Package org.gatein.pc.api
Class ParametersStateString
java.lang.Object
org.gatein.pc.api.StateString
org.gatein.pc.api.ParametersStateString
- All Implemented Interfaces:
Serializable
A set of parameters.
- Version:
- $Revision: 6549 $
- Author:
- Julien Viet
- See Also:
-
Field Summary
Fields inherited from class org.gatein.pc.api.StateString
EMPTY, JBPNS_PREFIX, OPAQUE, SERIALIZED -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates an empty parameter set.protectedprotectedParametersStateString(String opaqueValue) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear all the parameters.static ParametersStateStringcreate()static ParametersStateStringstatic ParametersStateStringcreate(StateString stateString) Create a parameters state string.booleanReturn the underlying parameter object.intgetSize()Return the size.Retrieves the opaque version associated with this navigational state.Return the parameter value or null if it does not exist.String[]Return the parameter values or null if it does not exist.inthashCode()voidRemove a parameter.voidReplace all the parameters.voidSet the a parameter value.voidSet the parameter values.toString()voidwriteTo(DataOutputStream out) Methods inherited from class org.gatein.pc.api.StateString
create, create, decodeOpaqueValue, encodeAsOpaqueValue
-
Constructor Details
-
ParametersStateString
- Throws:
IOException
-
ParametersStateString
-
ParametersStateString
protected ParametersStateString()Creates an empty parameter set.
-
-
Method Details
-
create
-
create
-
create
Create a parameters state string. It assumes that the argument is either an instance ofParametersStateStringor that it is the string encoded value of aParametersStateString.- Parameters:
stateString- the state string- Returns:
- a new parameter state string
- Throws:
IllegalArgumentException- if the state string is opaque and does not represent parameters
-
getValue
Return the parameter value or null if it does not exist.- Parameters:
name- the parameter name- Returns:
- the parameter value or null if it does not exist
- Throws:
IllegalArgumentException- if the name is null
-
getValues
Return the parameter values or null if it does not exist.- Parameters:
name- the value to get- Returns:
- the parameter values
- Throws:
IllegalArgumentException- if the name is null
-
clear
public void clear()Clear all the parameters. -
replace
Replace all the parameters.- Parameters:
map- the map to replace- Throws:
IllegalArgumentException- if the map is not valid
-
setValue
Set the a parameter value.- Parameters:
name- the parameter namevalue- the parameter value- Throws:
IllegalArgumentException- if the name or the value is null
-
setValues
Set the parameter values. This method does not make a defensive copy of the values.- Parameters:
name- the parameter namevalues- the parameter values- Throws:
IllegalArgumentException- if the name is null
-
remove
Remove a parameter.- Parameters:
name- the parameter name- Throws:
IllegalArgumentException- if the name is null
-
getSize
public int getSize()Return the size.- Returns:
- the size
-
getParameters
Return the underlying parameter object.- Returns:
- the parameter object
-
getStringValue
Retrieves the opaque version associated with this navigational state.- Specified by:
getStringValuein classStateString- Returns:
- a URL-safe String representation of this navigational state.
-
writeTo
- Specified by:
writeToin classStateString- Throws:
IOException
-
toString
-
equals
-
hashCode
public int hashCode()
-