org.dspace.submit.step
Class SkipInitialQuestionsStep

java.lang.Object
  extended by org.dspace.submit.AbstractProcessingStep
      extended by org.dspace.submit.step.SkipInitialQuestionsStep

public class SkipInitialQuestionsStep
extends AbstractProcessingStep

This is a Simple Step class that need to be used when you want skip the initial questions step!

At the moment this step is required because part of the behaviour of the InitialQuestionStep is required to be managed also in the DescribeStep (see JIRA [DS-83] Hardcoded behaviour of Initial question step in the submission)

Version:
$Revision: 3738 $
Author:
Andrea Bollini
See Also:
AbstractProcessingStep, InitialQuestionStep, DescribeStep

Field Summary
 
Fields inherited from class org.dspace.submit.AbstractProcessingStep
CANCEL_BUTTON, LAST_PAGE_REACHED, NEXT_BUTTON, PREVIOUS_BUTTON, PROGRESS_BAR_PREFIX, STATUS_COMPLETE
 
Constructor Summary
SkipInitialQuestionsStep()
           
 
Method Summary
 int doProcessing(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, SubmissionInfo subInfo)
          Simply we flags the submission as the user had checked both multi-title, multi-files and published before so that the input-form configuration will be used as is
 int getNumberOfPages(javax.servlet.http.HttpServletRequest request, SubmissionInfo subInfo)
          Retrieves the number of pages that this "step" extends over.
 
Methods inherited from class org.dspace.submit.AbstractProcessingStep
addErrorField, addErrorMessage, clearErrorFields, getCurrentPage, getErrorFields, getErrorMessage, setCurrentPage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SkipInitialQuestionsStep

public SkipInitialQuestionsStep()
Method Detail

doProcessing

public int doProcessing(Context context,
                        javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response,
                        SubmissionInfo subInfo)
                 throws javax.servlet.ServletException,
                        IOException,
                        SQLException,
                        AuthorizeException
Simply we flags the submission as the user had checked both multi-title, multi-files and published before so that the input-form configuration will be used as is

Specified by:
doProcessing in class AbstractProcessingStep
Parameters:
context - current DSpace context
request - current servlet request object
response - current servlet response object
subInfo - submission info object
Returns:
Status or error flag which will be processed by doPostProcessing() below! (if STATUS_COMPLETE or 0 is returned, no errors occurred!)
Throws:
javax.servlet.ServletException
IOException
SQLException
AuthorizeException

getNumberOfPages

public int getNumberOfPages(javax.servlet.http.HttpServletRequest request,
                            SubmissionInfo subInfo)
                     throws javax.servlet.ServletException
Description copied from class: AbstractProcessingStep
Retrieves the number of pages that this "step" extends over. This method is used by the SubmissionController to build the progress bar.

This method may just return 1 for most steps (since most steps consist of a single page). But, it should return a number greater than 1 for any "step" which spans across a number of HTML pages. For example, the configurable "Describe" step (configured using input-forms.xml) overrides this method to return the number of pages that are defined by its configuration file.

Steps which are non-interactive (i.e. they do not display an interface to the user) should return a value of 1, so that they are only processed once!

Specified by:
getNumberOfPages in class AbstractProcessingStep
Parameters:
request - The HTTP Request
subInfo - The current submission information object
Returns:
the number of pages in this step
Throws:
javax.servlet.ServletException


Copyright © 2010 DuraSpace. All Rights Reserved.