Package jakarta.portlet.filter
Class PortalContextWrapper
- java.lang.Object
-
- jakarta.portlet.filter.PortalContextWrapper
-
- All Implemented Interfaces:
PortalContext
public class PortalContextWrapper extends Object implements PortalContext
ThePortalContextWrapperprovides a convenient implementation of thePortalContextinterface that can be subclassed by developers. This class implements the Wrapper or Decorator pattern. Methods default to calling through to the wrapped object.- Since:
- 3.0
-
-
Field Summary
Fields Modifier and Type Field Description protected PortalContextwrapped-
Fields inherited from interface jakarta.portlet.PortalContext
MARKUP_HEAD_ELEMENT_SUPPORT
-
-
Constructor Summary
Constructors Constructor Description PortalContextWrapper(PortalContext wrapped)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetPortalInfo()Returns information about the portal like vendor, version, etc.StringgetProperty(String name)Returns the portal property with the given name, or anullif there is no property by that name.Enumeration<String>getPropertyNames()Returns all portal property names, or an emptyEnumerationif there are no property names.Enumeration<PortletMode>getSupportedPortletModes()Returns all supported portlet modes by the portal as an enumeration ofPortletModeobjects.Enumeration<WindowState>getSupportedWindowStates()Returns all supported window states by the portal as an enumeration ofWindowStateobjects.PortalContextgetWrapped()Gets the wrapped object.voidsetWrapped(PortalContext wrapped)Sets the wrapped object.
-
-
-
Field Detail
-
wrapped
protected PortalContext wrapped
-
-
Constructor Detail
-
PortalContextWrapper
public PortalContextWrapper(PortalContext wrapped)
- Parameters:
wrapped- the wrapped context
-
-
Method Detail
-
getWrapped
public PortalContext getWrapped()
Gets the wrapped object.- Returns:
- the wrapped object.
-
setWrapped
public void setWrapped(PortalContext wrapped)
Sets the wrapped object.- Parameters:
wrapped- the wrapped object to set.- Throws:
IllegalArgumentException- if the request is null.
-
getProperty
public String getProperty(String name)
Description copied from interface:PortalContextReturns the portal property with the given name, or anullif there is no property by that name.- Specified by:
getPropertyin interfacePortalContext- Parameters:
name- property name- Returns:
- portal property with key
name
-
getPropertyNames
public Enumeration<String> getPropertyNames()
Description copied from interface:PortalContextReturns all portal property names, or an emptyEnumerationif there are no property names.- Specified by:
getPropertyNamesin interfacePortalContext- Returns:
- All portal property names as an
EnumerationofStringobjects
-
getSupportedPortletModes
public Enumeration<PortletMode> getSupportedPortletModes()
Description copied from interface:PortalContextReturns all supported portlet modes by the portal as an enumeration ofPortletModeobjects.The portlet modes must at least include the standard portlet modes
EDIT, HELP, VIEW.- Specified by:
getSupportedPortletModesin interfacePortalContext- Returns:
- All supported portal modes by the portal
as an enumeration of
PortletModeobjects.
-
getSupportedWindowStates
public Enumeration<WindowState> getSupportedWindowStates()
Description copied from interface:PortalContextReturns all supported window states by the portal as an enumeration ofWindowStateobjects.The window states must at least include the standard window states
MINIMIZED, NORMAL, MAXIMIZED.- Specified by:
getSupportedWindowStatesin interfacePortalContext- Returns:
- All supported window states by the portal
as an enumeration of
WindowStateobjects.
-
getPortalInfo
public String getPortalInfo()
Description copied from interface:PortalContextReturns information about the portal like vendor, version, etc.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).- Specified by:
getPortalInfoin interfacePortalContext- Returns:
- a
Stringcontaining at least the portal name and version number
-
-