|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Operation
An object implementing this interface represents an operation of a business rule group.
An operation can have one or more potential targets. Which target is invoked when the
operation is invoked is determined by a selection algorithm based on date. Each target is
a business rule, which can be either a ruleset or a decision table. There can be one
default business rule target that is invoked if no other targets are found. There can also
be 0 or more business rule targets that are selected based on date/time. Each of these
targets has a date range associated with it. If the date in question falls within the
specified date range for the target, then that target business rule is invoked. Each of
these targets is represented by an OperationSelectionRecord
object associated
with the Operation
. Methods are provided to make changes to all of these
possible targets.
An Operation
also has an available targets list. This is a list of all
business rules that are valid targets for this operation. The available targets list is a
superset of the set of targets that are specified as either the default or with an
associated date range. This means that there can be business rules in the available targets
list that are not currently specified as a target. The available targets list cannot be
updated directly. The only way to change the available targets list is to create a new
business rule by copying an existing one. The new business rule is implicitly adding to the
appropriate available targets list.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
|
Method Summary | |
---|---|
BusinessRuleGroup |
getAssociatedBusinessRuleGroup()
Get the business rule group that this operation is associated with. |
java.util.List<BusinessRule> |
getAvailableTargets()
Get the list of available target business rules for this operation. |
java.util.List<BusinessRule> |
getBusinessRulesByName(java.lang.String name,
QueryOperator op,
int numberToSkip,
int maxToReturn)
Get business rules associated with the operation using the name as a key. |
java.util.List<BusinessRule> |
getBusinessRulesByTNS(java.lang.String tns,
QueryOperator op,
int numberToSkip,
int maxToReturn)
Get business rules for this operation that have the specified target name space. |
java.util.List<BusinessRule> |
getBusinessRulesByTNSAndName(java.lang.String tns,
QueryOperator tnsOp,
java.lang.String name,
QueryOperator nameOp,
int numberToSkip,
int maxToReturn)
Get business rules associated with this operation using the target name space and name as a key. |
BusinessRule |
getDefaultBusinessRule()
Get the default business rule for this operation. |
java.lang.String |
getDescription()
Get the description of the operation. |
java.lang.String |
getName()
Get the name of the operation. |
OperationSelectionRecordList |
getOperationSelectionRecordList()
Get the selection records associated with this operation. |
void |
setDefaultBusinessRule(BusinessRule newDefaultBusinessRule)
Set the default business rule for this operation. |
Methods inherited from interface com.ibm.wbiserver.brules.mgmt.BusinessRuleValidateable |
---|
validate |
Methods inherited from interface com.ibm.wbiserver.brules.mgmt.BusinessRuleChangeDetector |
---|
hasChanges |
Field Detail |
---|
static final java.lang.String COPYRIGHT
Method Detail |
---|
java.lang.String getName()
java.lang.String getDescription()
BusinessRule getDefaultBusinessRule()
void setDefaultBusinessRule(BusinessRule newDefaultBusinessRule) throws ValidationException
newDefaultBusinessRule
- The new default business rule for this operation. If null, then
this operation will have no default business rule.
ValidationException
- if the new default business rule is not in the available targets
list for this operation.
ChangesNotAllowedException
- if changes to this object are temporarily
disallowed while other changes are being published.java.util.List<BusinessRule> getAvailableTargets()
BusinessRule
can be either a RuleSet
or a DecisionTable
.
List
of BusinessRule
objects representing the list of
available target business rules for this operation. The returned List
is
unmodifiable. If a method is called that tries to change the
List
, an UnsupportedOperationException
is thrown. The internal
List
can be changed implicitly by other operations. Therefore if the client
code is multi-threaded, it is recommended that the client synchronize on the returned
List
object while accessing it. Internally the Operation
class synchronizes on the List
whenever it is modified.BusinessRule
,
RuleSet
,
DecisionTable
java.util.List<BusinessRule> getBusinessRulesByTNS(java.lang.String tns, QueryOperator op, int numberToSkip, int maxToReturn) throws BusinessRuleManagementException
com.ibm.wbiserver.brules.mgmt.query
package. The query is
performed using the specified target name space string and the specified operator.
For example, the following invocation:
List<BusinessRule> result = op.getBusinessRulesByTNS("%www.ibm.com/test%", QueryOperator.LIKE, 0, 0);is equivalent to doing the following:
PropertyQueryNode node = QueryNodeFactory.createPropertyQueryNode(QueryNodeFactory.PROPERTY_NAME__TARGET_NAME_SPACE, QueryOperator.LIKE, "%www.ibm.com/test%"); List<BusinessRule> result = op.getBusinessRulesByProperties(node, 0, 0);
The numberToSkip
and maxToReturn
parameters can be used
together to implement paging where only a certain number of business rules
is returned with each invocation. This could be useful in situations where there are
many business rules and you don't want to wait for them all to be returned. For example,
to get the business rules in separate groups each containing 20 business rules you would
pass 0 for numberToSkip
and 20 for maxToReturn
on the
first invocation. On the second, you would pass 20 and 20. On the third 40 and 20,
and so on.
tns
- The target name space string to query on. This string may
contain the wildcard characters '%' and '_' as used in SQL.op
- The operator to be used in the query. This specifies whether, for
example, the query should be an exact match query or a "like" query using wildcards.numberToSkip
- The number of business rules to skip. If this number is
greater than 0, then the specified number of business rules will be skipped and not
returned by this invocation of the method. A negative or 0 value indicates that all
business rules are to be returned.maxToReturn
- The maximum number of business rules to return. If this
number is greater than 0, then at most the specified number of business rules will be
returned by this invocation of the method. A negative or 0 value indicates that
all business rules will be returned starting with the first non-skipped business rule
to the end of the results.
List
of BusinessRule
objects representing the
business rules associated with this operation that have target name spaces matching
the specified query. If the maxToReturn
parameter is greater than 0, then
this list will contain at most maxToReturn
business rules.
BusinessRuleManagementException
- if an unexpected error is detected.BusinessRule
java.util.List<BusinessRule> getBusinessRulesByName(java.lang.String name, QueryOperator op, int numberToSkip, int maxToReturn) throws BusinessRuleManagementException
com.ibm.wbiserver.brules.mgmt.query
package. The query is
performed using the specified name string and the specified operator.
For example, the following invocation:
List<BusinessRule> result = op.getBusinessRulesByName("ChristmasSaleRule%", QueryOperator.LIKE, 0, 0);is equivalent to doing the following:
PropertyQueryNode node = QueryNodeFactory.createPropertyQueryNode(QueryNodeFactory.PROPERTY_NAME__NAME, QueryOperator.LIKE, "ChristmasSaleRuleGroup%"); List<BusinessRule> result = op.getBRGsByProperties(node, 0, 0);
The numberToSkip
and maxToReturn
parameters can be used
together to implement paging where only a certain number of business rules
is returned with each invocation. This could be useful in situations where there are
many business rules and you don't want to wait for them all to be returned. For example,
to get the business rules in separate groups each containing 20 business rules you would
pass 0 for numberToSkip
and 20 for maxToReturn
on the
first invocation. On the second, you would pass 20 and 20. On the third 40 and 20,
and so on.
name
- The name string to query on. This string may
contain the wildcard characters '%' and '_' as used in SQL.op
- The operator to be used in the query. This specifies whether, for
example, the query should be an exact match query or a "like" query using wildcards.numberToSkip
- The number of business rules to skip. If this number is
greater than 0, then the specified number of business rules will be skipped and not
returned by this invocation of the method. A negative or 0 value indicates that all
business rules are to be returned.maxToReturn
- The maximum number of business rules to return. If this
number is greater than 0, then at most the specified number of business rules will be
returned by this invocation of the method. A negative or 0 value indicates that
all business rules will be returned starting with the first non-skipped business rule
to the end of the results.
List
of BusinessRule
objects representing the
business rules associated with this operation that have names matching the specified
query. If the maxToReturn
parameter is greater than 0, then this list will
contain at most maxToReturn
business rules.
BusinessRuleManagementException
- if an unexpected error is detected.BusinessRule
java.util.List<BusinessRule> getBusinessRulesByTNSAndName(java.lang.String tns, QueryOperator tnsOp, java.lang.String name, QueryOperator nameOp, int numberToSkip, int maxToReturn) throws BusinessRuleManagementException
com.ibm.wbiserver.brules.mgmt.query
package. The query is performed using the
specified target name space string, the specified name, and the specified operator for each.
For example, the following invocation:
List<BusinessRule> result = op.getBusinessRulesByTNSAndName("www.ibm.com/test", QueryOperator.EQUAL, "%Christmas%", QueryOperator.LIKE, 0, 0);is equivalent to doing the following:
PropertyQueryNode tnsNode = QueryNodeFactory.createPropertyQueryNode(QueryNodeFactory.PROPERTY_NAME__TARGET_NAME_SPACE, QueryOperator.EQUAL, "www.ibm.com/test"); PropertyQueryNode nameNode = QueryNodeFactory.createPropertyQueryNode(QueryNodeFactory.PROPERTY_NAME__NAME, QueryOperator.LIKE, "%Christmas%"); AndNode andNode = new AndNode(tnsNode, nameNode); List<BusinessRule> result = op.getBusinessRulesByProperties(andNode, 0, 0);
The numberToSkip
and maxToReturn
parameters can be used
together to implement paging where only a certain number of business rules
is returned with each invocation. This could be useful in situations where there are
many business rules and you don't want to wait for them all to be returned. For example,
to get the business rules in separate groups each containing 20 business rules you would
pass 0 for numberToSkip
and 20 for maxToReturn
on the
first invocation. On the second, you would pass 20 and 20. On the third 40 and 20,
and so on.
tns
- The target name space string to query on. This string may
contain the wildcard characters '%' and '_' as used in SQL.tnsOp
- The operator to be used in the query for the target name space property.
This specifies whether, for example, the query should be an exact match query or a
"like" query using wildcards.name
- The name string to query on. This string may
contain the wildcard characters '%' and '_' as used in SQL.nameOp
- The operator to be used in the query for the name property.
This specifies whether, for example, the query should be an exact match query or a
"like" query using wildcards.numberToSkip
- The number of business rules to skip. If this number is
greater than 0, then the specified number of business rules will be skipped and not
returned by this invocation of the method. A negative or 0 value indicates that all
business rules are to be returned.maxToReturn
- The maximum number of business rules to return. If this
number is greater than 0, then at most the specified number of business rules will be
returned by this invocation of the method. A negative or 0 value indicates that
all business rules will be returned starting with the first non-skipped business rule
to the end of the results.
List
of BusinessRule
objects representing the
business rules associated with this operation that have target name spaces and names
matching the specified query. If the maxToReturn
parameter is greater
than 0, then this list will contain at most maxToReturn
business rules.
BusinessRuleManagementException
- if an unexpected error is detected.BusinessRule
OperationSelectionRecordList getOperationSelectionRecordList()
OperationSelectionRecordList
for this Operation
.BusinessRuleGroup getAssociatedBusinessRuleGroup()
|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |