org.kuali.rice.krms.api.repository.proposition
Class PropositionDefinition.Builder

java.lang.Object
  extended by org.kuali.rice.krms.api.repository.proposition.PropositionDefinition.Builder
All Implemented Interfaces:
Serializable, Identifiable, Versioned, ModelBuilder, PropositionDefinitionContract
Enclosing class:
PropositionDefinition

public static class PropositionDefinition.Builder
extends Object
implements PropositionDefinitionContract, ModelBuilder, Serializable

This builder is used to construct instances of KRMS Proposition. It enforces the constraints of the PropositionDefinitionContract.

See Also:
Serialized Form

Method Summary
 PropositionDefinition build()
          Builds an instance of a Proposition based on the current state of the builder.
 PropositionDefinition.Builder compoundComponents(List<PropositionDefinition.Builder> components)
          Set the value of the components to the given value.
 PropositionDefinition.Builder compoundOpCode(String opCode)
          Set the value of the opCode to the given value.
static PropositionDefinition.Builder create(PropositionDefinitionContract contract)
          Creates a builder by populating it with data from the given PropositionDefinitionContract.
static PropositionDefinition.Builder create(String propId, String propTypeCode, String ruleId, String typeId, List<PropositionParameter.Builder> parameters)
          Create a Builder with the given values
 List<PropositionDefinition.Builder> getCompoundComponents()
           
 String getCompoundOpCode()
           
 String getDescription()
           
 String getId()
           
 List<PropositionParameter.Builder> getParameters()
           
 String getPropositionTypeCode()
           
 String getRuleId()
           
 String getTypeId()
           
 Long getVersionNumber()
           
 void setCompoundComponents(List<PropositionDefinition.Builder> components)
          Sets the value of the components on this builder to the given value.
 void setCompoundOpCode(String opCode)
          Sets the value of the opCode on this builder to the given value.
 void setDescription(String description)
          Sets the value of the description on this builder to the given value.
 void setId(String propId)
          Sets the value of the propId on this builder to the given value.
 void setParameters(List<PropositionParameter.Builder> parameters)
          Sets the value of the parameters on this builder to the given value.
 void setPropositionTypeCode(String propTypeCode)
          Sets the value of the propTypeCode on this builder to the given value.
 void setRule(RuleDefinition.Builder rule)
          Sets the value of the rule on this builder to the given value.
 void setRuleId(String ruleId)
          Sets the value of the ruleId on this builder to the given value.
 void setTypeId(String typeId)
          Sets the value of the typeId on this builder to the given value.
 void setVersionNumber(Long versionNumber)
          Sets the value of the versionNumber on this builder to the given value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

compoundOpCode

public PropositionDefinition.Builder compoundOpCode(String opCode)
Set the value of the opCode to the given value.

Parameters:
opCode - the opCode value to set
Returns:
Builder an instance of the builder populated with given parameters

compoundComponents

public PropositionDefinition.Builder compoundComponents(List<PropositionDefinition.Builder> components)
Set the value of the components to the given value.

Parameters:
components - the components value to set
Returns:
Builder

create

public static PropositionDefinition.Builder create(String propId,
                                                   String propTypeCode,
                                                   String ruleId,
                                                   String typeId,
                                                   List<PropositionParameter.Builder> parameters)
Create a Builder with the given values

Parameters:
propId - the propId value to set
propTypeCode - the propTypeCode value to set
ruleId - the ruleId value to set
typeId - the typeId value to set
parameters - the parameters value to set
Returns:
Builder an instance of the builder populated with given parameters

create

public static PropositionDefinition.Builder create(PropositionDefinitionContract contract)
Creates a builder by populating it with data from the given PropositionDefinitionContract.

Parameters:
contract - the contract from which to populate this builder
Returns:
an instance of the builder populated with data from the contract

setId

public void setId(String propId)
Sets the value of the propId on this builder to the given value.

Parameters:
propId - the propId value to set
Throws:
IllegalArgumentException - if the propId is null or blank

setDescription

public void setDescription(String description)
Sets the value of the description on this builder to the given value.

Parameters:
description - the description value to set

setTypeId

public void setTypeId(String typeId)
Sets the value of the typeId on this builder to the given value.

Parameters:
typeId - the typeId value to set

setRuleId

public void setRuleId(String ruleId)
Sets the value of the ruleId on this builder to the given value.

Parameters:
ruleId - the ruleId value to set

setRule

public void setRule(RuleDefinition.Builder rule)
Sets the value of the rule on this builder to the given value.

Parameters:
rule - the rule value to set

setPropositionTypeCode

public void setPropositionTypeCode(String propTypeCode)
Sets the value of the propTypeCode on this builder to the given value.

Parameters:
propTypeCode - the propTypeCode value to set
Throws:
IllegalArgumentException - if the propTypeCode is null, blank or invalid

setParameters

public void setParameters(List<PropositionParameter.Builder> parameters)
Sets the value of the parameters on this builder to the given value.

Parameters:
parameters - the parameters value to set

setCompoundOpCode

public void setCompoundOpCode(String opCode)
Sets the value of the opCode on this builder to the given value.

Parameters:
opCode - the opCode value to set
Throws:
IllegalArgumentException - if the opCode invalid

setCompoundComponents

public void setCompoundComponents(List<PropositionDefinition.Builder> components)
Sets the value of the components on this builder to the given value.

Parameters:
components - the components value to set

setVersionNumber

public void setVersionNumber(Long versionNumber)
Sets the value of the versionNumber on this builder to the given value.

Parameters:
versionNumber - the versionNumber value to set

getId

public String getId()
Specified by:
getId in interface Identifiable

getDescription

public String getDescription()
Specified by:
getDescription in interface PropositionDefinitionContract

getRuleId

public String getRuleId()
Specified by:
getRuleId in interface PropositionDefinitionContract

getTypeId

public String getTypeId()
Specified by:
getTypeId in interface PropositionDefinitionContract

getPropositionTypeCode

public String getPropositionTypeCode()
Specified by:
getPropositionTypeCode in interface PropositionDefinitionContract

getParameters

public List<PropositionParameter.Builder> getParameters()
Specified by:
getParameters in interface PropositionDefinitionContract

getCompoundOpCode

public String getCompoundOpCode()
Specified by:
getCompoundOpCode in interface PropositionDefinitionContract

getCompoundComponents

public List<PropositionDefinition.Builder> getCompoundComponents()
Specified by:
getCompoundComponents in interface PropositionDefinitionContract

getVersionNumber

public Long getVersionNumber()
Specified by:
getVersionNumber in interface Versioned

build

public PropositionDefinition build()
Builds an instance of a Proposition based on the current state of the builder.

Specified by:
build in interface ModelBuilder
Returns:
the fully-constructed Proposition


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