Overview | Package | Class | Tree | Deprecated | Index | Help
| OracleAS PDK for Java 9.0.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.portal.provider.v2
Class PortletDefinition

    java.lang.Object
      |
      +--oracle.portal.provider.v2.PortletDefinition

All Implemented Interfaces:
  Validateable

Direct Known Subclasses:
  DefaultPortletDefinition

public class PortletDefinition
extends java.lang.Object
implements Validateable

A `PortletDefinition` is a sub-part of a `ProviderDefinition` that defines the properties of a single portlet. Again, a `PortletDefinition` is simply a container for meta data, and drives the behaviour of one or more `PortletInstance` objects which perform the portlet's functions. Users who require a richer set of portlet-level properties or accessors to these properties should feel free to use their own subclass.

It is recommended that you support multiple languages within portlet meta-data. This is accomplished by storing text in resource bundles and then registering the resource bundle by setting the `resource` property.

The following `PortletDefinition` properties can be specified via a resource bundle: `name`, `title`, `shortTitle`, `description`, and `timeoutMessage`. The `PortletConstants` interface defines constants for the resource names used to extract these properties from the resource file. Note that a resource look up for these properties will only occur if they are not set explicitly on the `PortletDefinition`.

It is also possible to define your own specific resource keys for each of the translatable strings by using the following properties: `nameKey`, `titleKey`, `shortTitleKey`, `descriptionKey`, and `timeoutMessageKey`.

Constructor Summary
`PortletDefinition()`

Method Summary
`void` | `addAcceptContentType(java.lang.String type)` Adds to the set of mime-types (represented as Strings) that this Portlet can render.
`void` | `addEvent(EventDefinition event)` Adds to the array of events that this portlet can raise to Portal.
`void` | `addInputParameter(ParameterDefinition parameter)` Adds to the array of (input) parameters that this portlet recognizes when requested to render to control/affect the rendering.
`boolean` | `callGetPortlet()` Returns `true` if calls to retrieve this portlet's meta data should be made before displaying in the portlet repository.
`boolean` | `callIsRunnable()` Returns `true` if calls to `hasAccess(oracle.portal.provider.v2.ProviderInstance, oracle.portal.provider.v2.ProviderUser)` should be made to determine whether this portlet is runnable, before displaying it in the portlet repository.
`void` | `deregister(ProviderInstance pi)` Called on each of a Provider instance's `PortletDefinition`s when the provider is deregistered from a Portal.
`java.lang.String[]` | `getAcceptContentTypes()` Gets an array of mime-types (represented as Strings) that this Portlet can render.
`int` | `getCacheLevel()` Returns the caching level used for portlet render requests.
`PortletContainerRenderer` | `getContainerRenderer()` Returns the controller that will render this portlet's container.
`java.util.Locale` | `getDefaultLocale()` Gets this Portlet's default locale.
`java.lang.String` | `getDescription(java.util.Locale l)` Gets the portlet description.
`java.lang.String` | `getDescriptionKey()` Gets the the key used to look up this portlet's description from a resource bundle.
`EventDefinition[]` | `getEvents()` Gets the array of events that this portlet can raise to Portal.
`long` | `getId()` Gets the portlet unique ID.
`ParameterDefinition[]` | `getInputParameters()` Gets an array of (input) parameters that this portlet recognizes when requested to render to control/affect the rendering.
`int` | `getLocalePersonalizationLevel()` Gets the locale personalization level for this `PortletDefinition`.
`int` | `getMinEditAuthLevel()` Returns the minimum user authentication level required for the customize link to be displayed in the portlet header If the authentication level of a user is less than the minimum authentication level specified, the customize link will not be displayed in the portlet header.
`MobileFlags` | `getMobileFlags()` Returns the portlet's mobile settings as a bitwise flag.
`java.lang.String` | `getName(java.util.Locale l)` Gets the portlet name.
`java.lang.String` | `getNameKey()` Gets the the key used to look up this portlet's name from a resource bundle.
`boolean` | `getPassAllUrlParams()` Determines whether Portal should always pass the requested page's URL parameters to the portlet.
`oracle.webdb.provider.v2.builder.BuilderMetaData` | `getPortletBuilder()` Each portlet can specifiy the builder attached to edit this portlet.
`java.lang.Class` | `getPortletInstanceClass()` Returns the `Class` representing the `PortletInstance` class or subclass that implements the portlet's behaviour.
`PreferenceStore` | `getPreferenceStore()` Gets the default `PreferenceStore` that should be used by the portlet and all its child objects for which a preference store has not been chosen explicitly.
`ProviderDefinition` | `getProviderDefinition()` Gets the ProviderDefinition that owns this portlet.
`java.util.ResourceBundle` | `getResourceBundle(java.util.Locale l)` Gets the string resource (bundle) for this Portlet.
`boolean` | `getRewriteUrls()` Determines whether URL rewriting will be performed on the result of a portlet render request.
`java.lang.String` | `getShortTitle(java.util.Locale l)` Gets the portlet short title.
`java.lang.String` | `getShortTitleKey()` Gets the key used to look up this portlet's short title from a resource bundle.
`boolean` | `getShowEditToPublic()` Deprecated. use `getMinEditAuthLevel()` to specify the minimum authentication level needed to edit the portlet
`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` | `getTimeoutMessageKey()` Gets the the key used to look up this portlet's timeout message from a resource bundle.
`java.lang.String` | `getTitle(java.util.Locale l)` Gets the portlet title.
`java.lang.String` | `getTitleKey()` Gets the key used to look up this portlet's title from a resource bundle.
`boolean` | `hasAbout()` Returns `true` if this portlet is capable of displaying about information.
`boolean` | `hasAccess(ProviderInstance pi, ProviderUser user)` Verifies whether the user is authorized to use instances of this `PortletDefinition`.
`boolean` | `hasHelp()` Returns `true` if this portlet is capable of displaying help information.
`boolean` | `hasShowDetails()` Returns `true` if this portlet is capable of displaying a full-screen (detailed) version of itself.
`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` | `hasShowLink()` Returns `true` if this portlet is capable of rendering content for link mode.
`boolean` | `hasShowPreview()` Returns `true` if this portlet is capable of displaying a design-time preview of itself (after customization or personalization).
`void` | `init(ProviderDefinition pd)` Should be called immediately after construction of a `PortletDefinition` to associate it with its parent `ProviderDefinition`.
`void` | `register(ProviderInstance pi)` Called on each of a Provider instance's `PortletDefinition`s when it is first registered on a Portal.
`void` | `setCacheLevel(int cacheLevel)` Sets the caching level used for portlet render requests.
`void` | `setCallGetPortlet(boolean value)` Controls whether calls to retrieve this Portlet's meta data should be made before displaying it in the portlet repository.
`void` | `setCallIsRunnable(boolean value)` Controls whether calls to `hasAccess(oracle.portal.provider.v2.ProviderInstance, oracle.portal.provider.v2.ProviderUser)` should be made to determine whether this portlet is runnable, before displaying it in the portlet repository.
`void` | `setContainerRenderer(PortletContainerRenderer renderer)` Sets the controller that will render this portlet's container.
`void` | `setDefaultLocale(java.util.Locale l)` Sets the default Locale for this Portal
`void` | `setDescription(java.lang.String description)` Sets the portlet description.
`void` | `setDescriptionKey(java.lang.String descriptionKey)` Sets the key used to look up the portlet's description in a resource bundle.
`void` | `setHasAbout(boolean hasAbout)` Controls whether this portlet displays about information.
`void` | `setHasHelp(boolean hasHelp)` Controls whether this portlet displays help information.
`void` | `setId(long id)` Sets the portlet unique ID.
`void` | `setLocalePersonalizationLevel(int level)` Sets the locale personalization level for this `PortletDefinition`.
`void` | `setMinEditAuthLevel(java.lang.String authLevel)` Sets the minimum user authentication level required for the customize link to be displayed in the portlet header If the authentication level of a user is less than the minimum authentication level specified, the customize link will not be displayed in the portlet header.
`void` | `setMobileFlags(long flags)` Sets the portlet's mobile settings.
`void` | `setName(java.lang.String name)` Sets the portlet name.
`void` | `setNameKey(java.lang.String nameKey)` Sets the key used to look up the portlet's name in a resource bundle.
`void` | `setPassAllUrlParams(boolean value)` Controls whether Portal will pass the requested page's URL parameters to the portlet.
`void` | `setPortletBuilder(oracle.webdb.provider.v2.builder.BuilderMetaData builderMetaData)` Each portlet can specifiy the builder attached to edit this portlet.
`void` | `setPortletInstanceClass(java.lang.Class c)` Defines the `PortletInstance` subclass that implements the portlet's behaviour.
`void` | `setPrefStoreName(java.lang.String preferenceStoreName)` Selects the default `PreferenceStore` that should be used by the portlet and all its child objects for which a preference store has not been chosen explicitly.
`void` | `setResource(java.lang.String resourceClassName)` Sets the name of the default resource bundle class for this Portlet.
`void` | `setRewriteUrls(boolean rewriteUrls)` Controls whether or not URL rewriting will be performed on the results of a portlet render request.
`void` | `setShortTitle(java.lang.String title)` Sets the portlet short title.
`void` | `setShortTitleKey(java.lang.String shortTitleKey)` Sets the key used to look up the portlet's short title in a resource bundle.
`void` | `setShowDetails(boolean hasDetails)` Controls whether this portlet displays "detailed" mode.
`void` | `setShowEdit(boolean canEdit)` Controls whether this portlet supports per user personalization.
`void` | `setShowEditDefault(boolean canEditDefault)` Controls whether this portlet supports per portlet customization.
`void` | `setShowEditToPublic(boolean canEdit)` Deprecated. use `setMinEditAuthLevel(java.lang.String)` to specify the minimum authentication level needed to edit the portlet
`void` | `setShowLink(boolean value)` Controls whether this portlet is capable of rendering content for link mode.
`void` | `setShowPreview(boolean canPreview)` Controls whether this portlet is capable of displaying a design-time preview of itself (after customization or personalization).
`void` | `setTimeout(int timeout)` Sets the number of seconds the portal should wait before timing out a request to this portlet.
`void` | `setTimeoutMessage(java.lang.String msg)` Sets the timeout messsage that the portal should use in its response when a request to this portlet times out.
`void` | `setTimeoutMessageKey(java.lang.String timeoutMessageKey)` Sets the portlet timeout message key.
`void` | `setTitle(java.lang.String title)` Sets the portlet title.
`void` | `setTitleKey(java.lang.String titleKey)` Sets the portlet title key.
`void` | `validate()` Deprecated. All validation is handled by the `validate(String, ValidationError)` method specified by the `Validateable` interface.
`void` | `validate(java.lang.String context, ValidationError errors)` Validates the internal state of this `PortletDefinition` instance.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PortletDefinition

    public PortletDefinition()

Method Detail

### init

    public void init(ProviderDefinition pd)

  Should be called immediately after construction of a `PortletDefinition` to associate it with its parent `ProviderDefinition`.

  Parameters:
    `pd` - the parent provider definition.

### validate

    public void validate()
                  throws PortletException

  Deprecated. All validation is handled by the `validate(String, ValidationError)` method specified by the `Validateable` interface.

    `PortletException`

### getPortletInstanceClass

    public java.lang.Class getPortletInstanceClass()

  Returns the `Class` representing the `PortletInstance` class or subclass that implements the portlet's behaviour.

  Returns:
    a `Class` representing the `PortletInstance` subclass that implements the portlet's behaviour.

### setPortletInstanceClass

    public void setPortletInstanceClass(java.lang.Class c)

  Defines the `PortletInstance` subclass that implements the portlet's behaviour.

  Parameters:
    `c` - a `Class` representing the `PortletInstance` subclass that implements the portlet's behaviour.

### getProviderDefinition

    public ProviderDefinition getProviderDefinition()

  Gets the ProviderDefinition that owns this portlet.

  Returns:
    the ProviderDefinition that owns this portlet.

### getDefaultLocale

    public java.util.Locale getDefaultLocale()

  Gets this Portlet's default locale. If this has not been specified with either `setDefaultLocale(java.util.Locale)` or `ProviderDefinition.setDefaultLocale(Locale)`, the VM's default locale is returned.

### getResourceBundle

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

  Gets the string resource (bundle) for this Portlet.

  Parameters:
    `l` - the Locale of the resource bundle being requested.
  Returns:
    the string resource (bundle) for this Portlet, or null if there isn't one.

### setResource

    public void setResource(java.lang.String resourceClassName)

  Sets the name of the default resource bundle class for this Portlet.

  Parameters:
    `resourceClassName` - full name of class extending `ResourceBundle`.

### getName

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

  Gets the portlet name.

  Parameters:
    `l` - the Locale (language) the requested name should be retrieved/returned in.
  Returns:
    the portlet name. This is the Portlet's non-unique display name.

### getNameKey

    public java.lang.String getNameKey()

  Gets the the key used to look up this portlet's name from a resource bundle.

  Returns:
    the key used to look up this portlet's name from a resource bundle.

### getId

    public long getId()

  Gets the portlet unique ID.

  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:
    `l` - the Locale (language) the requested title should be retrieved/returned in.
  Returns:
    the title of this Portlet. This is the name that shows up in a portlet's title bar.

### getTitleKey

    public java.lang.String getTitleKey()

  Gets the key used to look up this portlet's title from a resource bundle.

  Returns:
    the key used to look up this portlet's title from a resource bundle.

### getShortTitle

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

  Gets the portlet short title. This is the name used when real estate is at a premium such as when rendering a mobile link.

  Parameters:
    `l` - the Locale (language) the requested short title should be retrieved / returned in.
  Returns:
    the short title of this Portlet.

### getShortTitleKey

    public java.lang.String getShortTitleKey()

  Gets the key used to look up this portlet's short title from a resource bundle.

  Returns:
    the key used to look up this portlet's short title from a resource bundle.

### getDescription

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

  Gets the portlet description. This is displayed at design-time along with the name when a user is choosing to add a portlet to a page.

  Parameters:
    `l` - the Locale (language) the requested description should be retrieved/returned in.
  Returns:
    a short description of what this portlet is.

### getDescriptionKey

    public java.lang.String getDescriptionKey()

  Gets the the key used to look up this portlet's description from a resource bundle.

  Returns:
    the key used to look up this portlet's description from a resource bundle.

### getInputParameters

    public ParameterDefinition[] getInputParameters()

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

  Returns:
    array of `ParameterDefinition`s.

### getEvents

    public EventDefinition[] getEvents()

  Gets the array of events that this portlet can raise to Portal.

  Returns:
    array of `EventDefinition`s.

### 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:
    `l` - the Locale (language) the requested timeout message should be retrieved/returned in.
  Returns:
    Timeout message.

### getTimeoutMessageKey

    public java.lang.String getTimeoutMessageKey()

  Gets the the key used to look up this portlet's timeout message from a resource bundle.

  Returns:
    the key used to look up this portlet's timeout message from a resource bundle.

### hasShowEdit

    public boolean hasShowEdit()

  Returns `true` if this portlet supports per user personalization, `false` otherwise.

  Returns:
    `true` if this portlet supports per user personalization, `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:
    `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.

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

### hasShowDetails

    public boolean hasShowDetails()

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

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

### hasHelp

    public boolean hasHelp()

  Returns `true` if this portlet is capable of displaying help information.

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

### hasAbout

    public boolean hasAbout()

  Returns `true` if this portlet is capable of displaying about information.

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

### hasShowLink

    public boolean hasShowLink()

  Returns `true` if this portlet is capable of rendering content for link mode.

  Returns:
    `true` if this portlet is capable of rendering content for link mode.

### callIsRunnable

    public boolean callIsRunnable()

  Returns `true` if calls to `hasAccess(oracle.portal.provider.v2.ProviderInstance, oracle.portal.provider.v2.ProviderUser)` should be made to determine whether this portlet is runnable, before displaying it in the portlet repository. If `false`, the portlet is treated as a public portlet visible to all users.

  Returns:
    `true` if calls to `hasAccess(oracle.portal.provider.v2.ProviderInstance, oracle.portal.provider.v2.ProviderUser)` should be made to this Portlet.

### callGetPortlet

    public boolean callGetPortlet()

  Returns `true` if calls to retrieve this portlet's meta data should be made before displaying in the portlet repository. If `false`, the default meta data will be used for all users.

  Returns:
    returns `true` if calls to retrieve this portlet's meta data should be made.

### getMobileFlags

    public MobileFlags getMobileFlags()

  Returns the portlet's mobile settings as a bitwise flag. The flags values are defined in the class `MobileFlags`.

  Returns:
    the portlet's mobile setting in a bitwise flag

### getPassAllUrlParams

    public boolean getPassAllUrlParams()

  Determines whether Portal should always pass the requested page's URL parameters to the portlet.

  Returns:
    boolean indicating whether Portal will always pass the requested page's URL parameters to the portlet.
  See Also:
    `setPassAllUrlParams(boolean)`

### getCacheLevel

    public int getCacheLevel()

  Returns the caching level used for portlet render requests.

  Returns:
    int the portlet's cache level.
  See Also:
    `setCacheLevel(int)`

### getRewriteUrls

    public boolean getRewriteUrls()

  Determines whether URL rewriting will be performed on the result of a portlet render request.

  Returns:
    boolean true if URL rewriting is to be performed. Otherwise false.
  See Also:
    `setRewriteUrls(boolean)`

### setName

    public void setName(java.lang.String name)

  Sets the portlet name.

  Parameters:
    `name` - the portlet name. This is the Portlet's non-unique display name.

### setNameKey

    public void setNameKey(java.lang.String nameKey)

  Sets the key used to look up the portlet's name in a resource bundle.

  Parameters:
    `nameKey` - the string value for the key used to look up the portlet's name in a resource bundle.

### setId

    public void setId(long id)

  Sets the portlet unique ID.

  Parameters:
    `id` - the portlet (unique ID). Value should be a long value, unique with respect to the Provider.

### setTitle

    public void setTitle(java.lang.String title)

  Sets the portlet title.

  Parameters:
    `title` - the title of this Portlet. This is the name that shows up in a portlet's title bar.

### setTitleKey

    public void setTitleKey(java.lang.String titleKey)

  Sets the portlet title key.

  Parameters:
    `titleKey` - the string value for the key used to look up the portlet's title in a resource bundle.

### setShortTitle

    public void setShortTitle(java.lang.String title)

  Sets the portlet short title.

### setShortTitleKey

    public void setShortTitleKey(java.lang.String shortTitleKey)

  Sets the key used to look up the portlet's short title in a resource bundle.

  Parameters:
    `shortTitleKey` - the string value for the key used to look up the portlet's short title in a resource bundle.

### setDescription

    public void setDescription(java.lang.String description)

  Sets the portlet description.

  Parameters:
    `description` - a short description of what this portlet is. Displayed at design-time along with the name and thumbnail image when a user is choosing to add a portlet to a page.

### setDescriptionKey

    public void setDescriptionKey(java.lang.String descriptionKey)

  Sets the key used to look up the portlet's description in a resource bundle.

  Parameters:
    `descriptionKey` - the string value for the key used to look up the portlet's description in a resource bundle.

### addInputParameter

    public void addInputParameter(ParameterDefinition parameter)

  Adds to the array of (input) parameters that this portlet recognizes when requested to render to control/affect the rendering.

  Parameters:
    `parameter` - a ParameterDefinition.

### addEvent

    public void addEvent(EventDefinition event)

  Adds to the array of events that this portlet can raise to Portal.

  Parameters:
    `event` - an EventDefinition.

### addAcceptContentType

    public void addAcceptContentType(java.lang.String type)

  Adds to the set of mime-types (represented as Strings) that this Portlet can render.

  Parameters:
    `type` - mime-type String, e.g. "text/html" or "text/xml".

### setTimeout

    public void setTimeout(int timeout)

  Sets the number of seconds the portal should wait before timing out a request to this portlet.

  Parameters:
    `timeout` - integer number of seconds.

### setTimeoutMessage

    public void setTimeoutMessage(java.lang.String msg)

  Sets the timeout messsage that the portal should use in its response when a request to this portlet times out.

  Parameters:
    `msg` - timeout message.

### setTimeoutMessageKey

    public void setTimeoutMessageKey(java.lang.String timeoutMessageKey)

  Sets the portlet timeout message key.

  Parameters:
    `timeoutMessageKey` - the string value for the key used to look up the portlet's timeout message in a resource bundle.

### setShowEdit

    public void setShowEdit(boolean canEdit)

  Controls whether this portlet supports per user personalization.

  Parameters:
    `canEdit` - Should be `true` if this portlet is to support per user personalization, `false` otherwise.

### setShowEditToPublic

    public void setShowEditToPublic(boolean canEdit)

  Deprecated. use `setMinEditAuthLevel(java.lang.String)` to specify the minimum authentication level needed to edit the portlet

  Controls whether this Portlet exposes per user personalization to the public non-logged in user.

  Parameters:
    `canEdit` - set to `true` to expose personalization to the public non-logged in user, `false` otherwise.

### setShowEditDefault

    public void setShowEditDefault(boolean canEditDefault)

  Controls whether this portlet supports per portlet customization. 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).

  Parameters:
    `canEditDefault` - Should be `true` if this Portlet supports per portlet customization, `false` otherwise.

### setShowPreview

    public void setShowPreview(boolean canPreview)

  Controls whether this portlet is capable of displaying a design-time preview of itself (after customization or personalization).

  Parameters:
    `canPreview` - Should be `true` if this portlet is capable of displaying a design-time preview of itself (after customization or personalization), or `false` otherwise.

### setShowDetails

    public void setShowDetails(boolean hasDetails)

  Controls whether this portlet displays "detailed" mode. Detailed mode is a full page mode where this portlet is expected to display a finer level of information.

  Parameters:
    `hasDetails` - Should be `true` if this portlet is capable of displaying a "detailed" mode, or `false` otherwise.

### setHasHelp

    public void setHasHelp(boolean hasHelp)

  Controls whether this portlet displays help information.

  Parameters:
    `hasHelp` - Should be `true` if this portlet is capable of displaying a help information, or `false` otherwise.

### setHasAbout

    public void setHasAbout(boolean hasAbout)

  Controls whether this portlet displays about information.

  Parameters:
    `hasAbout` - Should be `true` if this portlet is capable of displaying about information, or `false` otherwise.

### setDefaultLocale

    public void setDefaultLocale(java.util.Locale l)

  Sets the default Locale for this Portal

  Parameters:
    `l` - a `Locale`

### setShowLink

    public void setShowLink(boolean value)

  Controls whether this portlet is capable of rendering content for link mode.

  Parameters:
    `value` - boolean flag.

### setCallIsRunnable

    public void setCallIsRunnable(boolean value)

  Controls whether calls to `hasAccess(oracle.portal.provider.v2.ProviderInstance, oracle.portal.provider.v2.ProviderUser)` should be made to determine whether this portlet is runnable, before displaying it in the portlet repository.

  Parameters:
    `value` - Should be `true` if access checks should be made on a per-user basis before displaying the portlet in the portlet repository. If `false`, the portlet is treated as a public portlet visible to all users.

### setCallGetPortlet

    public void setCallGetPortlet(boolean value)

  Controls whether calls to retrieve this Portlet's meta data should be made before displaying it in the portlet repository.

  Parameters:
    `value` - If `true`, portal will retrieve the portlet meta data before displaying it in the portlet repository. If `false`, the default meta data will be used for all users.

### setMobileFlags

    public void setMobileFlags(long flags)

  Sets the portlet's mobile settings. The flags values are defined by the `MobileFlags` class.

### setPassAllUrlParams

    public void setPassAllUrlParams(boolean value)

  Controls whether Portal will pass the requested page's URL parameters to the portlet.

  Parameters:
    `value` - boolean indicating whether Portal should always pass the requested page's URL parameters to the portlet.
    - If `true`, then the portlet will receive all the (non-system) parameters from the page URL.
    - If `false` (the default) and the portlet declares input parameters, then the portlet will only receive values for its declared input parameters and private parameters which have been generated using `PortletRendererUtil.portletParameter(oracle.portal.provider.v2.render.PortletRenderRequest, java.lang.String)`. The parameter values will be determined by the usage of the portlet on a particular page.

### setCacheLevel

    public void setCacheLevel(int cacheLevel)
                       throws PortletException

  Sets the caching level used for portlet render requests. This controls the set of parameters sent to the provider in a render request and hence the "cache key" under which the returned markup is stored. This overrides the User/Session information entered for the provider on registration. The possible settings are:
  - `session`: both user and portal session information is required.
  - `user`: user information is required but no session information is required.
  - `system`: neither user information nor portal session information is required.

  Parameters:
    `cacheLevel` - int indicates the caching level - can be one of PortletConstants.CACHE_LEVEL_SYSTEM, PortletConstants.CACHE_LEVEL_USER, or PortletConstants.CACHE_LEVEL_SESSION. The cache level for a portlet render request is determined using the following order of precedence:
    - If specified, the portlet setting is used
    - If specified, the provider setting is used
    - If the provider is registered as "public" then the portlet will be called using the "public" user and cached at the system level
    - If the provider is registered as "user" and "portal session data" is requested then portlet will be cached at the session level
    - Otherwise, the portlet will be cached at user level
    `PortletException`

### setRewriteUrls

    public void setRewriteUrls(boolean rewriteUrls)

  Controls whether or not URL rewriting will be performed on the results of a portlet render request.

  If this method is called then the specified setting will override any equivalent provider setting. If this method is not called then the equivalent provider setting will be used for this portlet.

  Parameters:
    `rewriteUrls` - boolean true if URL rewriting is to be performed. Otherwise false.

### setPrefStoreName

    public void setPrefStoreName(java.lang.String preferenceStoreName)
                          throws PreferenceStoreException

  Selects the default `PreferenceStore` that should be used by the portlet and all its child objects for which a preference store has not been chosen explicitly.

  Parameters:
    `preferenceStoreName` - the name of one of the `PreferenceStore`s declared in the `ProviderDefinition`.
  Throws:
    `PreferenceStoreException` - if a `PreferenceStore` with the given name has not been defined.
  See Also:
    `getPreferenceStore()`

### getPreferenceStore

    public PreferenceStore getPreferenceStore()

  Gets the default `PreferenceStore` that should be used by the portlet and all its child objects for which a preference store has not been chosen explicitly. If this has not been set with `setPrefStoreName(java.lang.String)`, then the provider's default preference store, returned by `ProviderDefinition.getPreferenceStore()` will be returned if one has been defined, or `null` otherwise.

  Returns:
    the `PreferenceStore` that should be used by child objects by default if one has been defined, or `null` otherwise.

### getShowEditToPublic

    public boolean getShowEditToPublic()

  Deprecated. use `getMinEditAuthLevel()` to specify the minimum authentication level needed to edit the portlet

  Determines whether this Portlet exposes per user personalization to the public non-logged in user.

  Returns:
    `true` if the public (not logged in) user should be allowed to personalize this portlet. Otherwise `false`.

### getMinEditAuthLevel

    public int getMinEditAuthLevel()

  Returns the minimum user authentication level required for the customize link to be displayed in the portlet header If the authentication level of a user is less than the minimum authentication level specified, the customize link will not be displayed in the portlet header.

  Returns:
    the min. authentication level required to edit the portlet.

### setMinEditAuthLevel

    public void setMinEditAuthLevel(java.lang.String authLevel)
                             throws PortletException

  Sets the minimum user authentication level required for the customize link to be displayed in the portlet header If the authentication level of a user is less than the minimum authentication level specified, the customize link will not be displayed in the portlet header.

  Parameters:
    `authLevel` - minimum authentication level. Possible values are `"PUBLIC"`, `"WEAK"`, `"STRONG"`
    `PortletException`

### getContainerRenderer

    public PortletContainerRenderer getContainerRenderer()

  Returns the controller that will render this portlet's container. If this has not been set with `setContainerRenderer(oracle.portal.provider.v2.render.PortletContainerRenderer)`, then the provider's default container renderer, returned by `ProviderDefinition.getContainerRenderer()` will be returned. The container renderer is responsible for rendering the portlet container in each of the show modes the portlet supports.

  Returns:
    the portlet container renderer that should be used to render the container for this portlet

### setContainerRenderer

    public void setContainerRenderer(PortletContainerRenderer renderer)
                              throws PortletException

  Sets the controller that will render this portlet's container. The container renderer is responsible for rendering the portlet container in each of the show modes the portlet supports

  Parameters:
    `renderer` - the portlet container renderer
    `PortletException`

### register

    public void register(ProviderInstance pi)
                  throws java.io.IOException,
                         AccessControlException

  Called on each of a Provider instance's `PortletDefinition`s when it is first registered on a Portal. This gives a `PortletDefinition` a chance to initialize storage for the portlet. This default implementation does nothing. Subclasses should override.

    `java.io.IOException`
    `AccessControlException`

### deregister

    public void deregister(ProviderInstance pi)
                    throws java.io.IOException,
                           AccessControlException

  Called on each of a Provider instance's `PortletDefinition`s when the provider is deregistered from a Portal. This gives a `PortletDefinition` a chance to release storage for the portlet. This default implementation does nothing. Subclasses should override.

    `java.io.IOException`
    `AccessControlException`

### hasAccess

    public boolean hasAccess(ProviderInstance pi,
                             ProviderUser user)

  Verifies whether the user is authorized to use instances of this `PortletDefinition`. That is, does this user have the necessary privileges to create, get, copy, and destroy instances of this `PortletDefinition`.

  Parameters:
    `user` - the current user we are being asked to authorize.
  Returns:
    `true` is this user is authorized to access this portlet. This base implementation always returns `true`. Subclasses should override.

### getPortletBuilder

    public oracle.webdb.provider.v2.builder.BuilderMetaData getPortletBuilder()

  Each portlet can specifiy the builder attached to edit this portlet. This method returns the PortletBuilder associated with this portlet.

  Returns:
    PortletBuilder the portlet builder attribute for this portlet definition.

### setPortletBuilder

    public void setPortletBuilder(oracle.webdb.provider.v2.builder.BuilderMetaData builderMetaData)

  Each portlet can specifiy the builder attached to edit this portlet. This method sets a PortletBuilder with this portletDefinition.

  Parameters:
    `builderMetaData` - the PortletBuilder attribute for this Portlet Defintion.

### setLocalePersonalizationLevel

    public void setLocalePersonalizationLevel(int level)

  Sets the locale personalization level for this `PortletDefinition`. This level determines whether or not the portlet stores localized default personalization data and if so, at what level. Possible values are:

  - `PortletConstants.PERSONALIZATION_LEVEL_NONE` - in this case, there will be no localized default personalization data. All edit default operations affect the same data set, irrespective of the user's locale.
  - `PortletConstants.PERSONALIZATION_LEVEL_LANGUAGE` - in this case, localized default personalization data is stored and queried using the language code from the user's locale. For example, provided there are no user level customizations, users in locales "en-US" and "en-GB" will see the same localized defaults.
  - `PortletConstants.PERSONALIZATION_LEVEL_LOCALE` - in this case, localized default personalization data is stored and queried using the language and country codes from the user's locale.

  Note: this setting does not affect user level personalizations, just the default level.

  Parameters:
    `level` - the required locale personalization level.

### getLocalePersonalizationLevel

    public int getLocalePersonalizationLevel()

  Gets the locale personalization level for this `PortletDefinition`. If the level has not been specified, the enclosing `ProviderDefinition` is queried. See `ProviderDefinition.getLocalePersonalizationLevel()`. For more information on the locale personalization level, see `setLocalePersonalizationLevel(int)`.

  Returns:
    the locale personalization level for this `PortletDefinition`.

### validate

    public void validate(java.lang.String context,
                         ValidationError errors)

  Validates the internal state of this `PortletDefinition` instance. Errors found are reported using the supplied `ValidationError` instance.

  Specified by:
    `validate` in interface `Validateable`
  Parameters:
    `context` - The context of the calling instance.
    `errors` - The current list of errors.

Overview | Package | Class | Tree | Deprecated | Index | Help
| OracleAS PDK for Java 9.0.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2002,2003 Oracle Corporation. All Rights Reserved.