@Override public void onWizardRequired(WizardRequiredEvent event) { destinationSelectionStepPresenter.setDestination(null); if (event.getEventParameters().length != 0) { if (event.getEventParameters()[0] instanceof String) { String datasourceName = (String) event.getEventParameters()[0]; destinationSelectionStepPresenter.setDestination(datasourceName); } } }
@SuppressWarnings({"PMD.NcssMethodCount", "OverlyLongMethod"}) private void updateFormatStepDisplay() { destinationSelectionStepPresenter.setImportFormat(getView().getImportFormat()); getView().updateHelp(); switch (getView().getImportFormat()) { case CSV: csvFormatStepPresenter.clear(); formatStepPresenter = csvFormatStepPresenter; getView().setFormatStepDisplay(csvFormatStepPresenter.getView()); break; case XML: formatStepPresenter = xmlFormatStepPresenter; getView().setFormatStepDisplay(xmlFormatStepPresenter.getView()); break; case LIMESURVEY: formatStepPresenter = limesurveyStepPresenter; getView().setFormatStepDisplay(limesurveyStepPresenter.getView()); break; case REST: formatStepPresenter = restStepPresenter; getView().setFormatStepDisplay(restStepPresenter.getView()); break; case SPSS: formatStepPresenter = spssFormatStepPresenter; getView().setFormatStepDisplay(spssFormatStepPresenter.getView()); break; default: noFormatStepPresenter.setImportFormat(getView().getImportFormat()); formatStepPresenter = noFormatStepPresenter; getView().setFormatStepDisplay(noFormatStepPresenter.getView()); } }
@Override public void onReveal() { destinationSelectionStepPresenter.refreshDisplay(); // to refresh the datasources updateFormatStepDisplay(); }