Class AgendaItemDefinition.Builder
java.lang.Object
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:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an instance of a AgendaItemDefinition based on the current state of the builder.static AgendaItemDefinition.BuilderCreate a builder with the given parameters.static AgendaItemDefinition.Buildercreate(AgendaItemDefinitionContract contract) Creates a builder by populating it with data from the givenAgendaItemDefinitionContract.Returns the agenda id to which the agenda item belongs.This is ID of the next AgendaItemDefinition to be executed after following any defined true or false actions.This is ID of the next AgendaItemDefinition to be executed after following any defined true or false actions.getId()getRule()This method returns the Rule associated with this AgendaItemDefinition.Returns the rule id associated with the agenda item.This method returns the SubAgenda associated with this AgendaItemDefinition.This is ID of the SubAgenda associated with this AgendaItemDefinition.This method returns the next AgendaItemDefinition to be executed if the Rule associated with this AgendaItemDefinition evaluates to false.This is ID of the next AgendaItemDefinition to be executed if the Rule associated AgendaItemDefinition evaluates to false.This method returns the next AgendaItemDefinition to be executed if the Rule associated with this AgendaItemDefinition evaluates to true.This is ID of the next AgendaItemDefinition to be executed if the Rule associated AgendaItemDefinition evaluates to true.voidsetAgendaId(String agendaId) Set the value of the agenda id on this builder to the given value.voidSet the value of the agenda item for the "always" condition on this builder to the given value.voidsetAlwaysId(String alwaysId) Set the value of the agenda item id for the "always" condition on this builder to the given value.voidSets the value of the id on this builder to the given value.voidSet the value of the rule on this builder to the given value.voidSet the value of the rule id on this builder to the given value.voidsetSubAgenda(AgendaDefinition.Builder subAgenda) Set the value of the sub agenda on this builder to the given value.voidsetSubAgendaId(String subAgendaId) Set the value of the sub agenda id on this builder to the given value.voidsetVersionNumber(Long versionNumber) Set the value of the version number on this builder to the given value.voidsetWhenFalse(AgendaItemDefinition.Builder whenFalse) Set the value of the agenda item for the "when false" condition on this builder to the given value.voidsetWhenFalseId(String whenFalseId) Set the value of the agenda item id for the "when false" condition on this builder to the given value.voidsetWhenTrue(AgendaItemDefinition.Builder whenTrue) Set the value of the agenda item for the "when true" condition on this builder to the given value.voidsetWhenTrueId(String whenTrueId) Set the value of the agenda item id for the "when true" condition on this builder to the given value.
-
Method Details
-
create
Create a builder with the given parameters.- Parameters:
id-agendaId-- Returns:
- Builder
-
create
Creates a builder by populating it with data from the givenAgendaItemDefinitionContract.- 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
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 blankThe 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
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
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
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
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
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
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
Set the value of the rule on this builder to the given value.- Parameters:
rule- the rule of the agenda item to set
-
setSubAgenda
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
Set the value of the agenda item for the "when true" condition on this builder to the given value. Has the additional side effect of setting whenTrueId to the ID value of the {{whenTrue}} argument.- Parameters:
whenTrue- the agenda item for the "when true" condition of the agenda item to set
-
setWhenFalse
Set the value of the agenda item for the "when false" condition on this builder to the given value. Has the additional side effect of setting whenTrueId to the ID value of the {{whenFalse}} argument.- Parameters:
whenFalse- the agenda item for the "when false" condition of the agenda item to set
-
setAlways
Set the value of the agenda item for the "always" condition on this builder to the given value. Has the additional side effect of setting {{whenTrueId}} to the ID value of the always argument.- Parameters:
always- the agenda item for the "always" condition of the agenda item to set
-
setVersionNumber
Set the value of the version number on this builder to the given value.- Parameters:
versionNumber- the version number set
-
getId
- Specified by:
getIdin interfaceIdentifiable
-
getAgendaId
Description copied from interface:AgendaItemDefinitionContractReturns the agenda id to which the agenda item belongs.- Specified by:
getAgendaIdin interfaceAgendaItemDefinitionContract- Returns:
- id for the agenda associated with the agenda item
-
getRuleId
Description copied from interface:AgendaItemDefinitionContractReturns the rule id associated with the agenda item.- Specified by:
getRuleIdin interfaceAgendaItemDefinitionContract- Returns:
- ID of the Rule associated with the agenda item
-
getSubAgendaId
Description copied from interface:AgendaItemDefinitionContractThis 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:
getSubAgendaIdin interfaceAgendaItemDefinitionContract- Returns:
- ID of the SubAgenda associated with the AgendaItemDefinition
-
getWhenTrueId
Description copied from interface:AgendaItemDefinitionContractThis is ID of the next AgendaItemDefinition to be executed if the Rule associated AgendaItemDefinition evaluates to true.- Specified by:
getWhenTrueIdin interfaceAgendaItemDefinitionContract- Returns:
- ID of the next AgendaItemDefinition
-
getWhenFalseId
Description copied from interface:AgendaItemDefinitionContractThis is ID of the next AgendaItemDefinition to be executed if the Rule associated AgendaItemDefinition evaluates to false.- Specified by:
getWhenFalseIdin interfaceAgendaItemDefinitionContract- Returns:
- ID of the next AgendaItemDefinition
-
getAlwaysId
Description copied from interface:AgendaItemDefinitionContractThis is ID of the next AgendaItemDefinition to be executed after following any defined true or false actions.- Specified by:
getAlwaysIdin interfaceAgendaItemDefinitionContract- Returns:
- ID of the next AgendaItemDefinition
-
getRule
Description copied from interface:AgendaItemDefinitionContractThis method returns the Rule associated with this AgendaItemDefinition.- Specified by:
getRulein interfaceAgendaItemDefinitionContract- Returns:
- an immutable representation of the Rule
-
getSubAgenda
Description copied from interface:AgendaItemDefinitionContractThis method returns the SubAgenda associated with this AgendaItemDefinition.- Specified by:
getSubAgendain interfaceAgendaItemDefinitionContract- Returns:
- an immutable representation of the SubAgenda
-
getWhenTrue
Description copied from interface:AgendaItemDefinitionContractThis method returns the next AgendaItemDefinition to be executed if the Rule associated with this AgendaItemDefinition evaluates to true.- Specified by:
getWhenTruein interfaceAgendaItemDefinitionContract- Returns:
- an immutable representation of the next AgendaItemDefinition
-
getWhenFalse
Description copied from interface:AgendaItemDefinitionContractThis method returns the next AgendaItemDefinition to be executed if the Rule associated with this AgendaItemDefinition evaluates to false.- Specified by:
getWhenFalsein interfaceAgendaItemDefinitionContract- Returns:
- an immutable representation of the next AgendaItemDefinition
-
getAlways
Description copied from interface:AgendaItemDefinitionContractThis is ID of the next AgendaItemDefinition to be executed after following any defined true or false actions.- Specified by:
getAlwaysin interfaceAgendaItemDefinitionContract- Returns:
- an immutable representation of the next AgendaItemDefinition
-
getVersionNumber
- Specified by:
getVersionNumberin interfaceVersioned
-
build
Builds an instance of a AgendaItemDefinition based on the current state of the builder.- Specified by:
buildin interfaceModelBuilder- Returns:
- the fully-constructed AgendaItemDefinition
-