Example #1
0
 @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);
     }
   }
 }
Example #2
0
 @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());
   }
 }
Example #3
0
 @Override
 public void onReveal() {
   destinationSelectionStepPresenter.refreshDisplay(); // to refresh the datasources
   updateFormatStepDisplay();
 }