public class JSPStepManager
extends java.lang.Object
This manager is utilized by the SubmissionController to appropriately load each JSP-UI step, and process any information returned by each step
AbstractProcessingStep,
SubmissionController,
JSPStep| Constructor and Description |
|---|
JSPStepManager() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
completeStep(Context context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
SubmissionInfo subInfo)
This method completes the processing of this "step" and forwards the
request back to the SubmissionController (so that the next step can be
called).
|
static java.lang.String |
getLastJSPDisplayed(javax.servlet.http.HttpServletRequest request)
Retrieves the context path of the last JSP that was displayed to the
user.
|
static int |
getPageReached(SubmissionInfo subInfo)
Find out which page a user has reached in this particular step.
|
java.lang.String |
getReviewJSP(Context context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
SubmissionInfo subInfo)
Return the URL path (e.g.
|
protected boolean |
hasMorePages(javax.servlet.http.HttpServletRequest request,
SubmissionInfo subInfo,
int pageNumber)
Checks to see if there are more pages in the current step after the
specified page
|
static JSPStepManager |
loadStep(SubmissionStepConfig stepConfig)
Initialize the current JSPStepManager object, by loading the
specified step class.
|
boolean |
processStep(Context context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
SubmissionInfo subInfo)
Initialize the current JSPStepManager object, to prepare for processing
of this step.
|
static void |
showJSP(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
SubmissionInfo subInfo,
java.lang.String pathToJSP)
This method actually displays a JSP page for this "step".
|
public static JSPStepManager loadStep(SubmissionStepConfig stepConfig) throws java.lang.Exception
stepConfig - the SubmissionStepConfig object which describes
this step's configuration in the item-submission.xmljava.lang.Exception - if the JSPStep cannot be loaded or the class
specified doesn't implement the JSPStep interfacepublic final boolean processStep(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, SubmissionInfo subInfo) throws javax.servlet.ServletException, java.io.IOException, java.sql.SQLException, AuthorizeException
Once the page has been determined, this method also determines whether the user is completing this page (i.e. there is user input data that needs to be saved to the database) or beginning this page (i.e. the user needs to be sent to the JSP for this page).
context - a DSpace Context objectrequest - the HTTP requestresponse - the HTTP responsesubInfo - submission info objectjavax.servlet.ServletException - if a general error occursjava.io.IOException - if a i/o error occursjava.sql.SQLException - if a database error occursAuthorizeException - if some authorization error occurspublic static final void showJSP(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
SubmissionInfo subInfo,
java.lang.String pathToJSP)
throws javax.servlet.ServletException,
java.io.IOException,
java.sql.SQLException
request - current servlet request objectresponse - current servlet response objectsubInfo - submission info objectpathToJSP - context path to the JSP to displayjavax.servlet.ServletExceptionjava.io.IOExceptionjava.sql.SQLExceptionprotected final boolean completeStep(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, SubmissionInfo subInfo) throws javax.servlet.ServletException, java.io.IOException, java.sql.SQLException, AuthorizeException
context - current DSpace contextrequest - current servlet request objectresponse - current servlet response objectsubInfo - submission info objectjavax.servlet.ServletExceptionjava.io.IOExceptionjava.sql.SQLExceptionAuthorizeExceptionprotected final boolean hasMorePages(javax.servlet.http.HttpServletRequest request,
SubmissionInfo subInfo,
int pageNumber)
throws javax.servlet.ServletException
request - The HTTP Request objectsubInfo - The current submission information objectpageNumber - The current pagejavax.servlet.ServletException - if there are no more pages in this steppublic static final int getPageReached(SubmissionInfo subInfo)
subInfo - Submission informationpublic static final java.lang.String getLastJSPDisplayed(javax.servlet.http.HttpServletRequest request)
request - current servlet request objectpublic java.lang.String getReviewJSP(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, SubmissionInfo subInfo)
This Review JSP is loaded by the 'Verify' Step, in order to dynamically generate a submission verification page consisting of the information gathered in all the enabled submission steps.
context - current DSpace contextrequest - current servlet request objectresponse - current servlet response objectsubInfo - submission info objectCopyright © 2018 DuraSpace. All Rights Reserved.