org.kuali.rice.kew.api.document
Interface WorkflowDocumentService

All Known Implementing Classes:
WorkflowDocumentServiceImpl

public interface WorkflowDocumentService

TODO ... annotate for JAX-WS!

Author:
Kuali Rice Team (rice.collab@kuali.org)

Method Summary
 List<ActionTaken> _getActionsTaken(String documentId)
          Deprecated. mistaken operation name...use getActionsTaken instead
 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 DocumentLinks 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.
 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 RouteNodeInstances 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
 List<DocumentLink> getIncomingDocumentLinks(String originatingDocumentId)
          Gets a list of all DocumentLinks for incoming links from the Document with the given documentId.
 List<DocumentLink> getOutgoingDocumentLinks(String originatingDocumentId)
          Gets a list of all DocumentLinks 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 routeNodeInstanceId)
          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 RouteNodeInstances 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.
 

Method Detail

getDocument

Document getDocument(String documentId)
                     throws RiceIllegalArgumentException
Gets a Document from a documentId.

This method will return null if the Document does not exist.

Parameters:
documentId - the unique id of the document to return
Returns:
the document with the passed in id value
Throws:
RiceIllegalArgumentException - if documentId is null

doesDocumentExist

boolean doesDocumentExist(String documentId)
                          throws RiceIllegalArgumentException
Returns a boolean depending on if a Document exists with the specified documentId

This method will return false if the responsibility does not exist.

Parameters:
documentId - the unique id of the document to check for existence
Returns:
boolean value representative of whether the document exists
Throws:
RiceIllegalArgumentException - if documentId is null

getDocumentContent

DocumentContent getDocumentContent(String documentId)
                                   throws RiceIllegalArgumentException
Gets DocumentContent from a documentId.

This method will return null if the document does not exist.

Parameters:
documentId - the unique id of the document content to return
Returns:
the documentContent with the passed in id value
Throws:
RiceIllegalArgumentException - if documentId is null

getRootActionRequests

List<ActionRequest> getRootActionRequests(String documentId)
                                          throws RiceIllegalArgumentException
Gets a list of root ActionRequests for a given documentId

Parameters:
documentId - the unique id of a document
Returns:
the list of root ActionRequests for a given documentId
Throws:
RiceIllegalArgumentException - if documentId is null

getPendingActionRequests

List<ActionRequest> getPendingActionRequests(String documentId)
Gets a list of ActionRequests which are pending for a given documentId

Parameters:
documentId - the unique id of a document
Returns:
the list of pending ActionRequests for a given documentId
Throws:
RiceIllegalArgumentException - if documentId is null
Since:
2.1

getActionRequestsForPrincipalAtNode

List<ActionRequest> getActionRequestsForPrincipalAtNode(String documentId,
                                                        String nodeName,
                                                        String principalId)
                                                        throws RiceIllegalArgumentException
Gets a list of ActionRequests for a given documentId, nodeName and principalId

Parameters:
documentId - the unique id of a document
nodeName - the name of a RouteNode
principalId - the unique id of a principal
Returns:
the list of ActionRequests for a given documentId, nodeName, and principalId
Throws:
RiceIllegalArgumentException - if documentId is null

getActionsTaken

List<ActionTaken> getActionsTaken(String documentId)
                                  throws RiceIllegalArgumentException
Gets a list of past ActionTaken of a Document with the given documentId

Parameters:
documentId - the unique id of a document
Returns:
the list of past ActionTakens for a given documentId
Throws:
RiceIllegalArgumentException - if documentId is null

_getActionsTaken

@Deprecated
List<ActionTaken> _getActionsTaken(String documentId)
                                   throws RiceIllegalArgumentException
Deprecated. mistaken operation name...use getActionsTaken instead

Parameters:
documentId - the unique id of a document
Returns:
the list of past ActionTakens for a given documentId
Throws:
RiceIllegalArgumentException - if documentId is null

getAllActionsTaken

List<ActionTaken> getAllActionsTaken(String documentId)
                                     throws RiceIllegalArgumentException
Gets a list of all ActionTaken of a Document with the given documentId

Parameters:
documentId - the unique id of a document
Returns:
the list of ActionTakens (both current and not) for a given documentId
Throws:
RiceIllegalArgumentException - if documentId is null
Since:
2.0.2

getDocumentDetailByAppId

DocumentDetail getDocumentDetailByAppId(String documentTypeName,
                                        String appId)
                                        throws RiceIllegalArgumentException
Gets a DocumentDetail of a Document with the given documentTypeName and appId

Parameters:
documentTypeName - the name of the DocumentType
appId - the unique id of the application
Returns:
a DocumentDetail for with the given documentTypeName and appId
Throws:
RiceIllegalArgumentException - if documentTypeName is null
RiceIllegalArgumentException - if appId is null

getDocumentDetail

DocumentDetail getDocumentDetail(String documentId)
Gets a DocumentDetail of a Document with the given documentId

Parameters:
documentId - the unique id of the Document
Returns:
a DocumentDetail for with the given documentId
Throws:
RiceIllegalArgumentException - if documentId is null

getRouteNodeInstance

RouteNodeInstance getRouteNodeInstance(String routeNodeInstanceId)
                                       throws RiceIllegalArgumentException
Gets a RouteNodeInstance with the given nodeInstanceId

Parameters:
routeNodeInstanceId - the unique id of the RouteNodeInstance
Returns:
a DocumentDetail for with the given documentId
Throws:
RiceIllegalArgumentException - if nodeInstanceId is null

getApplicationDocumentId

String getApplicationDocumentId(String documentId)
                                throws RiceIllegalArgumentException
Gets a value application document id of a Document with the given documentId

Parameters:
documentId - the unique id of the Document
Returns:
the value of the applicationDocumentId for the Document with the given documentId
Throws:
RiceIllegalArgumentException - if documentId is null

getApplicationDocumentStatus

String getApplicationDocumentStatus(String documentId)
                                    throws RiceIllegalArgumentException
Gets a value application document status of a Document with the given documentId

Parameters:
documentId - the unique id of the Document
Returns:
the value of the applicationDocumentStatus for the Document with the given documentId
Throws:
RiceIllegalArgumentException - if documentId is null

documentSearch

DocumentSearchResults documentSearch(String principalId,
                                     DocumentSearchCriteria criteria)
                                     throws RiceIllegalArgumentException
Executes a search for workflow documents using the given criteria and as the principal with the given id. Since documents can define security which permits access to view certain search results, the given principal id will be used when evaluating which documents should be filtered from the results because of lack of access.

Parameters:
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 performed
criteria - the criteria to use when executing the search
Returns:
the results of the search, this will never be null but may contain an empty list of results
Throws:
RiceIllegalArgumentException - if the given criteria is null

getRouteNodeInstances

List<RouteNodeInstance> getRouteNodeInstances(String documentId)
                                              throws RiceIllegalArgumentException
Gets a list of all RouteNodeInstance for a Document with the given documentId

Parameters:
documentId - the unique id of a Document
Returns:
the list of RouteNodeInstances for the Document with the given documentId
Throws:
RiceIllegalArgumentException - if documentId is null

getActiveRouteNodeInstances

List<RouteNodeInstance> getActiveRouteNodeInstances(String documentId)
                                                    throws RiceIllegalArgumentException
Gets a list of active RouteNodeInstance for a Document with the given documentId

Parameters:
documentId - the unique id of a Document
Returns:
the list of active RouteNodeInstances for the Document with the given documentId
Throws:
RiceIllegalArgumentException - if documentId is null

getTerminalRouteNodeInstances

List<RouteNodeInstance> getTerminalRouteNodeInstances(String documentId)
                                                      throws RiceIllegalArgumentException
Gets a list of terminal RouteNodeInstances for a Document with the given documentId

Parameters:
documentId - the unique id of a Document
Returns:
the list of terminal RouteNodeInstances for the Document with the given documentId
Throws:
RiceIllegalArgumentException - if documentId is null

getCurrentRouteNodeInstances

List<RouteNodeInstance> getCurrentRouteNodeInstances(String documentId)
                                                     throws RiceIllegalArgumentException
Gets a list of current RouteNodeInstances for a Document with the given documentId

Parameters:
documentId - the unique id of a Document
Returns:
the list of current RouteNodeInstances for the Document with the given documentId
Throws:
RiceIllegalArgumentException - if documentId is null

getPreviousRouteNodeNames

List<String> getPreviousRouteNodeNames(String documentId)
                                       throws RiceIllegalArgumentException
Gets a list of all previous RouteNodeInstance's node names for a Document with the given documentId

Parameters:
documentId - the unique id of a Document
Returns:
the list of all previous RouteNodeInstance's node names for the Document with the given documentId
Throws:
RiceIllegalArgumentException - if documentId is null

getDocumentStatus

DocumentStatus getDocumentStatus(String documentId)
                                 throws RiceIllegalArgumentException
Gets the status value for a Document with the given documentId

Parameters:
documentId - the unique id of a Document
Returns:
the current status of the Document with the given documentId
Throws:
RiceIllegalArgumentException - if documentId is null

getPrincipalIdsWithPendingActionRequestByActionRequestedAndDocId

List<String> getPrincipalIdsWithPendingActionRequestByActionRequestedAndDocId(String actionRequestedCd,
                                                                              String documentId)
                                                                              throws RiceIllegalArgumentException
Gets a list of principalId values for a Document with the given documentId and action request code that have pending action requests

Parameters:
actionRequestedCd - code for the pending action requested
documentId - the unique id of a Document
Returns:
a list of principalIds for the Document with the given parameters and have a pending action request
Throws:
RiceIllegalArgumentException - if documentId is null
RiceIllegalArgumentException - if actionRequestCd is null

getDocumentInitiatorPrincipalId

String getDocumentInitiatorPrincipalId(String documentId)
                                       throws RiceIllegalArgumentException
Gets the Document initiator's principalId with the given documentId

Parameters:
documentId - the unique id of a Document
Returns:
the Document initiator's principalId
Throws:
RiceIllegalArgumentException - if documentId is null

getRoutedByPrincipalIdByDocumentId

String getRoutedByPrincipalIdByDocumentId(String documentId)
                                          throws RiceIllegalArgumentException
Gets the Document's 'routed by' principalId with the given documentId Returns null if the document is not found

Parameters:
documentId - the unique id of a Document
Returns:
the Document's 'routed by' principalId
Throws:
RiceIllegalArgumentException - if documentId is null

getSearchableAttributeStringValuesByKey

List<String> getSearchableAttributeStringValuesByKey(String documentId,
                                                     String key)
                                                     throws RiceIllegalArgumentException
Does a direct search for searchableAttributes without going through the document search This returns a list of String values for String searchableAttributes

Parameters:
documentId - the unique id of a Document
key - the searchableAttributes key value
Returns:
a list of String values for the Document with the given documentId and searchable attribute key
Throws:
RiceIllegalArgumentException - if documentId is null
RiceIllegalArgumentException - if key is null

getSearchableAttributeDateTimeValuesByKey

List<org.joda.time.DateTime> getSearchableAttributeDateTimeValuesByKey(String documentId,
                                                                       String key)
                                                                       throws RiceIllegalArgumentException
Does a direct search for searchableAttributes without going through the document search This returns a list of DateTime values for date/time searchableAttributes

Parameters:
documentId - the unique id of a Document
key - the searchableAttributes key value
Returns:
a list of DateTime values for the Document with the given documentId and searchable attribute key
Throws:
RiceIllegalArgumentException - if documentId is null
RiceIllegalArgumentException - if key is null

getSearchableAttributeFloatValuesByKey

List<BigDecimal> getSearchableAttributeFloatValuesByKey(String documentId,
                                                        String key)
                                                        throws RiceIllegalArgumentException
Does a direct search for searchableAttributes without going through the document search This returns a list of BigDecimal values for decimal searchableAttributes

Parameters:
documentId - the unique id of a Document
key - the searchableAttributes key value
Returns:
a list of BigDecimal values for the Document with the given documentId and searchable attribute key
Throws:
RiceIllegalArgumentException - if documentId is null
RiceIllegalArgumentException - if key is null

getSearchableAttributeLongValuesByKey

List<Long> getSearchableAttributeLongValuesByKey(String documentId,
                                                 String key)
                                                 throws RiceIllegalArgumentException
Does a direct search for searchableAttributes without going through the document search This returns a list of Long values for long searchableAttributes

Parameters:
documentId - the unique id of a Document
key - the searchableAttributes key value
Returns:
a list of BigDecimal values for the Document with the given documentId and searchable attribute key
Throws:
RiceIllegalArgumentException - if documentId is null
RiceIllegalArgumentException - if key is null

getDocumentStatusTransitionHistory

List<DocumentStatusTransition> getDocumentStatusTransitionHistory(String documentId)
                                                                  throws RiceIllegalArgumentException
Gets a list of DocumentStatusTransitions for the Document with the given documentId

Parameters:
documentId - the unique id of a Document
Returns:
a list of DocumentStatusTransitions for the Document with the given documentId
Throws:
RiceIllegalArgumentException - if documentId is null

addDocumentLink

DocumentLink addDocumentLink(DocumentLink documentLink)
                             throws RiceIllegalArgumentException
Saves the passed in 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.

Parameters:
documentLink - the unique id of a Document
Returns:
the newly saved DocumentLink
Throws:
RiceIllegalArgumentException - if documentLink is null
RiceIllegalArgumentException - if documentLink's is id value is populated

deleteDocumentLink

DocumentLink deleteDocumentLink(String documentLinkId)
                                throws RiceIllegalArgumentException
Removes the DocumentLink with the given documentLinkId.

Parameters:
documentLinkId - the unique id of a Document
Returns:
the deleted DocumentLink
Throws:
RiceIllegalArgumentException - if documentLink is null
RiceIllegalStateException - if no DocumentLink with the passed indocumentLink exist

deleteDocumentLinksByDocumentId

List<DocumentLink> deleteDocumentLinksByDocumentId(String originatingDocumentId)
                                                   throws RiceIllegalArgumentException
Removes all DocumentLinks for the given Document with the given originatingDocumentId.

Parameters:
originatingDocumentId - the unique id of the originating Document of the document links to delete
Returns:
a list of the deleted DocumentLinks
Throws:
RiceIllegalArgumentException - if documentLink is null

getOutgoingDocumentLinks

List<DocumentLink> getOutgoingDocumentLinks(String originatingDocumentId)
                                            throws RiceIllegalArgumentException
Gets a list of all DocumentLinks for outgoing links from the Document with the given documentId.

Parameters:
originatingDocumentId - the unique id of the originating Document of the document links to retrieve
Returns:
a list of the outgoing DocumentLinks for the originating document
Throws:
RiceIllegalArgumentException - if originatingDocumentId is null

getIncomingDocumentLinks

List<DocumentLink> getIncomingDocumentLinks(String originatingDocumentId)
                                            throws RiceIllegalArgumentException
Gets a list of all DocumentLinks for incoming links from the Document with the given documentId.

Parameters:
originatingDocumentId - the unique id of the incoming Document of the document links to retrieve
Returns:
a list of the outgoing DocumentLinks for the incoming document
Throws:
RiceIllegalArgumentException - if originatingDocumentId is null

getDocumentLink

DocumentLink getDocumentLink(String documentLinkId)
                             throws RiceIllegalArgumentException
Gets the DocumentLink for with the given documentLinkId.

Parameters:
documentLinkId - the unique id of the DocumentLink to retrieve
Returns:
a DocumentLink with the passed in documentLinkId
Throws:
RiceIllegalArgumentException - if documentLinkId is null

getActiveRouteNodeNames

List<String> getActiveRouteNodeNames(String documentId)
                                     throws RiceIllegalArgumentException
Gets a list of active route node names for a Document with the given documentId. Will never return null but an empty collection to indicate no results.

Parameters:
documentId - the unique id of a Document
Returns:
an unmodifiable list of active route node names for the Document with the given documentId
Throws:
RiceIllegalArgumentException - if documentId is null or blank
Since:
rice 2.2

getTerminalRouteNodeNames

List<String> getTerminalRouteNodeNames(String documentId)
                                       throws RiceIllegalArgumentException
Gets a list of terminal route node names for a Document with the given documentId. Will never return null but an empty collection to indicate no results.

Parameters:
documentId - the unique id of a Document
Returns:
an unmodifiable list of terminal route node names for the Document with the given documentId
Throws:
RiceIllegalArgumentException - if documentId is null or blank
Since:
rice 2.2

getCurrentRouteNodeNames

List<String> getCurrentRouteNodeNames(String documentId)
                                      throws RiceIllegalArgumentException
Gets a list of current route node names for a Document with the given documentId. Will never return null but an empty collection to indicate no results.

Parameters:
documentId - the unique id of a Document
Returns:
an unmodifiable list of current route node names for the Document with the given documentId
Throws:
RiceIllegalArgumentException - if documentId is null or blank
Since:
rice 2.2


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