com.ibm.websphere.brb.mgmt
Interface IParameter

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ConstantParameter, MethodCallParameter, TriggerPointParameter

public interface IParameter
extends java.io.Serializable

Defines the interface for a parameter in BRBeans, either for use as an initialization parameter or a firing parameter. Before parameters are passed to the rule, each parameter which is set in the rule has its getValue method called, the results of which is the actual parameter which is passed to the rule implementor.


Method Summary
 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 toShortenedXML()
          Returns a shortened XML representation of this IParameter.
 java.lang.String toXML(boolean format, java.lang.String indent)
          Returns the XML representation of this IParameter.
 

Method Detail

getUserDescription

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

Returns:
the user's description, or null if none exists

getValue

public java.lang.Object getValue(java.lang.Object[] tpFiringParams,
                                 java.lang.Object target)
                          throws BusinessRuleBeansException
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.

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
Throws:
BusinessRuleBeansException

getValueDescription

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

Returns:
the description of the Parameter's value

makeCopy

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

Returns:
A copy of this object.

setUserDescription

public void setUserDescription(java.lang.String newUserDescription)
Sets the user-specified description of this parameter.

Parameters:
newUserDescription - the new description of this parameter

toXML

public java.lang.String toXML(boolean format,
                              java.lang.String indent)
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.

Parameters:
format - boolean indicating whether XML should be formatted
indent - the String to use to indent the XML
Returns:
the XML representation

toShortenedXML

public java.lang.String toShortenedXML()
Returns a shortened XML representation of this IParameter. The purpose of this shortened form is to take up less space when the data is stored in the database for the Rule EJB. There are no public methods available that can read this format. This method should only be used when the Rule EJB is being stored to the database.

FOR IBM INTERNAL USE ONLY