Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.websody
Class Parameters  view Parameters download Parameters.java

java.lang.Object
  extended byorg.websody.Parameters

public class Parameters
extends java.lang.Object

Class used to pass parameters to a plug.


Field Summary
private  java.util.Map map
           
static java.lang.String PARAMS_ATTR
          The ServletRequest attribute key
 
Constructor Summary
Parameters()
          Creates an empty Parameters object.
Parameters(javax.servlet.http.HttpServletRequest request)
          Creates a new Parameter object filled with the http parameters from the given request.
Parameters(java.util.Map map)
          Creates a new Parameter object based on the given map.
 
Method Summary
static Parameters get(javax.servlet.http.HttpServletRequest request)
          Returns the instance associated with the request.
 java.util.Map getMap()
          Returns a unmodifiable map containing all parameters.
 java.lang.String getValue(java.lang.String name)
          Returns the the first value for name.
 java.lang.String[] getValues(java.lang.String name)
          Returns the values for name.
 java.util.Iterator iterator()
          Returns an iterator for the parameter names.
static void remove(javax.servlet.http.HttpServletRequest request)
          Removes the Parameters object from the request.
static void set(javax.servlet.http.HttpServletRequest request, Parameters params)
          Stores a Parameters object as request attribute.
 void set(java.lang.String name, java.lang.String value)
          Sets the value for name.
 void set(java.lang.String name, java.lang.String[] values)
          Sets the values for name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAMS_ATTR

public static final java.lang.String PARAMS_ATTR
The ServletRequest attribute key

See Also:
Constant Field Values

map

private java.util.Map map
Constructor Detail

Parameters

public Parameters()
Creates an empty Parameters object.


Parameters

public Parameters(javax.servlet.http.HttpServletRequest request)
Creates a new Parameter object filled with the http parameters from the given request.


Parameters

public Parameters(java.util.Map map)
Creates a new Parameter object based on the given map. Note: Changes of the parameters will be reflected by the map and vice versa.

Method Detail

get

public static Parameters get(javax.servlet.http.HttpServletRequest request)
Returns the instance associated with the request.


set

public static void set(javax.servlet.http.HttpServletRequest request,
                       Parameters params)
Stores a Parameters object as request attribute.


remove

public static void remove(javax.servlet.http.HttpServletRequest request)
Removes the Parameters object from the request.


iterator

public java.util.Iterator iterator()
Returns an iterator for the parameter names.


getMap

public java.util.Map getMap()
Returns a unmodifiable map containing all parameters.


getValues

public java.lang.String[] getValues(java.lang.String name)
Returns the values for name.


getValue

public java.lang.String getValue(java.lang.String name)
Returns the the first value for name.


set

public void set(java.lang.String name,
                java.lang.String value)
Sets the value for name.


set

public void set(java.lang.String name,
                java.lang.String[] values)
Sets the values for name.