public class XmlWorkflowServiceImpl extends Object implements XmlWorkflowService
| Modifier and Type | Field and Description |
|---|---|
protected AuthorizeService |
authorizeService |
protected BitstreamFormatService |
bitstreamFormatService |
protected BitstreamService |
bitstreamService |
protected BundleService |
bundleService |
protected ClaimedTaskService |
claimedTaskService |
protected CollectionRoleService |
collectionRoleService |
protected GroupService |
groupService |
protected HandleService |
handleService |
protected InstallItemService |
installItemService |
protected ItemService |
itemService |
protected Map<UUID,Boolean> |
noEMail |
protected PoolTaskService |
poolTaskService |
protected WorkflowItemRoleService |
workflowItemRoleService |
protected WorkflowRequirementsService |
workflowRequirementsService |
protected WorkspaceItemService |
workspaceItemService |
protected XmlWorkflowFactory |
xmlWorkflowFactory |
protected XmlWorkflowItemService |
xmlWorkflowItemService |
| Modifier | Constructor and Description |
|---|---|
protected |
XmlWorkflowServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
WorkspaceItem |
abort(Context c,
XmlWorkflowItem 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
|
protected void |
activateFirstStep(Context context,
Workflow wf,
Step firstStep,
XmlWorkflowItem wfi) |
protected void |
addGroupPolicyToItem(Context context,
Item item,
int action,
Group group,
String policyType) |
protected void |
addPolicyToItem(Context context,
Item item,
int action,
EPerson epa,
String policyType) |
void |
alertUsersOnTaskActivation(Context c,
XmlWorkflowItem wfi,
String emailTemplate,
List<EPerson> epa,
String... arguments) |
protected Item |
archive(Context context,
XmlWorkflowItem wfi)
Commit the contained item to the main archive.
|
void |
createOwnedTask(Context context,
XmlWorkflowItem wi,
Step step,
WorkflowActionConfig action,
EPerson e) |
void |
createPoolTasks(Context context,
XmlWorkflowItem wi,
RoleMembers assignees,
Step step,
WorkflowActionConfig action) |
void |
deleteAllPooledTasks(Context context,
XmlWorkflowItem wi) |
void |
deleteAllTasks(Context context,
XmlWorkflowItem wi)
Deletes all tasks from this workflowflowitem
|
void |
deleteClaimedTask(Context c,
XmlWorkflowItem wi,
ClaimedTask task) |
void |
deleteCollection(Context context,
Collection collection) |
void |
deletePooledTask(Context context,
XmlWorkflowItem wi,
PoolTask task) |
WorkflowActionConfig |
doState(Context c,
EPerson user,
javax.servlet.http.HttpServletRequest request,
int workflowItemId,
Workflow workflow,
WorkflowActionConfig currentActionConfig) |
List<String> |
getEPersonDeleteConstraints(Context context,
EPerson ePerson) |
String |
getEPersonName(EPerson ePerson) |
List<String> |
getFlywayMigrationLocations() |
String |
getMyDSpaceLink() |
Group |
getWorkflowRoleGroup(Context context,
Collection collection,
String roleName,
Group roleGroup) |
protected void |
grantGroupAllItemPolicies(Context context,
Item item,
Group group,
String policyType) |
protected void |
grantSubmitterReadPolicies(Context context,
Item item) |
void |
grantUserAllItemPolicies(Context context,
Item item,
EPerson epa,
String policyType) |
protected void |
logWorkflowEvent(Context c,
String workflowId,
String previousStepId,
String previousActionConfigId,
XmlWorkflowItem wfi,
EPerson actor,
Step newStep,
WorkflowActionConfig newActionConfig) |
protected void |
notifyOfArchive(Context context,
Item item,
Collection coll)
notify the submitter that the item is archived
|
protected void |
notifyOfReject(Context c,
XmlWorkflowItem wi,
EPerson e,
String reason) |
protected WorkflowActionConfig |
processNextStep(Context c,
EPerson user,
Workflow workflow,
ActionResult currentOutcome,
XmlWorkflowItem wfi,
Step nextStep) |
WorkflowActionConfig |
processOutcome(Context c,
EPerson user,
Workflow workflow,
Step currentStep,
WorkflowActionConfig currentActionConfig,
ActionResult currentOutcome,
XmlWorkflowItem wfi,
boolean enteredNewStep) |
protected void |
recordStart(Context context,
Item myitem,
Action action) |
protected void |
removeGroupItemPolicies(Context context,
Item item,
Group e) |
void |
removeUserItemPolicies(Context context,
Item item,
EPerson e) |
protected WorkspaceItem |
returnToWorkspace(Context c,
XmlWorkflowItem wfi)
Return the workflow item to the workspace of the submitter.
|
protected void |
revokeReviewerPolicies(Context context,
Item item) |
WorkspaceItem |
sendWorkflowItemBackSubmission(Context context,
XmlWorkflowItem wi,
EPerson e,
String provenance,
String rejection_message) |
XmlWorkflowItem |
start(Context context,
WorkspaceItem wsi)
startWorkflow() begins a workflow - in a single transaction do away with
the PersonalWorkspace entry and turn it into a WorkflowItem.
|
XmlWorkflowItem |
startWithoutNotify(Context context,
WorkspaceItem wsi)
startWithoutNotify() starts the workflow normally, but disables
notifications (useful for large imports,) for the first workflow step -
subsequent notifications happen normally
|
@Autowired(required=true) protected AuthorizeService authorizeService
@Autowired(required=true) protected CollectionRoleService collectionRoleService
@Autowired(required=true) protected ClaimedTaskService claimedTaskService
@Autowired(required=true) protected HandleService handleService
@Autowired(required=true) protected InstallItemService installItemService
@Autowired(required=true) protected ItemService itemService
@Autowired(required=true) protected PoolTaskService poolTaskService
@Autowired(required=true) protected WorkflowItemRoleService workflowItemRoleService
@Autowired(required=true) protected WorkflowRequirementsService workflowRequirementsService
@Autowired(required=true) protected XmlWorkflowFactory xmlWorkflowFactory
@Autowired(required=true) protected WorkspaceItemService workspaceItemService
@Autowired(required=true) protected XmlWorkflowItemService xmlWorkflowItemService
@Autowired(required=true) protected GroupService groupService
@Autowired(required=true) protected BundleService bundleService
@Autowired(required=true) protected BitstreamFormatService bitstreamFormatService
@Autowired(required=true) protected BitstreamService bitstreamService
public void deleteCollection(Context context, Collection collection) throws SQLException, IOException, AuthorizeException
deleteCollection in interface WorkflowService<XmlWorkflowItem>SQLExceptionIOExceptionAuthorizeExceptionpublic List<String> getEPersonDeleteConstraints(Context context, EPerson ePerson) throws SQLException
getEPersonDeleteConstraints in interface WorkflowService<XmlWorkflowItem>SQLExceptionpublic Group getWorkflowRoleGroup(Context context, Collection collection, String roleName, Group roleGroup) throws SQLException, IOException, WorkflowException, AuthorizeException
getWorkflowRoleGroup in interface WorkflowService<XmlWorkflowItem>SQLExceptionIOExceptionWorkflowExceptionAuthorizeExceptionpublic List<String> getFlywayMigrationLocations()
getFlywayMigrationLocations in interface WorkflowService<XmlWorkflowItem>public XmlWorkflowItem start(Context context, WorkspaceItem wsi) throws SQLException, AuthorizeException, IOException, WorkflowException
WorkflowServicestart in interface WorkflowService<XmlWorkflowItem>context - The relevant DSpace Context.wsi - The WorkspaceItem to convert to a workflow itemSQLException - 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 errorpublic XmlWorkflowItem startWithoutNotify(Context context, WorkspaceItem wsi) throws SQLException, AuthorizeException, IOException, WorkflowException
startWithoutNotify in interface WorkflowService<XmlWorkflowItem>context - The relevant DSpace Context.wsi - workspace itemSQLException - 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 errorpublic void alertUsersOnTaskActivation(Context c, XmlWorkflowItem wfi, String emailTemplate, List<EPerson> epa, String... arguments) throws IOException, SQLException, javax.mail.MessagingException
alertUsersOnTaskActivation in interface XmlWorkflowServiceIOExceptionSQLExceptionjavax.mail.MessagingExceptionprotected void grantSubmitterReadPolicies(Context context, Item item) throws SQLException, AuthorizeException
SQLExceptionAuthorizeExceptionprotected void activateFirstStep(Context context, Workflow wf, Step firstStep, XmlWorkflowItem wfi) throws AuthorizeException, IOException, SQLException, WorkflowException, WorkflowConfigurationException
public 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
doState in interface XmlWorkflowServiceSQLExceptionAuthorizeExceptionIOExceptionjavax.mail.MessagingExceptionWorkflowExceptionpublic WorkflowActionConfig processOutcome(Context c, EPerson user, Workflow workflow, Step currentStep, WorkflowActionConfig currentActionConfig, ActionResult currentOutcome, XmlWorkflowItem wfi, boolean enteredNewStep) throws IOException, AuthorizeException, SQLException, WorkflowException
processOutcome in interface XmlWorkflowServiceIOExceptionAuthorizeExceptionSQLExceptionWorkflowExceptionprotected void logWorkflowEvent(Context c, String workflowId, String previousStepId, String previousActionConfigId, XmlWorkflowItem wfi, EPerson actor, Step newStep, WorkflowActionConfig newActionConfig) throws SQLException
SQLExceptionprotected WorkflowActionConfig processNextStep(Context c, EPerson user, Workflow workflow, ActionResult currentOutcome, XmlWorkflowItem wfi, Step nextStep) throws SQLException, IOException, AuthorizeException, WorkflowException, WorkflowConfigurationException
protected Item archive(Context context, XmlWorkflowItem wfi) throws SQLException, IOException, AuthorizeException
context - The relevant DSpace Context.wfi - workflow itemIOException - A general class of exceptions produced by failed or interrupted I/O operations.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.protected void notifyOfArchive(Context context, Item item, Collection coll) throws SQLException, IOException
context - The relevant DSpace Context.item - which item was archivedcoll - collection name to display in templateSQLException - 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.public void deleteAllTasks(Context context, XmlWorkflowItem wi) throws SQLException, AuthorizeException
deleteAllTasks in interface XmlWorkflowServicecontext - the dspace contextwi - the workflow item for which we are to delete the tasksSQLException - 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.public void deleteAllPooledTasks(Context context, XmlWorkflowItem wi) throws SQLException, AuthorizeException
deleteAllPooledTasks in interface XmlWorkflowServiceSQLExceptionAuthorizeExceptionpublic void deletePooledTask(Context context, XmlWorkflowItem wi, PoolTask task) throws SQLException, AuthorizeException
deletePooledTask in interface XmlWorkflowServiceSQLExceptionAuthorizeExceptionpublic void deleteClaimedTask(Context c, XmlWorkflowItem wi, ClaimedTask task) throws SQLException, AuthorizeException
deleteClaimedTask in interface XmlWorkflowServiceSQLExceptionAuthorizeExceptionpublic void createPoolTasks(Context context, XmlWorkflowItem wi, RoleMembers assignees, Step step, WorkflowActionConfig action) throws SQLException, AuthorizeException
createPoolTasks in interface XmlWorkflowServiceSQLExceptionAuthorizeExceptionpublic void createOwnedTask(Context context, XmlWorkflowItem wi, Step step, WorkflowActionConfig action, EPerson e) throws SQLException, AuthorizeException
createOwnedTask in interface XmlWorkflowServiceSQLExceptionAuthorizeExceptionpublic void grantUserAllItemPolicies(Context context, Item item, EPerson epa, String policyType) throws AuthorizeException, SQLException
grantUserAllItemPolicies in interface XmlWorkflowServiceAuthorizeExceptionSQLExceptionprotected void grantGroupAllItemPolicies(Context context, Item item, Group group, String policyType) throws AuthorizeException, SQLException
AuthorizeExceptionSQLExceptionprotected void addPolicyToItem(Context context, Item item, int action, EPerson epa, String policyType) throws AuthorizeException, SQLException
AuthorizeExceptionSQLExceptionprotected void addGroupPolicyToItem(Context context, Item item, int action, Group group, String policyType) throws AuthorizeException, SQLException
AuthorizeExceptionSQLExceptionpublic void removeUserItemPolicies(Context context, Item item, EPerson e) throws SQLException, AuthorizeException
removeUserItemPolicies in interface XmlWorkflowServiceSQLExceptionAuthorizeExceptionprotected void removeGroupItemPolicies(Context context, Item item, Group e) throws SQLException, AuthorizeException
SQLExceptionAuthorizeExceptionpublic WorkspaceItem sendWorkflowItemBackSubmission(Context context, XmlWorkflowItem wi, EPerson e, String provenance, String rejection_message) throws SQLException, AuthorizeException, IOException
sendWorkflowItemBackSubmission in interface WorkflowService<XmlWorkflowItem>SQLExceptionAuthorizeExceptionIOExceptionpublic WorkspaceItem abort(Context c, XmlWorkflowItem wi, EPerson e) throws AuthorizeException, SQLException, IOException
WorkflowServiceabort in interface WorkflowService<XmlWorkflowItem>c - The relevant DSpace Context.wi - WorkflowItem to operate one - EPerson doing the operationAuthorizeException - Exception indicating the current user of the context does not have permission
to perform a particular action.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.protected WorkspaceItem returnToWorkspace(Context c, XmlWorkflowItem wfi) throws SQLException, IOException, AuthorizeException
c - Contextwfi - WorkflowItem to be 'dismantled'IOException - ...SQLException - ...AuthorizeException - ...public String getEPersonName(EPerson ePerson)
getEPersonName in interface XmlWorkflowServiceprotected void recordStart(Context context, Item myitem, Action action) throws SQLException, IOException, AuthorizeException
protected void notifyOfReject(Context c, XmlWorkflowItem wi, EPerson e, String reason)
public String getMyDSpaceLink()
getMyDSpaceLink in interface WorkflowService<XmlWorkflowItem>protected void revokeReviewerPolicies(Context context, Item item) throws SQLException, AuthorizeException
SQLExceptionAuthorizeExceptionCopyright © 2019 DuraSpace. All rights reserved.