© 2003 BEA Systems, Inc.

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

See Also:
Serialized Form

Field Summary
protected  PortletInstance portletInstance
           
 
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)
           
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)
           
 
Method Summary
 String getBackingFile()
           
 int getCacheExpires()
          Getter for cache TTL
 String getContentUri()
           
 String getDefinitionLabel()
           
 String getDescription()
           
 String getEditUri()
          Getter for the edit content.
 String getHelpUri()
          Getter for the help content.
 String getInstanceLabel()
           
 LocalizationIntersectionId getLocalizationIntersectionId()
           
 LocalizationResource getLocalizationResource()
           
 MarkupDefinitionId getMarkupDefinitionId()
           
 PlaceableDefinitionId getPlaceableDefinitionId()
           
 PlacementId getPlacementId()
           
 PortletDefinitionId getPortletDefinitionId()
           
 String getPortletFile()
          Getter for returning the relative path of the .portlet file representing this portlet.
 PortletInstanceId getPrimaryInstanceId()
           
 ThemeDefinitionId getThemeDefinitionId()
           
 String getTitle()
           
 short getTitlebarOrientation()
           
 String getWebAppName()
           
 boolean isDefaultMinimized()
           
 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 isPublic()
           
 boolean isRenderCacheable()
          Getter for property renderCacheable.
 void setBackingFile(String backingFile)
           
 void setCacheExpires(int cacheExpires)
          Setter for the cache TTL. -1 indacates not to cache
 void setContentUri(String contentUri)
           
 void setDefaultMinimized(boolean defaultMinimized)
           
 void setDefinitionLabel(String definitionLabel)
           
 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)
           
 void setLocalizationResource(LocalizationResource localizationResource)
           
 void setMarkupDefinitionId(MarkupDefinitionId markupDefinitionId)
           
 void setPortletFile(String portletFile)
          Setter for setting the relative path of the .portlet file representing this portlet.
 void setPublic(boolean _public)
           
 void setRenderCacheable(boolean renderCacheable)
          Setter for property renderCacheable.
 void setThemeDefinitionId(ThemeDefinitionId themeDefinitionId)
           
 void setTitlebarOrientation(short titlebarOrientation)
           
 void setWebAppName(String webAppName)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

portletInstance

protected PortletInstance portletInstance
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)

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

getPlaceableDefinitionId

public PlaceableDefinitionId getPlaceableDefinitionId()
Specified by:
getPlaceableDefinitionId in interface PlaceableDefinition

getPortletDefinitionId

public PortletDefinitionId getPortletDefinitionId()

getPlacementId

public PlacementId getPlacementId()
Specified by:
getPlacementId in interface PlaceableDefinition

getMarkupDefinitionId

public MarkupDefinitionId getMarkupDefinitionId()

setMarkupDefinitionId

public void setMarkupDefinitionId(MarkupDefinitionId markupDefinitionId)

getContentUri

public String getContentUri()

setContentUri

public void setContentUri(String contentUri)

getBackingFile

public String getBackingFile()

setBackingFile

public void setBackingFile(String backingFile)

getDefinitionLabel

public String getDefinitionLabel()
Specified by:
getDefinitionLabel in interface PlaceableDefinition

setDefinitionLabel

public void setDefinitionLabel(String definitionLabel)

isPublic

public boolean isPublic()

setPublic

public void setPublic(boolean _public)

getLocalizationResource

public LocalizationResource getLocalizationResource()
Specified by:
getLocalizationResource in interface PlaceableDefinition

setLocalizationResource

public void setLocalizationResource(LocalizationResource localizationResource)

getLocalizationIntersectionId

public LocalizationIntersectionId getLocalizationIntersectionId()

getThemeDefinitionId

public ThemeDefinitionId getThemeDefinitionId()

setThemeDefinitionId

public void setThemeDefinitionId(ThemeDefinitionId themeDefinitionId)

getTitlebarOrientation

public short getTitlebarOrientation()

setTitlebarOrientation

public void setTitlebarOrientation(short titlebarOrientation)

isDefaultMinimized

public boolean isDefaultMinimized()

setDefaultMinimized

public void setDefaultMinimized(boolean defaultMinimized)

getPrimaryInstanceId

public PortletInstanceId getPrimaryInstanceId()

getInstanceLabel

public String getInstanceLabel()

setInstanceLabel

public void setInstanceLabel(String instanceLabel)

getTitle

public String getTitle()
Specified by:
getTitle in interface PlaceableDefinition

getDescription

public String getDescription()
Specified by:
getDescription in interface PlaceableDefinition

isRenderCacheable

public boolean isRenderCacheable()
Getter for property renderCacheable.

Returns:
a boolean indicating if the portelt is cacheable.

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.

getCacheExpires

public int getCacheExpires()
Getter for cache TTL

Returns:
Number of seconbds before cache expires.

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.

isForkRender

public boolean isForkRender()
Getter for property forkRender.

Returns:
true if this portlet will be multi threaded.

setForkRender

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

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

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

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.

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.

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.

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.

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.

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.

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.

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.

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.

getWebAppName

public String getWebAppName()
Specified by:
getWebAppName in interface PlaceableDefinition

setWebAppName

public void setWebAppName(String webAppName)

toString

public String toString()
Overrides:
toString in class Object

© 2003 BEA Systems, Inc.

Copyright © 2003 BEA Systems, Inc. All Rights Reserved