Interface ApprovalService


  • public interface ApprovalService
    Provides services for approving and rejecting content. The named approvals must have already being defined in the workflow associated to the content, and it must be valid in the current state
    Since:
    1.0
    See Also:
    StateService
    • Method Detail

      • approve

        Approval approve​(com.atlassian.confluence.core.ContentEntityObject content,
                         String name,
                         String userName,
                         String password,
                         String comment)
                  throws WorkflowException
        Approves the content.
        Parameters:
        content - the content object
        name - the name of the approval. It must be valid for the current State
        userName - the name of the user approving
        password - required if the approval requires user+password signature
        comment - a comment to be recorded with the approval @return the Approval record
        Returns:
        the Approval record
        Throws:
        WorkflowException
        Since:
        1.0
      • reject

        Rejection reject​(com.atlassian.confluence.core.ContentEntityObject content,
                         String name,
                         String userName,
                         String password,
                         String comment)
                  throws WorkflowException
        Rejects the content
        Parameters:
        content - the content object
        name - the name of the rejection. It must be valid for the current State
        userName - the name of the user rejecting
        password - required if the approval requires user+password signature
        comment - a comment to be recorded with the rejection
        Returns:
        the Rejection record
        Throws:
        WorkflowException
        Since:
        1.0
      • assign

        void assign​(com.atlassian.confluence.core.ContentEntityObject content,
                    String name,
                    Assignee assignee,
                    String comment)
             throws WorkflowException
        Assigns the named approval on the given content
        Parameters:
        content - the content object
        name - the name of the approval. It must be valid for the current State
        assignee - the assignee data
        comment - a comment to be send with the assignment
        Throws:
        WorkflowException
        Since:
        1.1
      • unassign

        void unassign​(com.atlassian.confluence.core.ContentEntityObject content,
                      String name,
                      String assignee,
                      String comment)
               throws WorkflowException
        Unassigns the named approval on the given content
        Parameters:
        content - the content object
        name - the name of the approval. It must be valid for the current State
        assignee - the name of the assignee
        Throws:
        WorkflowException
        Since:
        1.1