Package org.dspace.xmlworkflow.service
Interface XmlWorkflowService
-
- All Superinterfaces:
WorkflowService<XmlWorkflowItem>
- All Known Implementing Classes:
XmlWorkflowServiceImpl
public interface XmlWorkflowService extends WorkflowService<XmlWorkflowItem>
When an item is submitted and is somewhere in a workflow, it has a row in the WorkflowItem table pointing to it. Once the item has completed the workflow it will be archived.- Author:
- Bram De Schouwer (bram.deschouwer at dot com), Kevin Van de Velde (kevin at atmire dot com), Ben Bosman (ben at atmire dot com), Mark Diggory (markd at atmire dot com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidalertUsersOnTaskActivation(Context c, XmlWorkflowItem wfi, String emailTemplate, List<EPerson> epa, String... arguments)Send an email to some addresses, concerning a WorkflowItem, using a given template.voidcreateOwnedTask(Context context, XmlWorkflowItem wi, Step step, WorkflowActionConfig action, EPerson e)Create a claim on a task action for a given EPerson.voidcreatePoolTasks(Context context, XmlWorkflowItem wi, RoleMembers assignees, Step step, WorkflowActionConfig action)Create the task pool for a given item and workflow step.voiddeleteAllPooledTasks(Context c, XmlWorkflowItem wi)Deletes all pooled tasks from a WorkflowItem.voiddeleteAllTasks(Context context, XmlWorkflowItem wi)Deletes all tasks from a WorkflowItem.voiddeleteClaimedTask(Context c, XmlWorkflowItem wi, ClaimedTask task)Deletes a completed task of a step.voiddeletePooledTask(Context context, XmlWorkflowItem wi, PoolTask task)Deletes a pooled (uncompleted) task from the task pool of a step.WorkflowActionConfigdoState(Context c, EPerson user, javax.servlet.http.HttpServletRequest request, int workflowItemId, Workflow workflow, WorkflowActionConfig currentActionConfig)Executes a workflow action and returns the next.StringgetEPersonName(EPerson ePerson)Get a description of an EPerson.voidgrantUserAllItemPolicies(Context context, Item item, EPerson epa, String actionType)Grant a user full powers over an Item.voidnotifyOfCuration(Context c, XmlWorkflowItem wi, List<EPerson> ePeople, String taskName, String action, String message)Send email to interested parties when curation tasks run.WorkflowActionConfigprocessOutcome(Context c, EPerson user, Workflow workflow, Step currentStep, WorkflowActionConfig currentActionConfig, ActionResult currentOutcome, XmlWorkflowItem wfi, boolean enteredNewStep)Select the next action based on the outcome of a current action.voidremoveUserItemPolicies(Context context, Item item, EPerson e)-
Methods inherited from interface org.dspace.workflow.WorkflowService
abort, createWorkflowRoleGroup, deleteCollection, deleteWorkflowByWorkflowItem, getEPersonDeleteConstraints, getFlywayMigrationLocations, getMyDSpaceLink, getWorkflowRoleGroup, sendWorkflowItemBackSubmission, start, startWithoutNotify
-
-
-
-
Method Detail
-
alertUsersOnTaskActivation
void alertUsersOnTaskActivation(Context c, XmlWorkflowItem wfi, String emailTemplate, List<EPerson> epa, String... arguments) throws IOException, SQLException, javax.mail.MessagingException
Send an email to some addresses, concerning a WorkflowItem, using a given template.- Parameters:
c- current DSpace session.wfi- the workflow item.emailTemplate- name of the message template.epa- users to receive the message.arguments- to be substituted into the message template.- Throws:
IOException- passed through.SQLException- passed through.javax.mail.MessagingException- passed through.
-
doState
WorkflowActionConfig doState(Context c, EPerson user, javax.servlet.http.HttpServletRequest request, int workflowItemId, Workflow workflow, WorkflowActionConfig currentActionConfig) throws SQLException, AuthorizeException, IOException, javax.mail.MessagingException, WorkflowException
Executes a workflow action and returns the next.- Parameters:
c- current DSpace session.user- user attempting the action.request- the current request.workflowItemId- the workflow item on which to take the action.workflow- the workflow holding the item.currentActionConfig- the requested action.- Returns:
- the next action to be executed.
- Throws:
SQLException- passed through.AuthorizeException- if the user may not take this action.IOException- passed through.javax.mail.MessagingException- unused.WorkflowException- if the action could not be executed.
-
processOutcome
WorkflowActionConfig processOutcome(Context c, EPerson user, Workflow workflow, Step currentStep, WorkflowActionConfig currentActionConfig, ActionResult currentOutcome, XmlWorkflowItem wfi, boolean enteredNewStep) throws IOException, AuthorizeException, SQLException, WorkflowException
Select the next action based on the outcome of a current action.- Parameters:
c- session context.user- current user.workflow- item is in this workflow.currentStep- workflow step being executed.currentActionConfig- describes the current step's action.currentOutcome- the result of executing the current step (accept/reject/etc).wfi- the Item being processed through workflow.enteredNewStep- is the Item advancing to a new workflow step?- Returns:
- the next step's action.
- Throws:
SQLException- passed through.AuthorizeException- passed through.IOException- passed through.WorkflowException- if the current step's outcome is unrecognized.
-
deleteAllTasks
void deleteAllTasks(Context context, XmlWorkflowItem wi) throws SQLException, AuthorizeException
Deletes all tasks from a WorkflowItem.- Parameters:
context- current DSpace sessionwi- the workflow item for which we are to delete the tasks- Throws:
SQLException- passed through.AuthorizeException- passed through.
-
deleteAllPooledTasks
void deleteAllPooledTasks(Context c, XmlWorkflowItem wi) throws SQLException, AuthorizeException
Deletes all pooled tasks from a WorkflowItem.- Parameters:
c- current DSpace session.wi- the workflow item from which we are to delete the tasks.- Throws:
SQLException- passed through.AuthorizeException- passed through.
-
deletePooledTask
void deletePooledTask(Context context, XmlWorkflowItem wi, PoolTask task) throws SQLException, AuthorizeException
Deletes a pooled (uncompleted) task from the task pool of a step.- Parameters:
context- current DSpace session.wi- the workflow item associated with the task.task- the task to be removed.- Throws:
SQLException- passed through.AuthorizeException- passed through.
-
deleteClaimedTask
void deleteClaimedTask(Context c, XmlWorkflowItem wi, ClaimedTask task) throws SQLException, AuthorizeException
Deletes a completed task of a step.- Parameters:
c- current DSpace session.wi- the workflow item associated with the task.task- the task to be removed.- Throws:
SQLException- passed through.AuthorizeException- passed through.
-
createPoolTasks
void createPoolTasks(Context context, XmlWorkflowItem wi, RoleMembers assignees, Step step, WorkflowActionConfig action) throws SQLException, AuthorizeException
Create the task pool for a given item and workflow step.- Parameters:
context-wi- Create tasks for this item.assignees- Role members for this step.step- Create tasks for this step.action-- Throws:
SQLException- passed through.AuthorizeException- passed through.
-
createOwnedTask
void createOwnedTask(Context context, XmlWorkflowItem wi, Step step, WorkflowActionConfig action, EPerson e) throws SQLException, AuthorizeException
Create a claim on a task action for a given EPerson.- Parameters:
context- current DSpace session.wi- Claim tasks of this item.step- Claim tasks from this step.action- the action being claimed.e- Claimant.- Throws:
SQLException- passed through.AuthorizeException- passed through.
-
grantUserAllItemPolicies
void grantUserAllItemPolicies(Context context, Item item, EPerson epa, String actionType) throws AuthorizeException, SQLException
Grant a user full powers over an Item.- Parameters:
context- current DSpace session.item- grant powers over this item.epa- user to whom powers are granted.actionType- workflow, submission, etc.- Throws:
AuthorizeException- passed through.SQLException- passed through.
-
removeUserItemPolicies
void removeUserItemPolicies(Context context, Item item, EPerson e) throws SQLException, AuthorizeException
- Throws:
SQLExceptionAuthorizeException
-
notifyOfCuration
void notifyOfCuration(Context c, XmlWorkflowItem wi, List<EPerson> ePeople, String taskName, String action, String message) throws SQLException, IOException
Send email to interested parties when curation tasks run.- Parameters:
c- session context.wi- the item being curated.ePeople- the interested parties.taskName- the task that has been run.action- the action indicated by the task (reject, approve, etc.)message- anything the code wants to say about the task.- Throws:
SQLException- passed through.IOException- passed through.
-
-