org.kuali.rice.kew.api.validation
Class RuleValidationContext.Builder

java.lang.Object
  extended by org.kuali.rice.kew.api.validation.RuleValidationContext.Builder
All Implemented Interfaces:
Serializable, ModelBuilder, RuleValidationContextContract
Enclosing class:
RuleValidationContext

public static final class RuleValidationContext.Builder
extends Object
implements Serializable, ModelBuilder, RuleValidationContextContract

A builder which can be used to construct RuleValidationContext instances. Enforces the constraints of the RuleValidationContextContract.

See Also:
Serialized Form

Method Summary
 RuleValidationContext build()
          Returns an instance of the object being built by this builder based on the current state of the builder.
static RuleValidationContext.Builder create(RuleContract rule)
           
static RuleValidationContext.Builder create(RuleContract rule, RuleDelegationContract ruleDelegation, String ruleAuthorPrincipalId)
          Construct a RuleValidationContext under which to validate a rule.
static RuleValidationContext.Builder create(RuleValidationContextContract contract)
           
 Rule.Builder getRule()
          Retrieve the rule which is being validated.
 String getRuleAuthorPrincipalId()
          Retrieve the principal of the rule author.
 RuleDelegation.Builder getRuleDelegation()
          Retrieve the RuleDelegation representing the parent of the rule being validated.
 void setRule(Rule.Builder rule)
           
 void setRuleAuthorPrincipalId(String ruleAuthorPrincipalId)
           
 void setRuleDelegation(RuleDelegation.Builder ruleDelegation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static RuleValidationContext.Builder create(RuleContract rule)

create

public static RuleValidationContext.Builder create(RuleValidationContextContract contract)

create

public static RuleValidationContext.Builder create(RuleContract rule,
                                                   RuleDelegationContract ruleDelegation,
                                                   String ruleAuthorPrincipalId)
Construct a RuleValidationContext under which to validate a rule. The rule must be non-null, the delegation and author can be null given the circumstances defined in the description of this class.


build

public RuleValidationContext build()
Description copied from interface: ModelBuilder
Returns an instance of the object being built by this builder based on the current state of the builder. It should be possible to invoke this method more than once on the same builder. It should never return null;

Specified by:
build in interface ModelBuilder
Returns:
an instance of the object being built by this builder, should never return null

getRule

public Rule.Builder getRule()
Description copied from interface: RuleValidationContextContract
Retrieve the rule which is being validated.

Specified by:
getRule in interface RuleValidationContextContract

getRuleDelegation

public RuleDelegation.Builder getRuleDelegation()
Description copied from interface: RuleValidationContextContract
Retrieve the RuleDelegation representing the parent of the rule being validated. If the rule is not a delegation rule, then this will return null;

Specified by:
getRuleDelegation in interface RuleValidationContextContract

getRuleAuthorPrincipalId

public String getRuleAuthorPrincipalId()
Description copied from interface: RuleValidationContextContract
Retrieve the principal of the rule author. May be null in the case of an XML rule import.

Specified by:
getRuleAuthorPrincipalId in interface RuleValidationContextContract

setRule

public void setRule(Rule.Builder rule)

setRuleDelegation

public void setRuleDelegation(RuleDelegation.Builder ruleDelegation)

setRuleAuthorPrincipalId

public void setRuleAuthorPrincipalId(String ruleAuthorPrincipalId)


Copyright © 2005–2015 The Kuali Foundation. All rights reserved.