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

java.lang.Object
  extended by org.kuali.rice.krms.api.repository.AgendaItem.Builder
All Implemented Interfaces:
Serializable, 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 priorItemId, String entryCondition)
           
 String getAgendaId()
          This is the agenda ID for the Agenda associated with this Agenda Item
 String getEntryCondition()
          This code identifies the condition (the result of the previous agenda item) that led to choosing this item in the tree structure.
 String getId()
          This is the ID for the AgendaItem
 AgendaItem.Builder getNextAfter()
           
 AgendaItem.Builder getNextFalse()
           
 AgendaItem.Builder getNextTrue()
           
 String getPriorItemId()
          This is the id of the prior item in the tree of agenda items that make up the agenda.
 RuleDefinition.Builder getRule()
           
 String getRuleId()
          This is ID of the Rule associated with this AgendaItem.
 AgendaDefinition.Builder getSubAgenda()
           
 String getSubAgendaId()
          This is the KrmsType of the AgendaItem
 void setAgendaId(String agendaId)
          This method ...
 void setEntryCondition(String EntryCondition)
          This method ...
 void setid(String id)
          Sets the value of the id on this builder to the given value.
 void setNextAfter(AgendaItem.Builder nextAfter)
           
 void setNextFalse(AgendaItem.Builder nextFalse)
           
 void setNextTrue(AgendaItem.Builder nextTrue)
           
 void setPriorItemId(String priorItemId)
          This method ...
 void setRule(RuleDefinition.Builder rule)
           
 void setRuleId(String ruleId)
           
 void setSubAgenda(AgendaDefinition.Builder subAgenda)
           
 void setSubAgendaId(String subAgendaId)
           
 
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,
                                        String priorItemId,
                                        String entryCondition)

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 -

setPriorItemId

public void setPriorItemId(String priorItemId)
This method ...

Parameters:
priorItemId - - the item at the top level of the agenda tree has a null ID, all other items in the tree have a priorItemId

setEntryCondition

public void setEntryCondition(String EntryCondition)
This method ...

Parameters:
EntryCondition - - required.

setRuleId

public void setRuleId(String ruleId)

setSubAgendaId

public void setSubAgendaId(String subAgendaId)

setRule

public void setRule(RuleDefinition.Builder rule)

setSubAgenda

public void setSubAgenda(AgendaDefinition.Builder subAgenda)

setNextTrue

public void setNextTrue(AgendaItem.Builder nextTrue)

setNextFalse

public void setNextFalse(AgendaItem.Builder nextFalse)

setNextAfter

public void setNextAfter(AgendaItem.Builder nextAfter)

getId

public String getId()
Description copied from interface: AgendaItemContract
This is the ID for the AgendaItem

It is a ID of a AgendaItem

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

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

getPriorItemId

public String getPriorItemId()
Description copied from interface: AgendaItemContract
This is the id of the prior item in the tree of agenda items that make up the agenda.

priorItemId - the id of the prior item in the tree structure of agenda items

Specified by:
getPriorItemId in interface AgendaItemContract
Returns:
the id of the prior item in the agenda item tree structure

getEntryCondition

public String getEntryCondition()
Description copied from interface: AgendaItemContract
This code identifies the condition (the result of the previous agenda item) that led to choosing this item in the tree structure. TODO: more discussion here

The entry condition of the AgendaItem

Specified by:
getEntryCondition in interface AgendaItemContract
Returns:
the entry condition code of the AgendaItem

getRuleId

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

Specified by:
getRuleId in interface AgendaItemContract
Returns:
ruleId

getSubAgendaId

public String getSubAgendaId()
Description copied from interface: AgendaItemContract
This is the KrmsType of the AgendaItem

Specified by:
getSubAgendaId in interface AgendaItemContract
Returns:
id for KRMS type related of the AgendaItem

getRule

public RuleDefinition.Builder getRule()
Specified by:
getRule in interface AgendaItemContract

getSubAgenda

public AgendaDefinition.Builder getSubAgenda()
Specified by:
getSubAgenda in interface AgendaItemContract

getNextTrue

public AgendaItem.Builder getNextTrue()
Specified by:
getNextTrue in interface AgendaItemContract

getNextFalse

public AgendaItem.Builder getNextFalse()
Specified by:
getNextFalse in interface AgendaItemContract

getNextAfter

public AgendaItem.Builder getNextAfter()
Specified by:
getNextAfter in interface AgendaItemContract

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 © 2004-2011 The Kuali Foundation. All Rights Reserved.