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.- Author:
- mwood
- See Also:
CurationTaskConfig
-
-
Field Summary
Fields Modifier and Type Field Description protected ClaimedTaskServiceclaimedTaskServiceprotected CollectionServicecollectionServiceprotected ConfigurationServiceconfigurationServiceprotected CurationTaskConfigcurationTaskConfigprotected EPersonServiceePersonServiceprotected GroupServicegroupServiceprotected XmlWorkflowFactoryworkflowFactoryprotected XmlWorkflowItemServiceworkflowItemServiceprotected XmlWorkflowServiceworkflowService
-
Constructor Summary
Constructors Constructor Description XmlWorkflowCuratorServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancurate(Curator curator, Context c, String wfId)Determines 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.protected List<EPerson>resolveContacts(Context c, List<String> contacts, XmlWorkflowItem wfi)Develop a list of EPerson from a list of perhaps symbolic "contact" names.
-
-
-
Field Detail
-
workflowFactory
@Autowired(required=true) protected XmlWorkflowFactory workflowFactory
-
configurationService
@Autowired(required=true) protected ConfigurationService configurationService
-
groupService
@Autowired(required=true) protected GroupService groupService
-
ePersonService
@Autowired(required=true) protected EPersonService ePersonService
-
collectionService
@Autowired(required=true) protected CollectionService collectionService
-
claimedTaskService
@Autowired(required=true) protected ClaimedTaskService claimedTaskService
-
curationTaskConfig
@Autowired(required=true) protected CurationTaskConfig curationTaskConfig
-
workflowService
@Autowired(required=true) protected XmlWorkflowService workflowService
-
workflowItemService
@Autowired(required=true) protected XmlWorkflowItemService workflowItemService
-
-
Method Detail
-
needsCuration
public boolean needsCuration(Context c, XmlWorkflowItem wfi) throws SQLException, IOException
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 failed.
- 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 curation failed.
- Throws:
AuthorizeException- if authorization errorIOException- if IO errorSQLException- if database error
-
getFlowStep
protected FlowStep getFlowStep(Context c, XmlWorkflowItem wfi) throws SQLException, IOException
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.
-
-