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 TermResolutionEngine
selectionCriteria
- 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()
ExecutionEnvironment
getSelectionCriteria
in interface ExecutionEnvironment
public Map<Term,Object> getFacts()
ExecutionEnvironment
getFacts
in interface ExecutionEnvironment
public void addTermResolver(TermResolver<?> termResolver)
ExecutionEnvironment
TermResolver
addTermResolver
in interface ExecutionEnvironment
public <T> T resolveTerm(Term term, Object caller) throws TermResolutionException
ExecutionEnvironment
resolveTerm
in interface ExecutionEnvironment
term
- Term
TermResolutionException
public Set<Term> getTermsForCaller(Object caller)
ExecutionEnvironment
getTermsForCaller
in interface ExecutionEnvironment
public boolean publishFact(Term factName, Object factValue)
ExecutionEnvironment
publishFact
in interface ExecutionEnvironment
factName
- name of the fact to publishfactValue
- value of the fact to publish
// TODO: we don't support updating facts, refactor this methodpublic ExecutionOptions getExecutionOptions()
ExecutionEnvironment
ExecutionOptions
getExecutionOptions
in interface ExecutionEnvironment
ExecutionOptions
public EngineResults getEngineResults()
ExecutionEnvironment
EngineResults
getEngineResults
in interface ExecutionEnvironment
EngineResults
Copyright © 2005-2015 The Kuali Foundation. All Rights Reserved.