Package org.dspace.workflowbasic.service
Interface BasicWorkflowService
-
- All Superinterfaces:
WorkflowService<BasicWorkflowItem>
- All Known Implementing Classes:
BasicWorkflowServiceImpl
public interface BasicWorkflowService extends WorkflowService<BasicWorkflowItem>
Workflow state machine Notes: Determining item status from the database: When an item has not been submitted yet, it is in the user's personal workspace (there is a row in PersonalWorkspace pointing to it.) When an item is submitted and is somewhere in a workflow, it has a row in the WorkflowItem table pointing to it. The state of the workflow can be determined by looking at WorkflowItem.getState() When a submission is complete, the WorkflowItem pointing to the item is destroyed and the archive() method is called, which hooks the item up to the archive. Notification: When an item enters a state that requires notification, (WFSTATE_STEP1POOL, WFSTATE_STEP2POOL, WFSTATE_STEP3POOL,) the workflow needs to notify the appropriate groups that they have a pending task to claim. Revealing lists of approvers, editors, and reviewers. A method could be added to do this, but it isn't strictly necessary. (say public List getStateEPeople( WorkflowItem wi, int state ) could return people affected by the item's current state.
-
-
Field Summary
Fields Modifier and Type Field Description static intWFSTATE_ARCHIVEstatic intWFSTATE_STEP1static intWFSTATE_STEP1POOLstatic intWFSTATE_STEP2static intWFSTATE_STEP2POOLstatic intWFSTATE_STEP3static intWFSTATE_STEP3POOLstatic intWFSTATE_SUBMIT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadvance(Context context, BasicWorkflowItem workflowItem, 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 submissionbooleanadvance(Context context, BasicWorkflowItem workflowItem, 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 submissionvoidclaim(Context context, BasicWorkflowItem workflowItem, EPerson e)claim() claims a workflow task for an EPersonStringgetItemTitle(BasicWorkflowItem wi)get the title of the item in this workflowList<BasicWorkflowItem>getOwnedTasks(Context context, EPerson e)getOwnedTasks() returns a List of WorkflowItems containing the tasks claimed and owned by an EPerson.List<BasicWorkflowItem>getPooledTasks(Context context, EPerson e)getPooledTasks() returns a List of WorkflowItems an EPerson could claim (as a reviewer, etc.) for display on a user's MyDSpace page.StringgetSubmitterName(BasicWorkflowItem wi)get the name of the eperson who started this workflowintgetWorkflowID(String state)Translate symbolic name of workflow state into number.StringgetWorkflowText(int state)Get the text representing the given workflow statevoidnotifyOfCuration(Context c, BasicWorkflowItem wi, List<EPerson> ePeople, String taskName, String action, String message)voidunclaim(Context context, BasicWorkflowItem workflowItem, EPerson e)unclaim() returns an owned task/item to the pool-
Methods inherited from interface org.dspace.workflow.WorkflowService
abort, createWorkflowRoleGroup, deleteCollection, getEPersonDeleteConstraints, getFlywayMigrationLocations, getMyDSpaceLink, getWorkflowRoleGroup, sendWorkflowItemBackSubmission, start, startWithoutNotify
-
-
-
-
Field Detail
-
WFSTATE_SUBMIT
static final int WFSTATE_SUBMIT
- See Also:
- Constant Field Values
-
WFSTATE_STEP1POOL
static final int WFSTATE_STEP1POOL
- See Also:
- Constant Field Values
-
WFSTATE_STEP1
static final int WFSTATE_STEP1
- See Also:
- Constant Field Values
-
WFSTATE_STEP2POOL
static final int WFSTATE_STEP2POOL
- See Also:
- Constant Field Values
-
WFSTATE_STEP2
static final int WFSTATE_STEP2
- See Also:
- Constant Field Values
-
WFSTATE_STEP3POOL
static final int WFSTATE_STEP3POOL
- See Also:
- Constant Field Values
-
WFSTATE_STEP3
static final int WFSTATE_STEP3
- See Also:
- Constant Field Values
-
WFSTATE_ARCHIVE
static final int WFSTATE_ARCHIVE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getWorkflowID
int getWorkflowID(String state)
Translate symbolic name of workflow state into number. The name is case-insensitive. Returns -1 when name cannot be matched.- Parameters:
state- symbolic name of workflow state, must be one of the elements of workflowText array.- Returns:
- numeric workflow state or -1 for error.
-
getOwnedTasks
List<BasicWorkflowItem> getOwnedTasks(Context context, EPerson e) throws SQLException
getOwnedTasks() returns a List of WorkflowItems containing the tasks claimed and owned by an EPerson. The GUI displays this info on the MyDSpace page.- Parameters:
context- The relevant DSpace Context.e- The EPerson we want to fetch owned tasks for.- Returns:
- list of basic workflow items
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
getPooledTasks
List<BasicWorkflowItem> getPooledTasks(Context context, EPerson e) throws SQLException
getPooledTasks() returns a List of WorkflowItems an EPerson could claim (as a reviewer, etc.) for display on a user's MyDSpace page.- Parameters:
context- The relevant DSpace Context.e- The Eperson we want to fetch the pooled tasks for.- Returns:
- list of basic workflow items
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
claim
void claim(Context context, BasicWorkflowItem workflowItem, EPerson e) throws SQLException, IOException, AuthorizeException
claim() claims a workflow task for an EPerson- Parameters:
context- The relevant DSpace Context.workflowItem- WorkflowItem to do the claim one- The EPerson doing the claim- Throws:
SQLException- An exception that provides information on a database access error or other errors.IOException- A general class of exceptions produced by failed or interrupted I/O operations.AuthorizeException- Exception indicating the current user of the context does not have permission to perform a particular action.
-
advance
void advance(Context context, BasicWorkflowItem workflowItem, EPerson e) throws SQLException, IOException, AuthorizeException
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- Parameters:
context- The relevant DSpace Context.workflowItem- WorkflowItem do do the approval one- EPerson doing the approval- Throws:
SQLException- An exception that provides information on a database access error or other errors.IOException- A general class of exceptions produced by failed or interrupted I/O operations.AuthorizeException- Exception indicating the current user of the context does not have permission to perform a particular action.
-
advance
boolean advance(Context context, BasicWorkflowItem workflowItem, EPerson e, boolean curate, boolean record) throws SQLException, IOException, AuthorizeException
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- Parameters:
context- The relevant DSpace Context.workflowItem- WorkflowItem do do the approval one- EPerson doing the approvalcurate- boolean indicating whether curation tasks should be donerecord- boolean indicating whether to record action- Returns:
- true if the item was successfully archived
- Throws:
SQLException- An exception that provides information on a database access error or other errors.IOException- A general class of exceptions produced by failed or interrupted I/O operations.AuthorizeException- Exception indicating the current user of the context does not have permission to perform a particular action.
-
unclaim
void unclaim(Context context, BasicWorkflowItem workflowItem, EPerson e) throws SQLException, IOException, AuthorizeException
unclaim() returns an owned task/item to the pool- Parameters:
context- ContextworkflowItem- WorkflowItem to operate one- EPerson doing the operation- Throws:
SQLException- An exception that provides information on a database access error or other errors.IOException- A general class of exceptions produced by failed or interrupted I/O operations.AuthorizeException- Exception indicating the current user of the context does not have permission to perform a particular action.
-
getWorkflowText
String getWorkflowText(int state)
Get the text representing the given workflow state- Parameters:
state- the workflow state- Returns:
- the text representation
-
notifyOfCuration
void notifyOfCuration(Context c, BasicWorkflowItem wi, List<EPerson> ePeople, String taskName, String action, String message) throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getItemTitle
String getItemTitle(BasicWorkflowItem wi) throws SQLException
get the title of the item in this workflow- Parameters:
wi- the workflow item object- Returns:
- item title
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
getSubmitterName
String getSubmitterName(BasicWorkflowItem wi) throws SQLException
get the name of the eperson who started this workflow- Parameters:
wi- the workflow item- Returns:
- submitter's name
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
-