org.kuali.rice.krms.framework.engine
Class BasicExecutionEnvironment

java.lang.Object
  extended by org.kuali.rice.krms.framework.engine.BasicExecutionEnvironment
All Implemented Interfaces:
ExecutionEnvironment

public final class BasicExecutionEnvironment
extends Object
implements ExecutionEnvironment


Constructor Summary
BasicExecutionEnvironment(SelectionCriteria selectionCriteria, Map<Term,Object> facts, ExecutionOptions executionOptions, TermResolutionEngine termResolutionEngine)
           
 
Method Summary
 void addTermResolver(TermResolver<?> termResolver)
           
 EngineResults getEngineResults()
           
 ExecutionOptions getExecutionOptions()
           
 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)
           
 boolean publishFact(Term factName, Object factValue)
          Publishes a new fact
<T> T
resolveTerm(Term term, Object caller)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicExecutionEnvironment

public BasicExecutionEnvironment(SelectionCriteria selectionCriteria,
                                 Map<Term,Object> facts,
                                 ExecutionOptions executionOptions,
                                 TermResolutionEngine termResolutionEngine)
Method Detail

getSelectionCriteria

public SelectionCriteria getSelectionCriteria()
Description copied from interface: ExecutionEnvironment
Returns the selection criteria that was used to initialize the environment.

Specified by:
getSelectionCriteria in interface ExecutionEnvironment
Returns:
the selection criteria for this environment

getFacts

public Map<Term,Object> getFacts()
Description copied from interface: ExecutionEnvironment
Returns an immutable Map of facts available within this environment.

Specified by:
getFacts in interface ExecutionEnvironment
Returns:
the facts in this environment

addTermResolver

public void addTermResolver(TermResolver<?> termResolver)
Specified by:
addTermResolver in interface ExecutionEnvironment

resolveTerm

public <T> T resolveTerm(Term term,
                         Object caller)
              throws TermResolutionException
Specified by:
resolveTerm in interface ExecutionEnvironment
Throws:
TermResolutionException

getTermsForCaller

public Set<Term> getTermsForCaller(Object caller)
Specified by:
getTermsForCaller in interface ExecutionEnvironment

publishFact

public boolean publishFact(Term factName,
                           Object factValue)
Description copied from interface: ExecutionEnvironment
Publishes a new fact

Specified by:
publishFact in interface ExecutionEnvironment
Parameters:
factName - name of the fact to publish
factValue - value of the fact to publish // TODO: we don't support updating facts, refactor this method
Returns:
true if an existing fact was updated, false if this was a new fact

getExecutionOptions

public ExecutionOptions getExecutionOptions()
Specified by:
getExecutionOptions in interface ExecutionEnvironment

getEngineResults

public EngineResults getEngineResults()
Specified by:
getEngineResults in interface ExecutionEnvironment


Copyright © 2005-2011 The Kuali Foundation. All Rights Reserved.