Class WorkflowAttributeDefinition.Builder
java.lang.Object
org.kuali.rice.kew.api.document.attribute.WorkflowAttributeDefinition.Builder
- All Implemented Interfaces:
Serializable,org.kuali.rice.core.api.mo.ModelBuilder
- Enclosing class:
WorkflowAttributeDefinition
public static final class WorkflowAttributeDefinition.Builder
extends Object
implements Serializable, org.kuali.rice.core.api.mo.ModelBuilder
A builder which can be used to construct instances of
WorkflowAttributeDefinition.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddParameter(String parameter) Adds a parameter to the list of parameters maintained by this builder.voidaddPropertyDefinition(String name, String value) Add a property definition constructed from the given name and value to the list of property definitions on this builder.voidaddPropertyDefinition(PropertyDefinition propertyDefinition) Adds the given property definition to the list of property definitions maintained by this builder.build()Constructs a builder which is initialized with the given attribute name.create(WorkflowAttributeDefinition definition) Creates a new builder copying the properties from the given definition into it.Returns the attribute name that is set on this builder.Returns a list of string parameters that have been set on this builder.getPropertyDefinition(String name) Returns the property definition on this build which has the given name if it exists.Returns a list ofPropertyDefinitionobjects that have been set on this builder.voidremoveParameter(String parameter) Removes a parameter with the given value from the list of parameters maintained by this builder.voidsetAttributeName(String attributeName) Sets the attribute name on this builder to the given value.voidsetParameters(List<String> parameters) Sets the list of parameters on this builder.voidsetPropertyDefinitions(List<PropertyDefinition> propertyDefinitions) Sets the list of property definitions maintained by this build to the given list.
-
Method Details
-
create
Creates a new builder copying the properties from the given definition into it.- Parameters:
definition- the definition from which to copy properties- Returns:
- a builder initialized with the properties copied from the given definition
-
create
Constructs a builder which is initialized with the given attribute name.- Parameters:
attributeName- the attribute name to use when initializing this builder, cannot be a null or empty value- Returns:
- an instance of a builder initialized with the given attribute name
- Throws:
IllegalArgumentException- ifattributeNameis a null or blank value
-
build
- Specified by:
buildin interfaceorg.kuali.rice.core.api.mo.ModelBuilder
-
getAttributeName
Returns the attribute name that is set on this builder.- Returns:
- the attribute name this is set on this builder
-
getParameters
Returns a list of string parameters that have been set on this builder.- Returns:
- a list of string parameters that have been set on this builder
-
getPropertyDefinitions
Returns a list ofPropertyDefinitionobjects that have been set on this builder.- Returns:
- a list of property definitions that have been set on this builder
-
setAttributeName
Sets the attribute name on this builder to the given value. Must not be a null or blank value.- Parameters:
attributeName- the value of the attributeName to set- Throws:
IllegalArgumentException- ifattributeNameis a null or blank value
-
addParameter
Adds a parameter to the list of parameters maintained by this builder.- Parameters:
parameter- the parameter value to add
-
removeParameter
Removes a parameter with the given value from the list of parameters maintained by this builder.- Parameters:
parameter- the parameter value to remove
-
setParameters
Sets the list of parameters on this builder.- Parameters:
parameters- the list of parameters to set
-
addPropertyDefinition
Adds the given property definition to the list of property definitions maintained by this builder.- Parameters:
propertyDefinition- the property definition to set, should not be null- Throws:
IllegalArgumentException- if the given property definition is null
-
setPropertyDefinitions
Sets the list of property definitions maintained by this build to the given list.- Parameters:
propertyDefinitions- the list of property definitions to set
-
addPropertyDefinition
Add a property definition constructed from the given name and value to the list of property definitions on this builder.- Parameters:
name- name of the property definition to add, must not be a null or blank valuevalue- value of the property definition to add- Throws:
IllegalArgumentException- if the given name is a null or blank value
-
getPropertyDefinition
Returns the property definition on this build which has the given name if it exists. This method will return a null value if a definition with the given name cannot be found.- Parameters:
name- the name of the property definition to retrieve- Returns:
- the property definition with the given name, or null if no such property definition is found
- Throws:
IllegalArgumentException- if the given name is a null or blank value
-