|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.app.xmlui.aspect.submission.FlowUtils
public class FlowUtils
This is a utility class to aid in the submission flow scripts. Since data validation is cumbersome inside a flow script this is a collection of methods to preform processing at each step of the flow, the flow script will ties these operations together in a meaningful order but all actually processing is done through these various processes.
| Constructor Summary | |
|---|---|
FlowUtils()
|
|
| Method Summary | |
|---|---|
static InProgressSubmission |
findSubmission(Context context,
String inProgressSubmissionID)
Return the InProgressSubmission, either workspaceItem or workflowItem, depending on the id provided. |
static WorkflowItem |
findWorkflow(Context context,
String inProgressSubmissionID)
Return the workflow identified by the given id, the id should be prepended with the character S to signify that it is a workflow instead of a workspace. |
static WorkspaceItem |
findWorkspace(Context context,
String inProgressSubmissionID)
Return the workspace identified by the given id, the id should be prepended with the character S to signify that it is a workspace instead of a workflow. |
static String |
getFieldName(DCInput input)
Return the HTML / DRI field name for the given input. |
static Double[] |
getListOfAllSteps(javax.servlet.http.HttpServletRequest request,
SubmissionInfo subInfo)
Retrieves a list of all steps and pages within the current submission process. |
static int |
getMaximumPageReached(Context context,
String id)
Find the maximum page (within the maximum step) that the user has reached in the submission processes. |
static int |
getMaximumStepReached(Context context,
String id)
Find the maximum step the user has reached in the submission processes. |
static int |
getPage(double stepAndPage)
Get number of the current page within the current step |
static int |
getStep(double stepAndPage)
Get current step number |
static SubmissionInfo |
obtainSubmissionInfo(Map objectModel,
String workspaceID)
Obtains the submission info for the current submission process. |
static boolean |
processApproveTask(Context context,
String id)
Update the provided workflowItem to advance to the next workflow step. |
static void |
processClaimTask(Context context,
String id)
Claim this task from the pool of unclaimed task so that this user may preform the task by either approving or rejecting it. |
static String |
processRejectTask(Context context,
String id,
org.apache.cocoon.environment.Request request)
Reject the given task for the given reason. |
static void |
processSaveOrRemove(Context context,
String id,
org.apache.cocoon.environment.Request request)
Process the save or remove step. |
static void |
processUnclaimTask(Context context,
String id)
Return the given task back to the pool of unclaimed tasks for another user to select and preform. |
static void |
setBackPageReached(Context context,
String id,
int step,
int page)
Set a specific step and page as reached. |
static void |
setPageReached(Context context,
String id,
int step,
int page)
Indicate the user has advanced to the given page within a given step. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FlowUtils()
| Method Detail |
|---|
public static InProgressSubmission findSubmission(Context context,
String inProgressSubmissionID)
throws SQLException
context - inProgressSubmissionID -
SQLException
public static WorkspaceItem findWorkspace(Context context,
String inProgressSubmissionID)
throws SQLException
context - inProgressSubmissionID -
SQLException
public static WorkflowItem findWorkflow(Context context,
String inProgressSubmissionID)
throws SQLException
context - inProgressSubmissionID -
SQLException
public static SubmissionInfo obtainSubmissionInfo(Map objectModel,
String workspaceID)
throws SQLException
objectModel - the cocoon ObjectmodelworkspaceID - the workspaceID of the submission info to obtain
SQLException
public static void setPageReached(Context context,
String id,
int step,
int page)
throws SQLException,
AuthorizeException,
IOException
context - The current DSpace contentid - The unique ID of the current workflow/workspacestep - the step the user has just reachedpage - the page (within the step) the user has just reached
SQLException
AuthorizeException
IOException
public static void setBackPageReached(Context context,
String id,
int step,
int page)
throws SQLException,
AuthorizeException,
IOException
context - The current DSpace contentid - The unique ID of the current workflow/workspacestep - the step to set as reached, can be also a previous reached steppage - the page (within the step) to set as reached, can be also a previous reached page
SQLException
AuthorizeException
IOException
public static int getMaximumStepReached(Context context,
String id)
throws SQLException
context - The current DSpace contentid - The unique ID of the current workflow/workspace
SQLException
public static int getMaximumPageReached(Context context,
String id)
throws SQLException
context - The current DSpace contentid - The unique ID of the current workflow/workspace
SQLExceptionpublic static int getStep(double stepAndPage)
stepAndPage - a double representing the current step and page
(e.g. 1.2 is page 2 of step 1)
public static int getPage(double stepAndPage)
stepAndPage - a double representing the current step and page
(e.g. 1.2 is page 2 of step 1)
public static void processSaveOrRemove(Context context,
String id,
org.apache.cocoon.environment.Request request)
throws SQLException,
AuthorizeException,
IOException
context - The current DSpace contentid - The unique ID of the current workspace/workflowrequest - The cocoon request object.
SQLException
AuthorizeException
IOException
public static boolean processApproveTask(Context context,
String id)
throws SQLException,
UIException,
javax.servlet.ServletException,
AuthorizeException,
IOException
context - The current DSpace contentid - The unique ID of the current workflow
SQLException
UIException
javax.servlet.ServletException
AuthorizeException
IOException
public static void processUnclaimTask(Context context,
String id)
throws SQLException,
UIException,
javax.servlet.ServletException,
AuthorizeException,
IOException
context - The current DSpace contentid - The unique ID of the current workflow
SQLException
UIException
javax.servlet.ServletException
AuthorizeException
IOException
public static void processClaimTask(Context context,
String id)
throws SQLException,
UIException,
javax.servlet.ServletException,
AuthorizeException,
IOException
context - The current DSpace contentid - The unique ID of the current workflow
SQLException
UIException
javax.servlet.ServletException
AuthorizeException
IOException
public static String processRejectTask(Context context,
String id,
org.apache.cocoon.environment.Request request)
throws SQLException,
UIException,
javax.servlet.ServletException,
AuthorizeException,
IOException
context - The current DSpace contentid - The unique ID of the current workflowrequest - The current request object
SQLException
UIException
javax.servlet.ServletException
AuthorizeException
IOExceptionpublic static String getFieldName(DCInput input)
input -
public static Double[] getListOfAllSteps(javax.servlet.http.HttpServletRequest request,
SubmissionInfo subInfo)
This returns an array of Doubles of the form "#.#" where the former number is the step number, and the latter is the page number.
This list may differ from the list of steps in the progress bar if the current submission process includes non-interactive steps which do not appear in the progress bar!
This method is used by the Manakin submission flowscript (submission.js) to step forward/backward between steps.
request - The HTTP Servlet Request objectsubInfo - the current SubmissionInfo object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||