ariba.ui.aribaweb.util
Class Parameters

java.lang.Object
  extended by ariba.ui.aribaweb.util.Parameters
All Implemented Interfaces:
DebugState, Externalizable, Serializable

public class Parameters
extends Object
implements Externalizable, DebugState

Servlet style parameters from URL or CGI or RFC822 and friends The parameter names are case insensitive. We use the java.util classes because the Servlet API requires it.

See Also:
Serialized Form

Field Summary
static String ClassName
           
 
Constructor Summary
Parameters()
          Any class that implements Externalizable must have a constructor with no arguments.
Parameters(Map hashtable)
           
 
Method Summary
 void clear()
           
 Object debugState()
          Returns an object that will be toStringed when the debug information needs to be printed.
 String getParameter(String name)
           
 int getParameterCount()
           
 Iterator getParameterNames()
           
 String[] getParameterValues(String name)
           
 Iterator getParameterValuesIterator(String name)
           
 void putParameter(String name, String value)
           
 void readExternal(ObjectInput input)
          Implementation of the Externalizable interface
 String removeParameter(String name)
           
 String[] removeParameterValues(String name)
           
 String replaceParameter(String name, String value)
          Convenience method which removes the given parameter if it exists, then puts the new parameter value.
 String toString()
           
 void writeExternal(ObjectOutput output)
          Implementation of the Externalizable interface
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ClassName

public static final String ClassName
See Also:
Constant Field Values
Constructor Detail

Parameters

public Parameters()
Any class that implements Externalizable must have a constructor with no arguments.


Parameters

public Parameters(Map hashtable)
Method Detail

putParameter

public void putParameter(String name,
                         String value)

getParameter

public String getParameter(String name)

getParameterCount

public int getParameterCount()

getParameterValues

public String[] getParameterValues(String name)

getParameterValuesIterator

public Iterator getParameterValuesIterator(String name)

getParameterNames

public Iterator getParameterNames()

removeParameter

public String removeParameter(String name)

removeParameterValues

public String[] removeParameterValues(String name)

replaceParameter

public String replaceParameter(String name,
                               String value)
Convenience method which removes the given parameter if it exists, then puts the new parameter value. Returns the previous parameter value.


writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Implementation of the Externalizable interface

Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Implementation of the Externalizable interface

Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

toString

public String toString()
Overrides:
toString in class Object

debugState

public Object debugState()
Description copied from interface: DebugState
Returns an object that will be toStringed when the debug information needs to be printed. This method will only be called when the information is to be printed out - which will be rare. This method may safely be slow. It is also ok for the value that would be returned to change over time, even after the time that it is intially set in ThreadDebugState.

The most common implementation is to create a new Map and set key and value pairs of information in that Map which it will then return.

Specified by:
debugState in interface DebugState
Returns:
an object that encapsulates the state of the current application. The toString() method of the returned object should be made safe even if the object that implements DebugState is being modified at the time. Exceptions from toString are tollerable in this case, but data corruption is not.
See Also:
ThreadDebugState.set(ariba.util.core.ThreadDebugKey, java.lang.Object)

clear

public void clear()


AribaWeb User Interface Development Framework
Copyright © 2000-2009 Ariba, Inc. All Rights Reserved.