mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Violette Roche-Montane
29.46.2013 ef366490d191540780579c1e5e057b73ddea1f10
OPENDJ-928 Update tool: add option to automatically accept the license
- License is now accepted at the end of upgrade's process (if no errors).
1 files modified
18 ■■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/tools/upgrade/Upgrade.java 18 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/upgrade/Upgrade.java
@@ -411,6 +411,9 @@
        // At the end, and if only if succeed, we need to change the buildInfo
        // file with the version number updated.
        changeBuildInfoVersion(context, handler);
        // Writes the license if needed.
        LicenseFile.createFileLicenseApproved();
      }
      else
      {
@@ -661,24 +664,17 @@
          }
          else if (answer == ConfirmationCallback.YES)
          {
            createLicenseApproval();
            LicenseFile.setApproval(true);
          }
        }
        else
        {
          context.notify(handler, INFO_LICENSE_ACCEPT.get());
          context.notify(handler, INFO_PROMPT_YES_COMPLETE_ANSWER.get());
          createLicenseApproval();
        }
      }
    }
  }
  private static void createLicenseApproval()
  {
    // Creates the file
    LicenseFile.setApproval(true);
    LicenseFile.createFileLicenseApproved();
        }
      }
    }
  }
  // Prevent instantiation.