Package org.dspace.workflow
Interface WorkflowService<T extends WorkflowItem>
-
- Type Parameters:
T- some implementation of workflow item.
- All Known Subinterfaces:
BasicWorkflowService,XmlWorkflowService
- All Known Implementing Classes:
BasicWorkflowServiceImpl,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)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)startWorkflow() begins a workflow - in a single transaction do away with the PersonalWorkspace entry and turn it into a WorkflowItem.TstartWithoutNotify(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
-
-
-
Method Detail
-
start
T start(Context context, WorkspaceItem wsi) throws SQLException, AuthorizeException, IOException, WorkflowException
startWorkflow() begins a workflow - in a single transaction do away with the PersonalWorkspace entry and turn it into a WorkflowItem.- 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
startWithoutNotify() starts the workflow normally, but disables notifications (useful for large imports,) for the first workflow step - subsequent notifications happen normally- 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.
-
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
-
-