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 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

      public static WorkflowAttributeDefinition.Builder create(String attributeName)
      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 - if attributeName is a null or blank value
    • build

      Specified by:
      build in interface org.kuali.rice.core.api.mo.ModelBuilder
    • getAttributeName

      public String getAttributeName()
      Returns the attribute name that is set on this builder.
      Returns:
      the attribute name this is set on this builder
    • getParameters

      public List<String> 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

      public List<PropertyDefinition> getPropertyDefinitions()
      Returns a list of PropertyDefinition objects that have been set on this builder.
      Returns:
      a list of property definitions that have been set on this builder
    • setAttributeName

      public void setAttributeName(String attributeName)
      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 - if attributeName is a null or blank value
    • addParameter

      public void addParameter(String parameter)
      Adds a parameter to the list of parameters maintained by this builder.
      Parameters:
      parameter - the parameter value to add
    • removeParameter

      public void removeParameter(String parameter)
      Removes a parameter with the given value from the list of parameters maintained by this builder.
      Parameters:
      parameter - the parameter value to remove
    • setParameters

      public void setParameters(List<String> parameters)
      Sets the list of parameters on this builder.
      Parameters:
      parameters - the list of parameters to set
    • addPropertyDefinition

      public void addPropertyDefinition(PropertyDefinition propertyDefinition)
      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

      public void setPropertyDefinitions(List<PropertyDefinition> propertyDefinitions)
      Sets the list of property definitions maintained by this build to the given list.
      Parameters:
      propertyDefinitions - the list of property definitions to set
    • addPropertyDefinition

      public void addPropertyDefinition(String name, String value)
      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 value
      value - value of the property definition to add
      Throws:
      IllegalArgumentException - if the given name is a null or blank value
    • getPropertyDefinition

      public PropertyDefinition getPropertyDefinition(String name)
      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