Class Facts.Builder

java.lang.Object
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 Details

    • 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