org.dspace.app.webui.submit
Class JSPStep

java.lang.Object
  extended by org.dspace.app.webui.submit.JSPStep
Direct Known Subclasses:
JSPCCLicenseStep, JSPCompleteStep, JSPDescribeStep, JSPInitialQuestionsStep, JSPLicenseStep, JSPSampleStep, JSPSelectCollectionStep, JSPUploadStep, JSPVerifyStep

public abstract class JSPStep
extends Object

Abstract 'binding' class for DSpace Submission Steps which use the JSP-UI.

These methods revolve around the following: (1) pre-processing of data to prepare for display, (2) displaying the JSP, and (3) post-processing of any user input (or alternatively backend processing, for non-interactive steps).

For the JSP UI, the job of this class is to maintain the context of where the user is within the current "step" of the submission process. Each "step" can consist of multiple "pages" (which roughly correspond to HTML displays), so this class helps manage which page the user should see next.

The methods of the JSPStepManager are called in this order:

Version:
$Revision$
Author:
Tim Donohue
See Also:
AbstractProcessingStep, SubmissionController, SubmissionConfig, SubmissionStepConfig

Field Summary
static String NO_JSP
          Value to return from doPreProcessing to specify not to load any JSP Page (equal to "") *
 
Constructor Summary
JSPStep()
           
 
Method Summary
abstract  void doPostProcessing(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, SubmissionInfo subInfo, int status)
          Do any post-processing after the step's backend processing occurred (in the doProcessing() method).
abstract  void doPreProcessing(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, SubmissionInfo subInfo)
          Do any pre-processing to determine which JSP (if any) is used to generate the UI for this step.
abstract  String getReviewJSP(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, SubmissionInfo subInfo)
          Return the URL path (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_JSP

public static final String NO_JSP
Value to return from doPreProcessing to specify not to load any JSP Page (equal to "") *

See Also:
Constant Field Values
Constructor Detail

JSPStep

public JSPStep()
Method Detail

doPreProcessing

public abstract void doPreProcessing(Context context,
                                     javax.servlet.http.HttpServletRequest request,
                                     javax.servlet.http.HttpServletResponse response,
                                     SubmissionInfo subInfo)
                              throws javax.servlet.ServletException,
                                     IOException,
                                     SQLException,
                                     AuthorizeException
Do any pre-processing to determine which JSP (if any) is used to generate the UI for this step. This method should include the gathering and validating of all data required by the JSP. In addition, if the JSP requires any variable to passed to it on the Request, this method should set those variables.

If this step requires user interaction, then this method must call the JSP to display, using the "showJSP()" method of the JSPStepManager class.

If this step doesn't require user interaction OR you are solely using Manakin for your user interface, then this method may be left EMPTY, since all step processing should occur in the doProcessing() method.

Parameters:
context - current DSpace context
request - current servlet request object
response - current servlet response object
subInfo - submission info object
Throws:
javax.servlet.ServletException
IOException
SQLException
AuthorizeException

doPostProcessing

public abstract void doPostProcessing(Context context,
                                      javax.servlet.http.HttpServletRequest request,
                                      javax.servlet.http.HttpServletResponse response,
                                      SubmissionInfo subInfo,
                                      int status)
                               throws javax.servlet.ServletException,
                                      IOException,
                                      SQLException,
                                      AuthorizeException
Do any post-processing after the step's backend processing occurred (in the doProcessing() method).

It is this method's job to determine whether processing completed successfully, or display another JSP informing the users of any potential problems/errors.

If this step doesn't require user interaction OR you are solely using Manakin for your user interface, then this method may be left EMPTY, since all step processing should occur in the doProcessing() method.

Parameters:
context - current DSpace context
request - current servlet request object
response - current servlet response object
subInfo - submission info object
status - any status/errors reported by doProcessing() method
Throws:
javax.servlet.ServletException
IOException
SQLException
AuthorizeException

getReviewJSP

public abstract String getReviewJSP(Context context,
                                    javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response,
                                    SubmissionInfo subInfo)
Return the URL path (e.g. /submit/review-metadata.jsp) of the JSP which will review the information that was gathered in this Step.

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.

Parameters:
context - current DSpace context
request - current servlet request object
response - current servlet response object
subInfo - submission info object


Copyright © 2013 DuraSpace. All Rights Reserved.