Class PortletContext

    • Field Detail

      • INVOKER_SEPARATOR

        public static final String INVOKER_SEPARATOR
        The separator used in the id to route to the correct invoker.
        See Also:
        Constant Field Values
      • PRODUCER_CLONE_PREFIX_LENGTH

        public static final int PRODUCER_CLONE_PREFIX_LENGTH
      • CONSUMER_CLONE_PREFIX_LENGTH

        public static final int CONSUMER_CLONE_PREFIX_LENGTH
      • LOCAL_CONSUMER_CLONE

        public static final PortletContext LOCAL_CONSUMER_CLONE
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getId

        public String getId()
      • createPortletContext

        @Deprecated
        public static PortletContext createPortletContext​(String id,
                                                          byte[] state)
        Deprecated.
        Create a PortletContext based on id and optional state.
        Parameters:
        id - the portlet id
        state - the optional state
        Returns:
        a new PortletContext based on the provided information
      • createStatefulPortletContext

        @Deprecated
        public static StatefulPortletContext<byte[]> createStatefulPortletContext​(String id,
                                                                                  byte[] state)
        Deprecated.
        Create a PortletContext based on given id and required state: this method will fail if state is not valid. Use this method instead of createPortletContext(String, byte[]) for cases when a state is expected and the creation of the PortletContext should fail if no state was given.
        Parameters:
        id - the portlet id
        state - the mandatory state
        Returns:
        a new PortletContext
      • createPortletContext

        public static PortletContext createPortletContext​(String portletId)
        Creates a PortletContext by interpreting the specified identifier and breaking it down to its components. When possible, it's better to use createPortletContext(String, String) to create the PortletContext from its components instead of trying to build it manually. In case a PortletContext namespaced by a PortletInvoker id is needed, please use reference(String, PortletContext).
        Parameters:
        portletId - the portlet identifier to interpret as a PortletContext
        Returns:
        a newly created PortletContext representing the portlet associated with the specified identifier
        Throws:
        IllegalArgumentException - if the specified identifier cannot be properly interpreted into components
        See Also:
        interpretIntoComponents(String)
      • createPortletContext

        public static PortletContext createPortletContext​(String portletId,
                                                          boolean interpret)
      • createPortletContext

        public static PortletContext createPortletContext​(String portletId,
                                                          byte[] state,
                                                          boolean interpret)
      • createPortletContext

        public static PortletContext createPortletContext​(String applicationName,
                                                          String portletName)
        Creates a new PortletContext referencing the specified portlet in the specified application (usually a web application).
        Parameters:
        applicationName - the application name (usually a web application context path)
        portletName - the portlet name
        Returns:
        a newly created PortletContext referencing the specified portlet in the specified application.
        Throws:
        IllegalArgumentException - if the specified arguments are null or empty and if the application name is not properly formatted.