|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.rice.krad.service.impl.DocumentServiceImpl
public class DocumentServiceImpl
Service implementation for the Document structure. It contains all of the document level type of processing and calling back into documents for various centralization of functionality. This is the default, Kuali delivered implementation which utilizes Workflow.
| Constructor Summary | |
|---|---|
DocumentServiceImpl()
|
|
| Method Summary | |
|---|---|
Document |
acknowledgeDocument(Document document,
String annotation,
List<AdHocRouteRecipient> 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. |
Document |
approveDocument(Document document,
String annotation,
List<AdHocRouteRecipient> adHocRecipients)
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<AdHocRouteRecipient> 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 |
protected void |
checkForNulls(Document document)
|
Document |
clearDocumentFyi(Document document,
List<AdHocRouteRecipient> 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 |
Document |
completeDocument(Document document,
String annotation,
List adHocRecipients)
Complete action for a document |
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)
|
protected BusinessObjectService |
getBusinessObjectService()
|
Document |
getByDocumentHeaderId(String documentHeaderId)
This is temporary until workflow 2.0 and reads from a table to get documents whose status has changed to A (approved - no outstanding approval actions requested) |
Document |
getByDocumentHeaderIdSessionless(String documentHeaderId)
get a document based on the document header id which is the primary key for all document types. |
protected DataDictionaryService |
getDataDictionaryService()
|
protected DateTimeService |
getDateTimeService()
|
protected DocumentDao |
getDocumentDao()
|
protected DocumentDictionaryService |
getDocumentDictionaryService()
|
protected DocumentHeaderService |
getDocumentHeaderService()
|
List<Document> |
getDocumentsByListOfDocumentHeaderIds(Class<? extends Document> documentClass,
List<String> documentHeaderIds)
The default implementation - this retrieves all documents by a list of documentHeader for a given class. |
Document |
getNewDocument(Class<? extends Document> documentClass)
Creates a new document by class. |
Document |
getNewDocument(String documentTypeName)
Creates a new document by document type name. |
Document |
getNewDocument(String documentTypeName,
String initiatorPrincipalNm)
Creates a new document by document type name. |
protected NoteService |
getNoteService()
|
PersonService |
getPersonService()
|
protected WorkflowDocumentService |
getWorkflowDocumentService()
|
protected boolean |
isNoteTargetReady(Document document)
Determines if the given document's note target is ready for notes to be attached and persisted against it. |
protected void |
loadNotes(Document document)
Loads the Notes for the note target on this Document. |
void |
prepareWorkflowDocument(Document document)
Sets the title and app document id in the flex document |
Document |
recallDocument(Document document,
String annotation,
boolean cancel)
recall this document, optionally providing an annotation for the recall which will show up in the route log for the document for this action taken |
Document |
routeDocument(Document document,
String annotation,
List<AdHocRouteRecipient> adHocRecipients)
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 DocumentService.saveDocument(Document, Class) method. |
Document |
saveDocument(Document document,
Class<? extends KualiDocumentEvent> kualiDocumentEventClass)
Saves the passed-in document. |
boolean |
saveDocumentNotes(Document document)
Saves the notes associated with the given document if they are in a state where they can be saved. |
void |
sendAdHocRequests(Document document,
String annotation,
List<AdHocRouteRecipient> adHocRecipients)
|
void |
sendNoteRouteNotification(Document document,
Note note,
Person sender)
Builds an workflow notification request for the note and sends it to note recipient. |
void |
setBusinessObjectService(BusinessObjectService businessObjectService)
|
void |
setDataDictionaryService(DataDictionaryService dataDictionaryService)
|
void |
setDateTimeService(DateTimeService dateTimeService)
|
void |
setDocumentDao(DocumentDao documentDao)
|
void |
setDocumentDictionaryService(DocumentDictionaryService documentDictionaryService)
|
void |
setDocumentHeaderService(DocumentHeaderService documentHeaderService)
|
void |
setKualiConfigurationService(ConfigurationService kualiConfigurationService)
|
void |
setNoteService(NoteService noteService)
|
void |
setWorkflowDocumentService(WorkflowDocumentService workflowDocumentService)
|
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 |
Document |
superUserDisapproveDocumentWithoutSaving(Document document,
String annotation)
disapprove this document as super user, without saving, optionally providing an annotation which will show up in the route log for this document for this action taken |
Document |
updateDocument(Document document)
This is to allow for updates of document statuses and other related requirements for updates outside of the initial save and route |
Document |
validateAndPersistDocument(Document document,
KualiDocumentEvent event)
Validates and persists a document. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DocumentServiceImpl()
| Method Detail |
|---|
public Document saveDocument(Document document)
throws WorkflowException,
ValidationException
DocumentServiceDocumentService.saveDocument(Document, Class) method. The convenience
of this method is that the event being used is the standard SaveDocumentEvent.
saveDocument in interface DocumentServiceWorkflowException
ValidationExceptionDocumentService.saveDocument(org.kuali.rice.krad.document.Document)
public Document saveDocument(Document document,
Class<? extends KualiDocumentEvent> kualiDocumentEventClass)
throws WorkflowException,
ValidationException
DocumentServiceSaveEvent 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
saveDocument in interface DocumentServicedocument - The document to be savedkualiDocumentEventClass - The event class to use when saving (class must implement the SaveEvent interface)
WorkflowException
ValidationException
public Document routeDocument(Document document,
String annotation,
List<AdHocRouteRecipient> adHocRecipients)
throws ValidationException,
WorkflowException
DocumentService
routeDocument in interface DocumentServiceValidationException
WorkflowExceptionDocumentService.routeDocument(org.kuali.rice.krad.document.Document,
java.lang.String, java.util.List)
public Document approveDocument(Document document,
String annotation,
List<AdHocRouteRecipient> adHocRecipients)
throws ValidationException,
WorkflowException
DocumentService
approveDocument in interface DocumentServiceValidationException
WorkflowExceptionDocumentService.approveDocument(org.kuali.rice.krad.document.Document,
java.lang.String,
java.util.List)
public Document superUserApproveDocument(Document document,
String annotation)
throws WorkflowException
DocumentService
superUserApproveDocument in interface DocumentServiceWorkflowExceptionDocumentService.superUserApproveDocument(org.kuali.rice.krad.document.Document,
java.lang.String)
public Document superUserCancelDocument(Document document,
String annotation)
throws WorkflowException
DocumentService
superUserCancelDocument in interface DocumentServiceWorkflowExceptionDocumentService.superUserCancelDocument(org.kuali.rice.krad.document.Document,
java.lang.String)
public Document superUserDisapproveDocument(Document document,
String annotation)
throws WorkflowException
DocumentService
superUserDisapproveDocument in interface DocumentServiceWorkflowExceptionDocumentService.superUserCancelDocument(org.kuali.rice.krad.document.Document,
java.lang.String)
public Document superUserDisapproveDocumentWithoutSaving(Document document,
String annotation)
throws WorkflowException
DocumentService
superUserDisapproveDocumentWithoutSaving in interface DocumentServiceWorkflowExceptionDocumentService.superUserCancelDocument(org.kuali.rice.krad.document.Document,
java.lang.String)
public Document disapproveDocument(Document document,
String annotation)
throws Exception
DocumentService
disapproveDocument in interface DocumentServiceExceptionDocumentService.disapproveDocument(org.kuali.rice.krad.document.Document,
java.lang.String)
public Document cancelDocument(Document document,
String annotation)
throws WorkflowException
DocumentService
cancelDocument in interface DocumentServiceWorkflowExceptionDocumentService.cancelDocument(org.kuali.rice.krad.document.Document,
java.lang.String)
public Document recallDocument(Document document,
String annotation,
boolean cancel)
throws WorkflowException
DocumentService
recallDocument in interface DocumentServiceWorkflowException
public Document acknowledgeDocument(Document document,
String annotation,
List<AdHocRouteRecipient> adHocRecipients)
throws WorkflowException
DocumentService
acknowledgeDocument in interface DocumentServiceWorkflowExceptionDocumentService.acknowledgeDocument(org.kuali.rice.krad.document.Document,
java.lang.String,
java.util.List)
public Document blanketApproveDocument(Document document,
String annotation,
List<AdHocRouteRecipient> adHocRecipients)
throws ValidationException,
WorkflowException
DocumentService
blanketApproveDocument in interface DocumentServiceValidationException
WorkflowExceptionDocumentService.blanketApproveDocument(org.kuali.rice.krad.document.Document,
java.lang.String,
java.util.List)
public Document clearDocumentFyi(Document document,
List<AdHocRouteRecipient> adHocRecipients)
throws WorkflowException
DocumentService
clearDocumentFyi in interface DocumentServiceWorkflowExceptionDocumentService.clearDocumentFyi(org.kuali.rice.krad.document.Document,
java.util.List)
public Document completeDocument(Document document,
String annotation,
List adHocRecipients)
throws WorkflowException
DocumentService
completeDocument in interface DocumentServicedocument - Documentannotation - Annotation textadHocRecipients - list of adhoc recipients
WorkflowExceptionDocumentService.completeDocument(org.kuali.rice.krad.document.Document,
java.lang.String,
java.util.List)protected void checkForNulls(Document document)
public boolean documentExists(String documentHeaderId)
documentExists in interface DocumentServiceDocumentService.documentExists(java.lang.String)
public Document getNewDocument(Class<? extends Document> documentClass)
throws WorkflowException
getNewDocument in interface DocumentServiceWorkflowExceptionDocumentService.getNewDocument(java.lang.Class)
public Document getNewDocument(String documentTypeName,
String initiatorPrincipalNm)
throws WorkflowException
getNewDocument in interface DocumentServiceWorkflowExceptionDocumentService.getNewDocument(String, String)
public Document getNewDocument(String documentTypeName)
throws WorkflowException
getNewDocument in interface DocumentServiceWorkflowExceptionDocumentService.getNewDocument(java.lang.String)
public Document getByDocumentHeaderId(String documentHeaderId)
throws WorkflowException
getByDocumentHeaderId in interface DocumentServicedocumentHeaderId -
WorkflowException
public Document getByDocumentHeaderIdSessionless(String documentHeaderId)
throws WorkflowException
DocumentService
getByDocumentHeaderIdSessionless in interface DocumentServiceWorkflowExceptionDocumentService.getByDocumentHeaderIdSessionless(java.lang.String)protected void loadNotes(Document document)
document - the document for which to load the notes
public List<Document> getDocumentsByListOfDocumentHeaderIds(Class<? extends Document> documentClass,
List<String> documentHeaderIds)
throws WorkflowException
getDocumentsByListOfDocumentHeaderIds in interface DocumentServiceWorkflowExceptionDocumentService.getDocumentsByListOfDocumentHeaderIds(java.lang.Class,
java.util.List)
public Document validateAndPersistDocument(Document document,
KualiDocumentEvent event)
throws ValidationException
validateAndPersistDocument in interface DocumentServicedocument - Documentevent - KualiDocumentEvent
ValidationException
public void prepareWorkflowDocument(Document document)
throws WorkflowException
prepareWorkflowDocument in interface DocumentServicedocument -
WorkflowExceptionpublic Document updateDocument(Document document)
updateDocument in interface DocumentService
public Note createNoteFromDocument(Document document,
String text)
DocumentServiceDocument.getNoteType(). Additionally, it's
remoteObjectId will be set to the object id of the document's note target.
createNoteFromDocument in interface DocumentServicedocument - the document from which to use the note type and note target when creating the notetext - the text value to include in the resulting note
DocumentService.createNoteFromDocument(org.kuali.rice.krad.document.Document,
java.lang.String)public boolean saveDocumentNotes(Document document)
DocumentService
saveDocumentNotes in interface DocumentServicedocument - the document for which to save notes
DocumentService.saveDocumentNotes(org.kuali.rice.krad.document.Document)
public void sendNoteRouteNotification(Document document,
Note note,
Person sender)
throws WorkflowException
DocumentService
sendNoteRouteNotification in interface DocumentServicedocument - - document that contains the notenote - - note to notifysender - - user who is sending the notification
WorkflowExceptionDocumentServiceprotected boolean isNoteTargetReady(Document document)
document - the document on which to check for note target readiness
public void sendAdHocRequests(Document document,
String annotation,
List<AdHocRouteRecipient> adHocRecipients)
throws WorkflowException
sendAdHocRequests in interface DocumentServiceWorkflowExceptionDocumentService.sendAdHocRequests(org.kuali.rice.krad.document.Document, String, java.util.List)public void setDateTimeService(DateTimeService dateTimeService)
protected DateTimeService getDateTimeService()
public void setNoteService(NoteService noteService)
protected NoteService getNoteService()
public void setBusinessObjectService(BusinessObjectService businessObjectService)
protected BusinessObjectService getBusinessObjectService()
public void setWorkflowDocumentService(WorkflowDocumentService workflowDocumentService)
protected WorkflowDocumentService getWorkflowDocumentService()
public void setDocumentDao(DocumentDao documentDao)
protected DocumentDao getDocumentDao()
public void setDataDictionaryService(DataDictionaryService dataDictionaryService)
protected DataDictionaryService getDataDictionaryService()
public void setDocumentHeaderService(DocumentHeaderService documentHeaderService)
protected DocumentHeaderService getDocumentHeaderService()
protected DocumentDictionaryService getDocumentDictionaryService()
public void setDocumentDictionaryService(DocumentDictionaryService documentDictionaryService)
public PersonService getPersonService()
public void setKualiConfigurationService(ConfigurationService kualiConfigurationService)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||