Package org.dspace.workflow
Interface WorkflowService<T extends WorkflowItem>
-
- Type Parameters:
T- some implementation of workflow item.
- All Known Subinterfaces:
XmlWorkflowService
- All Known Implementing Classes:
XmlWorkflowServiceImpl
public interface WorkflowService<T extends WorkflowItem>Service interface class for the WorkflowService framework. All WorkflowServices service classes should implement this class since it offers some basic methods which all Workflows are required to have.- Author:
- kevinvandevelde at atmire.com
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WorkspaceItemabort(Context c, T 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 PersonalWorkspaceGroupcreateWorkflowRoleGroup(Context context, Collection collection, String roleName)This method will create the workflowRoleGroup for a collection and the given rolenamevoiddeleteCollection(Context context, Collection collection)voiddeleteWorkflowByWorkflowItem(Context c, T wi, EPerson e)Deletes workflow task item in correct order.List<String>getEPersonDeleteConstraints(Context context, EPerson ePerson)List<String>getFlywayMigrationLocations()StringgetMyDSpaceLink()GroupgetWorkflowRoleGroup(Context context, Collection collection, String roleName, Group roleGroup)WorkspaceItemsendWorkflowItemBackSubmission(Context c, T workflowItem, EPerson e, String provenance, String rejection_message)Tstart(Context context, WorkspaceItem wsi)Move an Item from a submitter's workspace into a collection's workflow - in a single transaction do away with the WorkspaceItem and turn it into a WorkflowItem.TstartWithoutNotify(Context c, WorkspaceItem wsi)Start the workflow normally, but disable notifications for the first workflow step.
-
-
-
Method Detail
-
start
T start(Context context, WorkspaceItem wsi) throws SQLException, AuthorizeException, IOException, WorkflowException
Move an Item from a submitter's workspace into a collection's workflow - in a single transaction do away with the WorkspaceItem and turn it into a WorkflowItem. The WorkspaceItem which wraps the submitted Item is deleted.- Parameters:
context- The relevant DSpace Context.wsi- The WorkspaceItem to convert to a workflow item- Returns:
- The resulting workflow item
- Throws:
SQLException- An exception that provides information on a database access error or other errors.AuthorizeException- Exception indicating the current user of the context does not have permission to perform a particular action.IOException- A general class of exceptions produced by failed or interrupted I/O operations.WorkflowException- if workflow error
-
startWithoutNotify
T startWithoutNotify(Context c, WorkspaceItem wsi) throws SQLException, AuthorizeException, IOException, WorkflowException
Start the workflow normally, but disable notifications for the first workflow step. Subsequent notifications happen normally. Useful for large imports.- Parameters:
c- The relevant DSpace Context.wsi- workspace item- Returns:
- the resulting workflow item.
- Throws:
SQLException- An exception that provides information on a database access error or other errors.AuthorizeException- Exception indicating the current user of the context does not have permission to perform a particular action.IOException- A general class of exceptions produced by failed or interrupted I/O operations.WorkflowException- if workflow error
-
abort
WorkspaceItem abort(Context c, T wi, EPerson e) throws SQLException, AuthorizeException, IOException
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- Parameters:
c- The relevant DSpace Context.wi- WorkflowItem to operate one- EPerson doing the operation- Returns:
- workspace item returned to workspace
- Throws:
SQLException- An exception that provides information on a database access error or other errors.AuthorizeException- Exception indicating the current user of the context does not have permission to perform a particular action.IOException- A general class of exceptions produced by failed or interrupted I/O operations.
-
deleteWorkflowByWorkflowItem
void deleteWorkflowByWorkflowItem(Context c, T wi, EPerson e) throws SQLException, AuthorizeException, IOException
Deletes workflow task item in correct order.- Parameters:
c- The relevant DSpace Context.wi- The WorkflowItem that shall be deleted.e- Admin that deletes this workflow task and item (for logging- Throws:
SQLException- An exception that provides information on a database access error or other errors.AuthorizeException- Exception indicating the current user of the context does not have permission to perform a particular action.IOException- A general class of exceptions produced by failed or interrupted I/O operations.
-
sendWorkflowItemBackSubmission
WorkspaceItem sendWorkflowItemBackSubmission(Context c, T workflowItem, EPerson e, String provenance, String rejection_message) throws SQLException, AuthorizeException, IOException
-
getMyDSpaceLink
String getMyDSpaceLink()
-
deleteCollection
void deleteCollection(Context context, Collection collection) throws SQLException, IOException, AuthorizeException
-
getEPersonDeleteConstraints
List<String> getEPersonDeleteConstraints(Context context, EPerson ePerson) throws SQLException
- Throws:
SQLException
-
getWorkflowRoleGroup
Group getWorkflowRoleGroup(Context context, Collection collection, String roleName, Group roleGroup) throws SQLException, IOException, WorkflowConfigurationException, AuthorizeException, WorkflowException
-
createWorkflowRoleGroup
Group createWorkflowRoleGroup(Context context, Collection collection, String roleName) throws AuthorizeException, SQLException, IOException, WorkflowConfigurationException
This method will create the workflowRoleGroup for a collection and the given rolename- Parameters:
context- The relevant DSpace contextcollection- The collectionroleName- The rolename- Returns:
- The created Group
- Throws:
AuthorizeException- If something goes wrongSQLException- If something goes wrongIOException- If something goes wrongWorkflowConfigurationException- If something goes wrong
-
-