Package org.nasutekds.quicksetup

Examples of org.nasutekds.quicksetup.BuildInformation


   * Implements the initialization phase of the upgrade.
   * @throws ApplicationException if upgrade is not possible
   */
  protected void initialize() throws ApplicationException {
    try {
      BuildInformation fromVersion = getCurrentInstanceBuildInformation();
      BuildInformation toVersion = getStagedBuildInformation();
      if (fromVersion.equals(toVersion)) {
        // Only possible if product differs
        String fromProductName = getCurrentBuildInformation().getName();
        String toProductName = toVersion.getName();
        LOG.log(Level.FINEST, "fromProductName=" + fromProductName);
        LOG.log(Level.FINEST, "toProductName=" + toProductName);
        if ((fromProductName != null) &&
                (toProductName != null) &&
                fromProductName.equals(toProductName)) {
          throw new ApplicationException(ReturnCode.APPLICATION_ERROR,
                  INFO_UPGRADE_ORACLE_SAME_VERSION.get(
                  toVersion.toString()), null);
        }
      }
      if (getInstallation().getStatus().isServerRunning()) {
        new ServerController(getInstallation()).stopServer(true);
      }
View Full Code Here


   * day' types of changes to the codebase.
   * @throws org.nasutekds.quicksetup.ApplicationException if upgradability
   *         cannot be insured.
   */
  private void insureUpgradability() throws ApplicationException {
    BuildInformation newVersion;
    currentVersion = getCurrentInstanceBuildInformation();

    try {
      newVersion = getStagedInstallation().getBuildInformation();
    } catch (ApplicationException ae) {
View Full Code Here

  private Message getFinalSuccessMessage() {
    Message txt;
    String installPath = Utils.getPath(getInstallation().getRootDirectory());
    String newVersion;
    try {
      BuildInformation bi = getInstallation().getBuildInformation();
      if (bi != null) {
        newVersion = bi.toString();
      } else {
        newVersion = INFO_UPGRADE_BUILD_ID_UNKNOWN.get().toString();
      }
    } catch (ApplicationException e) {
      newVersion = INFO_UPGRADE_BUILD_ID_UNKNOWN.get().toString();
View Full Code Here

      System.exit(USER_ERROR);
    }
    }

    // Initialize buildinfo in not already done (ZIP delivery)
    BuildInformation installBi =
            BuildInformation.fromBuildString(MAJOR_VERSION +
            "." + MINOR_VERSION +
            "." + POINT_VERSION +
            "." + REVISION_NUMBER);
    File bif = new File(confDir, Installation.BUILDINFO_RELATIVE_PATH);
    if (!bif.exists()) {
      FileWriter fwriter = null;
      try {
        fwriter = new FileWriter(bif, true);
        fwriter.append(installBi.getBuildString());
      } catch (Exception e) {
      } finally {
        try {
          fwriter.close();
        } catch (Exception e) {
        }
      }
    }

    // Check version
    if (checkVersionArg.isPresent()) {
      BuildInformation instanceBi = installBi;

      try {
        if (bif.exists()) {
          BufferedReader breader = new BufferedReader(new FileReader(bif));
View Full Code Here

                Message date = INFO_GENERAL_UNKNOWN.get();
                try {
                  File f = appendFilesDirIfNeccessary(raDir);
                  Installation i =
                          new Installation(f,f);
                  BuildInformation bi = i.getBuildInformation();
                  buildInfo = Message.raw(bi.toString());
                } catch (Exception e) {
                  LOG.log(Level.INFO,
                          "Error determining archive version for " + name);
                }
View Full Code Here

      if (ui != null) {
        Message cont = INFO_CONTINUE_BUTTON_LABEL.get();
        Message cancel = INFO_CANCEL_BUTTON_LABEL.get();

        String toBuildString;
        BuildInformation toBi = getArchiveBuildInformation();
        if (toBi != null) {
          toBuildString = toBi.toString();
        } else {
          if (getReversionFilesDirectory() == null)
          {
            throw new ApplicationException(
                ReturnCode.APPLICATION_ERROR,
View Full Code Here

  private Message getFinalSuccessMessage() {
    Message txt;
    String installPath = Utils.getPath(getInstallation().getRootDirectory());
    String newVersion;
    try {
      BuildInformation bi = getInstallation().getBuildInformation();
      if (bi != null) {
        newVersion = bi.toString();
      } else {
        newVersion = INFO_UPGRADE_BUILD_ID_UNKNOWN.get().toString();
      }
    } catch (ApplicationException e) {
      newVersion = INFO_UPGRADE_BUILD_ID_UNKNOWN.get().toString();
View Full Code Here

   * day' types of changes to the codebase.
   * @throws org.nasutekds.quicksetup.ApplicationException if revertability
   *         cannot be insured.
   */
  private void insureRevertability() throws ApplicationException {
    BuildInformation currentVersion;
    BuildInformation newVersion;
    try {
      currentVersion = getInstallation().getBuildInformation();
    } catch (ApplicationException e) {
      LOG.log(Level.INFO, "Error getting build information for " +
              "current installation", e);
View Full Code Here

   * @return String indicating the new build
   */
  private String getNewBuildString() {
    String b = null;
    try {
      BuildInformation bi = BuildInformation.getCurrent();
      if (bi != null) {
        b = bi.toString();
      }
    } catch (ApplicationException e) {
      LOG.log(Level.INFO, "error trying to determine new build string", e);
    }
    if (b == null) {
View Full Code Here

TOP

Related Classes of org.nasutekds.quicksetup.BuildInformation

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.