Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.netuix.application.definition
Class PortletDefinition

    java.lang.Object
      com.bea.netuix.application.definition.PortletDefinition

All Implemented Interfaces:
  PlaceableDefinition, Serializable

public class PortletDefinition
extends Object
implements Serializable, PlaceableDefinition

This class represents a persistant portlet.

See Also:
  Serialized Form

Field Summary
`static byte` | `CLONE_BEFORE_WRITE`
`protected PortletInstance` | `portletInstance`
`static byte` | `READ_ONLY`
`static byte` | `READ_WRITE`

Constructor Summary
`` | `PortletDefinition(LocalizationResource localizationResource, MarkupDefinitionId markupDefinitionId, String contentUri, String backingFile, String definitionLabel, String instanceLabel, boolean forkable, boolean _public, ThemeDefinitionId themeDefinitionId, short titlebarOrientation, boolean defaultMinimized, boolean renderCacheable, int cacheExpires, boolean forkRender, String portletFile, boolean deleted, String helpUri, String editUri, String webAppName)` Contructor to create a new `PortletDefinition` object.
`` | `PortletDefinition(LocalizationResource localizationResource, MarkupDefinitionId markupDefinitionId, String contentUri, String backingFile, String definitionLabel, String instanceLabel, boolean forkable, boolean _public, ThemeDefinitionId themeDefinitionId, short titlebarOrientation, boolean defaultMinimized, boolean renderCacheable, int cacheExpires, boolean forkRender, String portletFile, boolean deleted, String helpUri, String editUri, String webAppName, String producerHandle, String portletHandle, byte stateChangeFlag, boolean requiresUrlTemplates, boolean templatesStoredInSession, byte[] portletState, boolean producerOfferedPortlet)` Overloaded constructor
`protected` | `PortletDefinition(MarkupDefinitionId markupDefinitionId, String contentUri, String backingFile, boolean forkable, boolean _public, boolean renderCacheable, int cacheExpires, boolean forkRender, String portletFile, boolean deleted, String helpUri, String editUri, String definitionLabel, String webAppName, PortletInstance portletInstance)` Overloaded constructor that takes a `PortletInstance`.
`protected` | `PortletDefinition(MarkupDefinitionId markupDefinitionId, String contentUri, String backingFile, boolean forkable, boolean _public, boolean renderCacheable, int cacheExpires, boolean forkRender, String portletFile, boolean deleted, String helpUri, String editUri, String definitionLabel, String webAppName, PortletInstance portletInstance, String producerHandle, String portletHandle, byte stateChangeFlag, boolean requiresUrlTemplates, boolean templatesStoredInSession, byte[] portletState, boolean producerOfferedPortlet)` Overloaded constructor

Method Summary
`String` | `getBackingFile()` Returns the name of the backing file for this portlet, if present, `NULL` otherwise.
`int` | `getCacheExpires()` Getter for cache TTL
`String` | `getContentUri()` Returns the content uri for this portlet.
`String` | `getDefinitionLabel()` Returns the definition label for this portlet.
`String` | `getDescription()` Retrieves this portlet's localized description from it's `LocalizationResource`.
`String` | `getEditUri()` Getter for the edit content.
`String` | `getHelpUri()` Getter for the help content.
`String` | `getInstanceLabel()` Returns the instance label for this portlet.
`LocalizationIntersectionId` | `getLocalizationIntersectionId()` Returns the `LocalizationIntersectionId` for this portlet.
`LocalizationResource` | `getLocalizationResource()` Returns the `LocalizationResource` associated with this `PortletDefinition` based on the locale of the request used for retrieving the `PortletDefinition`.
`MarkupDefinitionId` | `getMarkupDefinitionId()` Returns the `MarkupDefinitionId` for the `MarkupDefinition` associated with this portlet.
`PlaceableDefinitionId` | `getPlaceableDefinitionId()` Returns the `PlaceableDefinitionId` associated with this portlet.
`PlacementId` | `getPlacementId()` Returns the `PlacementId` for this portlet.
`PortletDefinitionId` | `getPortletDefinitionId()` Returns the `PortletDefinitionId` for this portlet.
`String` | `getPortletFile()` Getter for returning the relative path of the .portlet file representing this portlet.
`String` | `getPortletHandle()` Returns the portlet handle associated with this portlet if it is a WSRP remote portlet, `NULL` otherwise.
`byte[]` | `getPortletState()` Returns the portlet state for a WSRP remote portlet
`PortletInstanceId` | `getPrimaryInstanceId()` Returns the primary instance id of the portlet.
`String` | `getProducerHandle()` Returns the producer handle associated with this portlet if it is a WSRP remote portlet, `NULL` otherwise.
`byte` | `getStateChangeFlag()` Returns state change flag associated with this portlet if it is a WSRP remote portlet.
`ThemeDefinitionId` | `getThemeDefinitionId()` Returns the `ThemeDefinitionId` of theme associated with this `PortletDefinition`.
`String` | `getTitle()` Retrieves this portlet's localized title from it's `LocalizationResource`.
`short` | `getTitlebarOrientation()` Returns the titlebar orientation for this `PortletDefinition`
`String` | `getWebAppName()` Returns the name of the J2EE web application this portlet is scoped to.
`boolean` | `isDefaultMinimized()` Returns if this portlet is minimized by default.
`boolean` | `isDeleted()` Getter to determined if this portet definition has been deleted.
`boolean` | `isForkable()` Getter for the boolean indicating if this portlet is forkable.
`boolean` | `isForkRender()` Getter for property forkRender.
`boolean` | `isProducerOfferedPortlet()` Returns whether a WSRP remote portlet has not been customized by a WSRP consumer
`boolean` | `isPublic()` Returns whether this portlet is end-user created.
`boolean` | `isRenderCacheable()` Getter for property renderCacheable.
`boolean` | `isRequiresUrlTemplates()` Returns whether a WSRP remote portlet requires url templates
`boolean` | `isTemplatesStoredInSession()` Returns whether url templates are stored in the HttpSession for a WSRP remote portlet
`void` | `setBackingFile(String backingFile)` Sets the backing file for this portlet.
`void` | `setCacheExpires(int cacheExpires)` Setter for the cache TTL. -1 indacates not to cache
`void` | `setContentUri(String contentUri)` Sets the content uri for this portlet.
`void` | `setDefaultMinimized(boolean defaultMinimized)` Sets whether this portlet is default minimized.
`void` | `setDefinitionLabel(String definitionLabel)` Sets the definition label for this portlet.
`void` | `setDeleted(boolean deleted)` Getter to determined if this portet definition has been deleted.
`void` | `setEditUri(String editUri)` Setter for the edit content.
`void` | `setForkable(boolean forkable)` setter for the boolean indicating if this portlet is forkable.
`void` | `setForkRender(boolean forkRender)` Setter for property forkRender.
`void` | `setHelpUri(String helpUri)` Setter for the help content.
`void` | `setInstanceLabel(String instanceLabel)` Sets the instance label for this portlet.
`void` | `setLocalizationResource(LocalizationResource localizationResource)` Sets the `LocalizationResource` for this portlet.
`void` | `setMarkupDefinitionId(MarkupDefinitionId markupDefinitionId)` Sets the `MarkupDefinitionId` for this portlet.
`void` | `setPortletFile(String portletFile)` Setter for setting the relative path of the .portlet file representing this portlet.
`void` | `setPortletHandle(String portletHandle)` Sets the portlet handle for this portlet
`void` | `setPortletState(byte[] portletState)` Sets the portlet state for a WSRP remote portlet
`void` | `setProducerHandle(String producerHandle)` Sets the producer handle for this portlet
`void` | `setProducerOfferedPortlet(boolean producerOfferedPortlet)` Sets whether a WSRP remote portlet is customized by a WSRP consumer
`void` | `setPublic(boolean _public)` Sets whether this portlet is end-user created.
`void` | `setRenderCacheable(boolean renderCacheable)` Setter for property renderCacheable.
`void` | `setRequiresUrlTemplates(boolean requiresUrlTemplates)` Sets whether a WSRP remote portlet requires url templates
`void` | `setStateChangeFlag(byte stateChangeFlag)` Sets state change flag
`void` | `setTemplatesStoredInSession(boolean templatesStoredInSession)` Sets whether url templates are stored in the HttpSession for a WSRP remote portlet
`void` | `setThemeDefinitionId(ThemeDefinitionId themeDefinitionId)` Associates a theme with this portlet.
`void` | `setTitlebarOrientation(short titlebarOrientation)` Sets the titlebar orientation for this portlet
`void` | `setWebAppName(String webAppName)` Scopes this portlet to specified J2EE web application
`String` | `toString()`

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

Field Detail

### CLONE_BEFORE_WRITE

    public static final byte CLONE_BEFORE_WRITE

See Also:
  Constant Field Values

### portletInstance

    protected PortletInstance portletInstance

### READ_ONLY

    public static final byte READ_ONLY

See Also:
  Constant Field Values

### READ_WRITE

    public static final byte READ_WRITE

See Also:
  Constant Field Values

Constructor Detail

### PortletDefinition

    public PortletDefinition(LocalizationResource localizationResource,
                             MarkupDefinitionId markupDefinitionId,
                             String contentUri,
                             String backingFile,
                             String definitionLabel,
                             String instanceLabel,
                             boolean forkable,
                             boolean _public,
                             ThemeDefinitionId themeDefinitionId,
                             short titlebarOrientation,
                             boolean defaultMinimized,
                             boolean renderCacheable,
                             int cacheExpires,
                             boolean forkRender,
                             String portletFile,
                             boolean deleted,
                             String helpUri,
                             String editUri,
                             String webAppName)

  Contructor to create a new `PortletDefinition` object.

### PortletDefinition

    public PortletDefinition(LocalizationResource localizationResource,
                             MarkupDefinitionId markupDefinitionId,
                             String contentUri,
                             String backingFile,
                             String definitionLabel,
                             String instanceLabel,
                             boolean forkable,
                             boolean _public,
                             ThemeDefinitionId themeDefinitionId,
                             short titlebarOrientation,
                             boolean defaultMinimized,
                             boolean renderCacheable,
                             int cacheExpires,
                             boolean forkRender,
                             String portletFile,
                             boolean deleted,
                             String helpUri,
                             String editUri,
                             String webAppName,
                             String producerHandle,
                             String portletHandle,
                             byte stateChangeFlag,
                             boolean requiresUrlTemplates,
                             boolean templatesStoredInSession,
                             byte[] portletState,
                             boolean producerOfferedPortlet)

  Overloaded constructor

### PortletDefinition

    protected PortletDefinition(MarkupDefinitionId markupDefinitionId,
                                String contentUri,
                                String backingFile,
                                boolean forkable,
                                boolean _public,
                                boolean renderCacheable,
                                int cacheExpires,
                                boolean forkRender,
                                String portletFile,
                                boolean deleted,
                                String helpUri,
                                String editUri,
                                String definitionLabel,
                                String webAppName,
                                PortletInstance portletInstance)

  Overloaded constructor that takes a `PortletInstance`.

### PortletDefinition

    protected PortletDefinition(MarkupDefinitionId markupDefinitionId,
                                String contentUri,
                                String backingFile,
                                boolean forkable,
                                boolean _public,
                                boolean renderCacheable,
                                int cacheExpires,
                                boolean forkRender,
                                String portletFile,
                                boolean deleted,
                                String helpUri,
                                String editUri,
                                String definitionLabel,
                                String webAppName,
                                PortletInstance portletInstance,
                                String producerHandle,
                                String portletHandle,
                                byte stateChangeFlag,
                                boolean requiresUrlTemplates,
                                boolean templatesStoredInSession,
                                byte[] portletState,
                                boolean producerOfferedPortlet)

  Overloaded constructor

Method Detail

### getBackingFile

    public String getBackingFile()

  Returns the name of the backing file for this portlet, if present, `NULL` otherwise.

  Returns:

### getCacheExpires

    public int getCacheExpires()

  Getter for cache TTL

  Returns:
    Number of seconbds before cache expires.

### getContentUri

    public String getContentUri()

  Returns the content uri for this portlet.

  Returns:
    content uri

### getDefinitionLabel

    public String getDefinitionLabel()

  Returns the definition label for this portlet.

  Specified by:
    `getDefinitionLabel` in interface `PlaceableDefinition`
  Returns:
    definition label

### getDescription

    public String getDescription()

  Retrieves this portlet's localized description from it's `LocalizationResource`.

  Specified by:
    `getDescription` in interface `PlaceableDefinition`
  Returns:
    localized description for this portlet

### getEditUri

    public String getEditUri()

  Getter for the edit content. The Edit uri is the uri to the JSP or HTML page to be displayed when the portlet is in edit mode.

  Returns:
    A uri or null if none exist.

### getHelpUri

    public String getHelpUri()

  Getter for the help content. The Help uri is the uri to the JSP or HTML page to be displayed when the portlet is in help mode.

  Returns:
    A uri or null if none exist.

### getInstanceLabel

    public String getInstanceLabel()

  Returns the instance label for this portlet. Returns `NULL` if this portlet has not been retrieved using the persistence API.

  Returns:
    instance label

### getLocalizationIntersectionId

    public LocalizationIntersectionId getLocalizationIntersectionId()

  Returns the `LocalizationIntersectionId` for this portlet. Returns `NULL` if no LocalizationResource is associated with this portlet. A `LocalizationIntersectionId` is a reference to all localized versions of title and description for an entity.

  Returns:
    `LocalizationIntersectionId` for this portlet

### getLocalizationResource

    public LocalizationResource getLocalizationResource()

  Returns the `LocalizationResource` associated with this `PortletDefinition` based on the locale of the request used for retrieving the `PortletDefinition`.

  Specified by:
    `getLocalizationResource` in interface `PlaceableDefinition`
  Returns:
    `LocalizationResource` associated with this portlet

### getMarkupDefinitionId

    public MarkupDefinitionId getMarkupDefinitionId()

  Returns the `MarkupDefinitionId` for the `MarkupDefinition` associated with this portlet.

  Returns:
    `MarkupDefinitionId`
  See Also:
    `MarkupDefinition`

### getPlaceableDefinitionId

    public PlaceableDefinitionId getPlaceableDefinitionId()

  Returns the `PlaceableDefinitionId` associated with this portlet. Returns `NULL` when the PortletDefinition has not been retrieved by using the persistence API.

  Specified by:
    `getPlaceableDefinitionId` in interface `PlaceableDefinition`
  Returns:
    `PlaceableDefinitionId` associated with this portlet
  See Also:
    `PlaceableDefinition`

### getPlacementId

    public PlacementId getPlacementId()

  Returns the `PlacementId` for this portlet. May be `NULL` if this portlet is not placed or if it has not been retrieved using the persistence API.

  Specified by:
    `getPlacementId` in interface `PlaceableDefinition`
  Returns:
    `PlacementId` for this portlet
  Excluded: Should not appear in public javadocs

### getPortletDefinitionId

    public PortletDefinitionId getPortletDefinitionId()

  Returns the `PortletDefinitionId` for this portlet. Returns `NULL` when the PortletDefinition has not been retrieved by using the persistence API.

  Returns:
    `PortletDefinitionId` for this portlet

### getPortletFile

    public String getPortletFile()

  Getter for returning the relative path of the .portlet file representing this portlet. Note: not all portlet have .portlet files (portlets created via the API instead of the IDE)

  Returns:
    the relative path name of the .portlet file.

### getPortletHandle

    public String getPortletHandle()

  Returns the portlet handle associated with this portlet if it is a WSRP remote portlet, `NULL` otherwise.

  Returns:
    portlet handle

### getPortletState

    public byte[] getPortletState()

  Returns the portlet state for a WSRP remote portlet

  Returns:
    portlet state

### getPrimaryInstanceId

    public PortletInstanceId getPrimaryInstanceId()

  Returns the primary instance id of the portlet. Returns `NULL` if this portlet has not been retrieved using the persistence API.

  Returns:
    `PortletInstanceId`

### getProducerHandle

    public String getProducerHandle()

  Returns the producer handle associated with this portlet if it is a WSRP remote portlet, `NULL` otherwise.

  Returns:
    producer handle

### getStateChangeFlag

    public byte getStateChangeFlag()

  Returns state change flag associated with this portlet if it is a WSRP remote portlet.

  Returns:
    state change flag

### getThemeDefinitionId

    public ThemeDefinitionId getThemeDefinitionId()

  Returns the `ThemeDefinitionId` of theme associated with this `PortletDefinition`.

  Returns:
    `ThemeDefinitionId`

### getTitle

    public String getTitle()

  Retrieves this portlet's localized title from it's `LocalizationResource`.

  Specified by:
    `getTitle` in interface `PlaceableDefinition`
  Returns:
    localized title for this portlet

### getTitlebarOrientation

    public short getTitlebarOrientation()

  Returns the titlebar orientation for this `PortletDefinition`

  Returns:
    menu orientation

### getWebAppName

    public String getWebAppName()

  Returns the name of the J2EE web application this portlet is scoped to.

  Specified by:
    `getWebAppName` in interface `PlaceableDefinition`
  Returns:
    name of web application

### isDefaultMinimized

    public boolean isDefaultMinimized()

  Returns if this portlet is minimized by default.

  Returns:
    true if this portlet is minimized by default

### isDeleted

    public boolean isDeleted()

  Getter to determined if this portet definition has been deleted. This is set by the system if the `.portlet` file has been removed from the file system. Because the consequences of deleting the porteltDefinition and all it's instances would be a costly and perminent, we just mark the portlet definition as being deleted and then the admin can permanently delete it via his admin tools.

  Returns:
    tru if the portlet has been marked deleted.

### isForkable

    public boolean isForkable()

  Getter for the boolean indicating if this portlet is forkable. This value is set by the developer in the .protlet file to indicate if the portlet can be set multithreaded by the system administrator.

  Returns:
    true if this portlet can be forked

### isForkRender

    public boolean isForkRender()

  Getter for property forkRender.

  Returns:
    true if this portlet will be multi threaded.

### isProducerOfferedPortlet

    public boolean isProducerOfferedPortlet()

  Returns whether a WSRP remote portlet has not been customized by a WSRP consumer

  Returns:
    true if a WSRP remote portlet has not been customized by a WSRP consumer

### isPublic

    public boolean isPublic()

  Returns whether this portlet is end-user created.

  Returns:
    true if this portlet is end-user created.

### isRenderCacheable

    public boolean isRenderCacheable()

  Getter for property renderCacheable.

  Returns:
    a boolean indicating if the portelt is cacheable.

### isRequiresUrlTemplates

    public boolean isRequiresUrlTemplates()

  Returns whether a WSRP remote portlet requires url templates

  Returns:
    true if portlet requires url templates

### isTemplatesStoredInSession

    public boolean isTemplatesStoredInSession()

  Returns whether url templates are stored in the HttpSession for a WSRP remote portlet

  Returns:
    true if url templates are stored in the HttpSession

### setBackingFile

    public void setBackingFile(String backingFile)

  Sets the backing file for this portlet.

  Parameters:
    `backingFile` -

### setCacheExpires

    public void setCacheExpires(int cacheExpires)

  Setter for the cache TTL. -1 indacates not to cache./

  Parameters:
    `cacheExpires` - number of seconds before the cache expires.

### setContentUri

    public void setContentUri(String contentUri)

  Sets the content uri for this portlet.

  Parameters:
    `contentUri` -

### setDefaultMinimized

    public void setDefaultMinimized(boolean defaultMinimized)

  Sets whether this portlet is default minimized.

  Parameters:
    `defaultMinimized` - true to set the portlet to minimized by default

### setDefinitionLabel

    public void setDefinitionLabel(String definitionLabel)

  Sets the definition label for this portlet.

  Parameters:
    `definitionLabel` -

### setDeleted

    public void setDeleted(boolean deleted)

  Getter to determined if this portet definition has been deleted. This is set by the system if the `.portlet` file has been removed from the file system. Because the consequences of deleting the porteltDefinition and all it's instances would be a costly and perminent, we just mark the portlet definition as being deleted and then the admin can permanently delete it via his admin tools.

  Parameters:
    `deleted` - true if the portlet has been marked deleted.

### setEditUri

    public void setEditUri(String editUri)

  Setter for the edit content. The Edit uri is the uri to the JSP or HTML page to be displayed when the portlet is in edit mode.

  Parameters:
    `editUri` - a relative path to the JSP or html page.

### setForkable

    public void setForkable(boolean forkable)

  setter for the boolean indicating if this portlet is forkable. This value is set by the developer in the .protlet file to indicate if the portlet can be set multithreaded by the system administrator.

  Parameters:
    `forkable` - true if this portlet can be forked.

### setForkRender

    public void setForkRender(boolean forkRender)

  Setter for property forkRender.

  Parameters:
    `forkRender` - true mean we will fork (multithred) the renderer.

### setHelpUri

    public void setHelpUri(String helpUri)

  Setter for the help content. The Help uri is the uri to the JSP or HTML page to be displayed when the portlet is in help mode.

  Parameters:
    `helpUri` - a relative path to the JSP or html page.

### setInstanceLabel

    public void setInstanceLabel(String instanceLabel)

  Sets the instance label for this portlet.

  Parameters:
    `instanceLabel` -

### setLocalizationResource

    public void setLocalizationResource(LocalizationResource localizationResource)

  Sets the `LocalizationResource` for this portlet.

  Parameters:
    `localizationResource` -

### setMarkupDefinitionId

    public void setMarkupDefinitionId(MarkupDefinitionId markupDefinitionId)

  Sets the `MarkupDefinitionId` for this portlet.

  Parameters:
    `markupDefinitionId` -

### setPortletFile

    public void setPortletFile(String portletFile)

  Setter for setting the relative path of the .portlet file representing this portlet. Note: not all portlets have .portlet files (portlets created via the API instead of the IDE)

  Parameters:
    `portletFile` - the relative path name of the .portlet file.

### setPortletHandle

    public void setPortletHandle(String portletHandle)

  Sets the portlet handle for this portlet

  Parameters:
    `portletHandle` -

### setPortletState

    public void setPortletState(byte[] portletState)

  Sets the portlet state for a WSRP remote portlet

  Parameters:
    `portletState` -

### setProducerHandle

    public void setProducerHandle(String producerHandle)

  Sets the producer handle for this portlet

  Parameters:
    `producerHandle` -

### setProducerOfferedPortlet

    public void setProducerOfferedPortlet(boolean producerOfferedPortlet)

  Sets whether a WSRP remote portlet is customized by a WSRP consumer

  Parameters:
    `producerOfferedPortlet` -

### setPublic

    public void setPublic(boolean _public)

  Sets whether this portlet is end-user created.

  Parameters:
    `_public` -

### setRenderCacheable

    public void setRenderCacheable(boolean renderCacheable)

  Setter for property renderCacheable. This property is set by the developer in the .portlet file. It is used to indicate that the portlet can be cached by the system administrator.

  Parameters:
    `renderCacheable` - true if the portlet can be cached.

### setRequiresUrlTemplates

    public void setRequiresUrlTemplates(boolean requiresUrlTemplates)

  Sets whether a WSRP remote portlet requires url templates

  Parameters:
    `requiresUrlTemplates` -

### setStateChangeFlag

    public void setStateChangeFlag(byte stateChangeFlag)

  Sets state change flag

  Parameters:
    `stateChangeFlag` -

### setTemplatesStoredInSession

    public void setTemplatesStoredInSession(boolean templatesStoredInSession)

  Sets whether url templates are stored in the HttpSession for a WSRP remote portlet

  Parameters:
    `templatesStoredInSession` -

### setThemeDefinitionId

    public void setThemeDefinitionId(ThemeDefinitionId themeDefinitionId)

  Associates a theme with this portlet.

  Parameters:
    `themeDefinitionId` - of theme associated with this portlet

### setTitlebarOrientation

    public void setTitlebarOrientation(short titlebarOrientation)

  Sets the titlebar orientation for this portlet

  Parameters:
    `titlebarOrientation` -

### setWebAppName

    public void setWebAppName(String webAppName)

  Scopes this portlet to specified J2EE web application

  Parameters:
    `webAppName` - name of the web application to scope this portlet to

### toString

    public String toString()

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 BEA Systems, Inc. All Rights Reserved