Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.portal.portlet
Class ParametersStateString

    java.lang.Object
      org.jboss.portal.portlet.StateString
          org.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: 6549 $
Author:
  Julien Viet
See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `JBPNS_PREFIX` .

Method Summary
`void` | `clear()` Clear all the parameters.
`static ParametersStateString` | `create()`
`static StateString` | `create(java.io.DataInputStream in)` Factory method that will create the most appropriate form from the byte representation.
`static ParametersStateString` | `create(java.util.Map<java.lang.String,java.lang.String[]> parameters)`
`static ParametersStateString` | `create(StateString stateString)` Create a parameters state string.
`static StateString` | `create(java.lang.String opaqueValue)` Factory method that will create the most appropriate form from the string representation.
`boolean` | `equals(java.lang.Object obj)`
`java.util.Map<java.lang.String,java.lang.String[]>` | `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<java.lang.String,java.lang.String[]> 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()`
`void` | `writeTo(java.io.DataOutputStream out)`

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

Method Detail

### create

    public static ParametersStateString create()

### create

    public static ParametersStateString create(java.util.Map<java.lang.String,java.lang.String[]> parameters)

### create

    public static StateString create(java.io.DataInputStream in)
                              throws java.io.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:
    `java.io.IOException` - any IOException

### create

    public static StateString create(java.lang.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

### create

    public static ParametersStateString create(StateString stateString)
                                        throws java.lang.IllegalArgumentException

  Create a parameters state string. It assumes that the argument is either an instance of `ParametersStateString` or that it is the string encoded value of a `ParametersStateString`.

  Parameters:
    `stateString` - the state string
  Returns:
    a new parameter state string
  Throws:
    `java.lang.IllegalArgumentException` - if the state string is opaque and does not represent parameters

### 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

### clear

    public void clear()

  Clear all the parameters.

### replace

    public void replace(java.util.Map<java.lang.String,java.lang.String[]> map)

  Replace all the parameters.

  Parameters:
    `map` - the map to replace
  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 or 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.

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

### getSize

    public int getSize()

  Return the size.

  Returns:
    the size

### getParameters

    public java.util.Map<java.lang.String,java.lang.String[]> 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.

### writeTo

    public void writeTo(java.io.DataOutputStream out)
                 throws java.io.IOException

  Specified by:
    `writeTo` in class `StateString`
  Throws:
    `java.io.IOException`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object obj)

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008. All Rights Reserved.