/** * Constructs a new Submission Configuration object, based on the XML * configuration file (item-submission.xml) * * @param submissionName the submission process name * @param steps the vector listing of step information to build * SubmissionStepConfig objects for this submission process */ public SubmissionConfig(boolean isDefault, String submissionName, List<Map<String, String>> steps) { this.submissionName = submissionName; this.defaultConf = isDefault; // initialize a vector of SubmissionStepConfig objects List<SubmissionStepConfig> stepConfigs = new ArrayList<SubmissionStepConfig>(); // loop through our steps, and create SubmissionStepConfig objects for (int stepNum = 0; stepNum < steps.size(); stepNum++) { Map<String, String> stepInfo = steps.get(stepNum); SubmissionStepConfig step = new SubmissionStepConfig(stepInfo); // set the number of the step (starts at 0) and add it step.setStepNumber(stepNum); stepConfigs.add(step); log.debug("Added step '" + step.getProcessingClassName() + "' as step #" + step.getStepNumber() + " of submission process " + submissionName); } // get steps as an array of Strings submissionSteps = stepConfigs .toArray(new SubmissionStepConfig[stepConfigs.size()]); }
int stepNumber = currentStep.getStepNumber(); if(currentStep.getId()!=null && currentStep.getId().equals(SubmissionStepConfig.SELECT_COLLECTION_STEP)) Class<?> stepClass = loader.loadClass(currentStep.getProcessingClassName()); + currentStep.getProcessingClassName() + "' Error:", e);
.loadClass(stepConfig.getProcessingClassName()); throw new Exception("The submission step class specified by '" + stepConfig.getProcessingClassName() + "' does not extend the class org.dspace.submit.AbstractProcessingStep!" + " Therefore it cannot be used by the Configurable Submission as the <processing-class>!"); if(stepConfig.getJSPUIClassName()!=null && stepConfig.getJSPUIClassName().length()>0) .loadClass(stepConfig.getJSPUIClassName()); throw new Exception("The submission step class specified by '" + stepConfig.getJSPUIClassName() + "' does not extend the class org.dspace.app.webui.JSPStep!" + " Therefore it cannot be used by the Configurable Submission for the JSP user interface!");
int currentStepNum = step.getStepNumber(); if(currentStepConfig.isVisible())
subInfo).getStepNumber()) log.error("Problem loading Review JSP for step #" + s.getStepNumber() + ". ", e); JSPManager.showIntegrityError(request, response); return;
if (!subInfo.isInWorkflow() && (currentStepConfig.getStepNumber() > getStepReached(subInfo))) userHasReached(subInfo, currentStepConfig.getStepNumber()); + currentStepConfig.getProcessingClassName() + "'"); log.error("Error loading step class'" + currentStepConfig.getProcessingClassName() + "':", e); JSPManager.showInternalError(request, response);
public List<DCInputSet> getInputsBySubmissionName(String name) throws DCInputsReaderException { SubmissionConfig config; try { config = new SubmissionConfigReader().getSubmissionConfigByName(name); String formName = config.getSubmissionName(); if (formName == null) { throw new DCInputsReaderException("No form designated as default"); } List<DCInputSet> results = new ArrayList<DCInputSet>(); for (int idx = 0; idx < config.getNumberOfSteps(); idx++) { SubmissionStepConfig step = config.getStep(idx); if (SubmissionStepConfig.INPUT_FORM_STEP_NAME.equals(step.getType())) { results.add(getInputsByFormName(step.getId())); } } return results; } catch (SubmissionConfigReaderException e) { throw new DCInputsReaderException("No form designated as default", e); } }
+ stepConfig.getProcessingClassName() + "'"); .getProcessingClassName()); + stepConfig.getProcessingClassName() + "':", e); JSPManager.showInternalError(request, response);
/** * Returns a particular global step definition based on its ID. * <P> * Global step definitions are those defined in the {@code <step-definitions>} * section of the configuration file. * * @param stepID step's identifier * @return the SubmissionStepConfig representing the step * @throws SubmissionConfigReaderException if no default submission process configuration defined */ public SubmissionStepConfig getStepConfig(String stepID) throws SubmissionConfigReaderException { // We should already have the step definitions loaded if (stepDefns != null) { // retreive step info Map<String, String> stepInfo = stepDefns.get(stepID); if (stepInfo != null) { return new SubmissionStepConfig(stepInfo); } } return null; }
AbstractStep stepUIClass = loadXMLUIClass(stepConfig.getXMLUIClassName()); + stepConfig.getXMLUIClassName() + ":", e); log.warn("The Step represented by " + stepConfig.getXMLUIClassName() + " is not a valid AbstractSubmissionStep, so it cannot be reviewed during the ReviewStep!");
/** * Returns the set of DC inputs used for a particular collection, or the * default set if no inputs defined for the collection * * @param collectionHandle collection's unique Handle * @return DC input set * @throws DCInputsReaderException if no default set defined * @throws ServletException */ public List<DCInputSet> getInputsByCollectionHandle(String collectionHandle) throws DCInputsReaderException { SubmissionConfig config; try { config = new SubmissionConfigReader().getSubmissionConfigByCollection(collectionHandle); String formName = config.getSubmissionName(); if (formName == null) { throw new DCInputsReaderException("No form designated as default"); } List<DCInputSet> results = new ArrayList<DCInputSet>(); for (int idx = 0; idx < config.getNumberOfSteps(); idx++) { SubmissionStepConfig step = config.getStep(idx); if (SubmissionStepConfig.INPUT_FORM_STEP_NAME.equals(step.getType())) { results.add(getInputsByFormName(step.getId())); } } return results; } catch (SubmissionConfigReaderException e) { throw new DCInputsReaderException("No form designated as default", e); } }
int currStep = currentStepConfig.getStepNumber(); int currPage = AbstractProcessingStep.getCurrentPage(request); double currStepAndPage = Float
currentStepNum = currentStepConfig.getStepNumber(); currentStepNum = currentStepConfig.getStepNumber(); foundPrevious = true;
doStep(context, request, response, subInfo, currentStepConfig.getStepNumber());
.getStepNumber()); else if ((this.stepConfig.getStepNumber() == SubmissionController .getStepReached(subInfo)) && (currentPage > pageReached))
int currStep=stepConfig.getStepNumber(); doStep(context, request, response, subInfo, currStep); stepConfig); int currStep=stepConfig.getStepNumber(); int currPage=AbstractProcessingStep.getCurrentPage(request); double currStepAndPage = Float.parseFloat(currStep+"."+currPage);
currentStepNum = currentStepConfig.getStepNumber();
+ step.getStepNumber() + "\"/>";