com.ibm.websphere.brb.mgmt
Class ConstantParameter

java.lang.Object
  |
  +--com.ibm.websphere.brb.mgmt.ConstantParameter
All Implemented Interfaces:
IParameter, java.io.Serializable

public class ConstantParameter
extends java.lang.Object
implements IParameter, java.io.Serializable

A constant parameter.

See Also:
Serialized Form

Constructor Summary
ConstantParameter(java.lang.Object constant)
          Creates an IParameter for passing a constant as a parameter.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Determine if this object is equal to the object passed in.
 java.lang.Object getConstant()
          Returns the constant which is returned when getValue is invoked.
 java.lang.String getUserDescription()
          Returns the user's description of this parameter.
 java.lang.Object getValue(java.lang.Object[] tpFiringParams, java.lang.Object target)
          Gets the value that this parameter represents.
 java.lang.String getValueDescription()
          Returns the text description of the value of this parameter.
 IParameter makeCopy()
          Makes a copy of this object.
 void setUserDescription(java.lang.String newUserDescription)
          Sets the user-specified description of this parameter.
 java.lang.String toXML(boolean format, java.lang.String indent)
          Returns the XML representation of this IParameter.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantParameter

public ConstantParameter(java.lang.Object constant)
Creates an IParameter for passing a constant as a parameter. It is not allowed to pass an arbitrary Serializable type as the constant. Only the following types are supported: In addition, the following array types are supported: Finally, a null value may be specified as the constant or may be an element of the array passed in as the constant. If the constant passed is not one of the types specified above, an IllegalArgumentException is thrown.

Parameters:
constant - the value getValue will return
Method Detail

equals

public boolean equals(java.lang.Object obj)
Determine if this object is equal to the object passed in.
Overrides:
equals in class java.lang.Object

getConstant

public java.lang.Object getConstant()
Returns the constant which is returned when getValue is invoked.
Returns:
the constant this mapper returns

getUserDescription

public java.lang.String getUserDescription()
Description copied from interface: IParameter
Returns the user's description of this parameter. This is a description that the user enters that describes what this parameter does.

Specified by:
getUserDescription in interface IParameter
Following copied from interface: com.ibm.websphere.brb.mgmt.IParameter
Returns:
the user's description, or null if none exists

getValue

public java.lang.Object getValue(java.lang.Object[] tpFiringParams,
                                 java.lang.Object target)
Description copied from interface: IParameter
Gets the value that this parameter represents. This method may determine the value to return based on the input parameters, or may totally ignore them.

Specified by:
getValue in interface IParameter
Following copied from interface: com.ibm.websphere.brb.mgmt.IParameter
Parameters:
tpFiringParams - the firing parameters passed from the trigger point
target - the target object passed from the trigger point
Returns:
the object to pass to the rule implementor

getValueDescription

public java.lang.String getValueDescription()
Description copied from interface: IParameter
Returns the text description of the value of this parameter. This description cannot be modified, and is specific to the type of ParameterMapper.

Specified by:
getValueDescription in interface IParameter
Following copied from interface: com.ibm.websphere.brb.mgmt.IParameter
Returns:
the description of the Parameter's value

makeCopy

public IParameter makeCopy()
Makes a copy of this object.

Specified by:
makeCopy in interface IParameter
Returns:
A copy of this object.

setUserDescription

public void setUserDescription(java.lang.String newUserDescription)
Description copied from interface: IParameter
Sets the user-specified description of this parameter.

Specified by:
setUserDescription in interface IParameter
Following copied from interface: com.ibm.websphere.brb.mgmt.IParameter
Parameters:
newUserDescription - the new description of this parameter

toXML

public java.lang.String toXML(boolean format,
                              java.lang.String indent)
Description copied from interface: IParameter
Returns the XML representation of this IParameter. Parameter format indicates whether the XML should be formatted with indentation and new lines. Parameter indent specifies the number of characters to indent the XML. This value is ignored if false is given for parameter format.

Specified by:
toXML in interface IParameter
Following copied from interface: com.ibm.websphere.brb.mgmt.IParameter
Parameters:
format - boolean indicating whether XML should be formatted
indent - the String to use to indent the XML
Returns:
the XML representation