Package org.gatein.pc.api
Class PortletContext
java.lang.Object
org.gatein.pc.api.PortletContext
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
StatefulPortletContext
- Since:
- 2.6
- Version:
- $Revision: 6890 $
- Author:
- Julien Viet, Chris Laprun
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfacestatic interface -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPortletContext(String id) protectedPortletContext(String id, boolean interpret) protectedPortletContext(PortletContext.Components components) -
Method Summary
Modifier and TypeMethodDescriptionstatic PortletContextcreatePortletContext(String portletId) Creates a PortletContext by interpreting the specified identifier and breaking it down to its components.static PortletContextcreatePortletContext(String portletId, boolean interpret) static PortletContextcreatePortletContext(String id, byte[] state) Deprecated.static PortletContextcreatePortletContext(String portletId, byte[] state, boolean interpret) static PortletContextcreatePortletContext(String applicationName, String portletName) Creates a new PortletContext referencing the specified portlet in the specified application (usually a web application).static StatefulPortletContext<byte[]>createStatefulPortletContext(String id, byte[] state) Deprecated.static PortletContextdereference(PortletContext compoundPortletContext) booleangetId()inthashCode()protected PortletContext.Componentsstatic PortletContextreference(String invokerId, PortletContext portletContext) toString()
-
Field Details
-
INVOKER_SEPARATOR
The separator used in the id to route to the correct invoker.- See Also:
-
PRODUCER_CLONE_ID_PREFIX
- See Also:
-
PRODUCER_CLONE_PREFIX_LENGTH
public static final int PRODUCER_CLONE_PREFIX_LENGTH -
CONSUMER_CLONE_ID_PREFIX
- See Also:
-
CONSUMER_CLONE_PREFIX_LENGTH
public static final int CONSUMER_CLONE_PREFIX_LENGTH -
CONSUMER_CLONE_DUMMY_STATE_ID
- See Also:
-
CONSUMER_CLONE_ID
- See Also:
-
LOCAL_CONSUMER_CLONE
-
INVALID_PORTLET_CONTEXT
- See Also:
-
-
Constructor Details
-
PortletContext
- Throws:
IllegalArgumentException
-
PortletContext
-
PortletContext
-
-
Method Details
-
dereference
-
interpret
-
reference
-
equals
-
hashCode
public int hashCode() -
getId
-
toString
-
createPortletContext
Deprecated.Create a PortletContext based on id and optional state.- Parameters:
id- the portlet idstate- 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 ofcreatePortletContext(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 idstate- the mandatory state- Returns:
- a new PortletContext
-
createPortletContext
Creates a PortletContext by interpreting the specified identifier and breaking it down to its components. When possible, it's better to usecreatePortletContext(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 usereference(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
-
createPortletContext
public static PortletContext createPortletContext(String portletId, byte[] state, boolean interpret) -
createPortletContext
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.
-
getComponents
-