Package org.dspace.xmlworkflow
Class WorkflowRequirementsServiceImpl
- java.lang.Object
-
- org.dspace.xmlworkflow.WorkflowRequirementsServiceImpl
-
- All Implemented Interfaces:
WorkflowRequirementsService
public class WorkflowRequirementsServiceImpl extends Object implements WorkflowRequirementsService
A class that contains utililty methods related to the workflow The adding/removing from claimed users and ensuring that if multiple users have to perform these steps that a count is kept so that no more then the allowed user count are allowed to perform their actions- 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)
-
-
Field Summary
Fields Modifier and Type Field Description protected InProgressUserServiceinProgressUserServiceprotected ItemServiceitemServiceprotected PoolTaskServicepoolTaskServiceprotected XmlWorkflowFactoryworkflowFactoryprotected XmlWorkflowItemServicexmlWorkflowItemServiceprotected XmlWorkflowServicexmlWorkflowService-
Fields inherited from interface org.dspace.xmlworkflow.service.WorkflowRequirementsService
WORKFLOW_SCHEMA
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedWorkflowRequirementsServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddClaimedUser(Context context, XmlWorkflowItem wfi, Step step, EPerson user)Adds a claimed user in the metadata if enough users have claimed this task (claimed or finished) to meet the required number the pooled tasks will be deletedvoidaddFinishedUser(Context c, XmlWorkflowItem wfi, EPerson user)Adds a finished user in the metadata this method will also remove the user from the inprogress metadatavoidclearInProgressUsers(Context c, XmlWorkflowItem wfi)voidremoveClaimedUser(Context context, XmlWorkflowItem wfi, EPerson user, String stepID)
-
-
-
Field Detail
-
inProgressUserService
@Autowired(required=true) protected InProgressUserService inProgressUserService
-
itemService
@Autowired(required=true) protected ItemService itemService
-
poolTaskService
@Autowired(required=true) protected PoolTaskService poolTaskService
-
workflowFactory
@Autowired(required=true) protected XmlWorkflowFactory workflowFactory
-
xmlWorkflowItemService
@Autowired(required=true) protected XmlWorkflowItemService xmlWorkflowItemService
-
xmlWorkflowService
@Autowired(required=true) protected XmlWorkflowService xmlWorkflowService
-
-
Method Detail
-
addClaimedUser
public void addClaimedUser(Context context, XmlWorkflowItem wfi, Step step, EPerson user) throws SQLException, AuthorizeException, IOException
Description copied from interface:WorkflowRequirementsServiceAdds a claimed user in the metadata if enough users have claimed this task (claimed or finished) to meet the required number the pooled tasks will be deleted- Specified by:
addClaimedUserin interfaceWorkflowRequirementsService- Parameters:
context- the dspace contextwfi- the workflow itemstep- the step for which we are acceptinguser- the current user- Throws:
SQLException- ...AuthorizeException- ...IOException- ...
-
removeClaimedUser
public void removeClaimedUser(Context context, XmlWorkflowItem wfi, EPerson user, String stepID) throws SQLException, IOException, WorkflowConfigurationException, AuthorizeException
- Specified by:
removeClaimedUserin interfaceWorkflowRequirementsService- Throws:
SQLExceptionIOExceptionWorkflowConfigurationExceptionAuthorizeException
-
addFinishedUser
public void addFinishedUser(Context c, XmlWorkflowItem wfi, EPerson user) throws AuthorizeException, SQLException
Description copied from interface:WorkflowRequirementsServiceAdds a finished user in the metadata this method will also remove the user from the inprogress metadata- Specified by:
addFinishedUserin interfaceWorkflowRequirementsService- Parameters:
c- the dspace contextwfi- the workflow itemuser- the current user- Throws:
AuthorizeException- ...SQLException- ...
-
clearInProgressUsers
public void clearInProgressUsers(Context c, XmlWorkflowItem wfi) throws AuthorizeException, SQLException
- Specified by:
clearInProgressUsersin interfaceWorkflowRequirementsService- Throws:
AuthorizeExceptionSQLException
-
-