org.kuali.rice.krms.framework.engine
Interface ContextProvider

All Known Implementing Classes:
RuleRepositoryContextProvider

public interface ContextProvider

Loads a Context for the given set of criteria. Applications who want to provide their own means for creating a context and supplying it to the KRMS engine can do so by implementing a custom ContextProvider.

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Context

Method Summary
 Context loadContext(SelectionCriteria selectionCriteria, Map<Term,Object> facts, ExecutionOptions executionOptions)
          Loads the context for the given selection criteria, facts, and execution options.
 

Method Detail

loadContext

Context loadContext(SelectionCriteria selectionCriteria,
                    Map<Term,Object> facts,
                    ExecutionOptions executionOptions)
Loads the context for the given selection criteria, facts, and execution options. If no context can be located based on the given criteria, then this method should return null.

In the case where multiple Contexts could potentially be identified from the same set of selection criteria, it is up to the implementer of the ContextProvider to ensure that the most appropriate Context is returned. Or alternatively, an exception could be thrown indicating context ambiguity.

The sectionCriteria, facts, and executionOptions which are passed to this method should never be null. However, they might be empty.

Parameters:
selectionCriteria - the criteria to use during the selection phase of engine operation
facts - the set of facts that are supplied to the engine at execution time
executionOptions - a collection of options that can be used to customize engine execution behavior
Returns:
the context which matches the given criteria, or null if no context matches


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