Class DocumentAttribute.AbstractBuilder<T>

java.lang.Object
org.kuali.rice.kew.api.document.attribute.DocumentAttribute.AbstractBuilder<T>
Type Parameters:
T - the type of the value contained within the document attribute that is built by this builder
All Implemented Interfaces:
Serializable, ModelBuilder, DocumentAttributeContract
Direct Known Subclasses:
DocumentAttributeDateTime.Builder, DocumentAttributeDecimal.Builder, DocumentAttributeInteger.Builder, DocumentAttributeString.Builder
Enclosing class:
DocumentAttribute

public abstract static class DocumentAttribute.AbstractBuilder<T> extends Object implements Serializable, ModelBuilder, DocumentAttributeContract
An abstract base class that can be extended by concrete builder implementations of subclasses of DocumentAttribute.
See Also:
  • Constructor Details

    • AbstractBuilder

      protected AbstractBuilder(String name)
  • Method Details

    • getName

      public String getName()
      Description copied from interface: DocumentAttributeContract
      Returns the name of this document attribute which serves as an identifier for this attribute on the document. A document may have more then one attribute with the same name, in which case it is treated as a multi-valued attribute. This method should never return a null or blank value.
      Specified by:
      getName in interface DocumentAttributeContract
      Returns:
      the name of the document attribute
    • setName

      public void setName(String name)
      Sets the name of the document attribute that will be built by this builder.
      Parameters:
      name - the name of the document attribute to set, must not be a null or blank value
      Throws:
      IllegalArgumentException - if the given name is a null or blank value.
    • getValue

      public T getValue()
      Description copied from interface: DocumentAttributeContract
      Returns the value of this document attribute. It can be of any type as defined by the implementations of this interface. It is possible that this value may be null in cases where the document has a particular attribute but no actual value associated with that attribute.
      Specified by:
      getValue in interface DocumentAttributeContract
      Returns:
      the value of the document attribute
    • setValue

      public void setValue(T value)
      Sets the value of the document attribute that will be built by this builder.
      Parameters:
      value - the value of the document attribute to set
    • build

      public abstract DocumentAttribute build()
      Build the DocumentAttribute for this builder based on it's current state.
      Specified by:
      build in interface ModelBuilder
      Returns:
      the instantiated instance of DocumentAttribute which was built by this builder