Class DocumentSearchResultValue.Builder

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

public static final class DocumentSearchResultValue.Builder extends Object implements Serializable, org.kuali.rice.core.api.mo.ModelBuilder, DocumentSearchResultValueContract
A builder which can be used to construct DocumentSearchResultValue instances. Enforces the constraints of the DocumentSearchResultValueContract.
See Also:
  • Method Details

    • 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

      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()
      Specified by:
      build in interface org.kuali.rice.core.api.mo.ModelBuilder
    • 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<org.kuali.rice.kew.api.document.attribute.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<org.kuali.rice.kew.api.document.attribute.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