public interface DocumentService
| Modifier and Type | Method and Description | 
|---|---|
| Document | acknowledgeDocument(Document document,
                                      String annotation,
                                      List<AdHocRouteRecipient> adHocRecipients)Acknowledge the document, optionally providing an annotation for the acknowledgement which will show up in the
 route log of the document, and optionally providing a list of ad hoc recipients for the document. | 
| Document | approveDocument(Document document,
                              String annotation,
                              List<AdHocRouteRecipient> adHocRoutingRecipients)Save and then approve the document, optionally providing an annotation which will show up in the route log
 of the document for the action taken, and optionally providing a list of ad hoc recipients for the document. | 
| Document | blanketApproveDocument(Document document,
                                            String annotation,
                                            List<AdHocRouteRecipient> adHocRecipients)Blanket approve the document which will save the document, 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 the document, without saving, optionally providing an annotation for the disapproval which will show
 up in the route log of the document for the action taken. | 
| Document | clearDocumentFyi(Document document,
                                List<AdHocRouteRecipient> adHocRecipients)Clear the fyi requests for the document, optionally providing a list of ad hoc recipients for the document,
 which should be restricted to action requested of fyi as all other actions requested will be discarded. | 
| Document | completeDocument(Document document,
                                String annotation,
                                List adHocRecipients)Save and then complete the document, optionally providing an annotation which will show up in the route log
 of the document for the action taken, and optionally providing a list of ad hoc recipients for the document | 
| Note | createNoteFromDocument(Document document,
                                            String text)This method creates a note from the given document and note text. | 
| Document | disapproveDocument(Document document,
                                    String annotation)Disapprove the document, without saving, optionally providing an annotation which will show up in the route log
 of the document for the 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<Document> | getDocumentsByListOfDocumentHeaderIds(Class<? extends Document> documentClass,
                                                                          List<String> documentHeaderIds)This method retrieves a list of fully-populated documents given a list of document header id values. | 
| Document | getNewDocument(Class<? extends Document> 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 | 
| Document | getNewDocument(String documentTypeName,
                            String initiatorPrincipalNm)get a new blank document instance based on the document type name. | 
| void | prepareWorkflowDocument(Document document)Sets the title and app document id in the workflow document | 
| Document | recallDocument(Document document,
                            String annotation,
                            boolean cancel)Recall the document, optionally providing an annotation for the recall which will show up in the route
 log of the document for the action taken. | 
| Document | routeDocument(Document document,
                          String annotation,
                          List<AdHocRouteRecipient> adHocRoutingRecipients)Save and then route the document, optionally providing an annotation which will show up in the route log
 of the document for the action taken, and optionally providing a list of ad hoc recipients 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<? extends DocumentEvent> kualiDocumentEventClass)Saves the passed-in document. | 
| Document | saveDocument(Document document,
                        DocumentEvent docEvent)This method saves the given document using the document event passed in. | 
| boolean | saveDocumentNotes(Document document)Saves the notes associated with the given document if they are in a state where they can be
 saved. | 
| Document | sendAdHocRequests(Document document,
                                  String annotation,
                                  List<AdHocRouteRecipient> adHocRecipients)Send ad hoc requests for the given document, optionally providing an annotation which will show up in the route
 log of the document. | 
| Document | sendNoteRouteNotification(Document document,
                                                  Note note,
                                                  Person sender)Builds an workflow notification request for the note and sends it to note recipient. | 
| Document | superUserApproveDocument(Document document,
                                                String annotation)Save and then approve the document as a super user, optionally providing an annotation which will show up in the
 route log of the document for the action taken. | 
| Document | superUserCancelDocument(Document document,
                                              String annotation)Save and then cancel the document as a super user, optionally providing an annotation which will show up in the
 route log of the document for the action taken. | 
| Document | superUserDisapproveDocument(Document document,
                                                      String annotation)Save and then disapprove the document as a super user, optionally providing an annotation which will show up
 in the route log of the document for the action taken. | 
| Document | superUserDisapproveDocumentWithoutSaving(Document document,
                                                                                String annotation)Disapprove the document as super user, without saving, optionally providing an annotation which will show
 up in the route log of the document for the action taken. | 
| Document | updateDocument(Document document)This method is to allow for documents to be updated. | 
| Document | validateAndPersistDocument(Document document,
                                                    DocumentEvent event)Helper method used to save and validate a document | 
boolean documentExists(String documentHeaderId)
documentHeaderId - Document getNewDocument(String documentTypeName) throws WorkflowException
documentTypeName - WorkflowExceptionDocument getNewDocument(Class<? extends Document> documentClass) throws WorkflowException
documentClass - WorkflowExceptionDocument getNewDocument(String documentTypeName, String initiatorPrincipalNm) throws WorkflowException
documentTypeName - initiatorPrincipalNm - WorkflowExceptionDocument getByDocumentHeaderId(String documentHeaderId) throws WorkflowException
documentHeaderId - WorkflowExceptionDocument getByDocumentHeaderIdSessionless(String documentHeaderId) throws WorkflowException
documentHeaderId - WorkflowExceptionList<Document> getDocumentsByListOfDocumentHeaderIds(Class<? extends Document> documentClass, List<String> documentHeaderIds) throws WorkflowException
documentClass - documentHeaderIds - WorkflowExceptionDocument updateDocument(Document document)
document - the document to be updatedDocument saveDocument(Document document) throws WorkflowException
saveDocument(Document, Class) method.  The
 convenience of this method is that the event being used is the standard SaveDocumentEvent.WorkflowExceptionsaveDocument(Document, Class)Document saveDocument(Document document, DocumentEvent docEvent) throws WorkflowException
WorkflowExceptionsaveDocument(Document, Class)Document saveDocument(Document document, Class<? extends DocumentEvent> kualiDocumentEventClass) throws WorkflowException
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.
 Also note that this method will not check the document action flags to check if a save is valid
 The calling code should always use the object returned from this method for future operations since a new
 object is created when the passed-in document is saved.document - the document to be savedkualiDocumentEventClass - the event class to use when saving (class must implement the SaveEvent interface)WorkflowExceptionDocument routeDocument(Document document, String annotation, List<AdHocRouteRecipient> adHocRoutingRecipients) throws WorkflowException
document - the document to be routedannotation - the annotation to appear in the route log of the documentadHocRoutingRecipients - list of ad hoc recipients to which the document will be routedWorkflowExceptionDocument approveDocument(Document document, String annotation, List<AdHocRouteRecipient> adHocRoutingRecipients) throws WorkflowException
document - the document to be approvedannotation - the annotation to appear in the route log of the documentadHocRoutingRecipients - list of ad hoc recipients to which the document will be routedWorkflowExceptionDocument superUserApproveDocument(Document document, String annotation) throws WorkflowException
document - the document to be super user approvedannotation - the annotation to appear in the route log of the documentWorkflowExceptionDocument superUserCancelDocument(Document document, String annotation) throws WorkflowException
document - the document to be super user canceledannotation - the annotation to appear in the route log of the documentWorkflowExceptionDocument superUserDisapproveDocument(Document document, String annotation) throws WorkflowException
document - the document to be super user disapprovedannotation - the annotation to appear in the route log of the documentWorkflowExceptionDocument superUserDisapproveDocumentWithoutSaving(Document document, String annotation) throws WorkflowException
document - the document to be super user disapprovedannotation - the annotation to appear in the route log of the documentWorkflowExceptionDocument disapproveDocument(Document document, String annotation) throws Exception
document - the document to be disapprovedannotation - the annotation to appear in the route log of the documentExceptionDocument cancelDocument(Document document, String annotation) throws WorkflowException
document - the document to be canceledannotation - the annotation to appear in the route log of the documentWorkflowExceptionDocument acknowledgeDocument(Document document, String annotation, List<AdHocRouteRecipient> adHocRecipients) throws WorkflowException
document - the document to be acknowledgedannotation - the annotation to appear in the route log of the documentadHocRecipients - list of ad hoc recipients to which the document will be routedWorkflowExceptionDocument blanketApproveDocument(Document document, String annotation, List<AdHocRouteRecipient> adHocRecipients) throws WorkflowException
document - the document to be blanket approvedannotation - the annotation to appear in the route log of the documentadHocRecipients - list of ad hoc recipients to which the document will be routedWorkflowExceptionDocument clearDocumentFyi(Document document, List<AdHocRouteRecipient> adHocRecipients) throws WorkflowException
document - the document to clear of fyi requestsadHocRecipients - list of ad hoc recipients to which the document will be routedWorkflowExceptionvoid prepareWorkflowDocument(Document document) throws WorkflowException
document - the document to prepareWorkflowExceptionNote createNoteFromDocument(Document document, String text)
Document.getNoteType().  Additionally, it's
 remoteObjectId will be set to the object id of the document's note target.document - the document from which to use the note type and note target when creating the notetext - the text value to include in the resulting noteboolean saveDocumentNotes(Document document)
document - the document for which to save notesDocument sendAdHocRequests(Document document, String annotation, List<AdHocRouteRecipient> adHocRecipients) throws WorkflowException
document - the document for which the ad hoc requests are sentannotation - the annotation to appear in the route log of the documentadHocRecipients - list of ad hoc recipients to which the document will be routedWorkflowExceptionDocument sendNoteRouteNotification(Document document, Note note, Person sender) throws WorkflowException
document - - document that contains the notenote - - note to notifysender - - user who is sending the notificationWorkflowExceptionDocument recallDocument(Document document, String annotation, boolean cancel) throws WorkflowException
document - the document to recallannotation - the annotation to appear in the route log of the documentcancel - indicates if the document should be canceled as part of the recallWorkflowExceptionDocument completeDocument(Document document, String annotation, List adHocRecipients) throws WorkflowException
document - the document to completeannotation - the annotation to appear in the route log of the documentadHocRecipients - list of ad hoc recipients to which the document will be routedWorkflowExceptionDocument validateAndPersistDocument(Document document, DocumentEvent event) throws ValidationException
document - document to be validated and persistedevent - indicates which kualiDocumentEvent was requestedValidationExceptionCopyright © 2005–2014 The Kuali Foundation. All rights reserved.