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); } }
&& lastSubmissionConfig.getSubmissionName().equals(submitName)) { log.debug("Found submission process config '" + submitName + "' in cache."); + "' not in cache. Reloading from scratch."); lastSubmissionConfig = new SubmissionConfig(StringUtils.equals(getDefaultSubmissionConfigName(), submitName), submitName, steps); + lastSubmissionConfig.getNumberOfSteps() + " steps listed.");
/** * 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". * * @param stepNum the current step. * @return true, if a step at "stepNum+1" exists. false, otherwise. */ public boolean hasMoreSteps(int stepNum) { return (getStep(stepNum + 1) != null); } }
for (int i = 0; i < subInfo.getSubmissionConfig().getNumberOfSteps(); i++) .getStep(i); int stepNumber = currentStep.getStepNumber();
int lastStep = subConfig.getNumberOfSteps() - 2; wsi.setStageReached(lastStep); wsi.setPageReached(AbstractProcessingStep.LAST_PAGE_REACHED);
if (subInfo.getSubmissionConfig().hasMoreSteps(currentStepNum))
return si.getSubmissionConfig().getStep(stepNum);
if(getStepReached(si) >= si.getSubmissionConfig().getNumberOfSteps()) int lastStep = si.getSubmissionConfig().getNumberOfSteps()-1; wi.setStageReached(lastStep);
/** * 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); } }
currentStepConfig = si.getSubmissionConfig().getStep(currentStepNum);
int lastStep = subConfig.getNumberOfSteps()-2; wsi.setStageReached(lastStep); wsi.setPageReached(AbstractProcessingStep.LAST_PAGE_REACHED);
SubmissionStepConfig s = subProcessConfig.getStep(stepNum);
SubmissionStepConfig stepConfig = subConfig.getStep(currentStepAndPage.getStep());
currentStepConfig = subInfo.getSubmissionConfig().getStep(stepNumber);