org.dspace.xmlworkflow
Class WorkflowRequirementsManager

java.lang.Object
  extended by org.dspace.xmlworkflow.WorkflowRequirementsManager

public class WorkflowRequirementsManager
extends Object

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
static String WORKFLOW_SCHEMA
           
 
Constructor Summary
WorkflowRequirementsManager()
           
 
Method Summary
static void addClaimedUser(Context c, 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 deleted
static void addFinishedUser(Context c, XmlWorkflowItem wfi, EPerson user)
          Adds a finished user in the metadata this method will also remove the user from the inprogress metadata
static void clearInProgressUsers(Context c, XmlWorkflowItem wfi)
           
static void removeClaimedUser(Context c, XmlWorkflowItem wfi, EPerson user, String stepID)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WORKFLOW_SCHEMA

public static final String WORKFLOW_SCHEMA
See Also:
Constant Field Values
Constructor Detail

WorkflowRequirementsManager

public WorkflowRequirementsManager()
Method Detail

addClaimedUser

public static void addClaimedUser(Context c,
                                  XmlWorkflowItem wfi,
                                  Step step,
                                  EPerson user)
                           throws SQLException,
                                  AuthorizeException,
                                  IOException
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 deleted

Parameters:
c - the dspace context
wfi - the workflow item
step - the step for which we are accepting
user - the current user
Throws:
SQLException - ...
AuthorizeException - ...
IOException - ...

removeClaimedUser

public static void removeClaimedUser(Context c,
                                     XmlWorkflowItem wfi,
                                     EPerson user,
                                     String stepID)
                              throws SQLException,
                                     IOException,
                                     WorkflowConfigurationException,
                                     AuthorizeException
Throws:
SQLException
IOException
WorkflowConfigurationException
AuthorizeException

addFinishedUser

public static void addFinishedUser(Context c,
                                   XmlWorkflowItem wfi,
                                   EPerson user)
                            throws AuthorizeException,
                                   SQLException
Adds a finished user in the metadata this method will also remove the user from the inprogress metadata

Parameters:
c - the dspace context
wfi - the workflow item
user - the current user
Throws:
AuthorizeException - ...
SQLException - ...

clearInProgressUsers

public static void clearInProgressUsers(Context c,
                                        XmlWorkflowItem wfi)
                                 throws AuthorizeException,
                                        SQLException
Throws:
AuthorizeException
SQLException


Copyright © 2011 DuraSpace. All Rights Reserved.