|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.rule.RuleServiceFwd
The rule service supports the following functions:
Rule
).
getRule(java.lang.Object, wt.rule.RuleType)
).
applyRule(java.lang.Object, wt.rule.Rule, wt.inf.container.WTContainerRef)
).
Field Summary | |
private static String |
CLASSNAME
|
private static String |
FC_RESOURCE
|
(package private) static boolean |
SERVER
|
Fields inherited from interface wt.method.RemoteAccess |
versionID |
Constructor Summary | |
RuleServiceFwd()
|
Method Summary | |
Object |
applyRule(Object object,
Rule rule)
Apply rule to the object . |
Object |
applyRule(Object object,
Rule rule,
WTContainerRef container)
Apply rule to the object . |
Rule |
disableRule(Rule rule)
Disable the specified Rule . |
Rule |
enableRule(Rule rule)
Enable the specified Rule . |
QueryResult |
findRules(Class objType,
RuleType ruleType,
boolean enabled)
Find all TypeBasedRule s in the Classic
container that are of type ruleType and whose object
type attribute equals objType . |
QueryResult |
findRules(Class objType,
RuleType ruleType,
WTContainerRef container,
boolean enabled)
Find all TypeBasedRule s in the specified container
that are of type ruleType and whose object type attribute
equals objType . |
private static Manager |
getManager()
|
Rule |
getRule(Object object,
RuleType ruleType)
Select an appropriate rule from the Classic container
based on the object and ruleType supplied
as arguments. |
Rule |
getRule(Object object,
RuleType ruleType,
WTContainerRef container)
Select an appropriate rule from the specified container based on the object and ruleType supplied as arguments. |
Rule |
mergeRules(Rule[] rules,
RuleType ruleType)
Merge the provided rules into a composite rule. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static final boolean SERVER
private static final String FC_RESOURCE
private static final String CLASSNAME
Constructor Detail |
public RuleServiceFwd()
Method Detail |
private static Manager getManager() throws WTException
WTException
public Rule getRule(Object object, RuleType ruleType) throws WTException
Classic
container
based on the object
and ruleType
supplied
as arguments.
The object
argument may be a type identifier or
a normal object. A type identifier is one of the following:
Class
TypeIdentifier
String
specifying the name of the type
getRule
in interface RuleService
object
- the object that the rule should be applicable to (cannot be null
)ruleType
- the type of rule to select (cannot be null
)
WTException
public Rule getRule(Object object, RuleType ruleType, WTContainerRef container) throws WTException
object
and ruleType
supplied as arguments.
The object
argument may be a type identifier or
a normal object. A type identifier is one of the following:
Class
TypeIdentifier
String
specifying the name of the type
getRule
in interface RuleService
object
- the object that the rule should be applicable to (cannot be null
)ruleType
- the type of rule to select (cannot be null
)container
-
WTException
public Object applyRule(Object object, Rule rule, WTContainerRef container) throws WTException, WTPropertyVetoException
rule
to the object
. Return the resulting
object. The result object might be the same object or a different
one depending on the semantics of the rule. The specified container
is used to lookup resource objects that are required while applying
the rule.
If the rule
is null
then nothing is done
and the original object
is returned.
NOTE: This interface does not support operations that require
returning multiple objects.
Supported API: false
applyRule
in interface RuleService
object
- the object that the rule should be applied to (cannot be null
)rule
- the rule to be appliedcontainer
- the container to use for resource object lookups
WTException
WTPropertyVetoException
public Object applyRule(Object object, Rule rule) throws WTException, WTPropertyVetoException
rule
to the object
. Return the resulting
object. The result object might be the same object or a different
one depending on the semantics of the rule. The Classic
container is used to lookup resource objects that are required while
applying the rule.
If the rule
is null
then nothing is done
and the original object
is returned.
NOTE: This interface does not support operations that require
returning multiple objects.
Supported API: false
applyRule
in interface RuleService
object
- the object that the rule should be applied to (cannot be null
)rule
- the rule to be applied
WTException
WTPropertyVetoException
public QueryResult findRules(Class objType, RuleType ruleType, boolean enabled) throws WTException
TypeBasedRule
s in the Classic
container that are of type ruleType
and whose object
type attribute equals objType
.
If enabled
is true then only return those rules that
are enabled. If enabled
is false
then all
matching rules are returned.
Supported API: false
findRules
in interface RuleService
objType
- the object type that the returned rules should referenceruleType
- the type of rule that should be returnedenabled
- whether only enabled rules should be returned
WTException
public QueryResult findRules(Class objType, RuleType ruleType, WTContainerRef container, boolean enabled) throws WTException
TypeBasedRule
s in the specified container
that are of type ruleType
and whose object type attribute
equals objType
.
If enabled
is true then only return those rules that
are enabled. If enabled
is false
then all
matching rules are returned.
Supported API: false
findRules
in interface RuleService
objType
- the object type that the returned rules should referenceruleType
- the type of rule that should be returnedcontainer
- the container to start searching inenabled
- whether only enabled rules should be returned
WTException
public Rule disableRule(Rule rule) throws WTException
Rule
.
disableRule
in interface RuleService
rule
- the rule to disable
WTException
public Rule enableRule(Rule rule) throws WTException
Rule
.
enableRule
in interface RuleService
rule
- the rule to enable
WTException
public Rule mergeRules(Rule[] rules, RuleType ruleType) throws WTException, WTPropertyVetoException
mergeRules
in interface RuleService
rules
- the rules to be mergedruleType
- the ruleType of the rules to be merged
WTException
WTPropertyVetoException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |