org.kuali.rice.krms.api.engine
Class Facts.Builder

java.lang.Object
  extended by org.kuali.rice.krms.api.engine.Facts.Builder
Enclosing class:
Facts

public static class Facts.Builder
extends Object

Builder for a Facts parameter object


Method Summary
 Facts.Builder addFact(String termName, Map<String,String> termParameters, Object factValue)
          Add a fact mapping from the name and parameter map combination to the fact value
 Facts.Builder addFact(String termName, Object factValue)
          Add a fact mapping from the term name to the fact value
 Facts.Builder addFact(Term term, Object factValue)
          Add a fact mapping from the Term to the fact value
 Facts.Builder addFactsByName(Map<String,Object> facts)
          Add facts in bulk to this Facts parameter object
 Facts.Builder addFactsByTerm(Map<Term,Object> facts)
          Add facts in bulk to this Facts parameter object
 Facts build()
          return a Facts parameter object spawned from this Facts.Builder
static Facts.Builder create()
          Static factory method to produce instances of this Facts.Builder class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static Facts.Builder create()
Static factory method to produce instances of this Facts.Builder class

Returns:

addFact

public Facts.Builder addFact(String termName,
                             Map<String,String> termParameters,
                             Object factValue)
Add a fact mapping from the name and parameter map combination to the fact value

Parameters:
termName - the name of the term. Must not be empty or null.
termParameters - any parameters for the term. May be null or empty.
factValue - the concrete value for the term

addFact

public Facts.Builder addFact(String termName,
                             Object factValue)
Add a fact mapping from the term name to the fact value

Parameters:
termName - the name of the term. Must not be empty or null.
factValue - the concrete value for the term

addFact

public Facts.Builder addFact(Term term,
                             Object factValue)
Add a fact mapping from the Term to the fact value

Parameters:
term - the term that this fact is a value for. Must not be null.
factValue - the fact value

addFactsByTerm

public Facts.Builder addFactsByTerm(Map<Term,Object> facts)
Add facts in bulk to this Facts parameter object

Parameters:
facts - the map of Terms to fact values. May be null, in that case this call is a no op.

addFactsByName

public Facts.Builder addFactsByName(Map<String,Object> facts)
Add facts in bulk to this Facts parameter object

Parameters:
facts - the map of term names to fact values. May be null, in that case this call is a no op.

build

public Facts build()
return a Facts parameter object spawned from this Facts.Builder



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