Class KewTypeDefinition.Builder
java.lang.Object
org.kuali.rice.kew.api.repository.type.KewTypeDefinition.Builder
- All Implemented Interfaces:
Serializable,Inactivatable,Identifiable,Versioned,ModelBuilder,KewTypeDefinitionContract
- Enclosing class:
KewTypeDefinition
public static class KewTypeDefinition.Builder
extends Object
implements KewTypeDefinitionContract, ModelBuilder, Serializable
This builder is used to construct instances of KEW KewType. It enforces the constraints of the
KewTypeDefinitionContract.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionattributes(List<KewTypeAttribute.Builder> attributes) build()Builds an instance of a KewType based on the current state of the builder.static KewTypeDefinition.BuilderCreates a builder from the given parameters.static KewTypeDefinition.Buildercreate(KewTypeDefinitionContract contract) Creates a builder by populating it with data from the givenKewTypeDefinitionContract.This method returns a list of attributes associated with the KewTypegetId()getName()This is the name for the KEWTypeThis is the namespace code.This is the name of the KEW KewType servicebooleanisActive()serviceName(String serviceName) voidsetActive(boolean active) voidsetAttributes(List<KewTypeAttribute.Builder> attributes) voidSets the value of the id on this builder to the given value.voidvoidsetNamespace(String namespace) voidsetServiceName(String serviceName) voidsetVersionNumber(Long versionNumber)
-
Method Details
-
serviceName
-
attributes
-
create
Creates a builder from the given parameters.- Parameters:
id- the KEW type idname- the KEW type namenamespace- the KEW type namespace- Returns:
- an instance of the builder with the fields already populated
- Throws:
IllegalArgumentException- if the either the id, name or namespace is null or blank
-
create
Creates a builder by populating it with data from the givenKewTypeDefinitionContract.- Parameters:
contract- the contract from which to populate this builder- Returns:
- an instance of the builder populated with data from the contract
-
setId
Sets the value of the id on this builder to the given value.- Parameters:
id- the id value to set, must not be blank- Throws:
IllegalArgumentException- if the id is blank
-
setName
-
setNamespace
-
setServiceName
-
setAttributes
-
setActive
public void setActive(boolean active) -
setVersionNumber
-
getId
- Specified by:
getIdin interfaceIdentifiable
-
getName
Description copied from interface:KewTypeDefinitionContractThis is the name for the KEWTypeIt is a name of a KEW type.
- Specified by:
getNamein interfaceKewTypeDefinitionContract- Returns:
- name for KEW type.
-
getNamespace
Description copied from interface:KewTypeDefinitionContractThis is the namespace code.It provides scope of the KEW type.
- Specified by:
getNamespacein interfaceKewTypeDefinitionContract- Returns:
- the namespace code of the KEW type.
-
getServiceName
Description copied from interface:KewTypeDefinitionContractThis is the name of the KEW KewType service- Specified by:
getServiceNamein interfaceKewTypeDefinitionContract- Returns:
- the service name of the KEW type
-
getAttributes
Description copied from interface:KewTypeDefinitionContractThis method returns a list of attributes associated with the KewType- Specified by:
getAttributesin interfaceKewTypeDefinitionContract- Returns:
- a list of KewTypeAttribute objects.
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceInactivatable
-
getVersionNumber
- Specified by:
getVersionNumberin interfaceVersioned
-
build
Builds an instance of a KewType based on the current state of the builder.- Specified by:
buildin interfaceModelBuilder- Returns:
- the fully-constructed KewType
-