public final class BasicExecutionEnvironment extends Object implements ExecutionEnvironment
ExecutionEnvironment given SelectionCriteria, facts (Map<Term, Object> ), ExecutionOptions and TermResolutionEngine.| Constructor and Description |
|---|
BasicExecutionEnvironment(SelectionCriteria selectionCriteria,
Map<Term,Object> facts,
ExecutionOptions executionOptions,
TermResolutionEngine termResolutionEngine)
Constructor for a BasicExecutionEnvironment with the given
SelectionCriteria, facts, ExecutionOptions and TermResolutionEngine |
| Modifier and Type | Method and Description |
|---|---|
void |
addTermResolver(TermResolver<?> termResolver)
Add a
TermResolver |
EngineResults |
getEngineResults()
Return the
EngineResults |
ExecutionOptions |
getExecutionOptions()
Return the
ExecutionOptions |
Map<Term,Object> |
getFacts()
Returns an immutable Map of facts available within this environment.
|
SelectionCriteria |
getSelectionCriteria()
Returns the selection criteria that was used to initialize the environment.
|
Set<Term> |
getTermsForCaller(Object caller)
Return a set of Term for the given value
|
boolean |
publishFact(Term factName,
Object factValue)
Publishes a new fact
|
<T> T |
resolveTerm(Term term,
Object caller)
Resolve
|
public BasicExecutionEnvironment(SelectionCriteria selectionCriteria, Map<Term,Object> facts, ExecutionOptions executionOptions, TermResolutionEngine termResolutionEngine)
SelectionCriteria, facts, ExecutionOptions and TermResolutionEngineselectionCriteria - to set selectionCriteria to, cannot be nullfacts - to set facts to, cannot be nullexecutionOptions - to set executionOptions totermResolutionEngine - to set termResolutionEngine toIllegalArgumentException - if the selectionCriteria or facts are nullpublic SelectionCriteria getSelectionCriteria()
ExecutionEnvironmentgetSelectionCriteria in interface ExecutionEnvironmentpublic Map<Term,Object> getFacts()
ExecutionEnvironmentgetFacts in interface ExecutionEnvironmentpublic void addTermResolver(TermResolver<?> termResolver)
ExecutionEnvironmentTermResolveraddTermResolver in interface ExecutionEnvironmentpublic <T> T resolveTerm(Term term, Object caller) throws TermResolutionException
ExecutionEnvironmentresolveTerm in interface ExecutionEnvironmentterm - TermTermResolutionExceptionpublic Set<Term> getTermsForCaller(Object caller)
ExecutionEnvironmentgetTermsForCaller in interface ExecutionEnvironmentpublic boolean publishFact(Term factName, Object factValue)
ExecutionEnvironmentpublishFact in interface ExecutionEnvironmentfactName - name of the fact to publishfactValue - value of the fact to publish
// TODO: we don't support updating facts, refactor this methodpublic ExecutionOptions getExecutionOptions()
ExecutionEnvironmentExecutionOptionsgetExecutionOptions in interface ExecutionEnvironmentExecutionOptionspublic EngineResults getEngineResults()
ExecutionEnvironmentEngineResultsgetEngineResults in interface ExecutionEnvironmentEngineResultsCopyright © 2005–2016 The Kuali Foundation. All rights reserved.