org.kuali.rice.krms.api.repository.agenda
Class AgendaItemDefinition.Builder

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

public static class AgendaItemDefinition.Builder
extends Object
implements AgendaItemDefinitionContract, ModelBuilder, Serializable

This builder is used to construct instances of KRMS Repository AgendaItemDefinition. It enforces the constraints of the AgendaItemDefinitionContract.

See Also:
Serialized Form

Method Summary
 AgendaItemDefinition build()
          Builds an instance of a AgendaItemDefinition based on the current state of the builder.
static AgendaItemDefinition.Builder create(AgendaItemDefinitionContract contract)
          Creates a builder by populating it with data from the given AgendaItemDefinitionContract.
static AgendaItemDefinition.Builder create(String id, String agendaId)
          Create a builder with the given parameters.
 String getAgendaId()
          Returns the agenda id to which the agenda item belongs.
 AgendaItemDefinition.Builder getAlways()
          This is ID of the next AgendaItemDefinition to be executed after following any defined true or false actions.
 String getAlwaysId()
          This is ID of the next AgendaItemDefinition to be executed after following any defined true or false actions.
 String getId()
          The unique identifier for an object.
 RuleDefinition.Builder getRule()
          This method returns the Rule associated with this AgendaItemDefinition.
 String getRuleId()
          Returns the rule id associated with the agenda item.
 AgendaDefinition.Builder getSubAgenda()
          This method returns the SubAgenda associated with this AgendaItemDefinition.
 String getSubAgendaId()
          This is ID of the SubAgenda associated with this AgendaItemDefinition.
 Long getVersionNumber()
          Returns the version number for this object.
 AgendaItemDefinition.Builder getWhenFalse()
          This method returns the next AgendaItemDefinition to be executed if the Rule associated with this AgendaItemDefinition evaluates to false.
 String getWhenFalseId()
          This is ID of the next AgendaItemDefinition to be executed if the Rule associated AgendaItemDefinition evaluates to false.
 AgendaItemDefinition.Builder getWhenTrue()
          This method returns the next AgendaItemDefinition to be executed if the Rule associated with this AgendaItemDefinition evaluates to true.
 String getWhenTrueId()
          This is ID of the next AgendaItemDefinition to be executed if the Rule associated AgendaItemDefinition evaluates to true.
 void setAgendaId(String agendaId)
          Set the value of the agenda id on this builder to the given value.
 void setAlways(AgendaItemDefinition.Builder always)
          Set the value of the agenda item for the "always" condition on this builder to the given value.
 void setAlwaysId(String alwaysId)
          Set the value of the agenda item id for the "always" condition on this builder to the given value.
 void setId(String agendaItemId)
          Sets the value of the id on this builder to the given value.
 void setRule(RuleDefinition.Builder rule)
          Set the value of the rule on this builder to the given value.
 void setRuleId(String ruleId)
          Set the value of the rule id on this builder to the given value.
 void setSubAgenda(AgendaDefinition.Builder subAgenda)
          Set the value of the sub agenda on this builder to the given value.
 void setSubAgendaId(String subAgendaId)
          Set the value of the sub agenda id on this builder to the given value.
 void setVersionNumber(Long versionNumber)
          Set the value of the version number on this builder to the given value.
 void setWhenFalse(AgendaItemDefinition.Builder whenFalse)
          Set the value of the agenda item for the "when false" condition on this builder to the given value.
 void setWhenFalseId(String whenFalseId)
          Set the value of the agenda item id for the "when false" condition on this builder to the given value.
 void setWhenTrue(AgendaItemDefinition.Builder whenTrue)
          Set the value of the agenda item for the "when true" condition on this builder to the given value.
 void setWhenTrueId(String whenTrueId)
          Set the value of the agenda item id for the "when true" condition 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

create

public static AgendaItemDefinition.Builder create(String id,
                                                  String agendaId)
Create a builder with the given parameters.

Parameters:
id -
agendaId -
Returns:
Builder

create

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

Parameters:
contract - the contract from which to populate this builder
Returns:
an instance of the builder populated with data from the contract
Throws:
IllegalArgumentException - if the contract is null

setId

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

Parameters:
agendaItemId - the agenda item id to set, may be null, must not be blank

The agenda item id is generated by the system. For new agenda items (not yet persisted) this field is null. For existing agenda items this field is the generated id.

Throws:
IllegalArgumentException - if the id is blank

setAgendaId

public void setAgendaId(String agendaId)
Set the value of the agenda id on this builder to the given value.

Parameters:
agendaId - the agenda id of the agenda item to set, must not be null or blank
Throws:
IllegalArgumentException - if the agenda id is null or blank

setRuleId

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

Parameters:
ruleId - the rule id of the agenda item to set

setSubAgendaId

public void setSubAgendaId(String subAgendaId)
Set the value of the sub agenda id on this builder to the given value.

Parameters:
subAgendaId - the sub agenda id of the agenda item to set

setWhenTrueId

public void setWhenTrueId(String whenTrueId)
Set the value of the agenda item id for the "when true" condition on this builder to the given value.

Parameters:
whenTrueId - the agenda item id for the "when true" condition of the agenda item to set

setWhenFalseId

public void setWhenFalseId(String whenFalseId)
Set the value of the agenda item id for the "when false" condition on this builder to the given value.

Parameters:
whenFalseId - the agenda item id for the "when false" condition of the agenda item to set

setAlwaysId

public void setAlwaysId(String alwaysId)
Set the value of the agenda item id for the "always" condition on this builder to the given value.

Parameters:
alwaysId - the agenda item id for the "always" condition of the agenda item to set

setRule

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

Parameters:
rule - the rule of the agenda item to set

setSubAgenda

public void setSubAgenda(AgendaDefinition.Builder subAgenda)
Set the value of the sub agenda on this builder to the given value.

Parameters:
subAgenda - the sub agenda of the agenda item to set

setWhenTrue

public void setWhenTrue(AgendaItemDefinition.Builder whenTrue)
Set the value of the agenda item for the "when true" condition on this builder to the given value.

Parameters:
whenTrue - the agenda item for the "when true" condition of the agenda item to set

setWhenFalse

public void setWhenFalse(AgendaItemDefinition.Builder whenFalse)
Set the value of the agenda item for the "when false" condition on this builder to the given value.

Parameters:
whenFalse - the agenda item for the "when false" condition of the agenda item to set

setAlways

public void setAlways(AgendaItemDefinition.Builder always)
Set the value of the agenda item for the "always" condition on this builder to the given value.

Parameters:
always - the agenda item for the "always" condition of the agenda item to set

setVersionNumber

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

Parameters:
versionNumber - the version number set

getId

public String getId()
Description copied from interface: Identifiable
The unique identifier for an object. This can be null.

Specified by:
getId in interface Identifiable
Returns:
the id

getAgendaId

public String getAgendaId()
Description copied from interface: AgendaItemDefinitionContract
Returns the agenda id to which the agenda item belongs.

Specified by:
getAgendaId in interface AgendaItemDefinitionContract
Returns:
id for the agenda associated with the agenda item

getRuleId

public String getRuleId()
Description copied from interface: AgendaItemDefinitionContract
Returns the rule id associated with the agenda item.

Specified by:
getRuleId in interface AgendaItemDefinitionContract
Returns:
ID of the Rule associated with the agenda item

getSubAgendaId

public String getSubAgendaId()
Description copied from interface: AgendaItemDefinitionContract
This is ID of the SubAgenda associated with this AgendaItemDefinition. Each AgendaItemDefinition has either a Rule or a SubAgenda associated with it, but not both.

Specified by:
getSubAgendaId in interface AgendaItemDefinitionContract
Returns:
ID of the SubAgenda associated with the AgendaItemDefinition

getWhenTrueId

public String getWhenTrueId()
Description copied from interface: AgendaItemDefinitionContract
This is ID of the next AgendaItemDefinition to be executed if the Rule associated AgendaItemDefinition evaluates to true.

Specified by:
getWhenTrueId in interface AgendaItemDefinitionContract
Returns:
ID of the next AgendaItemDefinition

getWhenFalseId

public String getWhenFalseId()
Description copied from interface: AgendaItemDefinitionContract
This is ID of the next AgendaItemDefinition to be executed if the Rule associated AgendaItemDefinition evaluates to false.

Specified by:
getWhenFalseId in interface AgendaItemDefinitionContract
Returns:
ID of the next AgendaItemDefinition

getAlwaysId

public String getAlwaysId()
Description copied from interface: AgendaItemDefinitionContract
This is ID of the next AgendaItemDefinition to be executed after following any defined true or false actions.

Specified by:
getAlwaysId in interface AgendaItemDefinitionContract
Returns:
ID of the next AgendaItemDefinition

getRule

public RuleDefinition.Builder getRule()
Description copied from interface: AgendaItemDefinitionContract
This method returns the Rule associated with this AgendaItemDefinition.

Specified by:
getRule in interface AgendaItemDefinitionContract
Returns:
an immutable representation of the Rule

getSubAgenda

public AgendaDefinition.Builder getSubAgenda()
Description copied from interface: AgendaItemDefinitionContract
This method returns the SubAgenda associated with this AgendaItemDefinition.

Specified by:
getSubAgenda in interface AgendaItemDefinitionContract
Returns:
an immutable representation of the SubAgenda

getWhenTrue

public AgendaItemDefinition.Builder getWhenTrue()
Description copied from interface: AgendaItemDefinitionContract
This method returns the next AgendaItemDefinition to be executed if the Rule associated with this AgendaItemDefinition evaluates to true.

Specified by:
getWhenTrue in interface AgendaItemDefinitionContract
Returns:
an immutable representation of the next AgendaItemDefinition

getWhenFalse

public AgendaItemDefinition.Builder getWhenFalse()
Description copied from interface: AgendaItemDefinitionContract
This method returns the next AgendaItemDefinition to be executed if the Rule associated with this AgendaItemDefinition evaluates to false.

Specified by:
getWhenFalse in interface AgendaItemDefinitionContract
Returns:
an immutable representation of the next AgendaItemDefinition

getAlways

public AgendaItemDefinition.Builder getAlways()
Description copied from interface: AgendaItemDefinitionContract
This is ID of the next AgendaItemDefinition to be executed after following any defined true or false actions.

Specified by:
getAlways in interface AgendaItemDefinitionContract
Returns:
an immutable representation of the next AgendaItemDefinition

getVersionNumber

public Long getVersionNumber()
Description copied from interface: Versioned
Returns the version number for this object. In general, this value should only be null if the object has not yet been stored to a persistent data store. This version number is generally used for the purposes of optimistic locking.

Specified by:
getVersionNumber in interface Versioned
Returns:
the version number, or null if one has not been assigned yet

build

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

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


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