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

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

public static class AgendaItem.Builder
extends Object
implements AgendaItemContract, ModelBuilder, Serializable

This builder is used to construct instances of KRMS Repository AgendaItem. It enforces the constraints of the AgendaItemContract.

See Also:
Serialized Form

Method Summary
 AgendaItem build()
          Builds an instance of a AgendaItem based on the current state of the builder.
static AgendaItem.Builder create(AgendaItemContract contract)
          Creates a builder by populating it with data from the given AgendaItemContract.
static AgendaItem.Builder create(String id, String agendaId)
           
 String getAgendaId()
          This is the agenda ID for the Agenda associated with this Agenda Item
 AgendaItem.Builder getAlways()
          This is ID of the next AgendaItem to be executed after following any defined true or false actions.
 String getAlwaysId()
          This is ID of the next AgendaItem 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 AgendaItem.
 String getRuleId()
          This is ID of the Rule associated with this AgendaItem.
 AgendaDefinition.Builder getSubAgenda()
          This method returns the SubAgenda associated with this AgendaItem.
 String getSubAgendaId()
          This is ID of the SubAgenda associated with this AgendaItem.
 Long getVersionNumber()
          Returns the version number for this object.
 AgendaItem.Builder getWhenFalse()
          This method returns the next AgendaItem to be executed if the Rule associated with this AgendaItem evaluates to false.
 String getWhenFalseId()
          This is ID of the next AgendaItem to be executed if the Rule associated AgendaItem evaluates to false.
 AgendaItem.Builder getWhenTrue()
          This method returns the next AgendaItem to be executed if the Rule associated with this AgendaItem evaluates to true.
 String getWhenTrueId()
          This is ID of the next AgendaItem to be executed if the Rule associated AgendaItem evaluates to true.
 void setAgendaId(String agendaId)
          This method ...
 void setAlways(AgendaItem.Builder always)
           
 void setAlwaysId(String alwaysId)
           
 void setId(String id)
          Sets the value of the id on this builder to the given value.
 void setRule(RuleDefinition.Builder rule)
           
 void setRuleId(String ruleId)
           
 void setSubAgenda(AgendaDefinition.Builder subAgenda)
           
 void setSubAgendaId(String subAgendaId)
           
 void setVersionNumber(Long versionNumber)
           
 void setWhenFalse(AgendaItem.Builder whenFalse)
           
 void setWhenFalseId(String whenFalseId)
           
 void setWhenTrue(AgendaItem.Builder whenTrue)
           
 void setWhenTrueId(String whenTrueId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static AgendaItem.Builder create(String id,
                                        String agendaId)

create

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

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 id)
Sets the value of the id on this builder to the given value.

Parameters:
id - the primary id. (may be null), must not be or blank.

This value is generated by the system. For new items (not yet persisted) this field is null. For existing items this field is the generated id.

Throws:
IllegalArgumentException - if the id is blank

setAgendaId

public void setAgendaId(String agendaId)
This method ...

Parameters:
agendaId -

setRuleId

public void setRuleId(String ruleId)

setSubAgendaId

public void setSubAgendaId(String subAgendaId)

setWhenTrueId

public void setWhenTrueId(String whenTrueId)

setWhenFalseId

public void setWhenFalseId(String whenFalseId)

setAlwaysId

public void setAlwaysId(String alwaysId)

setRule

public void setRule(RuleDefinition.Builder rule)

setSubAgenda

public void setSubAgenda(AgendaDefinition.Builder subAgenda)

setWhenTrue

public void setWhenTrue(AgendaItem.Builder whenTrue)

setWhenFalse

public void setWhenFalse(AgendaItem.Builder whenFalse)

setAlways

public void setAlways(AgendaItem.Builder always)

setVersionNumber

public void setVersionNumber(Long versionNumber)

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: AgendaItemContract
This is the agenda ID for the Agenda associated with this Agenda Item

It is the agenda ID for the Agenda object associated with this Agenda Item.

Specified by:
getAgendaId in interface AgendaItemContract
Returns:
ID for AgendaItem

getRuleId

public String getRuleId()
Description copied from interface: AgendaItemContract
This is ID of the Rule associated with this AgendaItem.

Each AgendaItem has either a Rule or a SubAgenda associated with it, but not both.

Specified by:
getRuleId in interface AgendaItemContract
Returns:
ID of the Rule associated with the AgendaItem

getSubAgendaId

public String getSubAgendaId()
Description copied from interface: AgendaItemContract
This is ID of the SubAgenda associated with this AgendaItem.

Each AgendaItem has either a Rule or a SubAgenda associated with it, but not both.

Specified by:
getSubAgendaId in interface AgendaItemContract
Returns:
ID of the SubAgenda associated with the AgendaItem

getWhenTrueId

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

Specified by:
getWhenTrueId in interface AgendaItemContract
Returns:
ID of the next AgendaItem

getWhenFalseId

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

Specified by:
getWhenFalseId in interface AgendaItemContract
Returns:
ID of the next AgendaItem

getAlwaysId

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

Specified by:
getAlwaysId in interface AgendaItemContract
Returns:
ID of the next AgendaItem

getRule

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

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

getSubAgenda

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

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

getWhenTrue

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

Specified by:
getWhenTrue in interface AgendaItemContract
Returns:
an immutable representation of the next AgendaItem

getWhenFalse

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

Specified by:
getWhenFalse in interface AgendaItemContract
Returns:
an immutable representation of the next AgendaItem

getAlways

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

Specified by:
getAlways in interface AgendaItemContract
Returns:
an immutable representation of the next AgendaItem

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 AgendaItem build()
Builds an instance of a AgendaItem based on the current state of the builder.

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


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