org.kuali.rice.kew.api.document
Class Document.Builder

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

public static final class Document.Builder
extends Object
implements Serializable, ModelBuilder, DocumentContract

A builder which can be used to construct Document instances. Enforces the constraints of the DocumentContract.

See Also:
Serialized Form

Method Summary
 Document build()
          Returns an instance of the object being built by this builder based on the current state of the builder.
static Document.Builder create(DocumentContract contract)
           
static Document.Builder create(String documentId, DocumentStatus status, org.joda.time.DateTime dateCreated, String initiatorPrincipalId, String documentTypeName, String documentTypeId)
           
static Document.Builder create(String documentId, String initiatorPrinicpalId, String documentTypeName, String documentTypeId)
           
 String getApplicationDocumentId()
          Retrieve the application document id.
 String getApplicationDocumentStatus()
          Retrieve the application document status.
 org.joda.time.DateTime getApplicationDocumentStatusDate()
          Retrieve the last application document status transition date.
 org.joda.time.DateTime getDateApproved()
          Retrieve the document approval date
 org.joda.time.DateTime getDateCreated()
          Retrieve the document creation date
 org.joda.time.DateTime getDateFinalized()
          Retrieve the document finalization date
 org.joda.time.DateTime getDateLastModified()
          Retrieve the document last-modified date
 String getDocumentHandlerUrl()
          Retrieve the document handler url
 String getDocumentId()
          Retrieve the document id
 String getDocumentTypeId()
          Retrieve the id of the type of this document
 String getDocumentTypeName()
          Retrieve the name of the type of this document
 String getInitiatorPrincipalId()
          Retrieve the initiator principal id
 String getRoutedByPrincipalId()
          Retrieve the router principal id
 DocumentStatus getStatus()
          Retrieve the document status
 String getTitle()
          Retrieve the document title
 Map<String,String> getVariables()
          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
 void setApplicationDocumentId(String applicationDocumentId)
           
 void setApplicationDocumentStatus(String applicationDocumentStatus)
           
 void setApplicationDocumentStatusDate(org.joda.time.DateTime applicationDocumentStatusDate)
           
 void setDateApproved(org.joda.time.DateTime dateApproved)
           
 void setDateCreated(org.joda.time.DateTime dateCreated)
           
 void setDateFinalized(org.joda.time.DateTime dateFinalized)
           
 void setDateLastModified(org.joda.time.DateTime dateLastModified)
           
 void setDocumentHandlerUrl(String documentHandlerUrl)
           
 void setDocumentId(String documentId)
           
 void setDocumentTypeId(String documentTypeId)
           
 void setDocumentTypeName(String documentTypeName)
           
 void setInitiatorPrincipalId(String initiatorPrincipalId)
           
 void setRoutedByPrincipalId(String routedByPrincipalId)
           
 void setStatus(DocumentStatus status)
           
 void setTitle(String title)
           
 void setVariables(Map<String,String> variables)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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()
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: 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)


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