|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krms.api.repository.context.ContextDefinition.Builder
public static final class ContextDefinition.Builder
A builder which can be used to construct ContextDefinition instances. Enforces the
constraints of the ContextDefinitionContract
. This class is the only means
by which a ContextDefinition
object can be constructed.
Method Summary | |
---|---|
ContextDefinition |
build()
Returns an instance of the object being built by this builder based on the current state of the builder. |
static ContextDefinition.Builder |
create(ContextDefinitionContract contract)
Creates a populates a builder with the data on the given ContextDefinitionContract. |
static ContextDefinition.Builder |
create(String namespace,
String name)
Creates a context definition builder with the given required values |
List<AgendaDefinition.Builder> |
getAgendas()
Returns the list of agendas contained within the context definition. |
Map<String,String> |
getAttributes()
This method returns a list of attributes associated with the a context. |
String |
getDescription()
Returns the description of the context definition. |
String |
getId()
The unique identifier for an object. |
String |
getName()
Returns the name of the context definition. |
String |
getNamespace()
Returns the namespace of the context definition. |
String |
getTypeId()
Returns the type id for the context definition. |
Long |
getVersionNumber()
Returns the version number for this object. |
void |
setAgendas(List<? extends AgendaDefinitionContract> agendaContracts)
|
void |
setAttributes(Map<String,String> attributes)
|
void |
setDescription(String description)
Sets the description for the context definition that will be created by this builder. |
void |
setId(String id)
Sets the id for the context definition that will be created by this builder. |
void |
setName(String name)
Sets the name for the context definition that will be created by this builder. |
void |
setNamespace(String namespace)
Sets the namespace code for the context definition that will be created by this builder. |
void |
setTypeId(String typeId)
Sets the typeId for the context definition that will be created by this builder. |
void |
setVersionNumber(Long versionNumber)
Sets the version number for the style that will be returned by this builder. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ContextDefinition.Builder create(String namespace, String name)
namespace
- the namespace code of the context definition to create, must not be null or blankname
- the name of the context definition to create, must not be null or blank
IllegalArgumentException
- if the given namespace is null or blank
IllegalArgumentException
- if the given name is null or blankpublic static ContextDefinition.Builder create(ContextDefinitionContract contract)
contract
- an object implementing the ContextDefinitionContract from which
to copy property values
IllegalArgumentException
- if the given contract is nullpublic ContextDefinition build()
ModelBuilder
build
in interface ModelBuilder
public Long getVersionNumber()
Versioned
getVersionNumber
in interface Versioned
public String getId()
Identifiable
getId
in interface Identifiable
public String getNamespace()
ContextDefinitionContract
getNamespace
in interface ContextDefinitionContract
public String getName()
ContextDefinitionContract
getName
in interface ContextDefinitionContract
public String getTypeId()
ContextDefinitionContract
getTypeId
in interface ContextDefinitionContract
public String getDescription()
ContextDefinitionContract
getDescription
in interface ContextDefinitionContract
public List<AgendaDefinition.Builder> getAgendas()
ContextDefinitionContract
getAgendas
in interface ContextDefinitionContract
public Map<String,String> getAttributes()
ContextDefinitionContract
getAttributes
in interface ContextDefinitionContract
public void setId(String id)
id
- the id to setpublic void setNamespace(String namespace)
namespace
- the namespace to set on this builder, must not be
null or blank
IllegalArgumentException
- if the given namespace code is null or blankpublic void setName(String name)
name
- the name to set on this builder, must not be
null or blank
IllegalArgumentException
- if the given name is null or blankpublic void setTypeId(String typeId)
typeId
- the typeId to setpublic void setDescription(String description)
description
- the descripition to setpublic void setAgendas(List<? extends AgendaDefinitionContract> agendaContracts)
public void setAttributes(Map<String,String> attributes)
public void setVersionNumber(Long versionNumber)
In general, this value should not be manually set on the builder,
but rather copied from an existing ContextDefinitionContract
when
invoking create(ContextDefinitionContract)
.
versionNumber
- the version number to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |