
com.adobe.aem.formsndocuments.rnc.ReviewManagementService Maven / Gradle / Ivy
/***************************************************************************
* ADOBE CONFIDENTIAL
* ___________________
*
* Copyright 2013 Adobe Systems Incorporated
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and may be covered by U.S. and Foreign Patents,
* patents in process, and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
**************************************************************************/
package com.adobe.aem.formsndocuments.rnc;
import java.util.Map;
import javax.jcr.Session;
import com.adobe.aem.formsndocuments.exception.FormsNDocumentsException;
import com.adobe.aemforms.fm.exception.FormsMgrException;
import org.apache.sling.api.resource.ResourceResolver;
/**
* Interface used by Review and Commenting.
*
* @author sakarora
*
*/
public interface ReviewManagementService {
/**
* Returns all the information related to the ongoing review on the asset.
*
* @param resourceResolver
* @param assetPath
* Path to the node of the asset.
* @return Map with keys being the attributes (for example reviewName,
* reviewInitiator, reviewDescription, reviewProjectName,
* reviewGroup, reviewDeadline, underReview) of the review and their
* respective values.
* @throws FormsMgrException
*/
public Map fetchReviewInfo(ResourceResolver resourceResolver, String assetPath)
throws FormsMgrException;
/**
* Checks if the asset is currently under review or not
* @param resourceResolver
* @param assetPath
* Asset to be checked if under review or not
* @return true if the asset is under review else returns false
* @throws FormsNDocumentsException
*/
public boolean isUnderReview(ResourceResolver resourceResolver, String assetPath)
throws FormsNDocumentsException;
/**
* Starts the review. This method is responsible for creating and assigning
* appropriate tasks for the reviewers.
*
* @param reviewName
* Name of the review.
* @param reviewDescription
* Description of the review.
* @param deadline
* Deadline of the review.
* @param reviewers
* Array of reviewers.
* @param assetPath
* Asset to start review on.
* @throws FormsMgrException
*/
public void beginReview(String reviewName, String reviewDescription,
String deadline, String[] reviewers, String assetPath)
throws FormsMgrException;
/**
* Ends the review. This method is responsible for completing the review,
* that is it terminates all the active tasks assigned to the reviewers.
*
* @param assetPath
* Asset on which the review needs to be ended.
* @throws FormsMgrException
*/
public void endReview(String assetPath) throws FormsMgrException;
/**
* Updates the review. This method is responsible for updation of deadline,
* addition and removal of reviewers as per the new list of reviewers
* provided.
*
* @param assetPath
* Asset on which the review needs to be updated.
* @param reviewDescription
* Description of the review.
* @param deadline
* New deadline of the review.
* @param reviewers
* New array of reviewers.
* @throws FormsMgrException
*/
public void updateReview(String assetPath, String reviewDescription,
String deadline, String[] reviewers) throws FormsMgrException;
/**
* Cleans the review. This method is responsible for clearing any left out
* or corrupted state.
*
* @param assetPath
* Asset on which the review needs to be ended.
* @param session
* Session of initiator.
* @param updateReviewProperties
* Whether review properties need to be updated in clean review
* call
* @throws FormsMgrException
*/
public void cleanReview(String assetPath, Session session,
boolean updateReviewProperties) throws FormsMgrException;
/**
* This function returns the resource resolver for fd-service system user.
*
* @return fnd-service system user resource resolver
*/
public ResourceResolver getFnDServiceUserResourceResolver();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy