org.kuali.rice.kew.api.document.attribute
Class DocumentAttribute.AbstractBuilder<T>

java.lang.Object
  extended by 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:
Serialized Form

Constructor Summary
protected DocumentAttribute.AbstractBuilder(String name)
           
 
Method Summary
abstract  DocumentAttribute build()
          Build the DocumentAttribute for this builder based on it's current state.
 String getName()
          Returns the name of this document attribute which serves as an identifier for this attribute on the document.
 T getValue()
          Returns the value of this document attribute.
 void setName(String name)
          Sets the name of the document attribute that will be built by this builder.
 void setValue(T value)
          Sets the value of the document attribute that will be built by this builder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.kew.api.document.attribute.DocumentAttributeContract
getDataType
 

Constructor Detail

DocumentAttribute.AbstractBuilder

protected DocumentAttribute.AbstractBuilder(String name)
Method Detail

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


Copyright © 2005-2014 The Kuali Foundation. All Rights Reserved.