com.adobe.livecycle.rca.client
Class ReviewCommentingAndApprovalServiceClient

java.lang.Object
  extended by com.adobe.livecycle.rca.client.ReviewCommentingAndApprovalServiceClient

public class ReviewCommentingAndApprovalServiceClient
extends Object


Constructor Summary
ReviewCommentingAndApprovalServiceClient(com.adobe.idp.dsc.clientsdk.ServiceClientFactory serviceClientFactory)
          Create RCACoreClient instance.
 
Method Summary
 void addApprover(String reviewId, Integer stageNo, String domain, String canonicalName)
          Operation to add a new approver in an already running Review Approval Process.
 void addReviewer(String reviewId, Integer stageNo, String domain, String canonicalName, Boolean isOptional)
          Operation to add a new reviewer in an already running Review Approval Process.
 com.adobe.idp.Document applyReaderExtension(com.adobe.idp.Document document)
          Applies reader extension to the document based on the options configured as service configuration parameter.
 Boolean deleteReviewTemplate(String templateName)
          Deletes a Review Template from the system.
 com.adobe.idp.Document getDocument(String reviewID, Integer revision, String documentPath)
          This is a utility api to retrieve any document from a particular Review Zone.
 ReviewContextTO getReviewByProcessId(String assignTaskPid)
          Retrieve review context for a given process ID.
 com.adobe.idp.Document getReviewContext(String reviewId, Integer revision)
          This Operation returns the review context.
 com.adobe.idp.Document getReviewDocument(String reviewId, Integer revision)
          This Operation returns the review document.
 com.adobe.idp.Document getReviewStageDocument(String reviewId, Integer revision, Integer stageNo)
          This Operation returns the review document for a review stage.
 com.adobe.idp.Document getReviewTemplate(String templateName)
          Retrieves the Review Template from Review Zone.
 com.adobe.idp.Document getRevisions(String reviewId)
          2nd level Search API Returns XML that has the review_context for all the revision of that review.
 List getSupportingDocuments(String reviewID)
          Returns a list of urls of supporting documents for review identified by Review ID The urls will be specific to ReviewZoneProvider i.e.
 UserPreferenceTO getUserPreference(String domain, String canonicalName)
          Gets the user preferences for a particular user
 String initiateReview(com.adobe.idp.Document reviewContext, com.adobe.idp.Document reviewDocument, List supportingDocList)
          This Operation should be invoked to start an RCA process.
 void initiateReviewLongLived(com.adobe.idp.Document reviewContext, com.adobe.idp.Document reviewDocument, List supportingDocList)
          This is the long-lived version of initiateReview API.
 List purgeReviews(List listOfReviewIDs, Boolean clearReviewZone)
          Removes data for a particular review from database and also removes the review zone for particular review from Review Zone Location.
 void removeApprover(String reviewId, Integer stageNo, String domain, String canonicalName)
          This Operation removes the approver from the running process.
 void removeReviewer(String reviewId, Integer stageNo, String domain, String canonicalName)
          This Operation removes the reviewer from the running process.
 com.adobe.idp.Document retrieveAuditConfig()
          This Operation retrieves the audit configuration for RCA.
 void reviseReview(String reviewId, Integer stageNo, com.adobe.idp.Document reviewDocument, String changeDescription)
          This Operation generates a new revision of a review from a particular stage
 void revokeReview(String reviewId)
          This Operation can be used for revoking the review.
 com.adobe.idp.Document searchReviews(ReviewSearchFilterTO reviewSearchFilter)
          1st level Search API Search reviews based on ReviewSearchFilter.
 List searchReviewTemplates(TemplateSearchFilter templateSearchFilter)
          Search Review Templates based on Review Search Filter
 void setUserPreference(String domain, String canonicalName, UserPreferenceTO userPreference)
          Sets the user preferences for a particular user.
 void storeReviewTemplate(com.adobe.idp.Document reviewTemplate, List supportingDocList, Boolean overwrite)
          This Operation stores a Review Template XML Document in the RCA System.
 void updateCustomAttributes(String reviewId, Integer revision, List listCustomAttributeTO, Boolean discardOld)
          Updates the searchable custom attributes of a review.
 void updateReviewStageDuration(String reviewId, Integer stageNo, Integer duration, String durationUnit)
          This operation updates the Review Stage Duration of an already running Review Approval Process.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReviewCommentingAndApprovalServiceClient

public ReviewCommentingAndApprovalServiceClient(com.adobe.idp.dsc.clientsdk.ServiceClientFactory serviceClientFactory)
Create RCACoreClient instance.

Parameters:
serviceClientFactory - serviceClientFactory to be used
Method Detail

initiateReview

public String initiateReview(com.adobe.idp.Document reviewContext,
                             com.adobe.idp.Document reviewDocument,
                             List supportingDocList)
                      throws RCAException
This Operation should be invoked to start an RCA process. It does the following:
  • Validates the passed reviewContext (XML)
  • A unique ID is auto generated for the Review/Approval process and set in Review Template XML from previous step.
  • A Review Zone is created using Service ReviewZoneProvider using ID generated in previous step.
  • Adds supporting documents
  • com.adobe.idp.Document (Object): Document is first uploaded to ReviewZoneProvider and links to the document are added in Review Context XML passes as parameter
  • Document Link (String): If Document links' list is passed to this API, the are simply injected in Review Context
  • Store the original Review Document in Review Zone using Service ReviewZoneProvider
  • Pass the reviewDocument to RCA Orchestration to Prepare this document for Review
  • Invoke pre-review Orchestration Hook for the first Stage if given in Review Context XML
  • Enable passed reviewDocument (PDF) for Shared Review for the first Stage: Injects Acrobat specific JavaScript in the document
  • Store a copy of prepared reviewDocument in Review Zone using Service ReviewZoneProvider
  • Store a copy of updated reviewContext in Review Zone using Service ReviewZoneProvider
  • Invoke the Core Review Process (for Parallel or Sequential Review) passing it the Review Context and Review Document
  • Please note, this operation triggers the Core Review Process (Orchestration). It assumes the Review Context to be final and ready for the Review to begin. So, one should invoke operation addSupportingDocument before invoking this Operation, if needed.

    Parameters:
    reviewContext - Document instance of Review Context (XML) (Required Parameter)
    reviewDocument - Document to be reviewed (Required Parameter)
    supportingDocList - List of RCADocument (Required Parameter)
    Returns:
    String Review Id of the initiated review.
    Throws:
    InvalidReviewContextException - If passed reviewContext is invalid, i.e. it doesn't comply to RCA ReviewContext Schema.
    InvalidReviewDocumentException - If passed reviewDocument is not a valid PDF which can be sent for Shared Review.
    ReviewZoneCreationException - If review zone creation fails
    UserNotFoundException - If a user mentioned in Review Context is not found in LC UM
    RCAException

    initiateReviewLongLived

    public void initiateReviewLongLived(com.adobe.idp.Document reviewContext,
                                        com.adobe.idp.Document reviewDocument,
                                        List supportingDocList)
                                 throws RCAException
    This is the long-lived version of initiateReview API. This operation when invoked from within a long lived process will exit only when all the stages of the Review/Approval process complete. The exit criteria of this operation is:
    1. All stages complete
    2. The document was REJECTED in one of the Approval stage
    3. A stage of the Review/Approval process expires (timeout).
    4. The Review/Approval process is Revoked by a moderator/initiator.
    This operation survives multiple revisions of a Review/Approval process i.e. this operation doesn't return on a reviseReview call.

    Parameters:
    reviewContext - Same as that of initiateReview
    reviewDocument - Same as that of initiateReview
    supportingDocList - Same as that of initiateReview
    Throws:
    RCAException

    getSupportingDocuments

    public List getSupportingDocuments(String reviewID)
                                throws RCAException
    Returns a list of urls of supporting documents for review identified by Review ID The urls will be specific to ReviewZoneProvider i.e. for file system based RZP urls may be network share path.

    Parameters:
    reviewID - Unique ID of the review
    Returns:
    List List of urls of supporting documents.
    Throws:
    RCAException

    updateReviewStageDuration

    public void updateReviewStageDuration(String reviewId,
                                          Integer stageNo,
                                          Integer duration,
                                          String durationUnit)
                                   throws RCAException
    This operation updates the Review Stage Duration of an already running Review Approval Process.

    Parameters:
    reviewId - Unique ID of the review (Required Parameter)
    stageNo - ID of the stage within a review (Required Parameter)
    duration - stage duration
    durationUnit - Unit of stage duration. valid values are:
    • DAYS
    • HOURS
    • MINUTES
    Default value is DAYS
    Throws:
    RCAException - Any Exception generated in RCA Core

    addReviewer

    public void addReviewer(String reviewId,
                            Integer stageNo,
                            String domain,
                            String canonicalName,
                            Boolean isOptional)
                     throws RCAException
    Operation to add a new reviewer in an already running Review Approval Process. Following rules apply:

    Parameters:
    reviewId - Unique ID of the review. (Required Parameter)
    stageNo - Unique identifier of the stage within a review. Integer >= 1. (Required Parameter)
    domain - Reviewer domain (Required Parameter)
    canonicalName - Canonical Name (Required Parameter)
    isOptional - This flag indicates if the reviewer to be added is optional or required. If null then it is defaulted to false. (Optional Parameter)
    Throws:
    RCAException - Any Exception generated in RCA Core.

    addApprover

    public void addApprover(String reviewId,
                            Integer stageNo,
                            String domain,
                            String canonicalName)
                     throws RCAException
    Operation to add a new approver in an already running Review Approval Process. Following rules apply:

    Parameters:
    reviewId - Unique ID of the review. (Required Parameter)
    stageNo - Unique identifier of the stage within a review. Integer >= 1. (Required Parameter)
    domain - Reviewer domain (Required Parameter)
    canonicalName - Canonical Name (Required Parameter)
    Throws:
    RCAException - Any Exception generated in RCA Core.

    removeReviewer

    public void removeReviewer(String reviewId,
                               Integer stageNo,
                               String domain,
                               String canonicalName)
                        throws RCAException
    This Operation removes the reviewer from the running process. The status of the reviewer, that need to be removed, should be PENDING before calling this operation. In case of parallel review, it is possible that reviewer completes his/her task before removal.

    Parameters:
    reviewId - Unique ID of the review. (Required Parameter)
    stageNo - Stage Id of the stage (Required parameter)
    domain - domain name of the reviewer. (Required parameter)
    canonicalName - canonical name of the reviewer. (Required parameter)
    Throws:
    RCAException - Any Exception generated in RCA Core.

    removeApprover

    public void removeApprover(String reviewId,
                               Integer stageNo,
                               String domain,
                               String canonicalName)
                        throws RCAException
    This Operation removes the approver from the running process. The status of the approver, that need to be removed, should be PENDING before calling this operation. In case of parallel approval, it is possible that approver completes his/her task before removal.

    Parameters:
    reviewId - Unique ID of the review. (Required Parameter)
    stageNo - Stage Id of the stage (Required parameter)
    domain - domain name of the approver (Required parameter)
    canonicalName - canonical name of the approver (Required parameter)
    Throws:
    RCAException - Any Exception generated in RCA Core.

    revokeReview

    public void revokeReview(String reviewId)
                      throws RCAException
    This Operation can be used for revoking the review. Only a review which is currently running can be revoked.

    Parameters:
    reviewId - Unique ID of the review. (Required Parameter)
    Throws:
    RCAException - Any Exception generated in RCA Core.

    searchReviews

    public com.adobe.idp.Document searchReviews(ReviewSearchFilterTO reviewSearchFilter)
                                         throws RCAException
    1st level Search API Search reviews based on ReviewSearchFilter.

    Parameters:
    ReviewSearchFilter - Filter to be applied while searching. All the attributes of ReviewSearchFilter will be ANDed.
    Returns:
    Document Search result XML in form of com.adobe.idp.Document. The XML conforms to SearchResult schema. It returns an XML comprising of XML Tags named Review. Review does not consist of all details about the review, but it contains few basic information about the review. This API is complemented by another API called getRevisions, which takes a review ID.
    Throws:
    RCAException

    getRevisions

    public com.adobe.idp.Document getRevisions(String reviewId)
                                        throws RCAException
    2nd level Search API Returns XML that has the review_context for all the revision of that review. Using this api, you can get all the information about a review and its revisions.

    Parameters:
    reviewId -
    Returns:
    Document Search result XML in form of com.adobe.idp.Document. The XML conforms to SearchResult schema. The returned XML has the review_context for all the revision of that review.
    Throws:
    RCAException

    getReviewStageDocument

    public com.adobe.idp.Document getReviewStageDocument(String reviewId,
                                                         Integer revision,
                                                         Integer stageNo)
                                                  throws RCAException
    This Operation returns the review document for a review stage.

    Parameters:
    reviewId - Unique ID of the review. (Required Parameter)
    revision - Revision (Required Parameter)
    stageNo - Stage Id of the stage
    Returns:
    Document PDF document for the review stage
    Throws:
    RCAException - Any Exception generated in RCA Core.

    getReviewDocument

    public com.adobe.idp.Document getReviewDocument(String reviewId,
                                                    Integer revision)
                                             throws RCAException
    This Operation returns the review document.

    Parameters:
    reviewId - Unique ID of the review. (Required Parameter)
    revision - Revision (Required Parameter)
    Returns:
    Document PDF document for the review.
    Throws:
    RCAException - Any Exception generated in RCA Core.

    getReviewContext

    public com.adobe.idp.Document getReviewContext(String reviewId,
                                                   Integer revision)
                                            throws RCAException
    This Operation returns the review context.

    Parameters:
    reviewId - Unique ID of the review. (Required Parameter)
    revision - Revision (Required Parameter)
    Returns:
    Document review context document.
    Throws:
    RCAException - Any Exception generated in RCA Core.

    reviseReview

    public void reviseReview(String reviewId,
                             Integer stageNo,
                             com.adobe.idp.Document reviewDocument,
                             String changeDescription)
                      throws RCAException
    This Operation generates a new revision of a review from a particular stage

    Parameters:
    reviewId - Unique ID of the review. (Required Parameter)
    stageNo - Stage Id of the stage (Required parameter)
    reviewDocument - New document that would be used in the revision (Required parameter).
    Throws:
    RCAException

    storeReviewTemplate

    public void storeReviewTemplate(com.adobe.idp.Document reviewTemplate,
                                    List supportingDocList,
                                    Boolean overwrite)
                             throws RCAException
    This Operation stores a Review Template XML Document in the RCA System. It picks up the review template name from the XML while storing. So, Review Template Name should be unique unless you want to overwrite a previously stored review template. It also hosts the supporting document at template level

    Parameters:
    reviewTemplate - Document instance of Review Template (XML) (Required Parameter)
    supportingDocList - List. This is a list of supporting documents that would be hosted at template level.
    overwrite - If true and a template exists with same name, it silently replaces the old one.
    Throws:
    RCAException

    retrieveAuditConfig

    public com.adobe.idp.Document retrieveAuditConfig()
                                               throws RCAException
    This Operation retrieves the audit configuration for RCA.

    Returns:
    Document Audit Configuration Document.
    Throws:
    RCAException

    applyReaderExtension

    public com.adobe.idp.Document applyReaderExtension(com.adobe.idp.Document document)
                                                throws RCAException
    Applies reader extension to the document based on the options configured as service configuration parameter.

    Parameters:
    document - input document
    Returns:
    reader extended document
    Throws:
    RCAException - Any Exception generated in RCA Core.

    setUserPreference

    public void setUserPreference(String domain,
                                  String canonicalName,
                                  UserPreferenceTO userPreference)
                           throws RCAException
    Sets the user preferences for a particular user. It deletes existing user preferences and replace it with new user preferences.

    Parameters:
    domain - User Domain name
    canonicalName - User Canonical Name
    userPreference - User Preferences object
    Throws:
    RCAException - Any Exception generated in RCA Core.

    getUserPreference

    public UserPreferenceTO getUserPreference(String domain,
                                              String canonicalName)
                                       throws RCAException
    Gets the user preferences for a particular user

    Parameters:
    domain - User Domain name
    canonicalName - User Canonical Name
    Returns:
    User preference object
    Throws:
    RCAException - Any Exception generated in RCA Core.

    getReviewByProcessId

    public ReviewContextTO getReviewByProcessId(String assignTaskPid)
                                         throws RCAException
    Retrieve review context for a given process ID.

    Parameters:
    assignTaskPid - Process ID of the assign Task operation.
    Returns:
    Throws:
    RCAException - Any Exception generated in RCA Core.

    updateCustomAttributes

    public void updateCustomAttributes(String reviewId,
                                       Integer revision,
                                       List listCustomAttributeTO,
                                       Boolean discardOld)
                                throws RCAException
    Updates the searchable custom attributes of a review.

    Parameters:
    reviewId - Review ID
    revision - Review Revision
    listCustomAttributeTO - list of CustomAttributeTO
    discardOld - If true, old custom attributes are discarded
    Throws:
    RCAException

    searchReviewTemplates

    public List searchReviewTemplates(TemplateSearchFilter templateSearchFilter)
                               throws RCAException
    Search Review Templates based on Review Search Filter

    Parameters:
    templateSearchFilter -
    Returns:
    Throws:
    RCAException

    deleteReviewTemplate

    public Boolean deleteReviewTemplate(String templateName)
                                 throws RCAException
    Deletes a Review Template from the system. Invoker should have Template Write permission to invoke this api

    Parameters:
    templateName - Name of the template e.g. DemoTemplate
    Returns:
    Boolean true if deletion is successful false otherwise.
    Throws:
    RCAException - in case of any error while deleting the template

    purgeReviews

    public List purgeReviews(List listOfReviewIDs,
                             Boolean clearReviewZone)
                      throws RCAException
    Removes data for a particular review from database and also removes the review zone for particular review from Review Zone Location. It will not purge a review if it is in progress. Review must be completed/expired/revoked before this api is called. Any such review will be ignored and a warning will be printed. Only users with RCA Administrator role shall be able to call this api.

    Parameters:
    listOfReviewIDs - List of Review IDs to be purged
    clearReviewZone - boolean flag, if true then corresponding review zone folder is also deleted.
    Returns:
    List of Review IDs that could not be purged.
    Throws:
    RCAException - in case of any error while purging the reviews

    getReviewTemplate

    public com.adobe.idp.Document getReviewTemplate(String templateName)
                                             throws RCAException
    Retrieves the Review Template from Review Zone. Invoker should have Template Read permission to invoke this api.

    Parameters:
    templateName - Name of the template e.g. "Demo Template"
    Returns:
    com.adobe.idp.Document Review Template XML
    Throws:
    RCAException

    getDocument

    public com.adobe.idp.Document getDocument(String reviewID,
                                              Integer revision,
                                              String documentPath)
                                       throws RCAException
    This is a utility api to retrieve any document from a particular Review Zone. Review zone is identified by Review ID and Revision.

    Parameters:
    reviewId - Unique ID of the review. (Required Parameter)
    revision - Revision (Required Parameter)
    documentPath - Relative path of document in the review zone
    Returns:
    com.adobe.idp.Document
    Throws:
    RCAException - In case of any error while retrieving the document from review zone.


    [an error occurred while processing this directive] [an error occurred while processing this directive]