com.ibm.wbiserver.brules.mgmt

Interface Rule

All Superinterfaces:
BusinessRuleChangeDetector, BusinessRuleValidateable, java.io.Serializable
All known subinterfaces:
DecisionTableRule, DecisionTableTemplateInstanceRule, RuleSetRule, RuleSetTemplateInstanceRule, TemplateInstanceRule

  1. public interface Rule
  2. extends BusinessRuleValidateable, BusinessRuleChangeDetector, java.io.Serializable
This interface represents one rule within either a ruleset or a decision table. The rule may be a hard-coded rule or may be a rule instance created from a rule template. A hard-coded rule is represented by an instance of this interface; there is no sub-interface for a hard-coded rule. A rule that was created from a template is represented by an instance of TemplateInstanceRule.

A rule has a name and a user presentation string. The user presentation string specifies how the rule should be presented to the end user.


Field Summary

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

Method Summary

Modifier and Type Method and Description
  1. java.lang.String
getDescription()
Get the description associated with this rule.
  1. java.lang.String
getDisplayName()
Get the display name for this rule.
  1. java.lang.String
getExpandedUserPresentation()
Get the user presentation for this rule with any placeholders for template parameters filled in with the actual value of the parameter.
  1. java.lang.String
getName()
Get the name of this rule.
  1. java.lang.String
getUserPresentation()
Get the user presentation for this rule.
  1. boolean
isDisplayNameSynchronizedToName()
Check to see if the display name is synchronized to the name for this rule.
  1. void
setDescription(java.lang.String newDescription)
Set the description associated with this rule.
  1. void
setDisplayName(java.lang.String newDisplayName)
Set the display name for this rule.
  1. void
setDisplayNameIsSynchronizedToName(boolean newDisplayNameIsSynchronizedToName)
Change the value of the flag that determines whether or not the display name is synchronized to the name for this rule.
Methods inherited from interface com.ibm.wbiserver.brules.mgmt.BusinessRuleValidateable
validate
Methods inherited from interface com.ibm.wbiserver.brules.mgmt.BusinessRuleChangeDetector
hasChanges

Field Detail

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

Method Detail

getName

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

getDisplayName

  1. java.lang.String getDisplayName( )
Get the display name for this rule. The display name may have been specified during development of the rule to give a name that is more understandable to the business user. A flag can be set on the rule to ensure that the display name value is always synchronized to the name value. If this flag is turned on, then the display name cannot be changed. See isDisplayNameSynchronizedToName and setDisplayName for more information.
Returns:
the display name of this rule. May be null.

setDisplayName

  1. void setDisplayName(java.lang.String newDisplayName)
Set the display name for this rule. If the display name is synchronized to the name for this rule (see isDisplayNameSynchronizedToName), then changes to the display name are not allowed. This is because the name field takes precedence over the display name and the name field cannot be changed. In this case a DisplayNameNotChangeableException is thrown.
Parameters:
newDisplayName - The new display name for this rule. May be null.
Throws:
DisplayNameNotChangeableException - if the display name for this rule is synchronized to the name.
ChangesNotAllowedException - if changes to this object are temporarily disallowed while other changes are being published.

isDisplayNameSynchronizedToName

  1. boolean isDisplayNameSynchronizedToName( )
Check to see if the display name is synchronized to the name for this rule. Synchronizing the display name to the name means that the display name value will always be the same as the name value. One consequence of this is that since the name is not changeable, when the two are synchronized you are not allowed to change the display name either. If the display name is not synchronized to the name, then the display name can be changed.
Returns:
true if the display name is synchronized to the name for this rule; otherwise false.

setDisplayNameIsSynchronizedToName

  1. void setDisplayNameIsSynchronizedToName( boolean newDisplayNameIsSynchronizedToName)
Change the value of the flag that determines whether or not the display name is synchronized to the name for this rule. Synchronizing the display name to the name means that the display name value will always be the same as the name value. One consequence of this is that since the name is not changeable, when the two are synchronized you are not allowed to change the display name either. If the display name is not synchronized to the name, then the display name can be changed.

When this method is called with a value of true, the display name is automatically changed to have the same value as the name.

Parameters:
newDisplayNameIsSynchronizedToName - The new value for the flag that determines whether or not the display name is synchronized to the name for this rule.
Throws:
ChangesNotAllowedException - if changes to this object are temporarily disallowed while other changes are being published.

getDescription

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

setDescription

  1. void setDescription(java.lang.String newDescription)
Set the description associated with this rule.
Parameters:
newDescription - The new description to be associated with this rule. May be null.
Throws:
ChangesNotAllowedException - if changes to this object are temporarily disallowed while other changes are being published.

getUserPresentation

  1. java.lang.String getUserPresentation( )
Get the user presentation for this rule. If this rule is based on a template, then the returned presentation string makes use of a convention where template parameters are represented by the index of the parameter in the template's parameter list surrounded by curly braces ('{' and '}'). For example, consider the following user presentation string: "set output1 to {0} and output2 to {1}". "{0}" represents the first parameter in the template and "{1}" represents the second parameter in the template. If this rule is not based on a template, then there are no parameters to be shown in the string.
Returns:
The user presentation for this rule.

getExpandedUserPresentation

  1. java.lang.String getExpandedUserPresentation( )
Get the user presentation for this rule with any placeholders for template parameters filled in with the actual value of the parameter. If this rule is not based on a template, then this is the same as calling the getUserPresentation method. If this rule is based on a template, then all of the template parameter placeholders (denoted by curly braces, '{' and '}') will be filled in with the actual parameter values specified in this template instance.
Returns:
The user presentation for this rule with template parameter values filled in.