ariba.ui.aribaweb.util
Class Parameters

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

public class Parameters
extends java.lang.Object
implements java.io.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 java.lang.String ClassName
           
 
Constructor Summary
Parameters()
          Any class that implements Externalizable must have a constructor with no arguments.
Parameters(java.util.Map hashtable)
           
 
Method Summary
 void clear()
           
 java.lang.Object debugState()
          Returns an object that will be toStringed when the debug information needs to be printed.
 java.lang.String getParameter(java.lang.String name)
           
 int getParameterCount()
           
 java.util.Iterator getParameterNames()
           
 java.lang.String[] getParameterValues(java.lang.String name)
           
 java.util.Iterator getParameterValuesIterator(java.lang.String name)
           
 void putParameter(java.lang.String name, java.lang.String value)
           
 void readExternal(java.io.ObjectInput input)
          Implementation of the Externalizable interface
 java.lang.String removeParameter(java.lang.String name)
           
 java.lang.String[] removeParameterValues(java.lang.String name)
           
 java.lang.String replaceParameter(java.lang.String name, java.lang.String value)
          Convenience method which removes the given parameter if it exists, then puts the new parameter value.
 java.lang.String toString()
           
 void writeExternal(java.io.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 java.lang.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(java.util.Map hashtable)
Method Detail

putParameter

public void putParameter(java.lang.String name,
                         java.lang.String value)

getParameter

public java.lang.String getParameter(java.lang.String name)

getParameterCount

public int getParameterCount()

getParameterValues

public java.lang.String[] getParameterValues(java.lang.String name)

getParameterValuesIterator

public java.util.Iterator getParameterValuesIterator(java.lang.String name)

getParameterNames

public java.util.Iterator getParameterNames()

removeParameter

public java.lang.String removeParameter(java.lang.String name)

removeParameterValues

public java.lang.String[] removeParameterValues(java.lang.String name)

replaceParameter

public java.lang.String replaceParameter(java.lang.String name,
                                         java.lang.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(java.io.ObjectOutput output)
                   throws java.io.IOException
Implementation of the Externalizable interface

Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

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

Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

debugState

public java.lang.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-2014 Ariba, Inc. All Rights Reserved.