|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.jetspeed.portal.security.portlets.PortletWrapper
This object is used to wrap a Portlet, ensuring that access control rules are enforced.
| Field Summary |
| Fields inherited from interface org.apache.jetspeed.portal.Portlet |
PORTLET_MAXIMIZED, PORTLET_MINIMIZED, PORTLET_NORMAL |
| Constructor Summary | |
PortletWrapper(Portlet inner)
|
|
| Method Summary | |
protected boolean |
checkPermission(org.apache.turbine.util.RunData rundata,
java.lang.String permissionName)
Utility method for checking Permissions on myself. |
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. |
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)
Get a Description for this instance of the portlet. |
java.lang.String |
getID()
Retrieve a unique portlet id |
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 |
getPortlet()
|
PortletConfig |
getPortletConfig()
Get the config of this servlet. |
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()
By default don't provide any initialization |
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)
Sets a portlet attribute to persistent storage |
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 image)
Setter for property image. |
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)
Set the title for this Portlet |
boolean |
supportsType(MimeType mimeType)
Returns true portlet is able to output content for given mimetype |
static Portlet |
wrap(Portlet aPortlet)
Return an instance of one of the classes in this package making tests before calling the wrapped portlet |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PortletWrapper(Portlet inner)
| Method Detail |
public final java.lang.String getName()
Portlet
getName in interface Portletpublic final void setName(java.lang.String name)
Portlet
setName in interface PortletPortlet.getName()public final PortletConfig getPortletConfig()
Portlet
getPortletConfig in interface Portletpublic final void setPortletConfig(PortletConfig pc)
Portlet
setPortletConfig in interface Portletpublic org.apache.ecs.ConcreteElement getContent(org.apache.turbine.util.RunData rundata)
Portlet
getContent in interface Portletpublic java.lang.String getDescription()
getDescription in interface Portletpublic java.lang.String getDescription(java.lang.String instanceDescription)
Portlet
getDescription in interface PortletinstanceDescription - Description from PSMLpublic void setDescription(java.lang.String description)
Portlet
setDescription in interface Portletpublic java.lang.String getImage(java.lang.String instanceImage)
Portlet
getImage in interface PortletPortlet.getImage(java.lang.String)public void setImage(java.lang.String image)
Portlet
setImage in interface PortletPortlet#setImgepublic 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 PortletPortlet.getTitle()public java.lang.String getTitle(java.lang.String instanceTitle)
Portlet
getTitle in interface PortletinstanceTitle - Title from PSMLPortlet.getImage(java.lang.String)public void setTitle(java.lang.String title)
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 Portlet
public void init()
throws PortletException
init in interface PortletPortletExceptionpublic 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)
Portlet
supportsType in interface PortletPortlet.supportsType(org.apache.jetspeed.util.MimeType)
protected boolean checkPermission(org.apache.turbine.util.RunData rundata,
java.lang.String permissionName)
rundata - A rundata ObjectpermissionName - String the name of the Permission requested
public boolean isShowTitleBar(org.apache.turbine.util.RunData rundata)
isShowTitleBar in interface Portletrundata - 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 retrieverundata - A RunData objectattrDefValue - The value if the attr doesn't exists
public void setAttribute(java.lang.String attrName,
java.lang.String attrValue,
org.apache.turbine.util.RunData rundata)
setAttribute in interface PortletattrName - The attribute to retrieveattrValue - The valuerundata - A RunData objectpublic PortletInstance getInstance(org.apache.turbine.util.RunData rundata)
getInstance in interface Portletrundata - A RunData object
public static Portlet wrap(Portlet aPortlet)
Return an instance of one of the classes in this package making tests before calling the wrapped portlet
Different wrapper classes must be used with the current API depending on the interfaces implemented by the portlet. :-(
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 Portletpublic Portlet getPortlet()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||