org.kuali.rice.kns.service
Interface DocumentService

All Known Implementing Classes:
DocumentServiceImpl

public interface DocumentService

This is the DocumentService interface which must have an implementation that accompanies it. This interfaces defines all of the generally required methods for all document instances


Method Summary
 Document acknowledgeDocument(Document document, String annotation, List adHocRecipients)
          acknowledge this document, optionally providing an annotation for the acknowledgement which will show up in the route log for the document for this acknowledgement, additionally optionally provide a list of ad hoc recipients that should recieve this document.
 boolean addNoteToDocument(Document document, Note note)
          This method adds a note to a document
 Document approveDocument(Document document, String annotation, List adHocRoutingRecipients)
          approve this document, optionally providing an annotation which will show up in the route log for this document for this action taken, and optionally providing a list of ad hoc recipients for the document
 Document blanketApproveDocument(Document document, String annotation, List adHocRecipients)
          blanket approve this document which will approve the document and stand in for an approve for all typically generated approval actions requested for this document.
 Document cancelDocument(Document document, String annotation)
          cancel this document, optionally providing an annotation for the disapproval which will show up in the route log for the document for this action taken
 Document clearDocumentFyi(Document document, List adHocRecipients)
          clear the fyi request for this document, optionally providing a list of ad hoc recipients for this document, which should be restricted to action requested of fyi as all other actions requested will be discarded
 Note createNoteFromDocument(Document document, String text)
          This method creates a note from a given document and note text
 Document disapproveDocument(Document document, String annotation)
          disapprove this document, optionally providing an annotation for the disapproval which will show up in the route log for the document for this action taken
 boolean documentExists(String documentHeaderId)
           
 Document getByDocumentHeaderId(String documentHeaderId)
          get a document based on the document header id which is the primary key for all document types
 Document getByDocumentHeaderIdSessionless(String documentHeaderId)
          get a document based on the document header id which is the primary key for all document types.
 List getDocumentsByListOfDocumentHeaderIds(Class clazz, List documentHeaderIds)
          This method retrieves a list of fully-populated documents given a list of document header id values.
 Document getNewDocument(Class documentClass)
          get a new blank document instance having the given Document class
 Document getNewDocument(String documentTypeName)
          get a new blank document instance based on the document type name
 PersistableBusinessObject getNoteParent(Document document, Note newNote)
          This method gets the parent for a note from a document
 void prepareWorkflowDocument(Document document)
          Sets the title and app document id in the flex document
 Document routeDocument(Document document, String annotation, List adHocRoutingRecipients)
          start the route the document for approval, optionally providing a list of ad hoc recipients, and additionally provideing a annotation to show up in the route log for the document
 Document saveDocument(Document document)
          This is a helper method that performs the same as the saveDocument(Document, Class) method.
 Document saveDocument(Document document, Class kualiDocumentEventClass)
          Saves the passed-in document.
 void sendAdHocRequests(Document document, String annotation, List<AdHocRouteRecipient> adHocRecipients)
           
 Document superUserApproveDocument(Document document, String annotation)
          approve this document as super user, optionally providing an annotation which will show up in the route log for this document for this action taken
 Document superUserCancelDocument(Document document, String annotation)
          cancel this document as super user, optionally providing an annotation which will show up in the route log for this document for this action taken
 Document superUserDisapproveDocument(Document document, String annotation)
          disapprove this document as super user, optionally providing an annotation which will show up in the route log for this document for this action taken
 void updateDocument(Document document)
          This method is to allow for documents to be updated which is currently used to update the document status as well as to allow for locked docs to be unlocked
 

Method Detail

documentExists

boolean documentExists(String documentHeaderId)
Parameters:
documentHeaderId -
Returns:
true if a document with the given documentHeaderId exists

getNewDocument

Document getNewDocument(String documentTypeName)
                        throws org.kuali.rice.kew.exception.WorkflowException
get a new blank document instance based on the document type name

Parameters:
documentTypeName -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

getNewDocument

Document getNewDocument(Class documentClass)
                        throws org.kuali.rice.kew.exception.WorkflowException
get a new blank document instance having the given Document class

Parameters:
documentClass -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

getByDocumentHeaderId

Document getByDocumentHeaderId(String documentHeaderId)
                               throws org.kuali.rice.kew.exception.WorkflowException
get a document based on the document header id which is the primary key for all document types

Parameters:
documentHeaderId -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

getByDocumentHeaderIdSessionless

Document getByDocumentHeaderIdSessionless(String documentHeaderId)
                                          throws org.kuali.rice.kew.exception.WorkflowException
get a document based on the document header id which is the primary key for all document types. Using this method does not require that GlobalVariables.getUserSession() be populated. Therefore, this method can be used when a HTTP request is not being processed (e.g. during workflow indexing/post-processing).

Parameters:
documentHeaderId -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

getDocumentsByListOfDocumentHeaderIds

List getDocumentsByListOfDocumentHeaderIds(Class clazz,
                                           List documentHeaderIds)
                                           throws org.kuali.rice.kew.exception.WorkflowException
This method retrieves a list of fully-populated documents given a list of document header id values.

Parameters:
clazz -
documentHeaderIds -
Returns:
List of fully-populated documents
Throws:
org.kuali.rice.kew.exception.WorkflowException

updateDocument

void updateDocument(Document document)
This method is to allow for documents to be updated which is currently used to update the document status as well as to allow for locked docs to be unlocked

Parameters:
document -

saveDocument

Document saveDocument(Document document)
                      throws org.kuali.rice.kew.exception.WorkflowException
This is a helper method that performs the same as the saveDocument(Document, Class) method. The convenience of this method is that the event being used is the standard SaveDocumentEvent.

Throws:
org.kuali.rice.kew.exception.WorkflowException
See Also:
saveDocument(Document, Class)

saveDocument

Document saveDocument(Document document,
                      Class kualiDocumentEventClass)
                      throws org.kuali.rice.kew.exception.WorkflowException
Saves the passed-in document. This will persist it both to the Kuali database, and also initiate it (if necessary) within workflow, so its available in the initiator's action list. This method uses the passed in KualiDocumentEvent class when saving the document. The KualiDocumentEvent class must implement the SaveEvent interface. Note that the system does not support passing in Workflow Annotations or AdHoc Route Recipients on a SaveDocument call. These are sent to workflow on a routeDocument action, or any of the others which actually causes a routing action to happen in workflow. NOTE: This method will not check the document action flags to check if a save is valid

Parameters:
document - The document to be saved
kualiDocumentEventClass - The event class to use when saving (class must implement the SaveEvent interface)
Returns:
the document that was passed in
Throws:
org.kuali.rice.kew.exception.WorkflowException

routeDocument

Document routeDocument(Document document,
                       String annotation,
                       List adHocRoutingRecipients)
                       throws org.kuali.rice.kew.exception.WorkflowException
start the route the document for approval, optionally providing a list of ad hoc recipients, and additionally provideing a annotation to show up in the route log for the document

Parameters:
document -
annotation -
adHocRoutingRecipients -
Returns:
Throws:
ValidationErrorList
org.kuali.rice.kew.exception.WorkflowException

approveDocument

Document approveDocument(Document document,
                         String annotation,
                         List adHocRoutingRecipients)
                         throws org.kuali.rice.kew.exception.WorkflowException
approve this document, optionally providing an annotation which will show up in the route log for this document for this action taken, and optionally providing a list of ad hoc recipients for the document

Parameters:
document -
annotation -
adHocRoutingRecipients -
Returns:
Throws:
ValidationErrorList
org.kuali.rice.kew.exception.WorkflowException

superUserApproveDocument

Document superUserApproveDocument(Document document,
                                  String annotation)
                                  throws org.kuali.rice.kew.exception.WorkflowException
approve this document as super user, optionally providing an annotation which will show up in the route log for this document for this action taken

Parameters:
document -
annotation -
Returns:
Throws:
ValidationErrorList
org.kuali.rice.kew.exception.WorkflowException

superUserCancelDocument

Document superUserCancelDocument(Document document,
                                 String annotation)
                                 throws org.kuali.rice.kew.exception.WorkflowException
cancel this document as super user, optionally providing an annotation which will show up in the route log for this document for this action taken

Parameters:
document -
annotation -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

superUserDisapproveDocument

Document superUserDisapproveDocument(Document document,
                                     String annotation)
                                     throws org.kuali.rice.kew.exception.WorkflowException
disapprove this document as super user, optionally providing an annotation which will show up in the route log for this document for this action taken

Parameters:
document -
annotation -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

disapproveDocument

Document disapproveDocument(Document document,
                            String annotation)
                            throws Exception
disapprove this document, optionally providing an annotation for the disapproval which will show up in the route log for the document for this action taken

Parameters:
document -
annotation -
Returns:
Document
Throws:
Exception

cancelDocument

Document cancelDocument(Document document,
                        String annotation)
                        throws org.kuali.rice.kew.exception.WorkflowException
cancel this document, optionally providing an annotation for the disapproval which will show up in the route log for the document for this action taken

Parameters:
document -
annotation -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

acknowledgeDocument

Document acknowledgeDocument(Document document,
                             String annotation,
                             List adHocRecipients)
                             throws org.kuali.rice.kew.exception.WorkflowException
acknowledge this document, optionally providing an annotation for the acknowledgement which will show up in the route log for the document for this acknowledgement, additionally optionally provide a list of ad hoc recipients that should recieve this document. The list of ad hoc recipients for this document should have an action requested of acknowledge or fyi as all other actions requested will be discarded as invalid based on the action being taken being an acknowledgement.

Parameters:
document -
annotation -
adHocRecipients -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

blanketApproveDocument

Document blanketApproveDocument(Document document,
                                String annotation,
                                List adHocRecipients)
                                throws org.kuali.rice.kew.exception.WorkflowException
blanket approve this document which will approve the document and stand in for an approve for all typically generated approval actions requested for this document. The user must have blanket approval authority for this document by being registered as a user in the blanket approval workgroup that is associated with this document type. Optionally an annotation can be provided which will show up for this action taken on the document in the route log. Additionally optionally provide a list of ad hoc recipients for this document, which should be restricted to actions requested of acknowledge and fyi as all other actions requested will be discarded

Parameters:
document -
annotation -
adHocRecipients -
Returns:
Throws:
ValidationErrorList
org.kuali.rice.kew.exception.WorkflowException

clearDocumentFyi

Document clearDocumentFyi(Document document,
                          List adHocRecipients)
                          throws org.kuali.rice.kew.exception.WorkflowException
clear the fyi request for this document, optionally providing a list of ad hoc recipients for this document, which should be restricted to action requested of fyi as all other actions requested will be discarded

Parameters:
document -
adHocRecipients -
Returns:
Throws:
org.kuali.rice.kew.exception.WorkflowException

prepareWorkflowDocument

void prepareWorkflowDocument(Document document)
                             throws org.kuali.rice.kew.exception.WorkflowException
Sets the title and app document id in the flex document

Parameters:
document -
Throws:
org.kuali.rice.kew.exception.WorkflowException

createNoteFromDocument

Note createNoteFromDocument(Document document,
                            String text)
                            throws Exception
This method creates a note from a given document and note text

Parameters:
document -
text -
Returns:
Throws:
Exception

addNoteToDocument

boolean addNoteToDocument(Document document,
                          Note note)
This method adds a note to a document

Parameters:
document -
note -
Returns:
the added Note

getNoteParent

PersistableBusinessObject getNoteParent(Document document,
                                        Note newNote)
This method gets the parent for a note from a document

Parameters:
document -
newNote -
Returns:
Business Object that the note is attached to.

sendAdHocRequests

void sendAdHocRequests(Document document,
                       String annotation,
                       List<AdHocRouteRecipient> adHocRecipients)
                       throws org.kuali.rice.kew.exception.WorkflowException
Throws:
org.kuali.rice.kew.exception.WorkflowException


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.