站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

ParametersStateString - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.portlet
Class ParametersStateString

java.lang.Object
  extended byorg.jboss.portal.portlet.StateString
      extended byorg.jboss.portal.portlet.ParametersStateString
All Implemented Interfaces:
java.io.Serializable

public class ParametersStateString
extends StateString
implements java.io.Serializable

A set of parameters.

Version:
$Revision: 5448 $
Author:
Julien Viet
See Also:
Serialized Form

Field Summary
private static java.lang.String EOF
          .
static java.lang.String JBPNS_PREFIX
          .
private  Parameters parameters
          The data.
private static long serialVersionUID
          The serialVersionUID
 
Constructor Summary
ParametersStateString()
          Creates an empty parameter set.
ParametersStateString(Parameters parameterMap)
          Copy the parameter map to initialize the object state.
ParametersStateString(java.lang.String opaqueValue)
           
 
Method Summary
 void clear()
          Clear all the parameters.
 boolean equals(java.lang.Object o)
           
 java.util.Map getMap()
          Return the a map containing the values.
 Parameters getParameters()
          Return the underlying parameter object.
 int getSize()
          Return the size.
 java.lang.String getStringValue()
          Retrieves the opaque version associated with this navigational state.
 java.lang.String getValue(java.lang.String name)
          Return the parameter value or null if it does not exist.
 java.lang.String[] getValues(java.lang.String name)
          Return the parameter values or null if it does not exist.
 int hashCode()
           
 void remove(java.lang.String name)
          Remove a parameter.
 void replace(java.util.Map map)
          Replace all the parameters.
 void setValue(java.lang.String name, java.lang.String value)
          Set the a parameter value.
 void setValues(java.lang.String name, java.lang.String[] values)
          Set the parameter values.
 java.lang.String toString()
           
 
Methods inherited from class org.jboss.portal.portlet.StateString
createFrom
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

JBPNS_PREFIX

public static final java.lang.String JBPNS_PREFIX
.

See Also:
Constant Field Values

serialVersionUID

private static final long serialVersionUID
The serialVersionUID

See Also:
Constant Field Values

EOF

private static final java.lang.String EOF
.

See Also:
Constant Field Values

parameters

private Parameters parameters
The data.

Constructor Detail

ParametersStateString

public ParametersStateString(java.lang.String opaqueValue)

ParametersStateString

public ParametersStateString()
Creates an empty parameter set.


ParametersStateString

public ParametersStateString(Parameters parameterMap)
Copy the parameter map to initialize the object state.

Throws:
java.lang.IllegalArgumentException - if the parameter map is null or not valid
Method Detail

getValue

public java.lang.String getValue(java.lang.String name)
                          throws java.lang.IllegalArgumentException
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:
java.lang.IllegalArgumentException - if the name is null

getValues

public java.lang.String[] getValues(java.lang.String name)
                             throws java.lang.IllegalArgumentException
Return the parameter values or null if it does not exist.

Parameters:
name - the value to get
Returns:
the parameter values
Throws:
java.lang.IllegalArgumentException - if the name is null

getMap

public java.util.Map getMap()
Return the a map containing the values.


clear

public void clear()
Clear all the parameters.


replace

public void replace(java.util.Map map)
Replace all the parameters.

Throws:
java.lang.IllegalArgumentException - if the map is not valid

setValue

public void setValue(java.lang.String name,
                     java.lang.String value)
Set the a parameter value.

Parameters:
name - the parameter name
value - the parameter value
Throws:
java.lang.IllegalArgumentException - if the name is null
java.lang.IllegalArgumentException - if the value is null

setValues

public void setValues(java.lang.String name,
                      java.lang.String[] values)
Set the parameter values. This method does not make a defensive copy of the values.

Parameters:
name - the parameter name
values - the parameter values
Throws:
java.lang.IllegalArgumentException - if the name is null

remove

public void remove(java.lang.String name)
Remove a parameter.

Throws:
java.lang.IllegalArgumentException - if the name is null

getSize

public int getSize()
Return the size.


getParameters

public Parameters getParameters()
Return the underlying parameter object.

Returns:
the parameter object

getStringValue

public java.lang.String getStringValue()
Retrieves the opaque version associated with this navigational state.

Specified by:
getStringValue in class StateString
Returns:
a URL-safe String representation of this navigational state.

hashCode

public int hashCode()
Specified by:
hashCode in class StateString

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in class StateString

toString

public java.lang.String toString()