org.dspace.app.util
Class SubmissionConfig

java.lang.Object
  extended by org.dspace.app.util.SubmissionConfig
All Implemented Interfaces:
Serializable

public class SubmissionConfig
extends Object
implements Serializable

Class representing a single Item Submission config definition, organized into steps. This class represents the structure of a single 'submission-process' node in the item-submission.xml configuration file. Note: Implements Serializable as it will be saved to the current session during submission. Please ensure that nothing is added to this class that isn't also serializable

Version:
$Revision: 3734 $
Author:
Tim Donohue, based on DCInputSet by Brian S. Hughes
See Also:
SubmissionConfigReader, SubmissionStepConfig, Serialized Form

Constructor Summary
SubmissionConfig(String submissionName, Vector steps, boolean isWorkflowProcess)
          Constructs a new Submission Configuration object, based on the XML configuration file (item-submission.xml)
 
Method Summary
 int getNumberOfSteps()
          Return the number of steps in this submission process
 SubmissionStepConfig getStep(int stepNum)
          Retrieve a particular Step configuration in this Item Submission Process configuration.
 String getSubmissionName()
          Return the name of the item submission process definition
 boolean hasMoreSteps(int stepNum)
          Returns whether or not there are more steps which follow the specified "stepNum".
 boolean isWorkflow()
          Return whether or not this submission process is being used in a workflow!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubmissionConfig

public SubmissionConfig(String submissionName,
                        Vector steps,
                        boolean isWorkflowProcess)
Constructs a new Submission Configuration object, based on the XML configuration file (item-submission.xml)

Parameters:
submissionName - the submission process name
steps - the vector listing of step information to build SubmissionStepConfig objects for this submission process
isWorkflowProcess - whether this submission process is being used in a workflow or not. If it is a workflow process this may limit the steps that are available for editing.
Method Detail

getSubmissionName

public String getSubmissionName()
Return the name of the item submission process definition

Returns:
the name of the submission process

getNumberOfSteps

public int getNumberOfSteps()
Return the number of steps in this submission process

Returns:
number of steps

isWorkflow

public boolean isWorkflow()
Return whether or not this submission process is being used in a workflow!

Returns:
true, if it's a workflow process. false, otherwise.

getStep

public SubmissionStepConfig getStep(int stepNum)
Retrieve a particular Step configuration in this Item Submission Process configuration. The first step is numbered "0" (although step #0 is the implied "select collection" step).

If you want to retrieve the step after the "select collection" step, you should retrieve step #1. If the specified step isn't found, null is returned.

Parameters:
stepNum - desired step to retrieve
Returns:
the SubmissionStepConfig object for the step

hasMoreSteps

public boolean hasMoreSteps(int stepNum)
Returns whether or not there are more steps which follow the specified "stepNum". For example, if you specify stepNum=4, then this method checks to see if there is a Step #5. The first step is numbered "0".

Parameters:
stepNum - the current step.
Returns:
true, if a step at "stepNum+1" exists. false, otherwise.


Copyright © 2010 DuraSpace. All Rights Reserved.