org.dspace.app.util
Class SubmissionInfo

java.lang.Object
  extended by org.dspace.app.util.SubmissionInfo

public class SubmissionInfo
extends Object

Information about an item being editing with the submission UI

Version:
$Revision: 3734 $
Author:
Robert Tansley

Method Summary
 Bitstream getBitstream()
          Return the current bitstream we're working with (This is used during upload processes, or user interfaces that are dealing with bitstreams)
 Bundle getBundle()
          Return the current bundle we're working with (This is used during upload processes, or user interfaces that are dealing with bundles/bitstreams)
 String getCollectionHandle()
          Gets the handle of the collection to which this item is being submitted
 String getJumpToField()
          Return metadata field which JSP should "jump to" (i.e.
 List getMissingFields()
          Return form related indices of the required fields which were not filled out by the user.
 String getMoreBoxesFor()
          Return metadata field which user has requested more input boxes be displayed (by pressing "Add More" on one of the "Describe" pages)
 Map getProgressBarInfo()
          Return the information used to build the progress bar (this includes all the steps in this submission, as well as the ordering and names of the steps).
 SubmissionStepConfig getStepConfig(String stepID)
          Returns a particular global step definition based on its ID.
 SubmissionConfig getSubmissionConfig()
          Return the current submission process config (which includes all steps which need to be completed for the submission to be successful)
 InProgressSubmission getSubmissionItem()
          Return the current in progress submission
 String getSubmissionLogInfo()
          Return text information suitable for logging.
 boolean isInWorkflow()
          Is this submission in the workflow process?
static SubmissionInfo load(javax.servlet.http.HttpServletRequest request, InProgressSubmission subItem)
          Loads all known submission information based on the given in progress submission and request object.
 void reloadSubmissionConfig(javax.servlet.http.HttpServletRequest request)
          Causes the SubmissionConfig to be completely reloaded from the XML configuration file (item-submission.xml).
 void setBitstream(Bitstream bits)
          Sets the current bitstream we're working with (This is used during upload processes, or user interfaces that are dealing with bitstreams)
 void setBundle(Bundle bund)
          Sets the current bundle we're working with (This is used during upload processes, or user interfaces that are dealing with bundles/bitstreams)
 void setCollectionHandle(String handle)
          Sets the handle of the collection to which this item is being submitted
 void setJumpToField(String fieldname)
          Sets metadata field which JSP should "jump to" (i.e.
 void setMissingFields(List missing)
          Sets the form related indices of the required fields which were not filled out by the user.
 void setMoreBoxesFor(String fieldname)
          Sets the metadata field which user has requested more input boxes be displayed (by pressing "Add More" on one of the "Describe" pages)
 void setSubmissionItem(InProgressSubmission subItem)
          Updates the current in progress submission item
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

load

public static SubmissionInfo load(javax.servlet.http.HttpServletRequest request,
                                  InProgressSubmission subItem)
                           throws javax.servlet.ServletException
Loads all known submission information based on the given in progress submission and request object.

If subItem is null, then just loads the default submission information for a new submission.

Parameters:
request - The HTTP Servlet Request object
subItem - The in-progress submission we are loading information for
Returns:
a SubmissionInfo object
Throws:
javax.servlet.ServletException - if an error occurs

isInWorkflow

public boolean isInWorkflow()
Is this submission in the workflow process?

Returns:
true if the current submission is in the workflow process

getSubmissionItem

public InProgressSubmission getSubmissionItem()
Return the current in progress submission

Returns:
the InProgressSubmission object representing the current submission

setSubmissionItem

public void setSubmissionItem(InProgressSubmission subItem)
Updates the current in progress submission item

Parameters:
subItem - the new InProgressSubmission object

getSubmissionConfig

public SubmissionConfig getSubmissionConfig()
Return the current submission process config (which includes all steps which need to be completed for the submission to be successful)

Returns:
the SubmissionConfig object, which contains info on all the steps in the current submission process

reloadSubmissionConfig

public void reloadSubmissionConfig(javax.servlet.http.HttpServletRequest request)
                            throws javax.servlet.ServletException
Causes the SubmissionConfig to be completely reloaded from the XML configuration file (item-submission.xml).

Note: This also reloads the progress bar info, since the progress bar depends entirely on the submission process (and its steps).

Parameters:
request - The HTTP Servlet Request object
Throws:
javax.servlet.ServletException - if an error occurs

getStepConfig

public SubmissionStepConfig getStepConfig(String stepID)
                                   throws javax.servlet.ServletException
Returns a particular global step definition based on its ID.

Global step definitions are those defined in the section of the configuration file.

Parameters:
stepID - step's identifier
Returns:
the SubmissionStepConfig representing the step
Throws:
javax.servlet.ServletException - if no default submission process configuration defined

getSubmissionLogInfo

public String getSubmissionLogInfo()
Return text information suitable for logging.

This method is used by several of the Step classes to log major events during the submission process (e.g. when license agreement was accepted, when item was submitted, when it was available in DSpace, etc.)

Returns:
the type and ID of the submission, bundle and/or bitstream for logging

getCollectionHandle

public String getCollectionHandle()
Gets the handle of the collection to which this item is being submitted

Returns:
the collection handle

setCollectionHandle

public void setCollectionHandle(String handle)
Sets the handle of the collection to which this item is being submitted

Parameters:
handle - the new collection handle

getProgressBarInfo

public Map getProgressBarInfo()
Return the information used to build the progress bar (this includes all the steps in this submission, as well as the ordering and names of the steps).

Returns a Hashmap, with the following specifics:

Keys are the number of the step, followed by the number of the page within the step

(e.g. "2.1" = The first page of Step 2)

(e.g. "5.2" = The second page of Step 5)

Values are the Headings to display for each step (e.g. "Describe")

Returns:
a Hashmap of Progress Bar information.

getBitstream

public Bitstream getBitstream()
Return the current bitstream we're working with (This is used during upload processes, or user interfaces that are dealing with bitstreams)

Returns:
the Bitstream object for the bitstream

setBitstream

public void setBitstream(Bitstream bits)
Sets the current bitstream we're working with (This is used during upload processes, or user interfaces that are dealing with bitstreams)

Parameters:
bits - the bitstream

getBundle

public Bundle getBundle()
Return the current bundle we're working with (This is used during upload processes, or user interfaces that are dealing with bundles/bitstreams)

Returns:
the Bundle object for the bundle

setBundle

public void setBundle(Bundle bund)
Sets the current bundle we're working with (This is used during upload processes, or user interfaces that are dealing with bundles/bitstreams)

Parameters:
bund - the bundle

getMissingFields

public List getMissingFields()
Return form related indices of the required fields which were not filled out by the user.

Returns:
a List of empty fields which are required

setMissingFields

public void setMissingFields(List missing)
Sets the form related indices of the required fields which were not filled out by the user.

Parameters:
missing - the List of empty fields which are required

getMoreBoxesFor

public String getMoreBoxesFor()
Return metadata field which user has requested more input boxes be displayed (by pressing "Add More" on one of the "Describe" pages)

Returns:
the String name of the field element

setMoreBoxesFor

public void setMoreBoxesFor(String fieldname)
Sets the metadata field which user has requested more input boxes be displayed (by pressing "Add More" on one of the "Describe" pages)

Parameters:
fieldname - the name of the field element on the page

getJumpToField

public String getJumpToField()
Return metadata field which JSP should "jump to" (i.e. set focus on) when the JSP next loads. This is used during the Describe step.

Returns:
the String name of the field element

setJumpToField

public void setJumpToField(String fieldname)
Sets metadata field which JSP should "jump to" (i.e. set focus on) when the JSP next loads. This is used during the Describe step.

Parameters:
fieldname - the name of the field on the page


Copyright © 2010 DuraSpace. All Rights Reserved.