Exemplo n.º 1
0
  @Override
  public void initialize() {
    super.initialize();

    behavior.initialize();

    initDataCenter();
  }
Exemplo n.º 2
0
  /** The execution of the action should be done by calling this method. */
  public final void runAction() {
    if (actionFlowState == null) {
      actionFlowState = new ActionFlowState(1, finalAction);
    }

    if (model.getProgress() == null) {
      model.startProgress(null);
      actionFlowState.setStartedProgress(true);
    }

    if (parallelAction != null) {
      parallelAction.runParallelAction(actionFlowState);
    }

    if (shouldExecute()) {
      internalRunAction();
    } else {
      runNextAction();
    }
  }
Exemplo n.º 3
0
  @Override
  public void executeCommand(UICommand command) {
    super.executeCommand(command);

    if (CMD_IMPORT.equals(command.getName())) {
      onImport();
    } else if (CMD_CANCEL.equals(command.getName())) {
      cancel();
    } else if (getAddImportCommand().equals(command)) {
      addImport();
    } else if (getCancelImportCommand().equals(command)) {
      cancelImport();
    }
  }
Exemplo n.º 4
0
  void tryToFinalize(boolean handleErrors) {
    if (actionFlowState.isAllDone()) {
      if (actionFlowState.isStartedProgress()) {
        model.stopProgress();
      }

      if (handleErrors) {
        handleErrors();
      }

      if (actionFlowState.getFinalAction() != null) {
        actionFlowState.getFinalAction().execute();
      }
    }
  }
Exemplo n.º 5
0
  @Override
  public void executeCommand(UICommand command) {
    super.executeCommand(command);

    if (CMD_SAVE.equals(command.getName())) {
      onSave();
    } else if (CMD_TEST.equals(command.getName())) {
      onTest();
    } else if (CMD_CANCEL.equals(command.getName())) {
      cancel();
    } else if (CMD_IMPORT_CERTIFICATE.equals(command.getName())) {
      importCertificate();
    } else if (CMD_CANCEL_IMPORT.equals(command.getName())) {
      cancelImport();
    }
  }
Exemplo n.º 6
0
  @Override
  public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) {
    super.eventRaised(ev, sender, args);

    if (ev.matchesDefinition(ListModel.selectedItemChangedEventDefinition)) {
      if (sender == getDataCenter()) {
        dataCenter_SelectedItemChanged();
      } else if (sender == getHost()) {
        host_SelectedItemChanged();
      } else if (sender == getAvailableStorageTypeItems()) {
        storageType_SelectedItemChanged();
      } else if (sender == getAvailableStorageDomainTypeItems()) {
        behavior.setStorageTypeItems();
      }
    } else if (ev.matchesDefinition(ListModel.itemsChangedEventDefinition)) {
      if (sender == getAvailableStorageTypeItems()) {
        storageItemsChanged();
      }
    } else if (ev.matchesDefinition(NfsStorageModel.pathChangedEventDefinition)) {
      nfsStorageModel_PathChanged(sender);
    }
  }