Class PortalContextWrapper

  • All Implemented Interfaces:
    PortalContext

    public class PortalContextWrapper
    extends Object
    implements PortalContext
    The 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.
    Since:
    3.0
    • 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: PortalContext
        Returns the portal property with the given name, or a null if there is no property by that name.
        Specified by:
        getProperty in interface PortalContext
        Parameters:
        name - property name
        Returns:
        portal property with key name
      • getPropertyNames

        public Enumeration<String> getPropertyNames()
        Description copied from interface: PortalContext
        Returns all portal property names, or an empty Enumeration if there are no property names.
        Specified by:
        getPropertyNames in interface PortalContext
        Returns:
        All portal property names as an Enumeration of String objects
      • getSupportedPortletModes

        public Enumeration<PortletMode> getSupportedPortletModes()
        Description copied from interface: PortalContext
        Returns all supported portlet modes by the portal as an enumeration of PortletMode objects.

        The portlet modes must at least include the standard portlet modes EDIT, HELP, VIEW.

        Specified by:
        getSupportedPortletModes in interface PortalContext
        Returns:
        All supported portal modes by the portal as an enumeration of PortletMode objects.
      • getSupportedWindowStates

        public Enumeration<WindowState> getSupportedWindowStates()
        Description copied from interface: PortalContext
        Returns all supported window states by the portal as an enumeration of WindowState objects.

        The window states must at least include the standard window states MINIMIZED, NORMAL, MAXIMIZED.

        Specified by:
        getSupportedWindowStates in interface PortalContext
        Returns:
        All supported window states by the portal as an enumeration of WindowState objects.
      • getPortalInfo

        public String getPortalInfo()
        Description copied from interface: PortalContext
        Returns 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:
        getPortalInfo in interface PortalContext
        Returns:
        a String containing at least the portal name and version number