org.kuali.rice.kew.framework.document.search
Class DocumentSearchResultValue.Builder

java.lang.Object
  extended by org.kuali.rice.kew.framework.document.search.DocumentSearchResultValue.Builder
All Implemented Interfaces:
Serializable, ModelBuilder, DocumentSearchResultValueContract
Enclosing class:
DocumentSearchResultValue

public static final class DocumentSearchResultValue.Builder
extends Object
implements Serializable, ModelBuilder, DocumentSearchResultValueContract

A builder which can be used to construct DocumentSearchResultValue instances. Enforces the constraints of the DocumentSearchResultValueContract.

See Also:
Serialized Form

Method Summary
 DocumentSearchResultValue build()
          Returns an instance of the object being built by this builder based on the current state of the builder.
static DocumentSearchResultValue.Builder create(DocumentSearchResultValueContract contract)
          Creates a new builder instance initialized with copies of the properties from the given contract.
static DocumentSearchResultValue.Builder create(String documentId)
          Creates a new builder instance initialized with the given document id.
 List<DocumentAttribute.AbstractBuilder<?>> getDocumentAttributes()
          Returns the customized document attribute values for this document search result.
 String getDocumentId()
          Returns the id of the document for which this customized result value applies.
 void setDocumentAttributes(List<DocumentAttribute.AbstractBuilder<?>> documentAttributes)
          Sets the list of document attribute builders on this builder to the given list.
 void setDocumentId(String documentId)
          Sets the document id on this builder to the given value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static DocumentSearchResultValue.Builder create(String documentId)
Creates a new builder instance initialized with the given document id. The list of document attributes on this builder is initialized to an empty list.

Parameters:
documentId - the id of the document with which to initialize this builder, must not be a null or blank value
Returns:
a new builder instance initialized with the given document id

create

public static DocumentSearchResultValue.Builder create(DocumentSearchResultValueContract contract)
Creates a new builder instance initialized with copies of the properties from the given contract.

Parameters:
contract - the contract from which to copy properties
Returns:
a builder instance initialized with properties from the given contract
Throws:
IllegalArgumentException - if the given contract is null

build

public DocumentSearchResultValue build()
Description copied from interface: ModelBuilder
Returns an instance of the object being built by this builder based on the current state of the builder. It should be possible to invoke this method more than once on the same builder. It should never return null;

Specified by:
build in interface ModelBuilder
Returns:
an instance of the object being built by this builder, should never return null

getDocumentId

public String getDocumentId()
Description copied from interface: DocumentSearchResultValueContract
Returns the id of the document for which this customized result value applies.

Specified by:
getDocumentId in interface DocumentSearchResultValueContract
Returns:
the document id of the customized document search result

getDocumentAttributes

public List<DocumentAttribute.AbstractBuilder<?>> getDocumentAttributes()
Description copied from interface: DocumentSearchResultValueContract
Returns the customized document attribute values for this document search result.

Specified by:
getDocumentAttributes in interface DocumentSearchResultValueContract
Returns:
the customized document attribute values for this document search result

setDocumentId

public void setDocumentId(String documentId)
Sets the document id on this builder to the given value. The given document id must not be a null or blank value.

Parameters:
documentId - the id of the document to set on this builder, must not be a null or blank value
Throws:
IllegalArgumentException - if documentId is a null or blank value

setDocumentAttributes

public void setDocumentAttributes(List<DocumentAttribute.AbstractBuilder<?>> documentAttributes)
Sets the list of document attribute builders on this builder to the given list.

Parameters:
documentAttributes - the list of document attribute builders to set on this builder


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.