Class KrmsAttributeDefinition.Builder
java.lang.Object
org.kuali.rice.krms.api.repository.type.KrmsAttributeDefinition.Builder
- All Implemented Interfaces:
Serializable,Inactivatable,Identifiable,Versioned,ModelBuilder,KrmsAttributeDefinitionContract
- Enclosing class:
- KrmsAttributeDefinition
public static class KrmsAttributeDefinition.Builder
extends Object
implements KrmsAttributeDefinitionContract, ModelBuilder, Serializable
This builder is used to construct instances of KrmsAttributeDefinition. It enforces the constraints of the
KrmsAttributeDefinitionContract.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an instance of a CampusType based on the current state of the builder.componentName(String componentName) fluent interface that sets the componentName of the KrmsAttributeDefinition.Creates a builder from the given parameters.create(KrmsAttributeDefinitionContract contract) Creates a builder by populating it with data from the givenKrmsAttributeDefinitionContract.Returns the name of the component used to display the attribute.Returns the description of the attribute.getId()getLabel()Returns the label of this attribute definition.getName()Returns the name of this attribute definition.Returns the namespace of this attribute definition.booleanisActive()fluent interface that sets the label of the KrmsAttributeDefinition.voidsetActive(boolean active) sets the active indicator valuevoidsetComponentName(String componentName) sets the name of the component used to display the attributevoidsetDescription(String description) sets the description of the attributevoidSets the value of the id on this builder to the given value.voidsets the label to be displayed with the attribute.voidsets the name of the attribute. must not be null or blank.voidsetNamespace(String namespace) sets the namespace of the attribute. must not be null or blank.voidsetVersionNumber(Long versionNumber) Sets the version number for this object.
-
Method Details
-
label
fluent interface that sets the label of the KrmsAttributeDefinition.- Parameters:
label- the label used when the attribute is displayed; may be null or blank- Returns:
- a Builder object with the label attribute set
-
componentName
fluent interface that sets the componentName of the KrmsAttributeDefinition.- Parameters:
componentName- the name of the component used to display the attribute; can be null or blank- Returns:
- a Builder object with the componentName set
-
create
Creates a builder from the given parameters.- Parameters:
id- the KrmsAttributeDefinition idname- the KrmsAttributeDefinition namenamespace- the KrmsAttributeDefinition namespace- Returns:
- an instance of the builder with the fields already populated
- Throws:
IllegalArgumentException- if either the id, name or namespace is null or blank
-
create
Creates a builder by populating it with data from the givenKrmsAttributeDefinitionContract.- 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 or blank
-
setId
Sets the value of the id on this builder to the given value.- Parameters:
id- the id value to set, must be null or non-blank- Throws:
IllegalArgumentException- if the id is non-null and blank
-
setName
sets the name of the attribute. must not be null or blank.- Parameters:
name- the name of the attribute;- Throws:
IllegalArgumentException- if the name is non-null and blank
-
setNamespace
sets the namespace of the attribute. must not be null or blank.- Parameters:
namespace- the namespace of the attribute;- Throws:
IllegalArgumentException- if the namespace is non-null and blank
-
setLabel
sets the label to be displayed with the attribute.- Parameters:
label- string to display as label; May be null or empty
-
setDescription
sets the description of the attribute- Parameters:
description- string; Optional, may be null or empty
-
setComponentName
sets the name of the component used to display the attribute- Parameters:
componentName- ; May be null or empty
-
setActive
public void setActive(boolean active) sets the active indicator value- Parameters:
active- boolean value to set
-
setVersionNumber
Sets 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.- Parameters:
versionNumber- the version number, or null if one has not been assigned yet.
-
getId
- Specified by:
getIdin interfaceIdentifiable
-
getName
Description copied from interface:KrmsAttributeDefinitionContractReturns the name of this attribute definition.All attribute definitions have a name and namespace, so this value can not be null or blank. The combination of name and namespace must be unique within the entire KRMS system.
- Specified by:
getNamein interfaceKrmsAttributeDefinitionContract- Returns:
- name for this attribute definition
-
getNamespace
Description copied from interface:KrmsAttributeDefinitionContractReturns the namespace of this attribute definition.The namespace provides scope of the the attribute definition. All attribute definition have a name and namespace, so this field may not be null or blank. The combination of name and namespace must be unique within the entire KRMS system.
- Specified by:
getNamespacein interfaceKrmsAttributeDefinitionContract- Returns:
- the namespace of this attribute definition
-
getComponentName
Description copied from interface:KrmsAttributeDefinitionContractReturns the name of the component used to display the attribute.- Specified by:
getComponentNamein interfaceKrmsAttributeDefinitionContract- Returns:
- the component name of the of the attribute
-
getLabel
Description copied from interface:KrmsAttributeDefinitionContractReturns the label of this attribute definition.This is an optional field and may be null or blank.
- Specified by:
getLabelin interfaceKrmsAttributeDefinitionContract- Returns:
- the label to be used when displaying the attribute
-
getDescription
Description copied from interface:KrmsAttributeDefinitionContractReturns the description of the attribute.This is an option field and may be null or blank.
- Specified by:
getDescriptionin interfaceKrmsAttributeDefinitionContract- Returns:
- a text description of the attribute
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceInactivatable
-
getVersionNumber
- Specified by:
getVersionNumberin interfaceVersioned
-
build
Builds an instance of a CampusType based on the current state of the builder.- Specified by:
buildin interfaceModelBuilder- Returns:
- the fully-constructed CampusType
-