Package org.openbravo.erpCommon.modules.VersionUtility

Examples of org.openbravo.erpCommon.modules.VersionUtility.VersionComparator


              + depActualVersion + ". They must exactly match.");
        }
        // check dependencies for included modules recursively
        checkDependencyVersion(dependentModule.getDependentModule(), result);
      } else {
        VersionUtility.VersionComparator vc = new VersionComparator();
        if (vc.compare(depDefinedVersion, depActualVersion) == 1) {
          result.addError(SystemValidationType.MODULE_ERROR, module.getName()
              + " defines dependency on " + dependentModule.getDependentModule().getName()
              + " start version " + depDefinedVersion + ", but actual version in DB is "
              + depActualVersion);
        } else if (dependentModule.getLastVersion() == null
            && vc.compareMajorVersions(depDefinedVersion, depActualVersion) != 0) {
          result.addError(SystemValidationType.MODULE_ERROR, module.getName()
              + " defines dependency on " + dependentModule.getDependentModule().getName()
              + " start version " + depDefinedVersion + ", but actual version in DB is "
              + depActualVersion + ". Which has a different major version.");
        } else if (dependentModule.getLastVersion() != null
            && vc.compare(depActualVersion, dependentModule.getLastVersion()) == 1) {
          result.addError(SystemValidationType.MODULE_ERROR, module.getName()
              + " defines dependency on " + dependentModule.getDependentModule().getName()
              + " end version " + dependentModule.getLastVersion()
              + ", but actual version in DB is " + depActualVersion);
        }
View Full Code Here

TOP

Related Classes of org.openbravo.erpCommon.modules.VersionUtility.VersionComparator

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.