public class WorkflowManager extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
WFSTATE_ARCHIVE |
static int |
WFSTATE_STEP1 |
static int |
WFSTATE_STEP1POOL |
static int |
WFSTATE_STEP2 |
static int |
WFSTATE_STEP2POOL |
static int |
WFSTATE_STEP3 |
static int |
WFSTATE_STEP3POOL |
static int |
WFSTATE_SUBMIT |
| Constructor and Description |
|---|
WorkflowManager() |
| Modifier and Type | Method and Description |
|---|---|
static void |
abort(Context c,
WorkflowItem wi,
EPerson e)
abort() aborts a workflow, completely deleting it (administrator do this)
(it will basically do a reject from any state - the item ends up back in
the user's PersonalWorkspace
|
static void |
advance(Context c,
WorkflowItem wi,
EPerson e)
advance() sends an item forward in the workflow (reviewers,
approvers, and editors all do an 'approve' to move the item forward) if
the item arrives at the submit state, then remove the WorkflowItem and
call the archive() method to put it in the archive, and email notify the
submitter of a successful submission
|
static boolean |
advance(Context c,
WorkflowItem wi,
EPerson e,
boolean curate,
boolean record)
advance() sends an item forward in the workflow (reviewers,
approvers, and editors all do an 'approve' to move the item forward) if
the item arrives at the submit state, then remove the WorkflowItem and
call the archive() method to put it in the archive, and email notify the
submitter of a successful submission
|
static void |
claim(Context c,
WorkflowItem wi,
EPerson e)
claim() claims a workflow task for an EPerson
|
static String |
getItemTitle(WorkflowItem wi)
get the title of the item in this workflow
|
static List<WorkflowItem> |
getOwnedTasks(Context c,
EPerson e)
getOwnedTasks() returns a List of WorkflowItems containing the tasks
claimed and owned by an EPerson.
|
static List<WorkflowItem> |
getPooledTasks(Context c,
EPerson e)
getPooledTasks() returns a List of WorkflowItems an EPerson could claim
(as a reviewer, etc.) for display on a user's MyDSpace page.
|
static String |
getSubmitterName(WorkflowItem wi)
get the name of the eperson who started this workflow
|
static int |
getWorkflowID(String state)
Translate symbolic name of workflow state into number.
|
static String |
getWorkflowText(int state)
Get the text representing the given workflow state
|
static void |
notifyOfCuration(Context c,
WorkflowItem wi,
EPerson[] epa,
String taskName,
String action,
String message) |
static WorkspaceItem |
reject(Context c,
WorkflowItem wi,
EPerson e,
String rejection_message)
rejects an item - rejection means undoing a submit - WorkspaceItem is
created, and the WorkflowItem is removed, user is emailed
rejection_message.
|
static WorkflowItem |
start(Context c,
WorkspaceItem wsi)
startWorkflow() begins a workflow - in a single transaction do away with
the PersonalWorkspace entry and turn it into a WorkflowItem.
|
static WorkflowItem |
startWithoutNotify(Context c,
WorkspaceItem wsi)
startWithoutNotify() starts the workflow normally, but disables
notifications (useful for large imports,) for the first workflow step -
subsequent notifications happen normally
|
static void |
unclaim(Context c,
WorkflowItem wi,
EPerson e)
unclaim() returns an owned task/item to the pool
|
public static final int WFSTATE_SUBMIT
public static final int WFSTATE_STEP1POOL
public static final int WFSTATE_STEP1
public static final int WFSTATE_STEP2POOL
public static final int WFSTATE_STEP2
public static final int WFSTATE_STEP3POOL
public static final int WFSTATE_STEP3
public static final int WFSTATE_ARCHIVE
public static int getWorkflowID(String state)
state - symbolic name of workflow state, must be one of
the elements of workflowText array.public static WorkflowItem start(Context c, WorkspaceItem wsi) throws SQLException, AuthorizeException, IOException
c - Contextwsi - The WorkspaceItem to convert to a workflow itemSQLExceptionAuthorizeExceptionIOExceptionpublic static WorkflowItem startWithoutNotify(Context c, WorkspaceItem wsi) throws SQLException, AuthorizeException, IOException
public static List<WorkflowItem> getOwnedTasks(Context c, EPerson e) throws SQLException
e - The EPerson we want to fetch owned tasks for.SQLExceptionpublic static List<WorkflowItem> getPooledTasks(Context c, EPerson e) throws SQLException
e - The Eperson we want to fetch the pooled tasks for.SQLExceptionpublic static void claim(Context c, WorkflowItem wi, EPerson e) throws SQLException, IOException, AuthorizeException
wi - WorkflowItem to do the claim one - The EPerson doing the claimSQLExceptionIOExceptionAuthorizeExceptionpublic static void advance(Context c, WorkflowItem wi, EPerson e) throws SQLException, IOException, AuthorizeException
c - Contextwi - WorkflowItem do do the approval one - EPerson doing the approvalSQLExceptionIOExceptionAuthorizeExceptionpublic static boolean advance(Context c, WorkflowItem wi, EPerson e, boolean curate, boolean record) throws SQLException, IOException, AuthorizeException
c - Contextwi - WorkflowItem do do the approval one - EPerson doing the approvalcurate - boolean indicating whether curation tasks should be donerecord - boolean indicating whether to record actionSQLExceptionIOExceptionAuthorizeExceptionpublic static void unclaim(Context c, WorkflowItem wi, EPerson e) throws SQLException, IOException, AuthorizeException
c - Contextwi - WorkflowItem to operate one - EPerson doing the operationSQLExceptionIOExceptionAuthorizeExceptionpublic static void abort(Context c, WorkflowItem wi, EPerson e) throws SQLException, AuthorizeException, IOException
c - Contextwi - WorkflowItem to operate one - EPerson doing the operationSQLExceptionAuthorizeExceptionIOExceptionpublic static String getWorkflowText(int state)
state - the workflow statepublic static WorkspaceItem reject(Context c, WorkflowItem wi, EPerson e, String rejection_message) throws SQLException, AuthorizeException, IOException
c - Contextwi - WorkflowItem to operate one - EPerson doing the operationrejection_message - message to email to userSQLExceptionAuthorizeExceptionIOExceptionpublic static void notifyOfCuration(Context c, WorkflowItem wi, EPerson[] epa, String taskName, String action, String message) throws SQLException, IOException
SQLExceptionIOExceptionpublic static String getItemTitle(WorkflowItem wi) throws SQLException
wi - the workflow item objectSQLExceptionpublic static String getSubmitterName(WorkflowItem wi) throws SQLException
wi - the workflow itemSQLExceptionCopyright © 2014 DuraSpace. All Rights Reserved.