com.ibm.wbiserver.brules.mgmt

Interface Parameter

All Superinterfaces:
java.io.Serializable

  1. public interface Parameter
  2. extends java.io.Serializable
This interface represents one template parameter. Each parameter has a name, a data type, and an optional constraint. The constraint, if present, specifies constraints on the value for this parameter. For example, the constraint may specify that a numeric parameter must be within the range from 0 to 100.

A method is provided to create a new ParameterValue object to represent a value for this parameter. This method would be used when new parameter values need to be specified when creating a new template instance. There is also a method to validate that a given value is valid for this parameter given the data type and any defined constraints.


Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
COPYRIGHT

Method Summary

Modifier and Type Method and Description
  1. ParameterValue
createParameterValue(java.lang.String value)
Create a new ParameterValue object for the parameter represented by this object.
  1. Constraint
getConstraint()
Get the constraints, if any, for the values for this variable.
  1. ParameterDataType
getDataType()
Get the data type of this variable.
  1. Template
getDefiningTemplate()
Get the template in which this parameter is defined.
  1. java.lang.String
getDescription()
Get the description associated with this parameter.
  1. java.lang.String
getDisplayName()
Get the display name for this parameter.
  1. java.lang.String
getName()
Get the name of this variable.

Field Detail

  1. static final java.lang.String COPYRIGHT
See Also:

Method Detail

getName

  1. java.lang.String getName()
Get the name of this variable.
Returns:
The name of this variable.

getDescription

  1. java.lang.String getDescription( )
Get the description associated with this parameter.
Returns:
The description associated with this parameter. May be null.

getDisplayName

  1. java.lang.String getDisplayName( )
Get the display name for this parameter. The display name may have been specified during development of the parameter to give a name that is more understandable to the business user.
Returns:
the display name of this parameter. May be null.

getDataType

  1. ParameterDataType getDataType()
Get the data type of this variable.
Returns:
The data type of this variable.

getConstraint

  1. Constraint getConstraint()
Get the constraints, if any, for the values for this variable.
Returns:
The Constraint object that specifies the constraints for the value for this variable or null if there are no constraints.

getDefiningTemplate

  1. Template getDefiningTemplate()
Get the template in which this parameter is defined.
Returns:
The template in which this parameter is defined.

createParameterValue

  1. ParameterValue createParameterValue( java.lang.String value)
  2. throws ValidationException
Create a new ParameterValue object for the parameter represented by this object. The new object represents the specified value for this parameter. This method can be used to create ParameterValue objects to be used when creating a template instances based on a particular template. The specified value is checked to ensure that it is valid for this parameter given the parameter's data type and any defined constraints. The value must be convertible, using standard Java methods, to the type of the parameter. For example, if the type of the parameter is double, then it must be possible to convert the valueto a Java double using the Double.valueOf() method. Note that for boolean types the only allowed values are the strings "true" and "false", all lower case.
Parameters:
value - The value for the template parameter in string form. This value must be convertible, using standard Java methods, to the type of the parameter. null is not allowed unless the type of the parameter is string.
Returns:
A new ParameterValue representing the specified value for the specified parameter.
Throws:
ValidationException - if any validation errors are detected as defined above.
java.lang.IllegalArgumentException - if the specified value is null and the type of the parameter is not string.
ChangesNotAllowedException - if changes related to this object are temporarily disallowed while other changes are being published.