public class FlowUtils extends Object
| Constructor and Description |
|---|
FlowUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
authorizeWorkflowItem(Context context,
String workflowItemId)
Verifies if the currently logged in user has proper rights to perform the workflow task on the item
|
static WorkflowItem |
findWorkflow(Context context,
String inProgressSubmissionID)
Return the workflow identified by the given id, the id should be
prepended with the character S to signify that it is a workflow
instead of a workspace.
|
static boolean |
processApproveTask(Context context,
String id)
Update the provided workflowItem to advance to the next workflow
step.
|
static void |
processClaimTask(Context context,
String id)
Claim this task from the pool of unclaimed task so that this user may
perform the task by either approving or rejecting it.
|
static String |
processRejectTask(Context context,
String id,
org.apache.cocoon.environment.Request request)
Reject the given task for the given reason.
|
static void |
processUnclaimTask(Context context,
String id)
Return the given task back to the pool of unclaimed tasks for another user
to select and perform.
|
public static boolean processApproveTask(Context context, String id) throws SQLException, UIException, javax.servlet.ServletException, AuthorizeException, IOException
context - The current DSpace contentid - The unique ID of the current workflowSQLExceptionUIExceptionjavax.servlet.ServletExceptionAuthorizeExceptionIOExceptionpublic static void processUnclaimTask(Context context, String id) throws SQLException, UIException, javax.servlet.ServletException, AuthorizeException, IOException
context - The current DSpace contentid - The unique ID of the current workflowSQLExceptionUIExceptionjavax.servlet.ServletExceptionAuthorizeExceptionIOExceptionpublic static void processClaimTask(Context context, String id) throws SQLException, UIException, javax.servlet.ServletException, AuthorizeException, IOException
context - The current DSpace contentid - The unique ID of the current workflowSQLExceptionUIExceptionjavax.servlet.ServletExceptionAuthorizeExceptionIOExceptionpublic static void authorizeWorkflowItem(Context context, String workflowItemId) throws AuthorizeException, SQLException
context - the current dspace contextworkflowItemId - the identifier of the workflow itemAuthorizeException - thrown if the user doesn't have sufficient rights to perform the task at handSQLException - is thrown when something is wrong with the databasepublic static String processRejectTask(Context context, String id, org.apache.cocoon.environment.Request request) throws SQLException, UIException, javax.servlet.ServletException, AuthorizeException, IOException
context - The current DSpace contentid - The unique ID of the current workflowrequest - The current request objectSQLExceptionUIExceptionjavax.servlet.ServletExceptionAuthorizeExceptionIOExceptionpublic static WorkflowItem findWorkflow(Context context, String inProgressSubmissionID) throws SQLException, AuthorizeException, IOException
context - inProgressSubmissionID - SQLExceptionAuthorizeExceptionIOExceptionCopyright © 2016 DuraSpace. All Rights Reserved.