com.ibm.wbiserver.brules.mgmt
Interface BusinessRule
- public interface BusinessRule
- extends BusinessRuleValidateable, BusinessRuleChangeDetector, java.io.Serializable
createCopy
method. This is the only way to create
a new business rule using the API.
Field Summary
Modifier and Type | Field and Description |
---|---|
|
COPYRIGHT
|
Method Summary
Modifier and Type | Method and Description |
---|---|
createCopy(java.lang.String newTargetNameSpace,java.lang.String newName)
Create a copy of this
BusinessRule with a new name.
|
|
getAssociatedOperation()
Get the
Operation for which this business rule is defined.
|
|
|
getDescription()
Get the description associated with this business rule.
|
|
getDisplayName()
Get the display name for this business rule.
|
|
getName()
Get the name of the business rule.
|
getProperties()
Get the list of properties associated with this business rule.
|
|
getProperty(java.lang.String name)
Get the property on this business rule that has the specified name.
|
|
|
getPropertyValue(java.lang.String name)
Get the value of the property on this business rule that has the specified name.
|
|
getRuntimeID()
Returns a globally unique ID for the business rule.
|
|
getSaveDate()
Get the date and time that the information in this copy of the business rule
was saved to persistent storage.
|
|
getTargetNameSpace()
Get the target name space of the business rule.
|
getType()
Get the type of this business rule.
|
|
|
isDisplayNameSynchronizedToName()
Check to see if the display name is synchronized to the name for this business rule.
|
|
setDescription(java.lang.String newDescription)
Set the description associated with this business rule.
|
|
setDisplayName(java.lang.String newDisplayName)
Set the display name for this business rule.
|
|
setDisplayNameIsSynchronizedToName(boolean newDisplayNameIsSynchronizedToName)
Change the value of the flag that determines whether or not the display name is
synchronized to the name for this business rule.
|
|
setPropertyValue(java.lang.String name,java.lang.String value)
Set the value of the property with the specified name to the specified value.
|
Methods inherited from interface com.ibm.wbiserver.brules.mgmt.BusinessRuleValidateable |
---|
validate |
Methods inherited from interface com.ibm.wbiserver.brules.mgmt.BusinessRuleChangeDetector |
---|
hasChanges |
Field Detail
COPYRIGHT
- static final java.lang.String COPYRIGHT
Method Detail
getTargetNameSpace
- java.lang.String getTargetNameSpace( )
getName
- java.lang.String getName()
getDisplayName
- java.lang.String getDisplayName( )
isDisplayNameSynchronizedToName
and setDisplayName
for more
information.
setDisplayName
- 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 business rule. May be null. DisplayNameNotChangeableException
- if the display name for this business rule
is synchronized to the name. ChangesNotAllowedException
- if changes to this object are temporarily
disallowed while other changes are being published. isDisplayNameSynchronizedToName
- boolean isDisplayNameSynchronizedToName( )
true
if the display name is synchronized to the name for this
business rule; otherwise false
. setDisplayNameIsSynchronizedToName
- 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 business rule. ChangesNotAllowedException
- if changes to this object are temporarily
disallowed while other changes are being published. getType
- BusinessRuleType getType()
getDescription
- java.lang.String getDescription( )
setDescription
- void setDescription(java.lang.String newDescription)
newDescription
- The new description to be associated with this business rule.
May be null. ChangesNotAllowedException
- if changes to this object are temporarily
disallowed while other changes are being published. getAssociatedOperation
- Operation getAssociatedOperation( )
Operation
for which this business rule is defined.
Operation
for which this business rule is defined. getSaveDate
- java.util.Date getSaveDate()
BusinessRule
is
retrieved using one of the methods on the BusinessRuleManager
class,
its save date is retrieved from persistent storage as well and is stored in the
in-memory BusinessRule
object. It is important to remember that
this is a copy of the save date at the point in time at which the
BusinessRule
was retrieved. If another user changes the business
rule in persistent storage, the save date in persistent storage will now be
different than the date in your in-memory copy. The next time the
BusinessRule
is retrieved, the save date in the new in-memory
copy will be different.
The save date of a business rule in persistent storage is only changed when
a change is published using the BusinessRuleManager publish
method or
when some other operation (such as installing a new version of the application)
updates the business rule in persistent storage. The in-memory copy of the
save date is updated when a publish is performed that updates that
BusinessRule
object.
When a BusinessRule
is published, if the save date in persistent
storage is different from the save date in the in-memory object that is being published,
then the publish will fail with a ChangeConflictException
. This is because
publishing the current changes would overwrite changes that were made by some other
user. When you get a ChangeConflictException
, if you still want to
publish the current changes, you must retrieve the business rule again and merge
the current changes into the new BusinessRule
object.
createCopy
- BusinessRule createCopy(java.lang.String newTargetNameSpace,
- java.lang.String newName)
- throws ValidationException
- BusinessRuleManagementException
BusinessRule
with a new name. The new
BusinessRule
is added to the available targets list of the operation
associated with the original BusinessRule
. The target name space and name
specified must be unique across all rulesets and decision tables available to this
server. If it is not, a ValidationException
is thrown. The
BusinessRule
on which this method is being called must also be valid.
If not, a ValidationException
is thrown.
newTargetNameSpace
- The target name space for the new BusinessRule
.
Must not be null or the zero-length string. newName
- The name for the new BusinessRule
. Must not be null or
the zero-length string. BusinessRule
object that is a copy of this BusinessRule
but with a different name. ValidationException
- if the specified target name space and name is already in use
for another business rule available to this server or if the BusinessRule
on which this method is called is not valid, in other words if it would produce
validation errors if the validate
method was called on it. java.lang.IllegalArgumentException
- if any required parameters are not specified or if
they are the zero-length string. BusinessRuleManagementException
- if an unexpected error is detected. getRuntimeID
- java.lang.String getRuntimeID()
getProperties
- PropertyList getProperties()
PropertyList
returned is empty.
getPropertyValue
- java.lang.String getPropertyValue( java.lang.String name)
name
- The name of the property whose value is to be returned. Must not be null. java.lang.IllegalArgumentException
- if the name parameter is null. getProperty
- Property getProperty(java.lang.String name)
name
- The name of the property to be retrieved. Must not be null. java.lang.IllegalArgumentException
- if the name parameter is null. setPropertyValue
- void setPropertyValue(java.lang.String name,
- java.lang.String value)
Only user-defined properties are changeable. If a property with the specified name
does not already exist, the new property created will be user-defined. If a system-defined
property with the specified name already exists for this rule, then a
SystemPropertyNotChangeableException
will be thrown.
name
- The name of the property whose value is to be set. Must not be null
or the zero-length string. value
- The value that the property should be set to. May be null. java.lang.IllegalArgumentException
- if the name parameter is null or is the zero-length
string. SystemPropertyNotChangeableException
- if a property with the specified name already
exists for this business rule and it is system-defined.