public class WorkflowDocumentServiceImpl extends Object implements WorkflowDocumentService
Constructor and Description |
---|
WorkflowDocumentServiceImpl() |
Modifier and Type | Method and Description |
---|---|
List<ActionTaken> |
_getActionsTaken(String documentId) |
protected boolean |
actionRequestMatches(ActionRequestValue actionRequest,
String nodeName,
String principalId) |
DocumentLink |
addDocumentLink(DocumentLink documentLink)
Saves the passed in
DocumentLink . |
DocumentLink |
deleteDocumentLink(String documentLinkId)
Removes the
DocumentLink with the given documentLinkId. |
List<DocumentLink> |
deleteDocumentLinksByDocumentId(String originatingDocumentId)
Removes all
DocumentLink s for the given Document with the given originatingDocumentId. |
DocumentSearchResults |
documentSearch(String principalId,
DocumentSearchCriteria criteria)
Executes a search for workflow documents using the given criteria and as the principal with the given id.
|
DocumentSearchResults |
documentSearchSaveable(String principalId,
DocumentSearchCriteria criteria,
boolean saveSearch)
Executes a search for workflow documents using the given criteria and as the principal with the given id.
|
boolean |
doesDocumentExist(String documentId)
Returns a boolean depending on if a
Document exists with the specified documentId |
List<ActionRequest> |
getActionRequestsForPrincipalAtNode(String documentId,
String nodeName,
String principalId)
Gets a list of ActionRequests for a given documentId, nodeName and principalId
|
List<ActionTaken> |
getActionsTaken(String documentId)
Gets a list of past
ActionTaken of a Document with the given documentId |
List<RouteNodeInstance> |
getActiveRouteNodeInstances(String documentId)
Gets a list of active
RouteNodeInstance for a Document with the given documentId |
List<String> |
getActiveRouteNodeNames(String documentId)
Gets a list of active route node names for a
Document with the given documentId. |
List<ActionTaken> |
getAllActionsTaken(String documentId)
Gets a list of all
ActionTaken of a Document with the given documentId |
String |
getApplicationDocumentId(String documentId)
Gets a value application document id of a
Document with the given documentId |
String |
getApplicationDocumentStatus(String documentId)
Gets a value application document status of a
Document with the given documentId |
List<RouteNodeInstance> |
getCurrentRouteNodeInstances(String documentId)
Gets a list of current
RouteNodeInstance s for a Document with the given documentId |
List<String> |
getCurrentRouteNodeNames(String documentId)
Gets a list of current route node names for a
Document with the given documentId. |
Document |
getDocument(String documentId)
Gets a
Document from a documentId. |
DocumentContent |
getDocumentContent(String documentId)
Gets
DocumentContent from a documentId. |
DocumentDetail |
getDocumentDetail(String documentId)
Gets a
DocumentDetail of a Document with the given documentId |
DocumentDetail |
getDocumentDetailByAppId(String documentTypeName,
String appId)
Gets a
DocumentDetail of a Document with the given documentTypeName and appId |
String |
getDocumentInitiatorPrincipalId(String documentId)
Gets the
Document initiator's principalId with the given documentId |
DocumentLink |
getDocumentLink(String documentLinkId)
Gets the
DocumentLink for with the given documentLinkId. |
DocumentStatus |
getDocumentStatus(String documentId)
Gets the status value for a
Document with the given documentId |
List<DocumentStatusTransition> |
getDocumentStatusTransitionHistory(String documentId)
Gets a list of DocumentStatusTransitions for the
Document with the given documentId |
String |
getDocumentTypeName(String documentId)
Returns the name of the document type used by the document with the given id.
|
List<DocumentLink> |
getIncomingDocumentLinks(String destinationDocumentId)
Gets a list of all
DocumentLink s for incoming links from the Document with the given documentId. |
List<DocumentLink> |
getOutgoingDocumentLinks(String originatingDocumentId)
Gets a list of all
DocumentLink s for outgoing links from the Document with the given documentId. |
List<ActionRequest> |
getPendingActionRequests(String documentId)
Gets a list of ActionRequests which are pending for a given documentId
|
List<String> |
getPreviousRouteNodeNames(String documentId)
Gets a list of all previous
RouteNodeInstance 's node names for a Document with the given documentId |
List<String> |
getPrincipalIdsWithPendingActionRequestByActionRequestedAndDocId(String actionRequestedCd,
String documentId)
Gets a list of principalId values for a
Document with the given documentId
and action request code that have pending action requests |
List<ActionRequest> |
getRootActionRequests(String documentId)
Gets a list of root ActionRequests for a given documentId
|
String |
getRoutedByPrincipalIdByDocumentId(String documentId)
Gets the
Document 's 'routed by' principalId with the given documentId
Returns null if the document is not found |
RouteNodeInstance |
getRouteNodeInstance(String nodeInstanceId)
Gets a
RouteNodeInstance with the given nodeInstanceId |
List<RouteNodeInstance> |
getRouteNodeInstances(String documentId)
Gets a list of all
RouteNodeInstance for a Document with the given documentId |
List<org.joda.time.DateTime> |
getSearchableAttributeDateTimeValuesByKey(String documentId,
String key)
Does a direct search for searchableAttributes without going through the document search
This returns a list of DateTime values for date/time searchableAttributes
|
List<BigDecimal> |
getSearchableAttributeFloatValuesByKey(String documentId,
String key)
Does a direct search for searchableAttributes without going through the document search
This returns a list of BigDecimal values for decimal searchableAttributes
|
List<Long> |
getSearchableAttributeLongValuesByKey(String documentId,
String key)
Does a direct search for searchableAttributes without going through the document search
This returns a list of Long values for long searchableAttributes
|
List<String> |
getSearchableAttributeStringValuesByKey(String documentId,
String key)
Does a direct search for searchableAttributes without going through the document search
This returns a list of String values for String searchableAttributes
|
List<RouteNodeInstance> |
getTerminalRouteNodeInstances(String documentId)
Gets a list of terminal
RouteNodeInstance s for a Document with the given documentId |
List<String> |
getTerminalRouteNodeNames(String documentId)
Gets a list of terminal route node names for a
Document with the given documentId. |
public WorkflowDocumentServiceImpl()
public Document getDocument(String documentId)
WorkflowDocumentService
Document
from a documentId.
This method will return null if the Document does not exist.
getDocument
in interface WorkflowDocumentService
documentId
- the unique id of the document to returnpublic boolean doesDocumentExist(String documentId)
WorkflowDocumentService
Document
exists with the specified documentId
This method will return false if the responsibility does not exist.
doesDocumentExist
in interface WorkflowDocumentService
documentId
- the unique id of the document to check for existencepublic String getDocumentTypeName(String documentId)
WorkflowDocumentService
getDocumentTypeName
in interface WorkflowDocumentService
documentId
- the id of the document for which to fetch the document type name, must not be null or blankpublic DocumentDetail getDocumentDetailByAppId(String documentTypeName, String appId)
WorkflowDocumentService
DocumentDetail
of a Document
with the given documentTypeName and appIdgetDocumentDetailByAppId
in interface WorkflowDocumentService
documentTypeName
- the name of the DocumentTypeappId
- the unique id of the applicationDocumentDetail
for with the given documentTypeName and appIdpublic RouteNodeInstance getRouteNodeInstance(String nodeInstanceId)
WorkflowDocumentService
RouteNodeInstance
with the given nodeInstanceIdgetRouteNodeInstance
in interface WorkflowDocumentService
nodeInstanceId
- the unique id of the RouteNodeInstance
DocumentDetail
for with the given documentIdpublic DocumentStatus getDocumentStatus(String documentId)
WorkflowDocumentService
Document
with the given documentIdgetDocumentStatus
in interface WorkflowDocumentService
documentId
- the unique id of a DocumentDocument
with the
given documentIdpublic String getApplicationDocumentId(String documentId)
WorkflowDocumentService
Document
with the given documentIdgetApplicationDocumentId
in interface WorkflowDocumentService
documentId
- the unique id of the DocumentDocument
with the given documentIdpublic String getApplicationDocumentStatus(String documentId) throws RiceIllegalArgumentException
WorkflowDocumentService
Document
with the given documentIdgetApplicationDocumentStatus
in interface WorkflowDocumentService
documentId
- the unique id of the DocumentDocument
with the given documentIdRiceIllegalArgumentException
- if documentId
is nullpublic DocumentSearchResults documentSearch(String principalId, DocumentSearchCriteria criteria)
WorkflowDocumentService
documentSearch
in interface WorkflowDocumentService
principalId
- the id of the principal to execute the search as, if this value is non-null then security
filtering will be executed against the results, if it is null then no filtering will be performedcriteria
- the criteria to use when executing the searchpublic DocumentSearchResults documentSearchSaveable(String principalId, DocumentSearchCriteria criteria, boolean saveSearch)
WorkflowDocumentService
documentSearchSaveable
in interface WorkflowDocumentService
principalId
- the id of the principal to execute the search as, if this value is non-null then security
filtering will be executed against the results, if it is null then no filtering will be performedcriteria
- the criteria to use when executing the searchpublic List<String> getSearchableAttributeStringValuesByKey(String documentId, String key)
WorkflowDocumentService
getSearchableAttributeStringValuesByKey
in interface WorkflowDocumentService
documentId
- the unique id of a Documentkey
- the searchableAttributes key valueDocument
with the
given documentId and searchable attribute keypublic List<org.joda.time.DateTime> getSearchableAttributeDateTimeValuesByKey(String documentId, String key)
WorkflowDocumentService
getSearchableAttributeDateTimeValuesByKey
in interface WorkflowDocumentService
documentId
- the unique id of a Documentkey
- the searchableAttributes key valueDocument
with the
given documentId and searchable attribute keypublic List<BigDecimal> getSearchableAttributeFloatValuesByKey(String documentId, String key)
WorkflowDocumentService
getSearchableAttributeFloatValuesByKey
in interface WorkflowDocumentService
documentId
- the unique id of a Documentkey
- the searchableAttributes key valueDocument
with the
given documentId and searchable attribute keypublic List<Long> getSearchableAttributeLongValuesByKey(String documentId, String key)
WorkflowDocumentService
getSearchableAttributeLongValuesByKey
in interface WorkflowDocumentService
documentId
- the unique id of a Documentkey
- the searchableAttributes key valueDocument
with the
given documentId and searchable attribute keypublic DocumentContent getDocumentContent(String documentId)
WorkflowDocumentService
DocumentContent
from a documentId.
This method will return null if the document does not exist.
getDocumentContent
in interface WorkflowDocumentService
documentId
- the unique id of the document content to returnpublic List<ActionRequest> getRootActionRequests(String documentId)
WorkflowDocumentService
getRootActionRequests
in interface WorkflowDocumentService
documentId
- the unique id of a documentpublic List<ActionRequest> getPendingActionRequests(String documentId)
WorkflowDocumentService
getPendingActionRequests
in interface WorkflowDocumentService
documentId
- the unique id of a documentpublic List<ActionRequest> getActionRequestsForPrincipalAtNode(String documentId, String nodeName, String principalId)
WorkflowDocumentService
getActionRequestsForPrincipalAtNode
in interface WorkflowDocumentService
documentId
- the unique id of a documentnodeName
- the name of a RouteNodeprincipalId
- the unique id of a principalprotected boolean actionRequestMatches(ActionRequestValue actionRequest, String nodeName, String principalId)
public List<ActionTaken> getActionsTaken(String documentId)
WorkflowDocumentService
ActionTaken
of a Document
with the given documentIdgetActionsTaken
in interface WorkflowDocumentService
documentId
- the unique id of a documentpublic List<ActionTaken> _getActionsTaken(String documentId)
_getActionsTaken
in interface WorkflowDocumentService
documentId
- the unique id of a documentpublic List<ActionTaken> getAllActionsTaken(String documentId)
WorkflowDocumentService
ActionTaken
of a Document
with the given documentIdgetAllActionsTaken
in interface WorkflowDocumentService
documentId
- the unique id of a documentpublic DocumentDetail getDocumentDetail(String documentId)
WorkflowDocumentService
DocumentDetail
of a Document
with the given documentIdgetDocumentDetail
in interface WorkflowDocumentService
documentId
- the unique id of the DocumentDocumentDetail
for with the given documentIdpublic List<DocumentStatusTransition> getDocumentStatusTransitionHistory(String documentId)
WorkflowDocumentService
Document
with the given documentIdgetDocumentStatusTransitionHistory
in interface WorkflowDocumentService
documentId
- the unique id of a DocumentDocument
with the
given documentIdpublic List<RouteNodeInstance> getRouteNodeInstances(String documentId)
WorkflowDocumentService
RouteNodeInstance
for a Document
with the given documentIdgetRouteNodeInstances
in interface WorkflowDocumentService
documentId
- the unique id of a DocumentRouteNodeInstance
s for the Document
with the given documentIdpublic List<RouteNodeInstance> getActiveRouteNodeInstances(String documentId)
WorkflowDocumentService
RouteNodeInstance
for a Document
with the given documentIdgetActiveRouteNodeInstances
in interface WorkflowDocumentService
documentId
- the unique id of a DocumentRouteNodeInstance
s for the Document
with the given documentIdpublic List<RouteNodeInstance> getTerminalRouteNodeInstances(String documentId)
WorkflowDocumentService
RouteNodeInstance
s for a Document
with the given documentIdgetTerminalRouteNodeInstances
in interface WorkflowDocumentService
documentId
- the unique id of a DocumentRouteNodeInstance
s for the Document
with the given documentIdpublic List<RouteNodeInstance> getCurrentRouteNodeInstances(String documentId)
WorkflowDocumentService
RouteNodeInstance
s for a Document
with the given documentIdgetCurrentRouteNodeInstances
in interface WorkflowDocumentService
documentId
- the unique id of a DocumentRouteNodeInstance
s for the Document
with the given documentIdpublic List<String> getActiveRouteNodeNames(String documentId)
WorkflowDocumentService
Document
with the given documentId. Will never return null but an empty collection to indicate no results.getActiveRouteNodeNames
in interface WorkflowDocumentService
documentId
- the unique id of a DocumentDocument
with the given documentIdpublic List<String> getTerminalRouteNodeNames(String documentId)
WorkflowDocumentService
Document
with the given documentId. Will never return null but an empty collection to indicate no results.getTerminalRouteNodeNames
in interface WorkflowDocumentService
documentId
- the unique id of a DocumentDocument
with the given documentIdpublic List<String> getCurrentRouteNodeNames(String documentId)
WorkflowDocumentService
Document
with the given documentId. Will never return null but an empty collection to indicate no results.getCurrentRouteNodeNames
in interface WorkflowDocumentService
documentId
- the unique id of a DocumentDocument
with the given documentIdpublic List<String> getPreviousRouteNodeNames(String documentId)
WorkflowDocumentService
RouteNodeInstance
's node names for a Document
with the given documentIdgetPreviousRouteNodeNames
in interface WorkflowDocumentService
documentId
- the unique id of a DocumentRouteNodeInstance
's node names for the Document
with the
given documentIdpublic List<String> getPrincipalIdsWithPendingActionRequestByActionRequestedAndDocId(String actionRequestedCd, String documentId)
WorkflowDocumentService
Document
with the given documentId
and action request code that have pending action requestsgetPrincipalIdsWithPendingActionRequestByActionRequestedAndDocId
in interface WorkflowDocumentService
actionRequestedCd
- code for the pending action requesteddocumentId
- the unique id of a DocumentDocument
with the
given parameters and have a pending action requestpublic String getDocumentInitiatorPrincipalId(String documentId)
WorkflowDocumentService
Document
initiator's principalId with the given documentIdgetDocumentInitiatorPrincipalId
in interface WorkflowDocumentService
documentId
- the unique id of a DocumentDocument
initiator's principalIdpublic String getRoutedByPrincipalIdByDocumentId(String documentId)
WorkflowDocumentService
Document
's 'routed by' principalId with the given documentId
Returns null if the document is not foundgetRoutedByPrincipalIdByDocumentId
in interface WorkflowDocumentService
documentId
- the unique id of a DocumentDocument
's 'routed by' principalIdpublic DocumentLink addDocumentLink(DocumentLink documentLink) throws RiceIllegalArgumentException
WorkflowDocumentService
DocumentLink
. If the DocumentLink
's id field is created. This method
actually creates two different links in the database (one from the document being
linked to the target and vice-versa). If the links already exist, then the call is ignored.addDocumentLink
in interface WorkflowDocumentService
documentLink
- the unique id of a DocumentDocumentLink
RiceIllegalArgumentException
- if documentLink
is nullpublic DocumentLink deleteDocumentLink(String documentLinkId) throws RiceIllegalArgumentException
WorkflowDocumentService
DocumentLink
with the given documentLinkId.deleteDocumentLink
in interface WorkflowDocumentService
documentLinkId
- the unique id of a DocumentDocumentLink
RiceIllegalArgumentException
- if documentLink
is nullpublic List<DocumentLink> deleteDocumentLinksByDocumentId(String originatingDocumentId) throws RiceIllegalArgumentException
WorkflowDocumentService
DocumentLink
s for the given Document
with the given originatingDocumentId.deleteDocumentLinksByDocumentId
in interface WorkflowDocumentService
originatingDocumentId
- the unique id of the originating Document of the document links to deleteDocumentLink
sRiceIllegalArgumentException
- if documentLink
is nullpublic List<DocumentLink> getOutgoingDocumentLinks(String originatingDocumentId) throws RiceIllegalArgumentException
WorkflowDocumentService
DocumentLink
s for outgoing links from the Document
with the given documentId.getOutgoingDocumentLinks
in interface WorkflowDocumentService
originatingDocumentId
- the unique id of the originating Document of the document links to retrieveDocumentLink
s for the originating documentRiceIllegalArgumentException
- if originatingDocumentId
is nullpublic List<DocumentLink> getIncomingDocumentLinks(String destinationDocumentId) throws RiceIllegalArgumentException
WorkflowDocumentService
DocumentLink
s for incoming links from the Document
with the given documentId.getIncomingDocumentLinks
in interface WorkflowDocumentService
destinationDocumentId
- the unique id of the incoming Document of the document links to retrieveDocumentLink
s for the incoming documentRiceIllegalArgumentException
- if originatingDocumentId
is nullpublic DocumentLink getDocumentLink(String documentLinkId) throws RiceIllegalArgumentException
WorkflowDocumentService
DocumentLink
for with the given documentLinkId.getDocumentLink
in interface WorkflowDocumentService
documentLinkId
- the unique id of the DocumentLink
to retrieveDocumentLink
with the passed in documentLinkIdRiceIllegalArgumentException
- if documentLinkId
is nullCopyright © 2005–2016 The Kuali Foundation. All rights reserved.