org.apache.jetspeed.portal
Interface PortletConfig


public interface PortletConfig

The PortletConfig interface provides the portlet with information about itself. This information is used by the portlet as well as the portlet container to render the content.

See Also:
Portlet

Method Summary
 boolean canBeClosed()
          Returns whether the portlet can be closed or not.
 boolean canBeMaximized()
          Returns whether the portlet can be maximized or not.
 boolean canBeMinimized()
          Returns whether the portlet can be minimized or not.
 java.lang.String getAttribute(java.lang.String aName)
          Returns the value of the attribute with the given name.
 java.util.Enumeration getAttributeNames()
          Returns an enumeration of all attributes names that this configuration holds.
 java.lang.String getDescription(java.util.Locale aLocale)
          Returns the description of the portlet.
 java.lang.String getName()
          Returns the name of the portlet.
 PortletContext getPortletContext()
          Returns the portlet context that the caller is executing in.
 java.util.Locale[] getSupportedLocales()
          Returns an array of locales that are supported by the portlet.
 MediaType[] getSupportedMediaTypes()
          Returns an array of media-types that are supported by the portlet.
 java.lang.String getTitle(java.util.Locale aLocale)
          Returns the title of the portlet.
 

Method Detail

getName

public java.lang.String getName()
Returns the name of the portlet.
Returns:
the name

getTitle

public java.lang.String getTitle(java.util.Locale aLocale)
Returns the title of the portlet. The title is typically used in the title bar of the portlet.
Parameters:
aLocale - the locale that the title is required for
Returns:
the title

getDescription

public java.lang.String getDescription(java.util.Locale aLocale)
Returns the description of the portlet. The description should contain a summary of what the portlet does for the user.
Parameters:
aLocale - the locale that the description is required for
Returns:
the description

canBeMinimized

public boolean canBeMinimized()
Returns whether the portlet can be minimized or not.
Returns:
true if the portlet can be minimized
false otherwise

canBeMaximized

public boolean canBeMaximized()
Returns whether the portlet can be maximized or not.
Returns:
true if the portlet can be maximized
false otherwise

canBeClosed

public boolean canBeClosed()
Returns whether the portlet can be closed or not.
Returns:
true if the portlet can be closed
false otherwise

getSupportedLocales

public java.util.Locale[] getSupportedLocales()
Returns an array of locales that are supported by the portlet.
Returns:
the locales

getSupportedMediaTypes

public MediaType[] getSupportedMediaTypes()
Returns an array of media-types that are supported by the portlet.
Returns:
an array if media-types

getAttribute

public java.lang.String getAttribute(java.lang.String aName)
Returns the value of the attribute with the given name.
Parameters:
aName - the attribute name
Returns:
the attribute value

getAttributeNames

public java.util.Enumeration getAttributeNames()
Returns an enumeration of all attributes names that this configuration holds.
Returns:
an enumeration of attribute names
See Also:
getAttribute(String)

getPortletContext

public PortletContext getPortletContext()
Returns the portlet context that the caller is executing in. Having the portlet config return the portlet context is copied over from the Servlet API, however, personally I don't like this and would rather have the Portlet.init() method to take both the config and the context.
Returns:
the portlet context
See Also:
Portlet.init(org.apache.jetspeed.portal.PortletConfig)