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

Parameters - JBOSS Portal 2.4 API 英文版文档


org.jboss.portal.portlet
Class Parameters

java.lang.Object
  extended byorg.jboss.portal.common.util.ParameterMap
      extended byorg.jboss.portal.portlet.Parameters
All Implemented Interfaces:
java.util.Map, java.io.Serializable

public class Parameters
extends ParameterMap
implements java.io.Serializable

A set of parameters.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.jboss.portal.common.util.ParameterMap
ParameterMap.ParameterEntry, ParameterMap.ParameterEntryIterator, ParameterMap.ParameterEntrySet
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Constructor Summary
Parameters()
          Creates an empty parameter set.
Parameters(java.util.Map parameterMap)
          Copy the parameter map to initialize the object state.
Parameters(Parameters parameters)
          Copy constructor.
 
Method Summary
 void append(java.util.Map params)
           
 void append(Parameters params)
          Append the parameters to this object.
protected  void assertMap(java.util.Map that)
           
 boolean equals(java.lang.Object o)
          Compare to parameters objects.
protected  java.util.Map getDelegate()
           
 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.
 void remove(java.lang.String name)
          Remove a parameter.
 void replace(java.util.Map params)
          Replace all the exisint parameters with the new ones.
 void replace(Parameters params)
          Replace all the parameters with the new ones.
 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.common.util.ParameterMap
assertKey, assertValue, clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
hashCode
 

Constructor Detail

Parameters

public Parameters()
Creates an empty parameter set.


Parameters

public Parameters(Parameters parameters)
Copy constructor.

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

Parameters

public Parameters(java.util.Map 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

getDelegate

protected java.util.Map getDelegate()
Specified by:
getDelegate in class ParameterMap

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

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

append

public void append(Parameters params)
            throws java.lang.IllegalArgumentException
Append the parameters to this object. All the entries will be inserted in the current map. If a collision occurs then the new values will be appended to the existing ones.

Parameters:
params -
Throws:
java.lang.IllegalArgumentException - if the params is null

append

public void append(java.util.Map params)
            throws java.lang.IllegalArgumentException
Parameters:
params - the parameters to appends
Throws:
java.lang.IllegalArgumentException - if the params argument is not valid

replace

public void replace(java.util.Map params)
Replace all the exisint parameters with the new ones.

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

replace

public void replace(Parameters params)
Replace all the parameters with the new ones.

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

equals

public boolean equals(java.lang.Object o)
Compare to parameters objects.

Specified by:
equals in interface java.util.Map

toString

public java.lang.String toString()

assertMap

protected void assertMap(java.util.Map that)
                  throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException