|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
A portlet implements a particular portal service. It is managed and exposed
to the portal via a Provider. A portlet is implemented as a set of controllers:
a renderer and optionally a personalization manager and a security manager.
The Portlet interface is a container for these controllers as well as portlet meta-data. The portlet design uses a controller model.
The meta-data specifies the static meta-data of this portlet; e.g. the id, name, etc.
The security manager (controller) is used to authorize a portlet user's actions.
See the PortletSecurityManager interface for further details.
The personalization manager (controller) provides access to and manages a portlet's
user customizations. See the PortletPersonalizatonManager interface for further details.
The renderer is responsible for all renditions(browser output) of the
portlet. See the PortletRenderer interface. for further details.
Controllers operate on logical portlet instance references. I.e. the object that represents a particular instance merely identifies the instance; it doesn't contain any additional actions. The controllers use this reference to map to their data model and perform their actions. This keeps the number of objects to a minumum ensuring maximum throughput.
By example, assume a portlet that implements user customizations. When asked to render, the framework:
Provider to get the Portlet that corresponds to
the request.PortletRenderRequest from the available information.PortletRenderer from the Portlet by calling
getPortletRenderer().renderer.render().SecurityManager from the request and checks with it to
see if the current user is authorized to render the corresponding
PortletReference contained in the request.PersonalizationManager from the request.PersonalizationManager for the personalization information
corresponding to the PortletReference contained in the request.PersonalizationManager as well as information contained in the
request.
| Method Summary | |
java.lang.String[] |
getAcceptContentTypes()
Gets an array of mime-types (represented as Strings) that this Portlet can render. |
java.util.Locale |
getDefaultLocale()
Returns this Portlet's default locale. |
java.lang.String |
getDescription(java.util.Locale l)
|
long |
getId()
Gets the Portlet unique ID. |
PortletParameter[] |
getInputParameters()
Gets an array of (input) parameters that this portlet recognizes when requested to render to control/affect the rendering. |
java.lang.String |
getName(java.util.Locale l)
Gets the Portlet name. |
PortletPersonalizationManager |
getPersonalizationManager()
Gets the personalization manager for this portlet. |
Provider |
getProvider()
Gets the Provider of this Portlet. |
PortletRenderer |
getRenderer()
Gets the renderer for this portlet. |
java.util.ResourceBundle |
getResourceBundle(java.util.Locale l)
Gets the string resource (bundle) for this Portlet. |
PortletSecurityManager |
getSecurityManager()
Gets the security manager for this portlet. |
boolean |
getShowEditToPublic()
Deprecated. use PortletXtra3.getMinEditAuthLevel(), MutablePortletXtra3.setMinEditAuthLevel() |
int |
getTimeout()
Gets the number of seconds the portal should wait before timing out a request to this portlet. |
java.lang.String |
getTimeoutMessage(java.util.Locale l)
Gets the timeout messsage that the portal should use in its response when a request to this Portlet times out. |
java.lang.String |
getTitle(java.util.Locale l)
Gets the Portlet title. |
boolean |
hasAbout()
|
boolean |
hasHelp()
|
boolean |
hasShowDetails()
|
boolean |
hasShowEdit()
Returns true if this Portlet supports per user personalization,
false otherwise. |
boolean |
hasShowEditDefault()
Returns true if this Portlet supports per portlet customization,
false otherwise. |
boolean |
hasShowPreview()
Returns true if this Portlet is capable of displaying a design-time
preview of itself (after customization or personalization). |
void |
init(Provider p)
Initializes the Portlet. |
| Method Detail |
public void init(Provider p)
public PortletSecurityManager getSecurityManager()
public PortletPersonalizationManager getPersonalizationManager()
public PortletRenderer getRenderer()
public Provider getProvider()
public java.util.ResourceBundle getResourceBundle(java.util.Locale l)
public java.util.Locale getDefaultLocale()
public java.lang.String getName(java.util.Locale l)
The - Locale the name should be represented in.public long getId()
public java.lang.String getTitle(java.util.Locale l)
The - Locale the name should be represented in.public java.lang.String getDescription(java.util.Locale l)
public PortletParameter[] getInputParameters()
public java.lang.String[] getAcceptContentTypes()
public int getTimeout()
public java.lang.String getTimeoutMessage(java.util.Locale l)
The - Locale the timeout message should be represented in.public boolean hasShowEdit()
true if this Portlet supports per user personalization,
false otherwise.true if this Portlet supports per user
personalization, false otherwise.public boolean getShowEditToPublic()
true if this Portlet exposes per user personalization to the
public (non-logged in) user. The default for portlets is false. In general
allowing the public user to personalize a portlet is a bad idea as the
personalization is seen by all public users. Instead it is recommended
that controlled users be allowed to edit the portlet's defaults which
are then exposed through to the public users (and any other user that
doesn't personalize the portlet).true if this Portlet exposes per user personalization to the
public (non-logged in) user, false otherwise.public boolean hasShowEditDefault()
true if this Portlet supports per portlet customization,
false otherwise. Per portlet customizations means that all users of this
instance see a customized version of the portlet vs. the generic version.
Users are then free to further personalize this instance (via showEdit).public boolean hasShowPreview()
true if this Portlet is capable of displaying a design-time
preview of itself (after customization or personalization). Returns
false otherwise.public boolean hasShowDetails()
true if this Portlet is capable of displaying a full-screen
(detailed) version of itself.public boolean hasHelp()
true if this Portlet is capable of displaying help
information.public boolean hasAbout()
true if this Portlet is capable of displaying about
information.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||