Package org.gatein.pc.api
Class StateString
- java.lang.Object
-
- org.gatein.pc.api.StateString
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
OpaqueStateString,ParametersStateString
public abstract class StateString extends Object implements Serializable
Encapsulate state as a string.- Version:
- $Revision: 5448 $
- Author:
- Julien Viet
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static intEMPTYstatic StringJBPNS_PREFIX.protected static intOPAQUEprotected static intSERIALIZED
-
Constructor Summary
Constructors Constructor Description StateString()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static StateStringcreate(DataInputStream in)Factory method that will create the most appropriate form from the byte representation.static StateStringcreate(String opaqueValue)Factory method that will create the most appropriate form from the string representation.static Map<String,String[]>decodeOpaqueValue(String opaqueValue)static StringencodeAsOpaqueValue(Map<String,String[]> parameters)abstract StringgetStringValue()Return the value of the navigational state of the portlet.abstract voidwriteTo(DataOutputStream out)
-
-
-
Field Detail
-
JBPNS_PREFIX
public static final String JBPNS_PREFIX
.- See Also:
- Constant Field Values
-
EMPTY
protected static final int EMPTY
- See Also:
- Constant Field Values
-
SERIALIZED
protected static final int SERIALIZED
- See Also:
- Constant Field Values
-
OPAQUE
protected static final int OPAQUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getStringValue
public abstract String getStringValue()
Return the value of the navigational state of the portlet.- Returns:
- the string value
-
writeTo
public abstract void writeTo(DataOutputStream out) throws IOException
- Throws:
IOException
-
create
public static StateString create(DataInputStream in) throws IOException
Factory method that will create the most appropriate form from the byte representation.- Parameters:
in- the inputstream to read from- Returns:
- a new state string
- Throws:
IOException- any IOException
-
create
public static StateString create(String opaqueValue)
Factory method that will create the most appropriate form from the string representation.- Parameters:
opaqueValue- the opaque value- Returns:
- a new state string
-
-