|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.jetspeed.portal.portlets.AbstractPortlet
Should be used by most Portlets that wish to conform to default behavior
PERFORMANCE NOTE: getContent returns a StringElement that was generated on setContent(). This is used so that performance is increased since ECS does not have to work overtime to generate output.
| Field Summary | |
protected java.util.Hashtable |
content
Holds instances of ConcreteElements (Portlet output/content) based on its current CapabilityMap. |
| Fields inherited from interface org.apache.jetspeed.portal.Portlet |
PORTLET_MAXIMIZED, PORTLET_MINIMIZED, PORTLET_NORMAL |
| Constructor Summary | |
AbstractPortlet()
|
|
| Method Summary | |
boolean |
allowClose(org.apache.turbine.util.RunData rundata)
Implements the default close behavior: security permissions will be checked. |
boolean |
allowCustomize(org.apache.turbine.util.RunData rundata)
Implements the default customize behavior: security permissions will be checked. |
boolean |
allowInfo(org.apache.turbine.util.RunData rundata)
Implements the default info behavior: security permissions will be checked. |
boolean |
allowMaximize(org.apache.turbine.util.RunData rundata)
Implements the default maximize behavior: security permissions will be checked. |
boolean |
allowMinimize(org.apache.turbine.util.RunData rundata)
Implements the default info behavior: security permissions will be checked. |
boolean |
allowPrintFriendly(org.apache.turbine.util.RunData rundata)
Implements the default print friendly format behavior: security permissions will be checked. |
boolean |
allowView(org.apache.turbine.util.RunData rundata)
Implements the default view behavior: security permissions will be checked. |
protected void |
clearContent()
|
boolean |
getAllowEdit(org.apache.turbine.util.RunData rundata)
Is the portled editable/customizeable. |
boolean |
getAllowMaximize(org.apache.turbine.util.RunData rundata)
Can this portlet be maximized |
boolean |
getAllowView(org.apache.turbine.util.RunData rundata)
Is the portled viewable. |
java.lang.String |
getAttribute(java.lang.String attrName,
java.lang.String attrDefValue,
org.apache.turbine.util.RunData rundata)
Retrieve a portlet attribute from persistent storage |
org.apache.ecs.ConcreteElement |
getContent(org.apache.turbine.util.RunData rundata)
Returns an HTML representation of this portlet. |
org.apache.ecs.ConcreteElement |
getContent(org.apache.turbine.util.RunData rundata,
CapabilityMap map)
|
org.apache.ecs.ConcreteElement |
getContent(org.apache.turbine.util.RunData rundata,
CapabilityMap map,
boolean allowRecurse)
|
long |
getCreationTime()
Get the creation time for this Portlet |
java.lang.String |
getDescription()
Provide a description within PML if the user has specified one. |
java.lang.String |
getDescription(java.lang.String instanceDescription)
Provide a Description within PML if the user has specified one. |
java.lang.Long |
getExpirationMillis()
Set the expiration time in milliseconds. |
Expire |
getExpire()
Used by a Cacheable object to determine when it should expire itself from the cache. |
java.lang.String |
getHandle()
Used by the cache to get a unique reference on what you want to add and then retrieve in the future from the cache |
static java.lang.Object |
getHandle(java.lang.Object config)
Builds a new cache handle for this cacheable class with the specified config object. |
java.lang.String |
getID()
Retrieve a unique portlet id |
java.lang.String |
getImage()
Getter for property image. |
java.lang.String |
getImage(java.lang.String instanceImage)
Getter for property image. |
PortletInstance |
getInstance(org.apache.turbine.util.RunData rundata)
Gets the portlet instance associated with this portlet. |
java.lang.String |
getName()
Get the portlet's name |
PortletConfig |
getPortletConfig()
Get the config of this servlet |
java.lang.String |
getTitle()
Provide a title within PML if the user has specified one. |
java.lang.String |
getTitle(java.lang.String instanceTitle)
Provide a title within PML if the user has specified one. |
void |
init()
By default don't provide any initialization |
boolean |
isCacheable()
Is this portlet cacheable. |
boolean |
isClosed(org.apache.turbine.util.RunData rundata)
Returns true if this portlet is currently closed |
boolean |
isMinimized(org.apache.turbine.util.RunData rundata)
Returns true if this portlet is currently minimized |
boolean |
isShowTitleBar(org.apache.turbine.util.RunData rundata)
Returns TRUE if the title bar in should be displayed. |
boolean |
providesCustomization()
|
void |
refresh()
Usually called by caching system when portlet is marked as expired, but has not be idle longer then TimeToLive. |
void |
setAttribute(java.lang.String attrName,
java.lang.String attrValue,
org.apache.turbine.util.RunData rundata)
Stores a portlet attribute in persistent storage |
void |
setCacheable(boolean cacheable)
Set cachable. |
void |
setCachedObject(org.apache.turbine.services.cache.CachedObject cachedObject)
Set this portlet's cached object. |
void |
setClosed(boolean close,
org.apache.turbine.util.RunData rundata)
Toggles the portlet state between closed and normal |
protected void |
setContent(org.apache.ecs.ConcreteElement content)
|
protected void |
setContent(org.apache.ecs.ConcreteElement content,
CapabilityMap map)
|
protected void |
setContent(java.lang.String content)
|
void |
setCreationTime(long creationTime)
Set the creation time for this Portlet |
void |
setDescription(java.lang.String description)
Set the description for this Portlet |
void |
setExpirationMillis(long expirationMillis)
Sets the cache expiration time. |
void |
setHandle(java.lang.String handle)
Deprecated. cacheable classes should now implement a static getHandle(config) method |
void |
setID(java.lang.String id)
|
void |
setImage(java.lang.String image)
Setter for property image. |
void |
setMinimized(boolean minimize,
org.apache.turbine.util.RunData rundata)
Change the portlet visibility state ( minimized <-> normal ) |
void |
setName(java.lang.String name)
Set the name of the portlet |
void |
setPortletConfig(PortletConfig pc)
Set's the configuration of this servlet. |
void |
setTitle(java.lang.String title)
Set the title for this Portlet. |
void |
setTitle(java.lang.String title,
org.apache.turbine.util.RunData rundata)
|
boolean |
supportsType(MimeType mimeType)
Returns true portlet is able to output content for given mimetype |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.Hashtable content
| Constructor Detail |
public AbstractPortlet()
| Method Detail |
protected void clearContent()
protected void setContent(org.apache.ecs.ConcreteElement content)
protected void setContent(java.lang.String content)
protected void setContent(org.apache.ecs.ConcreteElement content,
CapabilityMap map)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic void refresh()
refresh in interface org.apache.turbine.services.cache.Refreshablepublic boolean isCacheable()
isCacheable in interface Cacheabletrue Cachablefalse Not cachablepublic void setCacheable(boolean cacheable)
setCacheable in interface Cacheablecacheable - true Portlet is cachablefalse Portlet is NOT cachablepublic Expire getExpire()
getExpire in interface Cacheablepublic final java.lang.String getHandle()
Used by the cache to get a unique reference on what you want to add and then retrieve in the future from the cache
Most implementations should just call the CacheHandleManager with the given params within the implementation and just return this.
getHandle in interface Cacheablepublic final void setHandle(java.lang.String handle)
setHandle in interface Cacheablehandle - Cache Handlepublic java.lang.Long getExpirationMillis()
getExpirationMillis in interface Cacheablepublic void setExpirationMillis(long expirationMillis)
setExpirationMillis in interface CacheableexpirationMillis - setExpirationMillis Expiration in milliseconds since epochpublic static java.lang.Object getHandle(java.lang.Object config)
config - The configuration object to use for building the handle
public void setCachedObject(org.apache.turbine.services.cache.CachedObject cachedObject)
setCachedObject in interface CacheablecachedObject - Cached Object associated to this portletpublic java.lang.String getName()
getName in interface Portletpublic void setName(java.lang.String name)
setName in interface Portletname - Name of the portletPortlet.getName()public PortletConfig getPortletConfig()
getPortletConfig in interface Portletpublic void setPortletConfig(PortletConfig pc)
setPortletConfig in interface Portletpublic org.apache.ecs.ConcreteElement getContent(org.apache.turbine.util.RunData rundata)
Portlet
getContent in interface Portletrundata - The RunData object for the current request
public org.apache.ecs.ConcreteElement getContent(org.apache.turbine.util.RunData rundata,
CapabilityMap map)
public org.apache.ecs.ConcreteElement getContent(org.apache.turbine.util.RunData rundata,
CapabilityMap map,
boolean allowRecurse)
rundata - The RunData object for the current requestpublic java.lang.String getDescription()
getDescription in interface Portletpublic java.lang.String getDescription(java.lang.String instanceDescription)
getDescription in interface PortletinstanceDescription - Description from PSML
public void setDescription(java.lang.String description)
Portlet
setDescription in interface Portletpublic java.lang.String getTitle()
getTitle in interface Portletpublic java.lang.String getTitle(java.lang.String instanceTitle)
getTitle in interface PortletinstanceTitle - Title from PSML
public void setTitle(java.lang.String title)
setTitle in interface Portlettitle - Portlet title.
public void setTitle(java.lang.String title,
org.apache.turbine.util.RunData rundata)
setTitle in interface Portletpublic java.lang.String getImage()
public java.lang.String getImage(java.lang.String instanceImage)
getImage in interface Portletpublic void setImage(java.lang.String image)
Portlet
setImage in interface Portletpublic boolean getAllowEdit(org.apache.turbine.util.RunData rundata)
getAllowEdit in interface Portletrundata - The RunData object for the current request
true Editing is allow
false Editing is NOT alowedpublic boolean getAllowView(org.apache.turbine.util.RunData rundata)
getAllowView in interface Portletrundata - The RunData object for the current request
true Viewing is allow
false Viewing is NOT alowed
Override this method to control your own View behaviorpublic boolean getAllowMaximize(org.apache.turbine.util.RunData rundata)
getAllowMaximize in interface Portletrundata - The RunData object for the current request
true Portlet can be maximizedfalse Portlet can NOT be maximized
public void init()
throws PortletException
init in interface PortletPortletExceptionpublic long getCreationTime()
Portlet
getCreationTime in interface Portletpublic void setCreationTime(long creationTime)
Portlet
setCreationTime in interface Portletpublic boolean supportsType(MimeType mimeType)
Portlet
supportsType in interface Portletpublic boolean allowClose(org.apache.turbine.util.RunData rundata)
allowClose in interface PortletStaterundata - The RunData object for the current requestpublic boolean isClosed(org.apache.turbine.util.RunData rundata)
isClosed in interface PortletStaterundata - The RunData object for the current request
public void setClosed(boolean close,
org.apache.turbine.util.RunData rundata)
setClosed in interface PortletStaterundata - The RunData object for the current requestpublic boolean allowInfo(org.apache.turbine.util.RunData rundata)
allowInfo in interface PortletStaterundata - The RunData object for the current requestpublic boolean allowCustomize(org.apache.turbine.util.RunData rundata)
allowCustomize in interface PortletStaterundata - The RunData object for the current requestpublic boolean allowMaximize(org.apache.turbine.util.RunData rundata)
allowMaximize in interface PortletStaterundata - The RunData object for the current requestpublic boolean allowMinimize(org.apache.turbine.util.RunData rundata)
allowMinimize in interface PortletStaterundata - The RunData object for the current requestpublic boolean allowView(org.apache.turbine.util.RunData rundata)
rundata - The RunData object for the current requestpublic boolean allowPrintFriendly(org.apache.turbine.util.RunData rundata)
allowPrintFriendly in interface PortletStaterundata - The RunData object for the current requestpublic boolean isMinimized(org.apache.turbine.util.RunData rundata)
isMinimized in interface PortletStaterundata - The RunData object for the current request
public void setMinimized(boolean minimize,
org.apache.turbine.util.RunData rundata)
setMinimized in interface PortletStateminimize - True if the portlet change to minimizedrundata - The RunData object for the current requestpublic boolean isShowTitleBar(org.apache.turbine.util.RunData rundata)
isShowTitleBar in interface Portletrundata - The RunData object for the current request
public java.lang.String getAttribute(java.lang.String attrName,
java.lang.String attrDefValue,
org.apache.turbine.util.RunData rundata)
getAttribute in interface PortletattrName - The attribute to retrieveattrDefValue - The value if the attr doesn't existsrundata - The RunData object for the current request
public void setAttribute(java.lang.String attrName,
java.lang.String attrValue,
org.apache.turbine.util.RunData rundata)
setAttribute in interface PortletattrName - The attribute to retrieverundata - The RunData object for the current requestpublic PortletInstance getInstance(org.apache.turbine.util.RunData rundata)
getInstance in interface Portletrundata - The RunData object for the current request
public java.lang.String getID()
Portlet
getID in interface Portletpublic void setID(java.lang.String id)
setID in interface Portletpublic boolean providesCustomization()
providesCustomization in interface Portlet
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||