|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.services.StandardManager
wt.rule.init.StandardInitRuleEvalService
Use the newStandardInitRuleEvalService
static factory method(s),
not the StandardInitRuleEvalService
constructor, to construct
instances of this class. Instances must be constructed using the static
factory(s), in order to ensure proper initialization of the instance.
Supported API: false
Extendable: false
Nested Class Summary | |
static class |
StandardInitRuleEvalService.Cache
A cache for parsed rules. |
Field Summary | |
private static CacheManager |
_cache
|
private static String |
CLASSNAME
|
private static InitRuleEvaluator |
EVALUATOR
the utility that supports evaluating INIT rules |
private static String |
EVALUATOR_DEFAULT
|
private static String |
EVALUATOR_PROP
|
private static String |
RESOURCE
|
Fields inherited from class wt.services.StandardManager |
|
Fields inherited from interface wt.services.Manager |
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE |
Constructor Summary | |
StandardInitRuleEvalService()
|
Method Summary | |
private static void |
createCache()
Create the CacheManager that this service uses
to cache parsed rules. |
AttributeValues |
getAttributeValues(Rule rule)
Return the attribute values specification that results from parsing the rule. |
private static CacheManager |
getCache()
Return the CacheManager that is used by this service. |
String |
getConceptualClassname()
Deprecated. |
private AttributeValues |
getParsedRule(RuleCacheKey key)
Query the cache using the specified key. |
Object |
getValue(AlgoValue value,
Object object,
WTContainerRef container)
Calculate the value using the specified algorithm
and arguments . |
Object |
getValue(Attr attr,
Object object)
Get the value of the specified attribute from the specified
object . |
Object |
getValue(String id,
Object object,
WTContainerRef container)
Calculate the value for the attribute with the specified id
for the specified object and container . |
static StandardInitRuleEvalService |
newStandardInitRuleEvalService()
Default factory for the class. |
private void |
putParsedRule(RuleCacheKey key,
AttributeValues parsedRule)
Put the parsed rule in the cache. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private static final InitRuleEvaluator EVALUATOR
private static final String EVALUATOR_PROP
private static final String EVALUATOR_DEFAULT
private static CacheManager _cache
Constructor Detail |
public StandardInitRuleEvalService()
Method Detail |
public String getConceptualClassname()
getConceptualClassname
in interface NetFactor
getConceptualClassname
in class StandardManager
public static StandardInitRuleEvalService newStandardInitRuleEvalService() throws WTException
WTException
public AttributeValues getAttributeValues(Rule rule) throws WTException
getAttributeValues
in interface InitRuleEvalService
rule
-
WTException
public Object getValue(String id, Object object, WTContainerRef container) throws WTException
id
for the specified object
and container
.
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
type identifier
is passed in, then the attribute
value is calculated using default values for any attributes referenced
by the INIT
rule. Otherwise, attribute values from the
object
are used.
getValue
in interface InitRuleEvalService
id
- the logical identifier of the attributeobject
- the object to use for attribute references or a type identifiercontainer
- the container to use for data lookups
WTException
public Object getValue(AlgoValue value, Object object, WTContainerRef container) throws WTException
value
using the specified algorithm
and 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
type identifier
is passed in, then the attribute
value is calculated using default values for any attributes referenced
while computing the attribute value. Otherwise, attribute values
from the object
are used.
getValue
in interface InitRuleEvalService
value
- the value to be calculatedobject
- the object to use for attribute references or a type identifiercontainer
- the container to use for data lookups
WTException
public Object getValue(Attr attr, Object object) throws WTException
attribute
from the specified
object
.
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
type identifier
is passed in, then the default value
for the attribute is returned. Otherwise, the value is obtained from
the object
.
getValue
in interface InitRuleEvalService
attr
- the attribute to getobject
- the object to get the value from or a type identifier
WTException
private AttributeValues getParsedRule(RuleCacheKey key)
private void putParsedRule(RuleCacheKey key, AttributeValues parsedRule)
private static CacheManager getCache()
CacheManager
that is used by this service.
If the cache doesn't exist, createCache
is called to
create the cache.
private static void createCache()
CacheManager
that this service uses
to cache parsed rules.
A new cache is created only if one has not already been
created. If a new cache is created, it is added to the RuleService
to be managed.
This method is synchronized
to prevent multiple caches
from being created and added to the rule service.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |