public interface Rule extends BusinessRuleValidateable, BusinessRuleChangeDetector, java.io.Serializable
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.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
Get the description associated with this rule.
|
java.lang.String |
getDisplayName()
Get the display name for this rule.
|
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.
|
java.lang.String |
getName()
Get the name of this rule.
|
java.lang.String |
getUserPresentation()
Get the user presentation for this rule.
|
boolean |
isDisplayNameSynchronizedToName()
Check to see if the display name is synchronized to the name for this rule.
|
void |
setDescription(java.lang.String newDescription)
Set the description associated with this rule.
|
void |
setDisplayName(java.lang.String newDisplayName)
Set the display name for this rule.
|
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.
|
validate
hasChanges
static final java.lang.String COPYRIGHT
java.lang.String getName()
java.lang.String getDisplayName()
isDisplayNameSynchronizedToName
and setDisplayName
for more
information.void setDisplayName(java.lang.String newDisplayName)
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.newDisplayName
- The new display name for this rule. May be null.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.boolean isDisplayNameSynchronizedToName()
true
if the display name is synchronized to the name for this rule;
otherwise false
.void setDisplayNameIsSynchronizedToName(boolean newDisplayNameIsSynchronizedToName)
When this method is called with a value of true
, the display name is
automatically changed to have the same value as the name.
newDisplayNameIsSynchronizedToName
- The new value for the flag that determines
whether or not the display name is synchronized to the name for this rule.ChangesNotAllowedException
- if changes to this object are temporarily
disallowed while other changes are being published.java.lang.String getDescription()
void setDescription(java.lang.String newDescription)
newDescription
- The new description to be associated with this rule.
May be null.ChangesNotAllowedException
- if changes to this object are temporarily
disallowed while other changes are being published.java.lang.String getUserPresentation()
java.lang.String getExpandedUserPresentation()
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.