main/src/main/java/org/onap/policy/pap/main/rest/depundep/PdpGroupDeployProvider.java
/**
     * Determines if the new version matches the version in the DB.
     *
     * @param dbvers fully qualified version from the DB
     * @param ident identifier whose version is to be validated; the version need not be
     *        fully qualified
     * @param result the validation result
     */
Determines if the new version matches the version in the DB.
@param dbvers fully qualified version from the DB
@param ident identifier whose version is to be validated; the version need not be
fully qualified
@param result the validation result
Determines if the new version matches the version in the DB . @param dbvers fully qualified version from the DB @param ident identifier whose version is to be validated ; the version need not be fully qualified @param result the validation result
private void validateVersion(String dbvers, ToscaPolicyIdentifier ident, BeanValidationResult result) {
        String idvers = ident.getVersion();
        if (dbvers.equals(idvers)) {
            return;
        }
        if (SessionData.isVersionPrefix(idvers) && dbvers.startsWith(idvers + ".")) {
            return;
        }
        result.addResult(new ObjectValidationResult(POLICY_RESULT_NAME, ident, ValidationStatus.INVALID,
                        "different version already deployed: " + dbvers));
    }
private void validateVersion ( String dbvers , ToscaPolicyIdentifier ident , BeanValidationResult result ) { String idvers = ident . getVersion ( ) ; if ( dbvers . equals ( idvers ) ) { return ; } if ( SessionData . isVersionPrefix ( idvers ) && dbvers . startsWith ( idvers + "." ) ) { return ; } result . addResult ( new ObjectValidationResult ( POLICY_RESULT_NAME , ident , ValidationStatus . INVALID , "different version already deployed: " + dbvers ) ) ; }
Determines if the new version matches the version in the DB.
Determines if the new version matches the version in the DB .
// did not match - see if it's a prefix // ident has a prefix of this version