PortletDefinition Class

com.bea.netuix.application.definition
PortletDefinition Class

public class PortletDefinition

    extends Object
    implements PlaceableDefinition, Serializable

This class represents a persistant portlet.


Hierarchy
Object
  PortletDefinition
All Implemented Interfaces

PlaceableDefinition, Serializable

Field Summary

public static final byte
CLONE_BEFORE_WRITE
byte
protected PortletInstance
portletInstance
PortletInstance
public static final byte
READ_ONLY
byte
public static final byte
READ_WRITE
byte
 

Constructor Summary

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
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(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(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.
 

Method Summary

public String
getBackingFile()
Returns the name of the backing file for this portlet, if present, NULL otherwise.
public int
getCacheExpires()
Getter for cache TTL
public String
getContentUri()
Returns the content uri for this portlet.
public String
getDefinitionLabel()
Returns the definition label for this portlet.
public String
getDescription()
Retrieves this portlet's localized description from it's LocalizationResource.
public String
getEditUri()

Getter for the edit content.

public String
getHelpUri()

Getter for the help content.

public String
getInstanceLabel()
Returns the instance label for this portlet.
public LocalizationIntersectionId
getLocalizationIntersectionId()
Returns the LocalizationIntersectionId for this portlet.
public LocalizationResource
getLocalizationResource()
Returns the LocalizationResource associated with this PortletDefinition based on the locale of the request used for retrieving the PortletDefinition.
public MarkupDefinitionId
getMarkupDefinitionId()
Returns the MarkupDefinitionId for the MarkupDefinition associated with this portlet.
public PlaceableDefinitionId
getPlaceableDefinitionId()
Returns the PlaceableDefinitionId associated with this portlet.
public PlacementId
getPlacementId()
Returns the PlacementId for this portlet.
public PortletDefinitionId
getPortletDefinitionId()
Returns the PortletDefinitionId for this portlet.
public String
getPortletFile()
Getter for returning the relative path of the .portlet file representing this portlet.
public String
getPortletHandle()
Returns the portlet handle associated with this portlet if it is a WSRP remote portlet, NULL otherwise.
public byte[]
getPortletState()
Returns the portlet state for a WSRP remote portlet
public PortletInstanceId
getPrimaryInstanceId()
Returns the primary instance id of the portlet.
public String
getProducerHandle()
Returns the producer handle associated with this portlet if it is a WSRP remote portlet, NULL otherwise.
public byte
getStateChangeFlag()
Returns state change flag associated with this portlet if it is a WSRP remote portlet.
public ThemeDefinitionId
getThemeDefinitionId()
Returns the ThemeDefinitionId of theme associated with this PortletDefinition.
public String
getTitle()
Retrieves this portlet's localized title from it's LocalizationResource.
public short
getTitlebarOrientation()
Returns the titlebar orientation for this PortletDefinition
public String
getWebAppName()
Returns the name of the J2EE web application this portlet is scoped to.
public boolean
isDefaultMinimized()
Returns if this portlet is minimized by default.
public boolean
isDeleted()

Getter to determined if this portet definition has been deleted.

public boolean
isForkable()
Getter for the boolean indicating if this portlet is forkable.
public boolean
isForkRender()
Getter for property forkRender.
public boolean
isProducerOfferedPortlet()
Returns whether a WSRP remote portlet has not been customized by a WSRP consumer
public boolean
isPublic()
Returns whether this portlet is end-user created.
public boolean
isRenderCacheable()
Getter for property renderCacheable.
public boolean
isRequiresUrlTemplates()
Returns whether a WSRP remote portlet requires url templates
public boolean
isTemplatesStoredInSession()
Returns whether url templates are stored in the HttpSession for a WSRP remote portlet
public void
setBackingFile(String backingFile)
Sets the backing file for this portlet.
public void
setCacheExpires(int cacheExpires)
Setter for the cache TTL. -1 indacates not to cache
public void
setContentUri(String contentUri)
Sets the content uri for this portlet.
public void
setDefaultMinimized(boolean defaultMinimized)
Sets whether this portlet is default minimized.
public void
setDefinitionLabel(String definitionLabel)
Sets the definition label for this portlet.
public void
setDeleted(boolean deleted)
Getter to determined if this portet definition has been deleted.
public void
setEditUri(String editUri)

Setter for the edit content.

public void
setForkable(boolean forkable)
setter for the boolean indicating if this portlet is forkable.
public void
setForkRender(boolean forkRender)
Setter for property forkRender.
public void
setHelpUri(String helpUri)

Setter for the help content.

public void
setInstanceLabel(String instanceLabel)
Sets the instance label for this portlet.
public void
setLocalizationResource(LocalizationResource localizationResource)
Sets the LocalizationResource for this portlet.
public void
setMarkupDefinitionId(MarkupDefinitionId markupDefinitionId)
Sets the MarkupDefinitionId for this portlet.
public void
setPortletFile(String portletFile)
Setter for setting the relative path of the .portlet file representing this portlet.
public void
setPortletHandle(String portletHandle)
Sets the portlet handle for this portlet
public void
setPortletState(byte[] portletState)
Sets the portlet state for a WSRP remote portlet
public void
setProducerHandle(String producerHandle)
Sets the producer handle for this portlet
public void
setProducerOfferedPortlet(boolean producerOfferedPortlet)
Sets whether a WSRP remote portlet is customized by a WSRP consumer
public void
setPublic(boolean _public)
Sets whether this portlet is end-user created.
public void
setRenderCacheable(boolean renderCacheable)
Setter for property renderCacheable.
public void
setRequiresUrlTemplates(boolean requiresUrlTemplates)
Sets whether a WSRP remote portlet requires url templates
public void
setStateChangeFlag(byte stateChangeFlag)
Sets state change flag
public void
setTemplatesStoredInSession(boolean templatesStoredInSession)
Sets whether url templates are stored in the HttpSession for a WSRP remote portlet
public void
setThemeDefinitionId(ThemeDefinitionId themeDefinitionId)
Associates a theme with this portlet.
public void
setTitlebarOrientation(short titlebarOrientation)
Sets the titlebar orientation for this portlet
public void
setWebAppName(String webAppName)
Scopes this portlet to specified J2EE web application
public String
toString()
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
   
Methods from interface com.bea.netuix.application.definition.PlaceableDefinition
getDefinitionLabel, getDescription, getLocalizationResource, getPlaceableDefinitionId, getPlacementId, getTitle, getWebAppName
 

Field Detail

CLONE_BEFORE_WRITE

public static final byte CLONE_BEFORE_WRITE


portletInstance

protected PortletInstance portletInstance


READ_ONLY

public static final byte READ_ONLY


READ_WRITE

public static final byte READ_WRITE

 

Constructor Detail

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

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

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

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.
 

Method Detail

getBackingFile() Method

public String getBackingFile()
Returns the name of the backing file for this portlet, if present, NULL otherwise.


getCacheExpires() Method

public int getCacheExpires()
Getter for cache TTL

Returns

Number of seconbds before cache expires.

getContentUri() Method

public String getContentUri()
Returns the content uri for this portlet.

Returns

content uri

getDefinitionLabel() Method

public String getDefinitionLabel()
Returns the definition label for this portlet.

Returns

definition label

getDescription() Method

public String getDescription()
Retrieves this portlet's localized description from it's LocalizationResource.

Returns

localized description for this portlet

getEditUri() Method

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() Method

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() Method

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() Method

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() Method

public LocalizationResource getLocalizationResource()
Returns the LocalizationResource associated with this PortletDefinition based on the locale of the request used for retrieving the PortletDefinition.

Returns

LocalizationResource associated with this portlet

getMarkupDefinitionId() Method

public MarkupDefinitionId getMarkupDefinitionId()
Returns the MarkupDefinitionId for the MarkupDefinition associated with this portlet.

Returns

MarkupDefinitionId

Related Topics

MarkupDefinition


getPlaceableDefinitionId() Method

public PlaceableDefinitionId getPlaceableDefinitionId()
Returns the PlaceableDefinitionId associated with this portlet. Returns NULL when the PortletDefinition has not been retrieved by using the persistence API.

Returns

PlaceableDefinitionId associated with this portlet

Related Topics

PlaceableDefinition


getPlacementId() Method

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.

Returns

PlacementId for this portlet

getPortletDefinitionId() Method

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() Method

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() Method

public String getPortletHandle()
Returns the portlet handle associated with this portlet if it is a WSRP remote portlet, NULL otherwise.

Returns

portlet handle

getPortletState() Method

public byte[] getPortletState()
Returns the portlet state for a WSRP remote portlet

Returns

portlet state

getPrimaryInstanceId() Method

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() Method

public String getProducerHandle()
Returns the producer handle associated with this portlet if it is a WSRP remote portlet, NULL otherwise.

Returns

producer handle

getStateChangeFlag() Method

public byte getStateChangeFlag()
Returns state change flag associated with this portlet if it is a WSRP remote portlet.

Returns

state change flag

getThemeDefinitionId() Method

public ThemeDefinitionId getThemeDefinitionId()
Returns the ThemeDefinitionId of theme associated with this PortletDefinition.

Returns

ThemeDefinitionId

getTitle() Method

public String getTitle()
Retrieves this portlet's localized title from it's LocalizationResource.

Returns

localized title for this portlet

getTitlebarOrientation() Method

public short getTitlebarOrientation()
Returns the titlebar orientation for this PortletDefinition

Returns

menu orientation

getWebAppName() Method

public String getWebAppName()
Returns the name of the J2EE web application this portlet is scoped to.

Returns

name of web application

isDefaultMinimized() Method

public boolean isDefaultMinimized()
Returns if this portlet is minimized by default.

Returns

true if this portlet is minimized by default

isDeleted() Method

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() Method

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() Method

public boolean isForkRender()
Getter for property forkRender.

Returns

true if this portlet will be multi threaded.

isProducerOfferedPortlet() Method

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() Method

public boolean isPublic()
Returns whether this portlet is end-user created.

Returns

true if this portlet is end-user created.

isRenderCacheable() Method

public boolean isRenderCacheable()
Getter for property renderCacheable.

Returns

a boolean indicating if the portelt is cacheable.

isRequiresUrlTemplates() Method

public boolean isRequiresUrlTemplates()
Returns whether a WSRP remote portlet requires url templates

Returns

true if portlet requires url templates

isTemplatesStoredInSession() Method

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(String) Method

public void setBackingFile(String backingFile)
Sets the backing file for this portlet.


setCacheExpires(int) Method

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(String) Method

public void setContentUri(String contentUri)
Sets the content uri for this portlet.


setDefaultMinimized(boolean) Method

public void setDefaultMinimized(boolean defaultMinimized)
Sets whether this portlet is default minimized.

Parameters

defaultMinimized
true to set the portlet to minimized by default

setDefinitionLabel(String) Method

public void setDefinitionLabel(String definitionLabel)
Sets the definition label for this portlet.


setDeleted(boolean) Method

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(String) Method

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(boolean) Method

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(boolean) Method

public void setForkRender(boolean forkRender)
Setter for property forkRender.

Parameters

forkRender
true mean we will fork (multithred) the renderer.

setHelpUri(String) Method

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(String) Method

public void setInstanceLabel(String instanceLabel)
Sets the instance label for this portlet.


setLocalizationResource(LocalizationResource) Method

public void setLocalizationResource(LocalizationResource localizationResource)
Sets the LocalizationResource for this portlet.


setMarkupDefinitionId(MarkupDefinitionId) Method

public void setMarkupDefinitionId(MarkupDefinitionId markupDefinitionId)
Sets the MarkupDefinitionId for this portlet.


setPortletFile(String) Method

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(String) Method

public void setPortletHandle(String portletHandle)
Sets the portlet handle for this portlet


setPortletState(byte[]) Method

public void setPortletState(byte[] portletState)
Sets the portlet state for a WSRP remote portlet


setProducerHandle(String) Method

public void setProducerHandle(String producerHandle)
Sets the producer handle for this portlet


setProducerOfferedPortlet(boolean) Method

public void setProducerOfferedPortlet(boolean producerOfferedPortlet)
Sets whether a WSRP remote portlet is customized by a WSRP consumer


setPublic(boolean) Method

public void setPublic(boolean _public)
Sets whether this portlet is end-user created.


setRenderCacheable(boolean) Method

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(boolean) Method

public void setRequiresUrlTemplates(boolean requiresUrlTemplates)
Sets whether a WSRP remote portlet requires url templates


setStateChangeFlag(byte) Method

public void setStateChangeFlag(byte stateChangeFlag)
Sets state change flag


setTemplatesStoredInSession(boolean) Method

public void setTemplatesStoredInSession(boolean templatesStoredInSession)
Sets whether url templates are stored in the HttpSession for a WSRP remote portlet


setThemeDefinitionId(ThemeDefinitionId) Method

public void setThemeDefinitionId(ThemeDefinitionId themeDefinitionId)
Associates a theme with this portlet.

Parameters

themeDefinitionId
of theme associated with this portlet

setTitlebarOrientation(short) Method

public void setTitlebarOrientation(short titlebarOrientation)
Sets the titlebar orientation for this portlet


setWebAppName(String) Method

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() Method

public String toString()
Overrides
Object.toString()