Class ReviewManagementServiceImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void beginReview​(java.lang.String reviewName, java.lang.String reviewDescription, java.lang.String deadline, java.lang.String[] reviewers, java.lang.String assetPath)
      Starts the review.
      void cleanReview​(java.lang.String assetPath, javax.jcr.Session currentSession, boolean updateReviewProperties)
      Cleans the review.
      void endReview​(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.
      ResourceResolver getFnDServiceUserResourceResolver()
      This function returns the resource resolver for fd-service system user.
      boolean isUnderReview​(ResourceResolver resourceResolver, java.lang.String assetPath)
      Checks if the asset is currently under review or not
      void updateReview​(java.lang.String assetPath, java.lang.String reviewDescription, java.lang.String deadline, java.lang.String[] reviewers)
      Updates the review.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ReviewManagementServiceImpl

        public ReviewManagementServiceImpl()
    • Method Detail

      • 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:
        fetchReviewInfo in interface ReviewManagementService
        assetPath - 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 FormsNDocumentsException
        Starts the review. This method is responsible for creating and assigning appropriate tasks for the reviewers.
        Specified by:
        beginReview in interface ReviewManagementService
        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 FormsNDocumentsException
        Ends the review. This method is responsible for completing the review, that is it terminates all the active tasks assigned to the reviewers.
        Specified by:
        endReview in interface ReviewManagementService
        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 FormsNDocumentsException
        Updates 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:
        updateReview in interface ReviewManagementService
        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 FormsMgrException
        Description copied from interface: ReviewManagementService
        Cleans the review. This method is responsible for clearing any left out or corrupted state.
        Specified by:
        cleanReview in interface ReviewManagementService
        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