Package com.comalatech.workflow
Interface ApprovalService
-
public interface ApprovalServiceProvides 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 Approvalapprove(com.atlassian.confluence.core.ContentEntityObject content, String name, String userName, String password, String comment)Approves the content.voidassign(com.atlassian.confluence.core.ContentEntityObject content, String name, Assignee assignee, String comment)Assigns the named approval on the given contentRejectionreject(com.atlassian.confluence.core.ContentEntityObject content, String name, String userName, String password, String comment)Rejects the contentvoidunassign(com.atlassian.confluence.core.ContentEntityObject content, String name, String assignee, String comment)Unassigns the named approval on the given content
-
-
-
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 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 WorkflowExceptionAssigns 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 WorkflowExceptionUnassigns 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
-
-