public class PortalContextWrapper extends Object implements PortalContext
PortalContextWrapper provides a convenient
implementation of the PortalContext interface
that can be subclassed by developers.
This class implements the Wrapper or Decorator pattern.
Methods default to calling through to the wrapped object.
| Modifier and Type | Field and Description |
|---|---|
protected PortalContext |
wrapped |
MARKUP_HEAD_ELEMENT_SUPPORT| Constructor and Description |
|---|
PortalContextWrapper(PortalContext wrapped) |
| Modifier and Type | Method and Description |
|---|---|
String |
getPortalInfo()
Returns information about the portal like vendor, version, etc.
|
String |
getProperty(String name)
Returns the portal property with the given name,
or a
null if there is
no property by that name. |
Enumeration<String> |
getPropertyNames()
Returns all portal property names, or an empty
Enumeration if there are no property names. |
Enumeration<PortletMode> |
getSupportedPortletModes()
Returns all supported portlet modes by the portal
as an enumeration of
PortletMode objects. |
Enumeration<WindowState> |
getSupportedWindowStates()
Returns all supported window states by the portal
as an enumeration of
WindowState objects. |
PortalContext |
getWrapped()
Gets the wrapped object.
|
void |
setWrapped(PortalContext wrapped)
Sets the wrapped object.
|
protected PortalContext wrapped
public PortalContextWrapper(PortalContext wrapped)
public PortalContext getWrapped()
public void setWrapped(PortalContext wrapped)
wrapped - the wrapped object to set.IllegalArgumentException - if the request is null.public String getProperty(String name)
PortalContextnull if there is
no property by that name.getProperty in interface PortalContextname - property namenamepublic Enumeration<String> getPropertyNames()
PortalContextEnumeration if there are no property names.getPropertyNames in interface PortalContextEnumeration of String objectspublic Enumeration<PortletMode> getSupportedPortletModes()
PortalContextPortletMode objects.
The portlet modes must at least include the
standard portlet modes EDIT, HELP, VIEW.
getSupportedPortletModes in interface PortalContextPortletMode objects.public Enumeration<WindowState> getSupportedWindowStates()
PortalContextWindowState objects.
The window states must at least include the
standard window states MINIMIZED, NORMAL, MAXIMIZED.
getSupportedWindowStates in interface PortalContextWindowState objects.public String getPortalInfo()
PortalContext
The form of the returned string is servername/versionnumber. For
example, the reference implementation Pluto may return the string
Pluto/1.0.
The portlet container may return other optional information after the
primary string in parentheses, for example, Pluto/1.0
(JDK 1.3.1; Windows NT 4.0 x86).
getPortalInfo in interface PortalContextString containing at least the portal name and version numberJava Portlet 3.0 API Specification. See the Copyright and License provided with this distribution. Use is subject to license terms.