public void addSubtask(ICompositeCheatSheetTask task) {
   if (subtasks == null) {
     subtasks = new ArrayList();
   }
   subtasks.add(task);
   ((AbstractTask) task).setParent(this);
 }
Beispiel #2
0
  @Override
  protected void initTask() {
    super.initTask();

    if (isWindows) {
      cmd = "\"" + installDir + "\\bin\\installUtility.bat\"";
      processBuilder.environment().put("EXIT_ALL", "1");
    } else {
      cmd = installDir + "/bin/installUtility";
    }

    Properties sysp = System.getProperties();
    String javaHome = sysp.getProperty("java.home");

    // Set active directory (install dir)
    processBuilder.directory(installDir);
    processBuilder.environment().put("JAVA_HOME", javaHome);
    processBuilder.redirectErrorStream(true);
  }
Beispiel #3
0
 private void setCommonTaskMembers(AbstractTask task, CRTask crTask) {
   CRTask crTaskOnCancel = crTask.getOnCancel();
   task.setCancelTask(crTaskOnCancel != null ? toAbstractTask(crTaskOnCancel) : null);
   task.runIfConfigs = toRunIfConfigs(crTask.getRunIf());
 }
Beispiel #4
0
 private void log(AbstractTask task, String msg) {
   System.out.println("Verifica del file CNIPA delle root CA fallita!");
   if (task != null) task.setCanceled("Errore nella validazione delle root CA!");
 }
Beispiel #5
0
 @SuppressWarnings("hiding")
 @Override
 public void initialize(LocalPackage pkg, boolean restart) throws PackageException {
   super.initialize(pkg, restart);
   loadCommands();
 }
 /**
  * Sets a local result for this task. If this task is the root, set the shared result instead (if
  * not already set).
  *
  * @param localResult The result to set for this task
  */
 @Override
 protected void setLocalResult(R localResult) {
   if (isRoot()) {
     if (localResult != null) sharedResult.compareAndSet(null, localResult);
   } else super.setLocalResult(localResult);
 }