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 Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Approval approve​(com.atlassian.confluence.core.ContentEntityObject content, java.lang.String name, java.lang.String userName, java.lang.String password, java.lang.String comment)
      Approves the content.
      void assign​(com.atlassian.confluence.core.ContentEntityObject content, java.lang.String name, Assignee assignee, java.lang.String comment)
      Assigns the named approval on the given content
      Rejection reject​(com.atlassian.confluence.core.ContentEntityObject content, java.lang.String name, java.lang.String userName, java.lang.String password, java.lang.String comment)
      Rejects the content
      void unassign​(com.atlassian.confluence.core.ContentEntityObject content, java.lang.String name, java.lang.String assignee, java.lang.String comment)
      Unassigns the named approval on the given content
    • Method Detail

      • approve

        Approval approve​(com.atlassian.confluence.core.ContentEntityObject content,
                         java.lang.String name,
                         java.lang.String userName,
                         java.lang.String password,
                         java.lang.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
        Throws:
        WorkflowException
        Since:
        1.0
      • reject

        Rejection reject​(com.atlassian.confluence.core.ContentEntityObject content,
                         java.lang.String name,
                         java.lang.String userName,
                         java.lang.String password,
                         java.lang.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,
                    java.lang.String name,
                    Assignee assignee,
                    java.lang.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,
                      java.lang.String name,
                      java.lang.String assignee,
                      java.lang.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