Class Document.Builder

java.lang.Object
org.kuali.rice.kew.api.document.Document.Builder
All Implemented Interfaces:
Serializable, org.kuali.rice.core.api.mo.ModelBuilder, DocumentContract
Enclosing class:
Document

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

    • create

      public static Document.Builder create(String documentId, DocumentStatus status, org.joda.time.DateTime dateCreated, String initiatorPrincipalId, String documentTypeName, String documentTypeId)
    • create

      public static Document.Builder create(String documentId, String initiatorPrinicpalId, String documentTypeName, String documentTypeId)
    • create

      public static Document.Builder create(DocumentContract contract)
    • build

      public Document build()
      Specified by:
      build in interface org.kuali.rice.core.api.mo.ModelBuilder
    • getDocumentId

      public String getDocumentId()
      Description copied from interface: DocumentContract
      Retrieve the document id
      Specified by:
      getDocumentId in interface DocumentContract
      Returns:
      the document id
    • getStatus

      public DocumentStatus getStatus()
      Description copied from interface: DocumentContract
      Retrieve the document status
      Specified by:
      getStatus in interface DocumentContract
      Returns:
      the document status
    • getDateCreated

      public org.joda.time.DateTime getDateCreated()
      Description copied from interface: DocumentContract
      Retrieve the document creation date
      Specified by:
      getDateCreated in interface DocumentContract
      Returns:
      the document creation date or null
    • getDateLastModified

      public org.joda.time.DateTime getDateLastModified()
      Description copied from interface: DocumentContract
      Retrieve the document last-modified date
      Specified by:
      getDateLastModified in interface DocumentContract
      Returns:
      the document last-modified date or null
    • getDateApproved

      public org.joda.time.DateTime getDateApproved()
      Description copied from interface: DocumentContract
      Retrieve the document approval date
      Specified by:
      getDateApproved in interface DocumentContract
      Returns:
      the document approval date or null
    • getDateFinalized

      public org.joda.time.DateTime getDateFinalized()
      Description copied from interface: DocumentContract
      Retrieve the document finalization date
      Specified by:
      getDateFinalized in interface DocumentContract
      Returns:
      the document finalization date or null
    • getTitle

      public String getTitle()
      Description copied from interface: DocumentContract
      Retrieve the document title
      Specified by:
      getTitle in interface DocumentContract
      Returns:
      the document title
    • getApplicationDocumentId

      public String getApplicationDocumentId()
      Description copied from interface: DocumentContract
      Retrieve the application document id. The Application Document Id is used to record an application-relevant id for the workflow document.
      Specified by:
      getApplicationDocumentId in interface DocumentContract
      Returns:
      the application document id
    • getInitiatorPrincipalId

      public String getInitiatorPrincipalId()
      Description copied from interface: DocumentContract
      Retrieve the initiator principal id
      Specified by:
      getInitiatorPrincipalId in interface DocumentContract
      Returns:
      the initiator principal id
    • getRoutedByPrincipalId

      public String getRoutedByPrincipalId()
      Description copied from interface: DocumentContract
      Retrieve the router principal id
      Specified by:
      getRoutedByPrincipalId in interface DocumentContract
      Returns:
      the router principal id
    • getDocumentTypeName

      public String getDocumentTypeName()
      Description copied from interface: DocumentContract
      Retrieve the name of the type of this document
      Specified by:
      getDocumentTypeName in interface DocumentContract
      Returns:
      the name of the type of this document
    • getDocumentTypeId

      public String getDocumentTypeId()
      Description copied from interface: DocumentContract
      Retrieve the id of the type of this document
      Specified by:
      getDocumentTypeId in interface DocumentContract
      Returns:
      the id of the type of this document
    • getDocumentHandlerUrl

      public String getDocumentHandlerUrl()
      Description copied from interface: DocumentContract
      Retrieve the document handler url
      Specified by:
      getDocumentHandlerUrl in interface DocumentContract
      Returns:
      the document handler url
    • getApplicationDocumentStatus

      public String getApplicationDocumentStatus()
      Description copied from interface: DocumentContract
      Retrieve the application document status. The Application Document Status is used to track document/applicaiton specific statuses
      Specified by:
      getApplicationDocumentStatus in interface DocumentContract
      Returns:
      the application document status
    • getApplicationDocumentStatusDate

      public org.joda.time.DateTime getApplicationDocumentStatusDate()
      Description copied from interface: DocumentContract
      Retrieve the last application document status transition date. The Application Document Status date is the date the application document status last transitioned.
      Specified by:
      getApplicationDocumentStatusDate in interface DocumentContract
      Returns:
      the application document status date
    • getVariables

      public Map<String,String> getVariables()
      Description copied from interface: DocumentContract
      Retrieve the currently defined internal workflow engine variables for the document NOTE: use of workflow engine variables is an advanced technique requiring specific crafting of the workflow document routing; these variables will not be useful for the majority of workflow use cases
      Specified by:
      getVariables in interface DocumentContract
      Returns:
      the currently defined workflow engine variables for the document
    • setDocumentId

      public void setDocumentId(String documentId)
    • setStatus

      public void setStatus(DocumentStatus status)
    • setDateCreated

      public void setDateCreated(org.joda.time.DateTime dateCreated)
    • setDateLastModified

      public void setDateLastModified(org.joda.time.DateTime dateLastModified)
    • setDateApproved

      public void setDateApproved(org.joda.time.DateTime dateApproved)
    • setDateFinalized

      public void setDateFinalized(org.joda.time.DateTime dateFinalized)
    • setTitle

      public void setTitle(String title)
    • setApplicationDocumentId

      public void setApplicationDocumentId(String applicationDocumentId)
    • setInitiatorPrincipalId

      public void setInitiatorPrincipalId(String initiatorPrincipalId)
    • setRoutedByPrincipalId

      public void setRoutedByPrincipalId(String routedByPrincipalId)
    • setDocumentTypeName

      public void setDocumentTypeName(String documentTypeName)
    • setDocumentTypeId

      public void setDocumentTypeId(String documentTypeId)
    • setDocumentHandlerUrl

      public void setDocumentHandlerUrl(String documentHandlerUrl)
    • setApplicationDocumentStatus

      public void setApplicationDocumentStatus(String applicationDocumentStatus)
    • setApplicationDocumentStatusDate

      public void setApplicationDocumentStatusDate(org.joda.time.DateTime applicationDocumentStatusDate)
    • setVariables

      public void setVariables(Map<String,String> variables)