|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.jetspeed.portal.portlets.AbstractPortlet
org.apache.jetspeed.portal.controls.AbstractPortletControl
The PortletControl acts both as a decoration around a Portlet or PortletSet and also as the window manager for the enclosed Portlet(Set). As such it controls the operation that may be performed on this portlet and whether the portlet content should be displayed or not. PortletControl also delegates all Portlet and PortletSet methods to its inner object and can thus be transparently cascaded or substituted to a simple portlet wherever in a PSML object tree.
| Nested Class Summary |
| Nested classes inherited from class org.apache.jetspeed.portal.PortletSet |
PortletSet.Constraints |
| Field Summary | |
static java.lang.String |
BACKGROUND_COLOR
|
static java.lang.String |
COLOR
|
static java.lang.String |
TITLE_COLOR
|
static java.lang.String |
WIDTH
|
| Fields inherited from class org.apache.jetspeed.portal.portlets.AbstractPortlet |
content |
| Fields inherited from interface org.apache.jetspeed.portal.Portlet |
PORTLET_MAXIMIZED, PORTLET_MINIMIZED, PORTLET_NORMAL |
| Constructor Summary | |
AbstractPortletControl()
|
|
| Method Summary | |
void |
addPortlet(Portlet portlet)
Adds a portlet to the inner portletSet |
void |
addPortlet(Portlet portlet,
int position)
Adds a portlet to the inner portletSet at the explicit position |
void |
addPortlet(Portlet portlet,
PortletSet.Constraints constraints)
Adds a portlet to the inner portletSet within the given constraints |
void |
addPortlet(Portlet portlet,
PortletSet.Constraints constraint,
int position)
Adds a portlet to the inner portletSet within the given constraints at the specific position |
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 info behavior: any authenticated user may display portlet in print friendly format |
java.lang.String |
getBackgroundColor()
Deprecated. |
java.lang.String |
getColor()
Deprecated. |
PortletControlConfig |
getConfig()
|
org.apache.ecs.ConcreteElement |
getContent(org.apache.turbine.util.RunData rundata)
Returns the content of inner portlet |
PortletController |
getController()
Return the current controller for this set |
java.lang.String |
getDescription()
Returns a description of this portlet. |
java.lang.String |
getID()
Retrieve a unique portlet id |
java.lang.String |
getName()
Returns a name for this portlet. |
Portlet |
getPortlet()
Retrieves the portlet managed by this control |
Portlet |
getPortletAt(int pos)
Returns the Portlet at the given position if the control manages a PortletSet, else the inner portlet if the queried position is 0 |
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 elements contained within the inner PortletSet or the inner portlet |
java.lang.String |
getTitle()
Allows a Portlet to define its title. |
java.lang.String |
getTitleColor()
Deprecated. |
java.lang.String |
getWidth()
Deprecated. |
void |
init()
Inits the inner portlet |
void |
init(Portlet portlet)
Initializes the control and associates it with a portlet |
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 |
void |
setBackgroundColor(java.lang.String backgroundColor)
Deprecated. |
void |
setClosed(boolean close,
org.apache.turbine.util.RunData rundata)
Toggles the portlet state between closed and normal |
void |
setColor(java.lang.String color)
Deprecated. |
void |
setConfig(PortletControlConfig conf)
Sets the PortletControl specific configuration |
void |
setController(PortletController controller)
Sets the controller for the inner PortletSet. |
void |
setDescription(java.lang.String description)
Set the description for the inner portlet |
void |
setID(java.lang.String id)
|
void |
setMinimized(boolean minimize,
org.apache.turbine.util.RunData rundata)
Change the portlet visibility state ( minimized <-> normal ) |
void |
setName(java.lang.String name)
Updates the managed portlet name |
void |
setPortlet(Portlet portlet)
Sets the portlet to be managed by this control |
void |
setPortletConfig(PortletConfig portletConfig)
Updates the managed portlet config object |
void |
setTitle(java.lang.String title)
Set the title for the inner portlet |
void |
setTitleColor(java.lang.String titleColor)
Deprecated. |
void |
setWidth(int width)
Deprecated. |
void |
setWidth(java.lang.String width)
Deprecated. |
int |
size()
Returns the number of portlets currently stored in this set |
boolean |
supportsType(MimeType mimeType)
Returns true portlet is able to output content for given mimetype |
Portlet[] |
toArray()
Returns the portlet set as an array. |
| Methods inherited from class org.apache.jetspeed.portal.portlets.AbstractPortlet |
allowView, clearContent, getAllowEdit, getAllowMaximize, getAllowView, getAttribute, getContent, getContent, getCreationTime, getDescription, getExpirationMillis, getExpire, getHandle, getHandle, getImage, getImage, getInstance, getTitle, isCacheable, isShowTitleBar, providesCustomization, refresh, setAttribute, setCacheable, setCachedObject, setContent, setContent, setContent, setCreationTime, setExpirationMillis, setHandle, setImage, setTitle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.jetspeed.portal.Portlet |
getAllowEdit, getAllowMaximize, getAllowView, getAttribute, getCreationTime, getDescription, getImage, getInstance, getTitle, isShowTitleBar, providesCustomization, setAttribute, setCreationTime, setImage, setTitle |
| Field Detail |
public static final java.lang.String COLOR
public static final java.lang.String BACKGROUND_COLOR
public static final java.lang.String TITLE_COLOR
public static final java.lang.String WIDTH
| Constructor Detail |
public AbstractPortletControl()
| Method Detail |
public PortletControlConfig getConfig()
getConfig in interface PortletControlpublic void setConfig(PortletControlConfig conf)
setConfig in interface PortletControlconf - the new PortletControl configurationpublic void setPortlet(Portlet portlet)
setPortlet in interface PortletControlportlet - the new portlet to be managed by the controlpublic Portlet getPortlet()
getPortlet in interface PortletControlpublic void init(Portlet portlet)
init in interface PortletControlportlet - the portlet to be managed by this controlpublic java.lang.String getColor()
getColor in interface PortletControlpublic void setColor(java.lang.String color)
setColor in interface PortletControlcolor - the text color value in HTML format (#RRGGBB)public java.lang.String getBackgroundColor()
getBackgroundColor in interface PortletControlpublic void setBackgroundColor(java.lang.String backgroundColor)
setBackgroundColor in interface PortletControlbackgroundColor - the background color value in HTML format (#RRGGBB)public java.lang.String getTitleColor()
getTitleColor in interface PortletControlpublic void setTitleColor(java.lang.String titleColor)
setTitleColor in interface PortletControltitleColor - the title color value in HTML format (#RRGGBB)public java.lang.String getWidth()
getWidth in interface PortletControlpublic void setWidth(int width)
setWidth in interface PortletControlwidth - the width of portlet. Must be a positive, non nul integerpublic void setWidth(java.lang.String width)
setWidth in interface PortletControlwidth - the width of portlet. Must be parseable as a positive, non
nul integer or a percentagepublic PortletConfig getPortletConfig()
Portlet
getPortletConfig in interface PortletgetPortletConfig in class AbstractPortletpublic void setPortletConfig(PortletConfig portletConfig)
setPortletConfig in interface PortletsetPortletConfig in class AbstractPortletportletConfig - the new portet config objectpublic java.lang.String getName()
Portlet
getName in interface PortletgetName in class AbstractPortletpublic void setName(java.lang.String name)
setName in interface PortletsetName in class AbstractPortletname - the new portet namepublic 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 PortletgetTitle in class AbstractPortletpublic void setTitle(java.lang.String title)
setTitle in interface PortletsetTitle in class AbstractPortlettitle - the new portlet titlepublic 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 PortletgetDescription in class AbstractPortletpublic void setDescription(java.lang.String description)
setDescription in interface PortletsetDescription in class AbstractPortletdescription - the new portlet description
public void init()
throws PortletException
init in interface Portletinit in class AbstractPortletPortletExceptionpublic org.apache.ecs.ConcreteElement getContent(org.apache.turbine.util.RunData rundata)
getContent in interface PortletgetContent in class AbstractPortletrundata - the RunData for the requestpublic boolean supportsType(MimeType mimeType)
Portlet
supportsType in interface PortletsupportsType in class AbstractPortletPortlet.supportsType(org.apache.jetspeed.util.MimeType)public int size()
PortletSet
size in interface PortletSetpublic Portlet[] toArray()
PortletSet
toArray in interface PortletSetpublic Portlet getPortletAt(int pos)
getPortletAt in interface PortletSetpos - the queried position. Must be strictly smaller than the
value of size()
public java.util.Enumeration getPortlets()
getPortlets in interface PortletSetpublic void addPortlet(Portlet portlet)
addPortlet in interface PortletSetportlet - the portlet to add
public void addPortlet(Portlet portlet,
int position)
addPortlet in interface PortletSetportlet - the portlet to addposition - the position of the new portlet
public void addPortlet(Portlet portlet,
PortletSet.Constraints constraints)
addPortlet in interface PortletSetportlet - the portlet to addconstraints - the portlet layout constraints
public void addPortlet(Portlet portlet,
PortletSet.Constraints constraint,
int position)
addPortlet in interface PortletSetportlet - the portlet to addconstraint - the portlet layout constraintsposition - the portlet required positionpublic PortletController getController()
PortletSet
getController in interface PortletSetpublic void setController(PortletController controller)
setController in interface PortletSetpublic boolean allowClose(org.apache.turbine.util.RunData rundata)
allowClose in interface PortletStateallowClose in class AbstractPortletrundata - the RunData object for the current requestpublic boolean isClosed(org.apache.turbine.util.RunData rundata)
isClosed in interface PortletStateisClosed in class AbstractPortletrundata - The RunData object for the current request
public void setClosed(boolean close,
org.apache.turbine.util.RunData rundata)
setClosed in interface PortletStatesetClosed in class AbstractPortletrundata - The RunData object for the current requestpublic boolean allowInfo(org.apache.turbine.util.RunData rundata)
allowInfo in interface PortletStateallowInfo in class AbstractPortletrundata - the RunData object for the current requestpublic boolean allowCustomize(org.apache.turbine.util.RunData rundata)
allowCustomize in interface PortletStateallowCustomize in class AbstractPortletrundata - the RunData object for the current requestpublic boolean allowMaximize(org.apache.turbine.util.RunData rundata)
allowMaximize in interface PortletStateallowMaximize in class AbstractPortletrundata - the RunData object for the current requestpublic boolean allowMinimize(org.apache.turbine.util.RunData rundata)
allowMinimize in interface PortletStateallowMinimize in class AbstractPortletrundata - the RunData object for the current requestpublic boolean allowPrintFriendly(org.apache.turbine.util.RunData rundata)
allowPrintFriendly in interface PortletStateallowPrintFriendly in class AbstractPortletrundata - the RunData object for the current requestpublic boolean isMinimized(org.apache.turbine.util.RunData rundata)
isMinimized in interface PortletStateisMinimized in class AbstractPortletrundata - The RunData object for the current request
public void setMinimized(boolean minimize,
org.apache.turbine.util.RunData rundata)
setMinimized in interface PortletStatesetMinimized in class AbstractPortletminimize - True if the portlet change to minimizedrundata - A RunData objectpublic java.lang.String getID()
Portlet
getID in interface PortletgetID in class AbstractPortletpublic void setID(java.lang.String id)
setID in interface PortletsetID in class AbstractPortletpublic Portlet getPortletByID(java.lang.String id)
getPortletByID in interface PortletSetpublic Portlet getPortletByName(java.lang.String name)
getPortletByName in interface PortletSet
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||