Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.portal.provider.v1
Interface Portlet

All Known Subinterfaces:
  MobilePortlet, MutableMobilePortlet, MutablePortlet, MutablePortletXtra2, MutablePortletXtra3, PortletXtra2, PortletXtra3

public interface Portlet

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:

- Uses the `Provider` to get the `Portlet` that corresponds to the request.
- Constructs a `PortletRenderRequest` from the available information.
- Gets the `PortletRenderer` from the `Portlet` by calling `getPortletRenderer()`.
- Calls `renderer.render()`.

The renderer in turn:

- Gets the `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.
- Gets the `PersonalizationManager` from the request.
- Asks the `PersonalizationManager` for the personalization information corresponding to the `PortletReference` contained in the request.
- Renders the response using the information from the `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

### init

    public void init(Provider p)

  Initializes the Portlet. At its simpliest it registers the provider this Portlet is managed by. Needed because framework uses a null constructor.

### getSecurityManager

    public PortletSecurityManager getSecurityManager()

  Gets the security manager for this portlet. The security manager is used to check whether a user is authorized to perform a specific action. It is valid for a Portlet to not have a security manager. I.e. this method can return null. If there is no security manager it is assumed that all users have unrestricted access.

### getPersonalizationManager

    public PortletPersonalizationManager getPersonalizationManager()

  Gets the personalization manager for this portlet. The personalization manager provides the interface between the renderer and the personalization store that allows the renderer to get the user customizations for this rendition. It is valid for a Portlet to not have a personalization manager. I.e. this method can return null.

### getRenderer

    public PortletRenderer getRenderer()

  Gets the renderer for this portlet. The renderer is responsible for emitting the visual aspects of the portlet (as markup). All portlets must have a renderer.

### getProvider

    public Provider getProvider()

  Gets the Provider of this Portlet.
  Returns:
    the Provider that manages this Portlet.

### getResourceBundle

    public java.util.ResourceBundle getResourceBundle(java.util.Locale l)

  Gets the string resource (bundle) for this Portlet. This is the resource bundle that stores the meta-data string values for this portlet. I.e. if this portlet has been internationalized different translations are provided the meta-data values returned by this interface. This method returns the resource bundle containing these resources.
  Returns:
    the string resource (bundle) for this Portlet. null if there isn't one.

### getDefaultLocale

    public java.util.Locale getDefaultLocale()

  Returns this Portlet's default locale.

### getName

    public java.lang.String getName(java.util.Locale l)

  Gets the Portlet name.
  Parameters:
    `The` - Locale the name should be represented in.
  Returns:
    the Portlet name. This is the Portlet's non-unique display name.

### getId

    public long getId()

  Gets the Portlet unique ID. This ID must be unique within this Portlet's Provider. It must also be immutable. It need not be sequential.
  Returns:
    the Portlet (unique ID. Value should be unique with respect to the Provider.

### getTitle

    public java.lang.String getTitle(java.util.Locale l)

  Gets the Portlet title.
  Parameters:
    `The` - Locale the name should be represented in.
  Returns:
    the title of this Portlet. This is the name that shows up in a portlet's title bar.

### getDescription

    public java.lang.String getDescription(java.util.Locale l)

### getInputParameters

    public PortletParameter[] getInputParameters()

  Gets an array of (input) parameters that this portlet recognizes when requested to render to control/affect the rendering.
  Returns:
    array of PortletParameters.

### getAcceptContentTypes

    public java.lang.String[] getAcceptContentTypes()

  Gets an array of mime-types (represented as Strings) that this Portlet can render. For example {"text/html", "text/xml"}.
  Returns:
    array containing a list of mime-types.

### getTimeout

    public int getTimeout()

  Gets the number of seconds the portal should wait before timing out a request to this portlet.
  Returns:
    timeout period in seconds.

### getTimeoutMessage

    public 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.
  Parameters:
    `The` - Locale the timeout message should be represented in.
  Returns:
    Timeout message.

### hasShowEdit

    public boolean hasShowEdit()

  Returns `true` if this Portlet supports per user personalization, `false` otherwise.
  Returns:
    returns `true` if this Portlet supports per user personalization, `false` otherwise.

### getShowEditToPublic

    public boolean getShowEditToPublic()

  Deprecated. use PortletXtra3.getMinEditAuthLevel(), MutablePortletXtra3.setMinEditAuthLevel()

  Returns `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).
  Returns:
    returns `true` if this Portlet exposes per user personalization to the public (non-logged in) user, `false` otherwise.

### hasShowEditDefault

    public boolean hasShowEditDefault()

  Returns `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).
  Returns:
    returns true if this Portlet supports per portlet customization, false otherwise.

### hasShowPreview

    public boolean hasShowPreview()

  Returns `true` if this Portlet is capable of displaying a design-time preview of itself (after customization or personalization). Returns `false` otherwise.

### hasShowDetails

    public boolean hasShowDetails()

  Returns:
    returns `true` if this Portlet is capable of displaying a full-screen (detailed) version of itself.

### hasHelp

    public boolean hasHelp()

  Returns:
    returns `true` if this Portlet is capable of displaying help information.

### hasAbout

    public boolean hasAbout()

  Returns:
    returns `true` if this Portlet is capable of displaying about information.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD