Package com.instantiations.installer.core.steps

Examples of com.instantiations.installer.core.steps.ChoiceStep


   * Create a step displaying the EULA (End User License Agreement) for this product.
   *
   * @return the installation step created
   */
  protected ChoiceStep licenseStep() {
    ChoiceStep step = new ChoiceStep(installer);
    initStep(step, "License");
    step.setChoiceText(options.getString(InstallOptions.OPTION_LICENSE_AGREEMENT));
    step.setAcceptText("I accept the agreement");
    step.setDeclineText("I do not accept the agreement");
    step.setContinueOnDecline(false);
    step.setDefaultChoice(false);
    installer.add(step);
    return step;
  }
View Full Code Here


   * information about the product's bundles.
   *
   * @return the install step (not <code>null</code>)
   */
  protected ChoiceStep cleanConfigStep() {
    ChoiceStep step = new ChoiceStep(installer);
    initStep(step, OPTION_CLEAN_CONFIG);
    step.setChoiceText(options.getString("CleanConfigText"));
    step.setAcceptText(options.getString("CleanConfigYes"));
    step.setDeclineText(options.getString("CleanConfigNo"));
    step.setOptionName(OPTION_CLEAN_CONFIG);
    step.setDefaultChoice(options.getBoolean(OPTION_CLEAN_CONFIG));
    installer.add(step);
    return step;
  }
View Full Code Here

   * installations are detected.
   *
   * @return the install step (not <code>null</code>)
   */
  protected ChoiceStep checkUnlinkedInstallsStep() {
    final ChoiceStep step = new ChoiceStep(installer) {
      public boolean canBack() {
        return false;
      }

      public boolean canExecute() {
        String[] unlinkedInstallPaths = installer.getOptions().getStrings(
          ScanUnlinkedInstallsOperation.OPTION_UNLINKED_INSTALL_DIRS);
        String[] unusedInstallPaths = installer.getOptions().getStrings(
          ScanUnusedInstallsOperation.OPTION_UNUSED_INSTALL_DIRS);
        return (unlinkedInstallPaths.length > 0 || unusedInstallPaths.length > 0)
          && options.getBoolean(OPTION_CLEAN_CONFIG);
      }

      public void aboutToStep() {
        super.aboutToStep();
        StringWriter stringWriter = new StringWriter();
        PrintWriter writer = new PrintWriter(stringWriter);
        String[] unlinkedInstallPaths = installer.getOptions().getStrings(
          ScanUnlinkedInstallsOperation.OPTION_UNLINKED_INSTALL_DIRS);
        String[] unusedInstallPaths = installer.getOptions().getStrings(
          ScanUnusedInstallsOperation.OPTION_UNUSED_INSTALL_DIRS);
        for (int i = 0; i < unlinkedInstallPaths.length; i++)
          writer.println(unlinkedInstallPaths[i]);
        for (int i = 0; i < unusedInstallPaths.length; i++)
          writer.println(unusedInstallPaths[i]);
        setChoiceText(stringWriter.toString());
      }
    };
    step.setTitle("Delete old installations");
    step.setDescription("The following installations appear to be unused."
      + "\nDo you want to delete these installations?");
    step.setChoiceText("Scanning for unused installations...");
    step.setAcceptText("Yes, delete the installations listed above");
    step.setDeclineText("No, do NOT delete any installations");
    step.setDefaultChoice(false);
    step.setOptionName(OPTION_DELETE_UNUSED_INSTALLATIONS);
    installer.add(step);
    return step;
  }
View Full Code Here

TOP

Related Classes of com.instantiations.installer.core.steps.ChoiceStep

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.