Example #1
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 #2
0
  @Override
  protected void onBind() {
    super.onBind();
    csvFormatStepPresenter.bind();
    xmlFormatStepPresenter.bind();
    spssFormatStepPresenter.bind();
    limesurveyStepPresenter.bind();
    restStepPresenter.bind();
    comparedDatasourcesReportPresenter.bind();

    comparedDatasourcesReportPresenter.allowIgnoreAllModifications(false);

    setInSlot(Slots.Destination, destinationSelectionStepPresenter);
    setInSlot(Slots.Unit, unitSelectionStepPresenter);
    setInSlot(Slots.Values, datasourceValuesStepPresenter);
    setInSlot(Slots.Archive, archiveStepPresenter);
    setInSlot(Slots.Limesurvey, limesurveyStepPresenter);
    setInSlot(Slots.Rest, restStepPresenter);

    getView().setUnitSelectionStepInHandler(new UnitSelectionStepInHandler());
    getView().setComparedDatasourcesReportDisplay(comparedDatasourcesReportPresenter.getView());
    getView()
        .setComparedDatasourcesReportStepInHandler(
            transientDatasourceHandler = new TransientDatasourceHandler());
    getView().setDatasourceValuesStepInHandler(new DatasourceValuesHandler());

    addEventHandlers();
  }
Example #3
0
 @Override
 protected void onUnbind() {
   super.onUnbind();
   csvFormatStepPresenter.unbind();
   xmlFormatStepPresenter.unbind();
   spssFormatStepPresenter.unbind();
   limesurveyStepPresenter.unbind();
   restStepPresenter.unbind();
 }