Package org.dspace.curate
Class XmlWorkflowCuratorServiceImpl
java.lang.Object
org.dspace.curate.XmlWorkflowCuratorServiceImpl
- All Implemented Interfaces:
XmlWorkflowCuratorService
@Service
public class XmlWorkflowCuratorServiceImpl
extends Object
implements XmlWorkflowCuratorService
Manage interactions between curation and workflow. A curation task can be
attached to a workflow step, to be executed during the step.
NOTE: when run in workflow, curation tasks run with authorization disabled.
- Author:
- mwood
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ClaimedTaskServiceprotected CollectionServiceprotected ConfigurationServiceprotected CurationTaskConfigprotected EPersonServiceprotected GroupServiceprotected XmlWorkflowFactoryprotected XmlWorkflowItemServiceprotected XmlWorkflowService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines and executes curation of a Workflow item by ID.booleancurate(Curator curator, Context c, XmlWorkflowItem wfi) Determines and executes curation of a Workflow item.booleandoCuration(Context c, XmlWorkflowItem wfi) Determines and executes curation on a Workflow item.protected FlowStepgetFlowStep(Context c, XmlWorkflowItem wfi) Find the flow step occupied by a work flow item.booleanneedsCuration(Context c, XmlWorkflowItem wfi) Should this item be curated?protected voidnotifyContacts(Context c, XmlWorkflowItem wfi, Task task, String status, String action, String message) Send email to people who should be notified when curation tasks are run.resolveContacts(Context c, List<String> contacts, XmlWorkflowItem wfi) Develop a list of EPerson from a list of perhaps symbolic "contact" names.
-
Field Details
-
workflowFactory
-
configurationService
-
groupService
-
ePersonService
-
collectionService
-
claimedTaskService
-
curationTaskConfig
-
workflowService
-
workflowItemService
-
-
Constructor Details
-
XmlWorkflowCuratorServiceImpl
public XmlWorkflowCuratorServiceImpl()
-
-
Method Details
-
needsCuration
Description copied from interface:XmlWorkflowCuratorServiceShould this item be curated?- Specified by:
needsCurationin interfaceXmlWorkflowCuratorService- Parameters:
c- current DSpace session.wfi- the item in question.- Returns:
- true if the item is in a workflow step.
- Throws:
SQLException- passed through.IOException- passed through.
-
doCuration
public boolean doCuration(Context c, XmlWorkflowItem wfi) throws AuthorizeException, IOException, SQLException Description copied from interface:XmlWorkflowCuratorServiceDetermines and executes curation on a Workflow item.- Specified by:
doCurationin interfaceXmlWorkflowCuratorService- Parameters:
c- the contextwfi- the workflow item- Returns:
- true if curation was completed or not required; false if tasks were queued for later completion, or item was rejected.
- Throws:
AuthorizeException- if authorization errorIOException- if IO errorSQLException- if database error
-
curate
public boolean curate(Curator curator, Context c, String wfId) throws AuthorizeException, IOException, SQLException Description copied from interface:XmlWorkflowCuratorServiceDetermines and executes curation of a Workflow item by ID.- Specified by:
curatein interfaceXmlWorkflowCuratorService- Parameters:
curator- the curation contextc- the user contextwfId- the workflow item's ID- Returns:
- true if curation curation was completed or not required; false if tasks were queued for later completion, or item was rejected.
- Throws:
AuthorizeException- if authorization errorIOException- if IO errorSQLException- if database error
-
curate
public boolean curate(Curator curator, Context c, XmlWorkflowItem wfi) throws AuthorizeException, IOException, SQLException Description copied from interface:XmlWorkflowCuratorServiceDetermines and executes curation of a Workflow item.- Specified by:
curatein interfaceXmlWorkflowCuratorService- Parameters:
curator- the curation contextc- the user contextwfi- the workflow item- Returns:
- true if workflow curation was completed or not required; false if tasks were queued for later completion, or item was rejected.
- Throws:
AuthorizeException- if authorization errorIOException- if IO errorSQLException- if database error
-
getFlowStep
Find the flow step occupied by a work flow item.- Parameters:
c- session context.wfi- the work flow item in question.- Returns:
- the current flow step for the item, or null.
- Throws:
SQLExceptionIOException
-
notifyContacts
protected void notifyContacts(Context c, XmlWorkflowItem wfi, Task task, String status, String action, String message) throws AuthorizeException, IOException, SQLException Send email to people who should be notified when curation tasks are run.- Parameters:
c- session context.wfi- the work flow item being curated.task- the curation task being applied.status- status returned by the task.action- action to be taken as a result of task status.message- anything the code wants to say about the task run.- Throws:
AuthorizeException- passed through.IOException- passed through.SQLException- passed through.
-
resolveContacts
protected List<EPerson> resolveContacts(Context c, List<String> contacts, XmlWorkflowItem wfi) throws AuthorizeException, IOException, SQLException Develop a list of EPerson from a list of perhaps symbolic "contact" names.- Parameters:
c- session context.contacts- the list of concrete and symbolic groups to resolve.wfi- the work flow item associated with these groups via its current work flow step.- Returns:
- the EPersons associated with the current state of
wfi - Throws:
AuthorizeException- passed through.IOException- passed through.SQLException- passed through.
-