|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.portal.theme.impl.page.PortletContextImpl
An implementation of the portlet context.
A portlet context represents a portlet on a page with all of its current state. The portlet context can be used in the layout strategy to manipulate the rendering of the requested page. (See the layout strategy documentation for more details).
PortletContext
,
LayoutStrategy
Method Summary | |
boolean |
equals(java.lang.Object o)
|
int |
getOrder()
Get the order of the portlet in its region. |
Mode |
getPortletMode()
Get the current portlet mode of this portlet instance. |
java.lang.String |
getRegionName()
Get name of the page region this portlet is assigned to. |
java.util.Set |
getSupportedPortletModes(MediaType contentType)
Get a set of modes that this portlet supports. |
java.util.Set |
getSupportedWindowStates()
Get the set of window states allowed by this portlet. |
WindowContext |
getWindowContext()
Get the window context of this portlet on the currently requested page. |
java.lang.String |
getWindowID()
Get a handle to the portlet window for this portlet context. |
WindowState |
getWindowState()
Get the current portlet window state of this portlet instance. |
int |
hashCode()
|
boolean |
isModeSupported(Mode mode,
MediaType mediaType)
Check if the provided mode is valid for the media type (content type) presented. |
boolean |
isSupportedWindowState(WindowState windowState)
Check if the provided WindowState is allowed for this portlet. |
void |
setOrder(int order)
Set the sort order of this portlet in its region. |
void |
setRegionName(java.lang.String regionName)
Assign the portlet to a different region of the page. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
public WindowState getWindowState() throws ThemeException
PortletContext
getWindowState
in interface PortletContext
ThemeException
- if the current navigational state is unknownPortletContext.getWindowState()
public Mode getPortletMode() throws ThemeException
PortletContext
getPortletMode
in interface PortletContext
ThemeException
- if the current navigational state is unknownpublic boolean isSupportedWindowState(WindowState windowState) throws ThemeException
PortletContext
isSupportedWindowState
in interface PortletContext
windowState
- the window state to check against the allowed ones
java.lang.IllegalArgumentException
- if the window state is null
ThemeException
- if the state provider is unknownPortletContext.isSupportedWindowState(org.jboss.portal.WindowState)
public java.util.Set getSupportedWindowStates() throws ThemeException
PortletContext
getSupportedWindowStates
in interface PortletContext
ThemeException
- if the state provider is unknownPortletContext.getSupportedWindowStates()
public java.lang.String getRegionName()
PortletContext
getRegionName
in interface PortletContext
PortletContext.getRegionName()
public void setRegionName(java.lang.String regionName)
PortletContext
In order to assign this portlet to another region, the region must be one of the available regions of the current page. The change will not be persisted outside the current request.
setRegionName
in interface PortletContext
regionName
- the name of the region to re-assign the portlet toPortletContext.setRegionName(String)
public int getOrder()
PortletContext
getOrder
in interface PortletContext
PortletContext.getOrder()
public void setOrder(int order)
PortletContext
Note: this change is only valid for the current request, and will not be persisted
setOrder
in interface PortletContext
order
- the sort order to assign to this portletPortletContext.setOrder(int)
public java.lang.String getWindowID()
PortletContext
getWindowID
in interface PortletContext
PortletContext.getWindowID()
public java.util.Set getSupportedPortletModes(MediaType contentType) throws ThemeException
PortletContext
Portlet modes are defined per content type.
getSupportedPortletModes
in interface PortletContext
contentType
- the content type for which to look for the supported modes.
ThemeException
- if the mode provider is unknownPortletContext.getSupportedPortletModes(org.jboss.portal.common.MediaType)
public boolean isModeSupported(Mode mode, MediaType mediaType) throws ThemeException
PortletContext
Note: you can also check if the portal supports this mode via the strategy context
isModeSupported
in interface PortletContext
mode
- the mode to checkmediaType
- the content type to check the mode for
ThemeException
- if the mode provider is unknownPortletContext.isModeSupported(org.jboss.portal.Mode, org.jboss.portal.common.MediaType)
public WindowContext getWindowContext()
PortletContext
The window context is a state holder to get access to the portlet's position on the page.
getWindowContext
in interface PortletContext
PortletContext.getWindowContext()
public boolean equals(java.lang.Object o)
Object.equals(java.lang.Object)
public int hashCode()
Object.hashCode()
public java.lang.String toString()
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |