protected VersionValidity isValidVersion(
      final int prptVersionMajorRaw,
      final int prptVersionMinorRaw,
      final int prptVersionPatchRaw,
      final ProjectInformation info) {
    final int releaseMajor = ParserUtil.parseInt(info.getReleaseMajor(), 999);
    final int releaseMinor = ParserUtil.parseInt(info.getReleaseMinor(), 999);
    final int releasePatch = ParserUtil.parseInt(info.getReleaseMilestone(), 999);
    if (computeVersionId(prptVersionMajorRaw, prptVersionMinorRaw, prptVersionPatchRaw)
        == VERSION_TRUNK) {
      return VersionValidity.VALID;
    }

    if ((prptVersionMajorRaw * 1000 + prptVersionMinorRaw) > (releaseMajor * 1000 + releaseMinor)) {
      return VersionValidity.INVALID_RELEASE;
    }

    if ((prptVersionMajorRaw * 1000 + prptVersionMinorRaw)
        == (releaseMajor * 1000 + releaseMinor)) {
      if (prptVersionPatchRaw > releasePatch) {
        return VersionValidity.INVALID_PATCH;
      }
    }
    return VersionValidity.VALID;
  }
 public static int computeCurrentVersionId() {
   final int releaseMajor =
       ParserUtil.parseInt(ClassicEngineInfo.getInstance().getReleaseMajor(), 999);
   final int releaseMinor =
       ParserUtil.parseInt(ClassicEngineInfo.getInstance().getReleaseMinor(), 999);
   final int releasePatch =
       ParserUtil.parseInt(ClassicEngineInfo.getInstance().getReleaseMilestone(), 999);
   final int version = computeVersionId(releaseMajor, releaseMinor, releasePatch);
   if (version == 0) {
     return VERSION_TRUNK;
   }
   return version;
 }
 public static int parseVersionId(final String text) {
   final StringTokenizer strtok = new StringTokenizer(text, ".");
   if (strtok.countTokens() == 3) {
     final int major = ParserUtil.parseInt(strtok.nextToken(), -1);
     final int minor = ParserUtil.parseInt(strtok.nextToken(), -1);
     final int patch = ParserUtil.parseInt(strtok.nextToken(), -1);
     if (major == -1 || minor == -1 || patch == -1) {
       return -1;
     } else {
       return (ClassicEngineBoot.computeVersionId(major, minor, patch));
     }
   } else {
     return -1;
   }
 }
  public boolean isValid(final Locale locale, final boolean deepCheck) {

    final String[] textProperties = {"display-name", "grouping"};
    for (int i = 0; i < textProperties.length; i++) {
      final String property = textProperties[i];
      if (StringUtils.isEmpty(getMetaAttribute(property, locale))) {
        return false;
      }
    }

    final String[] optionalTextProperties = {"description", "deprecated"};
    for (int i = 0; i < optionalTextProperties.length; i++) {
      final String property = optionalTextProperties[i];
      if (getMetaAttribute(property, locale) == null) {
        return false;
      }
    }

    final String[] integerProperties = {"grouping.ordinal", "ordinal"};
    for (int i = 0; i < integerProperties.length; i++) {
      final String property = integerProperties[i];
      if (ParserUtil.parseInt(getMetaAttribute(property, locale), Integer.MAX_VALUE)
          == Integer.MAX_VALUE) {
        return false;
      }
    }
    return true;
  }