BEA Systems, Inc.

WebLogic Server 5.1.0 API Reference

weblogic.common
Class ParamSet

java.lang.Object
  |
  +--weblogic.common.ParamSet

public final class ParamSet
extends java.lang.Object
implements WLSerializable, java.lang.Cloneable

A ParamSet object is used to set parameters for events and remote procedures. A ParamSet contains ParamValues, which are accessible by keyname and index position.

A ParamSet keyname with its corresponding ParamValue makes up the name/value pair used by events, event registrations, evaluators, and actions.

Conversions among the various datatypes are handled automatically in a "Java" way, i.e., the conversion can be accomplished either of these ways:

Illegal conversions (for example, int to boolean) throw a ParamSetException.

Author:
Copyright (c) 1996-1998 WebLogic, Inc. All Rights Reserved., Copyright (c) 1998-2000 BEA Systems, Inc. All Rights Reserved.
See Also:
ParamValue, Serialized Form

Field Summary
 boolean trap
           
 
Constructor Summary
ParamSet()
          Constructs a ParamSet.
ParamSet(int i)
          Constructs a ParamSet with the specified number of parameters.
 
Method Summary
 java.lang.Object clone()
          Clones a ParamSet.
 ParamValue declareParam(java.lang.String name, int datatype)
          Declares the specified name and data type as a IN/OUT parameter and returns it as a ParamValue.
 ParamValue declareParam(java.lang.String name, int datatype, java.lang.String desc)
          Declares the specified name, data type, and description as a IN/OUT parameter and returns it as a ParamValue.
 void destroy()
          Destroys a ParamSet.
 java.lang.String display()
          Displays a string representation of a ParamSet.
 java.lang.String dump()
          Dumps the contents of a ParamSet into string form.
 ParamValue get(int i)
          Gets the ParamValue at the specified index into the ParamSet.
 java.lang.String[] getNames()
          Gets the names of the ParamValues in a ParamSet.
 ParamValue getParam(java.lang.String key)
          Gets the ParamValue in a ParamSet that matches the specified keyname.
 ParamValue getParam(java.lang.String key, int index)
          Gets the ParamValue that matches the specified keyname and at the specified index position into a vector of ParamValues.
 ParamValue getValue(java.lang.String key)
          Gets the ParamValue object for the specified keyname.
 void initialize()
          Initializes a ParamSet.
 boolean isEmpty()
          Determines whether a ParamSet is empty.
 void print(java.io.PrintStream out)
          Prints a ParamSet to a PrintStream.
 void readObject(WLObjectInput in)
          Internal use only.
 ParamValue setParam(java.lang.String key, boolean v)
          Sets a ParamValue at the specified keyname to the specified Boolean data type.
 ParamValue setParam(java.lang.String key, byte v)
          Sets a ParamValue at the specified keyname to the specified byte data type.
 ParamValue setParam(java.lang.String key, byte i, int v)
          Sets the ParamValue, at the specified byte in a vector of ParamValues that correspond to the specified keyname, to the specified integer data type.
 ParamValue setParam(java.lang.String key, char v)
          Sets a ParamValue at the specified keyname to the specified char data type.
 ParamValue setParam(java.lang.String key, java.util.Date v)
          Sets a ParamValue at the specified keyname to the specified date data type.
 ParamValue setParam(java.lang.String key, double v)
          Sets a ParamValue at the specified keyname to the specified double data type.
 ParamValue setParam(java.lang.String key, float v)
          Sets a ParamValue at the specified keyname to the specified float data type.
 ParamValue setParam(java.lang.String key, int v)
          Sets a ParamValue at the specified keyname to the specified integer data type.
 ParamValue setParam(java.lang.String key, int i, boolean v)
          Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified Boolean data type.
 ParamValue setParam(java.lang.String key, int i, char v)
          Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified char data type.
 ParamValue setParam(java.lang.String key, int i, java.util.Date v)
          Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified date data type.
 ParamValue setParam(java.lang.String key, int i, double v)
          Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified double data type.
 ParamValue setParam(java.lang.String key, int i, float v)
          Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified float data type.
 ParamValue setParam(java.lang.String key, int i, int v)
          Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified integer data type.
 ParamValue setParam(java.lang.String key, int i, long v)
          Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified long data type.
 ParamValue setParam(java.lang.String key, int i, java.lang.Object v)
          Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified Object data type.
 ParamValue setParam(java.lang.String key, int i, ParamValue v)
          Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified ParamValue.
 ParamValue setParam(java.lang.String key, int i, short v)
          Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified short data type.
 ParamValue setParam(java.lang.String key, int i, java.lang.String v)
          Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified string data type.
 ParamValue setParam(java.lang.String key, long v)
          Sets a ParamValue at the specified keyname to the specified long data type.
 ParamValue setParam(java.lang.String key, java.lang.Object v)
          Sets a ParamValue at the specified keyname to the specified object, which should implement either java.io.Serializable or weblogic.common.WLSerializable.
 ParamValue setParam(java.lang.String key, ParamValue v)
          Sets a ParamValue at the specified keyname to the specified ParamValue.
 ParamValue setParam(java.lang.String key, short v)
          Sets a ParamValue at the specified keyname to the specified short data type.
 ParamValue setParam(java.lang.String key, java.lang.String v)
          Sets a ParamValue at the specified keyname to the specified string data type.
 void setParam(java.lang.String keyNames, java.lang.String keyValues, ParamSet that)
          Sets the names and values of a ParamSet according to the names and values of another specified ParamSet.
 void setParams(ParamSet that)
          Sets the values of a ParamSet according to the values in another specified ParamSet.
 int size()
          Returns the number of parameters in a ParamSet.
 java.lang.String toString()
          Returns a string representation of a ParamSet.
 int used()
          Returns number of parameters in use in a ParamSet.
 void writeObject(WLObjectOutput out)
          Internal use only.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

trap

public boolean trap
Constructor Detail

ParamSet

public ParamSet(int i)
Constructs a ParamSet with the specified number of parameters.

Parameters:
i - Integer value

ParamSet

public ParamSet()
Constructs a ParamSet.
Method Detail

initialize

public void initialize()
Initializes a ParamSet.


destroy

public void destroy()
Destroys a ParamSet.


size

public int size()
Returns the number of parameters in a ParamSet.

Returns:
Number of parameters

used

public int used()
Returns number of parameters in use in a ParamSet.

Returns:
Number of parameters in use

isEmpty

public boolean isEmpty()
Determines whether a ParamSet is empty.

Returns:
true if empty

getValue

public ParamValue getValue(java.lang.String key)
Gets the ParamValue object for the specified keyname.

Parameters:
key - String keyname

get

public ParamValue get(int i)
Gets the ParamValue at the specified index into the ParamSet.

Parameters:
i - Integer value

declareParam

public ParamValue declareParam(java.lang.String name,
                               int datatype,
                               java.lang.String desc)
                        throws ParamSetException
Declares the specified name, data type, and description as a IN/OUT parameter and returns it as a ParamValue.

Parameters:
name - Parameter name
datatype - Data type from weblogic.common.ParamTypes
desc - Parameter description
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error with the ParamSet

declareParam

public ParamValue declareParam(java.lang.String name,
                               int datatype)
                        throws ParamSetException
Declares the specified name and data type as a IN/OUT parameter and returns it as a ParamValue.

Parameters:
name - Parameter name
datatype - Data type from weblogic.common.ParamTypes
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error with the ParamSet

getParam

public ParamValue getParam(java.lang.String key)
                    throws ParamSetException
Gets the ParamValue in a ParamSet that matches the specified keyname.

Parameters:
key - Keyname to match
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error with the ParamSet

getParam

public ParamValue getParam(java.lang.String key,
                           int index)
                    throws ParamSetException
Gets the ParamValue that matches the specified keyname and at the specified index position into a vector of ParamValues.

Parameters:
key - String to match
index - Index position
Throws:
ParamSetException - if there is an error in the ParamSet

setParams

public void setParams(ParamSet that)
               throws ParamSetException
Sets the values of a ParamSet according to the values in another specified ParamSet.

Parameters:
that - ParamSet to move values from
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public void setParam(java.lang.String keyNames,
                     java.lang.String keyValues,
                     ParamSet that)
              throws ParamSetException
Sets the names and values of a ParamSet according to the names and values of another specified ParamSet.

Parameters:
keyNames - Name of keynames
keyValues - Name of values
that - ParamSet to move names and values from
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           ParamValue v)
                    throws ParamSetException
Sets a ParamValue at the specified keyname to the specified ParamValue.

Parameters:
key - Keyname to set
v - ParamValue to be copied
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           double v)
                    throws ParamSetException
Sets a ParamValue at the specified keyname to the specified double data type.

Parameters:
key - Keyname to set
v - Double data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           float v)
                    throws ParamSetException
Sets a ParamValue at the specified keyname to the specified float data type.

Parameters:
key - Keyname to set
v - Float data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           long v)
                    throws ParamSetException
Sets a ParamValue at the specified keyname to the specified long data type.

Parameters:
key - Keyname to set
v - Long data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           int v)
                    throws ParamSetException
Sets a ParamValue at the specified keyname to the specified integer data type.

Parameters:
key - Keyname to set
v - Integer data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           short v)
                    throws ParamSetException
Sets a ParamValue at the specified keyname to the specified short data type.

Parameters:
key - Keyname to set
v - Short data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           byte v)
                    throws ParamSetException
Sets a ParamValue at the specified keyname to the specified byte data type.

Parameters:
key - Keyname to set
v - Byte data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           boolean v)
                    throws ParamSetException
Sets a ParamValue at the specified keyname to the specified Boolean data type.

Parameters:
key - Keyname to set
v - Boolean data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           char v)
                    throws ParamSetException
Sets a ParamValue at the specified keyname to the specified char data type.

Parameters:
key - Keyname to set
v - Char data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           java.lang.String v)
                    throws ParamSetException
Sets a ParamValue at the specified keyname to the specified string data type.

Parameters:
key - Keyname to set
v - String data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           java.util.Date v)
                    throws ParamSetException
Sets a ParamValue at the specified keyname to the specified date data type.

Parameters:
key - Keyname to set
v - Date data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           java.lang.Object v)
                    throws ParamSetException
Sets a ParamValue at the specified keyname to the specified object, which should implement either java.io.Serializable or weblogic.common.WLSerializable.

Parameters:
key - Keyname to set
v - Serializable data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           int i,
                           ParamValue v)
                    throws ParamSetException
Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified ParamValue.

Parameters:
key - Keyname to set
i - Index into a vector of ParamValues
v - ParamValue object to be set
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           int i,
                           double v)
                    throws ParamSetException
Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified double data type.

Parameters:
key - Keyname to set
i - Index into a vector of ParamValues
v - Double data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           int i,
                           float v)
                    throws ParamSetException
Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified float data type.

Parameters:
key - Keyname to set
i - Index into a vector of ParamValues
v - Float data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           int i,
                           long v)
                    throws ParamSetException
Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified long data type.

Parameters:
key - Keyname to set
i - Index into a vector of ParamValues
v - Long data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           int i,
                           int v)
                    throws ParamSetException
Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified integer data type.

Parameters:
key - Keyname to set
i - Index into a vector of ParamValues
v - Integer data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           int i,
                           short v)
                    throws ParamSetException
Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified short data type.

Parameters:
key - Keyname to set
i - Index into a vector of ParamValues
v - Short data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           byte i,
                           int v)
                    throws ParamSetException
Sets the ParamValue, at the specified byte in a vector of ParamValues that correspond to the specified keyname, to the specified integer data type.

Parameters:
key - Keyname to set
i - Byte in a vector of ParamValues
v - Integer data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           int i,
                           boolean v)
                    throws ParamSetException
Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified Boolean data type.

Parameters:
key - Keyname to set
i - Index into a vector of ParamValues
v - Boolean data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           int i,
                           char v)
                    throws ParamSetException
Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified char data type.

Parameters:
key - Keyname to set
i - Index into a vector of ParamValues
v - Char data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           int i,
                           java.lang.String v)
                    throws ParamSetException
Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified string data type.

Parameters:
key - Keyname to set
i - Index into a vector of ParamValues
v - String data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           int i,
                           java.util.Date v)
                    throws ParamSetException
Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified date data type.

Parameters:
key - Keyname to set
i - Index into a vector of ParamValues
v - Date data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

setParam

public ParamValue setParam(java.lang.String key,
                           int i,
                           java.lang.Object v)
                    throws ParamSetException
Sets the ParamValue, at the specified index into a vector of ParamValues that correspond to the specified keyname, to the specified Object data type.

Parameters:
key - Keyname to set
i - Index into a vector of ParamValues
v - Object data type
Returns:
ParamValue object
Throws:
ParamSetException - if there is an error in the ParamSet

clone

public java.lang.Object clone()
Clones a ParamSet. Performs a deep copy of the ParamSet. This method clones everything down to and including the ParamValue objects, but not the "value" that the ParamValue contains.

Returns:
Object
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Returns a string representation of a ParamSet.

Returns:
String representation
Overrides:
toString in class java.lang.Object

dump

public java.lang.String dump()
Dumps the contents of a ParamSet into string form.

Returns:
String representation

display

public java.lang.String display()
Displays a string representation of a ParamSet.

Returns:
String representation

print

public void print(java.io.PrintStream out)
Prints a ParamSet to a PrintStream.

Parameters:
out - PrintStream

getNames

public java.lang.String[] getNames()
                            throws ParamSetException
Gets the names of the ParamValues in a ParamSet.

Returns:
Array of strings
Throws:
ParamSetException - if there is an error in the ParamSet

readObject

public void readObject(WLObjectInput in)
                throws java.io.IOException
Internal use only.
Specified by:
readObject in interface WLSerializable


writeObject

public void writeObject(WLObjectOutput out)
                 throws java.io.IOException
Internal use only.
Specified by:
writeObject in interface WLSerializable


Documentation is available at
http://www.weblogic.com/docs51