|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.jetspeed.portal.BasePortletSet
The PortletSet is basically a wrapper around an array of portlets. It provides runtime context for a set of portlets. A portlet can get its current set by calling via its PortletConfig
| Nested Class Summary |
| Nested classes inherited from class org.apache.jetspeed.portal.PortletSet |
PortletSet.Constraints |
| Field Summary |
| Fields inherited from interface org.apache.jetspeed.portal.Portlet |
PORTLET_MAXIMIZED, PORTLET_MINIMIZED, PORTLET_NORMAL |
| Constructor Summary | |
BasePortletSet()
Builds a new empty set for storing portlets |
|
BasePortletSet(PortletController controller)
Builds a new empty set for storing portlets with a default controller |
|
| Method Summary | |
void |
addPortlet(Portlet portlet)
Add a portlet to this set.It updates its config to modify the current set |
void |
addPortlet(Portlet portlet,
int position)
Add a portlet to this set.It updates its config to modify the current set |
void |
addPortlet(Portlet portlet,
PortletSet.Constraints constraints)
Add a portlet to this set.It updates its config to modify the current set |
void |
addPortlet(Portlet portlet,
PortletSet.Constraints constraints,
int position)
Add a portlet to this set.It updates its config to modify the current set |
boolean |
allowClose(org.apache.turbine.util.RunData rundata)
Implements the default close behavior: any authenticated user may remove a portlet from his page |
boolean |
allowCustomize(org.apache.turbine.util.RunData rundata)
Implements the default customize behavior: any authenticated user may customize a portlet |
boolean |
allowInfo(org.apache.turbine.util.RunData rundata)
Implements the default info behavior: any authenticated user may get information on a portlet |
boolean |
allowMaximize(org.apache.turbine.util.RunData rundata)
Implements the default maximize behavior: any authenticated user may maximize a portlet |
boolean |
allowMinimize(org.apache.turbine.util.RunData rundata)
Implements the default info behavior: any authenticated user may minimize a portlet |
boolean |
allowPrintFriendly(org.apache.turbine.util.RunData rundata)
Implements the default print friendly format behavior: not available for the portlet set |
boolean |
getAllowEdit(org.apache.turbine.util.RunData rundata)
Return true if this portlet is allowed to be edited in the rundata's context . |
boolean |
getAllowMaximize(org.apache.turbine.util.RunData rundata)
Return true if this portlets is allowed to be maximized. |
boolean |
getAllowView(org.apache.turbine.util.RunData rundata)
Return true if this portlet is allowed to be viewed in the rundata's context . |
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. |
PortletController |
getController()
Return the current controller for this set |
long |
getCreationTime()
Get the creation time for this Portlet |
java.lang.String |
getDescription()
Returns a description of this portlet. |
java.lang.String |
getDescription(java.lang.String instanceDescription)
Getter for property description. |
java.lang.String |
getID()
Retrieve a unique portlet id |
java.lang.String |
getImage()
|
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()
Returns a name for this portlet. |
Portlet |
getPortletAt(int pos)
Returns the Portlet at position pos |
Portlet |
getPortletByID(java.lang.String id)
Returns the Portlet with the given id |
Portlet |
getPortletByName(java.lang.String name)
Returns the Portlet with the given name |
PortletConfig |
getPortletConfig()
Get the config of this servlet. |
java.util.Enumeration |
getPortlets()
Returns the portlet set as an Enumeration |
java.lang.String |
getTitle()
Allows a Portlet to define its title. |
java.lang.String |
getTitle(java.lang.String instanceTitle)
Get a title for this instance of the portlet. |
void |
init()
All initialization should be performed here. |
boolean |
isClosed(org.apache.turbine.util.RunData data)
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 |
setAttribute(java.lang.String attrName,
java.lang.String attrValue,
org.apache.turbine.util.RunData rundata)
Stores a portlet attribute in persistent storage |
void |
setClosed(boolean close,
org.apache.turbine.util.RunData data)
Toggles the portlet state between closed and normal |
void |
setController(PortletController controller)
Set the controller for this set |
void |
setCreationTime(long creationTime)
Set the creation time for this Portlet |
void |
setDescription(java.lang.String description)
Set the description for this Portlet |
void |
setID(java.lang.String id)
|
void |
setImage(java.lang.String instanceImage)
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)
Sets the name on this 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)
|
int |
size()
Returns the number of portlets currently stored in this set |
void |
sortPortletSet()
Sort the portlets according to Layout position |
boolean |
supportsType(MimeType mimeType)
Method retruns true if at least one of the portlets of the portletset fits the requested MimeTyp. |
Portlet[] |
toArray()
Returns the portlet set as an array. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BasePortletSet()
public BasePortletSet(PortletController controller)
| Method Detail |
public void init()
throws PortletException
Portlet
init in interface PortletPortletExceptionpublic int size()
size in interface PortletSetpublic Portlet[] toArray()
toArray in interface PortletSetpublic Portlet getPortletAt(int pos)
getPortletAt in interface PortletSetpublic Portlet getPortletByID(java.lang.String id)
getPortletByID in interface PortletSetpublic Portlet getPortletByName(java.lang.String name)
getPortletByName in interface PortletSetpublic java.util.Enumeration getPortlets()
getPortlets in interface PortletSetpublic void addPortlet(Portlet portlet)
addPortlet in interface PortletSet
public void addPortlet(Portlet portlet,
int position)
addPortlet in interface PortletSet
public void addPortlet(Portlet portlet,
PortletSet.Constraints constraints)
addPortlet in interface PortletSet
public void addPortlet(Portlet portlet,
PortletSet.Constraints constraints,
int position)
addPortlet in interface PortletSetpublic PortletController getController()
getController in interface PortletSetpublic void setController(PortletController controller)
setController in interface PortletSetpublic org.apache.ecs.ConcreteElement getContent(org.apache.turbine.util.RunData rundata)
Portlet
getContent in interface Portletpublic java.lang.String getName()
Portlet
getName in interface Portletpublic void setName(java.lang.String name)
Portlet
setName in interface PortletPortlet.getName()public PortletConfig getPortletConfig()
Portlet
getPortletConfig in interface Portletpublic void setPortletConfig(PortletConfig pc)
Portlet
setPortletConfig in interface Portletpublic java.lang.String getDescription()
PortletReturns a description of this portlet. This should describe what the capabilities of the portlet and how it can help the user.
In order to define a default title you should not override (in the AbstractPortlet implementation) this but should call setDescription() within your init() method
This should return null if not specified.
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 void setImage(java.lang.String instanceImage)
setImage in interface Portletpublic java.lang.String getImage()
public java.lang.String getImage(java.lang.String instanceImage)
getImage in interface Portletpublic java.lang.String getTitle()
PortletAllows a Portlet to define its title. This can be used by a PortletControl for rendering its content.
In order to define a default title you should not override this but should call setTitle() within your init() method
This should return null if not specified.
getTitle in interface Portletpublic java.lang.String getTitle(java.lang.String instanceTitle)
getTitle in interface PortletinstanceTitle - Title from PSMLpublic void setTitle(java.lang.String title)
Portlet
setTitle in interface Portlet
public void setTitle(java.lang.String title,
org.apache.turbine.util.RunData rundata)
setTitle in interface Portletpublic boolean getAllowEdit(org.apache.turbine.util.RunData rundata)
PortletReturn true if this portlet is allowed to be edited in the rundata's context .
Note: PortletControl implementations should pay attention to this so that they don't allow this option if it returns false.
getAllowEdit in interface Portletpublic boolean getAllowView(org.apache.turbine.util.RunData rundata)
PortletReturn true if this portlet is allowed to be viewed in the rundata's context .
Note: PortletControl implementations should pay attention to this so that they don't allow this option if it returns false.
getAllowView in interface Portletpublic boolean getAllowMaximize(org.apache.turbine.util.RunData rundata)
PortletReturn true if this portlets is allowed to be maximized.
Note: PortletControl implementations should pay attention to this so that they don't allow this option if it returns false.
getAllowMaximize in interface Portletpublic final void sortPortletSet()
public long getCreationTime()
Portlet
getCreationTime in interface PortletPortlet.getCreationTime()public void setCreationTime(long creationTime)
Portlet
setCreationTime in interface PortletPortlet.setCreationTime(long)public boolean supportsType(MimeType mimeType)
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 data)
isClosed in interface PortletState
public void setClosed(boolean close,
org.apache.turbine.util.RunData data)
setClosed in interface PortletStatedata - the RunData for this requestpublic boolean allowInfo(org.apache.turbine.util.RunData rundata)
allowInfo in interface PortletStaterundata - 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 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 isMinimized(org.apache.turbine.util.RunData rundata)
isMinimized in interface PortletState
public void setMinimized(boolean minimize,
org.apache.turbine.util.RunData rundata)
setMinimized in interface PortletStateminimize - True if the portlet change to minimizedrundata - A RunData object
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 Portletpublic java.lang.String getID()
Portlet
getID in interface Portletpublic void setID(java.lang.String id)
setID in interface Portletpublic boolean providesCustomization()
providesCustomization in interface Portletpublic boolean isShowTitleBar(org.apache.turbine.util.RunData rundata)
isShowTitleBar in interface Portletrundata - The RunData object for the current request
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||