Package com.comalatech.workflow
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:
-
Method Summary
Modifier and TypeMethodDescriptionapprove
(com.atlassian.confluence.core.ContentEntityObject content, String name, String userName, String password, String comment) Approves the content.void
assign
(com.atlassian.confluence.core.ContentEntityObject content, String name, Assignee assignee, String comment) Assigns the named approval on the given contentreject
(com.atlassian.confluence.core.ContentEntityObject content, String name, String userName, String password, String comment) Rejects the contentvoid
unassign
(com.atlassian.confluence.core.ContentEntityObject content, String name, String assignee, String comment) Unassigns the named approval on the given content
-
Method Details
-
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 objectname
- the name of the approval. It must be valid for the current StateuserName
- the name of the user approvingpassword
- required if the approval requires user+password signaturecomment
- 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 objectname
- the name of the rejection. It must be valid for the current StateuserName
- the name of the user rejectingpassword
- required if the approval requires user+password signaturecomment
- 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 objectname
- the name of the approval. It must be valid for the current Stateassignee
- the assignee datacomment
- 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 objectname
- the name of the approval. It must be valid for the current Stateassignee
- the name of the assignee- Throws:
WorkflowException
- Since:
- 1.1
-