Class PortletURLWrapper

    • Constructor Detail

      • PortletURLWrapper

        public PortletURLWrapper​(PortletURL wrapped)
        Parameters:
        wrapped - the wrapped object to set.
        Throws:
        IllegalArgumentException - if the PortletURL is null.
    • Method Detail

      • setWrapped

        public void setWrapped​(PortletURL wrapped)
        Sets the wrapped object.
        Parameters:
        wrapped - the wrapped object to set.
        Throws:
        IllegalArgumentException - if the PortletURL is null.
      • setWindowState

        public void setWindowState​(WindowState windowState)
                            throws WindowStateException
        Description copied from interface: MutableRenderState
        Sets the window state of a portlet to the given window state.

        Possible values are the standard window states and any custom window states supported by the portal and the portlet. Standard window states are:

        • MINIMIZED
        • NORMAL
        • MAXIMIZED

        Not more than one window state can be set. If more than one window state is set, only the last one set is valid.

        Specified by:
        setWindowState in interface MutableRenderState
        Parameters:
        windowState - the new portlet window state
        Throws:
        WindowStateException - if the portlet cannot switch to this state, because the portal does not support this state, the portlet has not declared in its deployment descriptor that it supports this state, or the current user is not allowed to switch to this state. The PortletRequest.isWindowStateAllowed() method can be used to check if the portlet can set a given window state.
      • setPortletMode

        public void setPortletMode​(PortletMode portletMode)
                            throws PortletModeException
        Description copied from interface: MutableRenderState
        Sets the portlet mode of a portlet to the given portlet mode.

        Possible values are the standard portlet modes and any custom portlet modes supported by the portal and the portlet. Portlets must declare in the deployment descriptor the portlet modes they support for each markup type. Standard portlet modes are:

        • EDIT
        • HELP
        • VIEW

        Not more than one portlet mode can be set. If more than one portlet mode is set, only the last one set is valid.

        Note: The portlet may still be called in a different portlet mode in the next render call, depending on the portlet container / portal.

        Specified by:
        setPortletMode in interface MutableRenderState
        Parameters:
        portletMode - the new portlet mode
        Throws:
        PortletModeException - if the portlet cannot switch to this mode, because the portal does not support this mode, the portlet has not declared in its deployment descriptor that it supports this mode for the current markup, or the current user is not allowed to switch to this mode. The PortletRequest.isPortletModeAllowed() method can be used to check if the portlet can set a given portlet mode.
      • removePublicRenderParameter

        @Deprecated
        public void removePublicRenderParameter​(String name)
        Deprecated.
        Description copied from interface: PortletURL
        Removes the specified public render parameter. The name must reference a public render parameter defined in the portlet deployment descriptor under the public-render-parameter element with the identifier mapping to the parameter name.
        Specified by:
        removePublicRenderParameter in interface PortletURL
        Parameters:
        name - a String specifying the name of the public render parameter to be removed
      • setBeanParameter

        public void setBeanParameter​(PortletSerializable bean)
        Description copied from interface: PortletURL
        Sets the value of a @RenderStateScoped bean on an action or render URL.

        Calling this method copies the bean state to the URL so that the values are available to the portlet when the URL is activated.

        Specified by:
        setBeanParameter in interface PortletURL
        Parameters:
        bean - The @RenderStateScoped bean
        See Also:
        RenderStateScoped