Class ReviewManagementServiceImpl
- java.lang.Object
-
- com.adobe.aem.formsndocuments.rnc.ReviewManagementServiceImpl
-
- All Implemented Interfaces:
ReviewManagementService
@Service(ReviewManagementService.class) public class ReviewManagementServiceImpl extends java.lang.Object implements ReviewManagementService
TheReviewManagementServiceis the service which provides functionality to support Review Management.
-
-
Constructor Summary
Constructors Constructor Description ReviewManagementServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeginReview(java.lang.String reviewName, java.lang.String reviewDescription, java.lang.String deadline, java.lang.String[] reviewers, java.lang.String assetPath)Starts the review.voidcleanReview(java.lang.String assetPath, javax.jcr.Session currentSession, boolean updateReviewProperties)Cleans the review.voidendReview(java.lang.String assetPath)Ends the review.java.util.Map<java.lang.String,java.lang.String>fetchReviewInfo(ResourceResolver resourceResolver, java.lang.String assetPath)Returns all the information related to the ongoing review on the asset.ResourceResolvergetFnDServiceUserResourceResolver()This function returns the resource resolver for fd-service system user.booleanisUnderReview(ResourceResolver resourceResolver, java.lang.String assetPath)Checks if the asset is currently under review or notvoidupdateReview(java.lang.String assetPath, java.lang.String reviewDescription, java.lang.String deadline, java.lang.String[] reviewers)Updates the review.
-
-
-
Method Detail
-
isUnderReview
public boolean isUnderReview(ResourceResolver resourceResolver, java.lang.String assetPath) throws FormsNDocumentsException
Description copied from interface:ReviewManagementServiceChecks if the asset is currently under review or not- Specified by:
isUnderReviewin interfaceReviewManagementServiceassetPath- Asset to be checked if under review or not- Returns:
- true if the asset is under review else returns false
- Throws:
FormsNDocumentsException
-
fetchReviewInfo
public java.util.Map<java.lang.String,java.lang.String> fetchReviewInfo(ResourceResolver resourceResolver, java.lang.String assetPath) throws FormsNDocumentsException
Returns all the information related to the ongoing review on the asset.- Specified by:
fetchReviewInfoin interfaceReviewManagementServiceassetPath- Path to the node of the asset.- Returns:
- Map with keys being the attributes (for example reviewName, reviewInitiator, reviewDescription, reviewProjectName, reviewGroup, reviewDeadline, underReview) of the review and their respective values.
- Throws:
FormsNDocumentsException
-
beginReview
public void beginReview(java.lang.String reviewName, java.lang.String reviewDescription, java.lang.String deadline, java.lang.String[] reviewers, java.lang.String assetPath) throws FormsNDocumentsExceptionStarts the review. This method is responsible for creating and assigning appropriate tasks for the reviewers.- Specified by:
beginReviewin interfaceReviewManagementService- Parameters:
reviewName- Name of the review.reviewDescription- Description of the review.deadline- Deadline of the review.reviewers- Array of reviewers.assetPath- Asset to start review on.- Throws:
FormsNDocumentsException
-
endReview
public void endReview(java.lang.String assetPath) throws FormsNDocumentsExceptionEnds the review. This method is responsible for completing the review, that is it terminates all the active tasks assigned to the reviewers.- Specified by:
endReviewin interfaceReviewManagementService- Parameters:
assetPath- Asset on which the review needs to be ended.- Throws:
FormsNDocumentsException
-
updateReview
public void updateReview(java.lang.String assetPath, java.lang.String reviewDescription, java.lang.String deadline, java.lang.String[] reviewers) throws FormsNDocumentsExceptionUpdates the review. This method is responsible for updation of deadline, addition and removal of reviewers as per the new list of reviewers provided.- Specified by:
updateReviewin interfaceReviewManagementService- Parameters:
assetPath- Asset on which the review needs to be updated.reviewDescription- Description of the review.deadline- New deadline of the review.reviewers- New array of reviewers.- Throws:
FormsNDocumentsException
-
cleanReview
public void cleanReview(java.lang.String assetPath, javax.jcr.Session currentSession, boolean updateReviewProperties) throws FormsMgrExceptionDescription copied from interface:ReviewManagementServiceCleans the review. This method is responsible for clearing any left out or corrupted state.- Specified by:
cleanReviewin interfaceReviewManagementService- Parameters:
assetPath- Asset on which the review needs to be ended.currentSession- Session of initiator.updateReviewProperties- Whether review properties need to be updated in clean review call- Throws:
FormsMgrException
-
getFnDServiceUserResourceResolver
public ResourceResolver getFnDServiceUserResourceResolver()
Description copied from interface:ReviewManagementServiceThis function returns the resource resolver for fd-service system user.- Specified by:
getFnDServiceUserResourceResolverin interfaceReviewManagementService- Returns:
- fnd-service system user resource resolver
-
-