src/main/java/application/rest/v1/configmaps/KindActionMappingProcessor.java
/**
     * Check to see if the apiVersions of a component and a mapping are matching
     * 
     * @param apiVersion
     * @param compApiVersion
     * @return true when the apiVersion is matched; false otherwise
     */
Check to see if the apiVersions of a component and a mapping are matching

@param apiVersion
@param compApiVersion
@return true when the apiVersion is matched; false otherwise
Check to see if the apiVersions of a component and a mapping are matching @param apiVersion @param compApiVersion @return true when the apiVersion is matched ; false otherwise
private boolean isApiVersionMatch(String apiVersion, String compApiVersion) {
        String methodName = "isApiVersionMatch";
        if (Logger.isEntryEnabled()) 
            Logger.log(CLASS_NAME, methodName, Logger.LogType.ENTRY, "apiVerion = " + apiVersion +
                       ", compApiVersion = " + compApiVersion);
        boolean match = false;
        if ( (apiVersion != null) && (!apiVersion.isEmpty()) &&
             (compApiVersion != null) && (!compApiVersion.isEmpty()) ) {   
            if (apiVersion.equals(compApiVersion)) { 
                match = true;
            } else {
                String grp_version[] = apiVersion.split("/");
                String comp_grp_version[] = compApiVersion.split("/");
                if ( (grp_version.length == 2) && (comp_grp_version.length == 2) ){ 
                    if (grp_version[GROUP].equals(comp_grp_version[GROUP]) || (grp_version[GROUP].equals(WILDCARD)) )
                        if (grp_version[VERSION].equals(comp_grp_version[VERSION]) || (grp_version[VERSION].equals(WILDCARD)) ) {
                            match = true;
                        }
                } else if ( (grp_version.length == 1) && (comp_grp_version.length == 1) ) { 
                    if (grp_version[GROUPLESS_VERSION].equals(comp_grp_version[GROUPLESS_VERSION]) || 
                       (grp_version[GROUPLESS_VERSION].equals(WILDCARD)) ) {
                        match = true;
                    }
                } 
            }
        }
        if (Logger.isExitEnabled()) 
            Logger.log(CLASS_NAME, methodName, Logger.LogType.EXIT, "match = " + match);
        return match;
    }
private boolean isApiVersionMatch ( String apiVersion , String compApiVersion ) { String methodName = "isApiVersionMatch" ; if ( Logger . isEntryEnabled ( ) ) Logger . log ( CLASS_NAME , methodName , Logger . LogType . ENTRY , "apiVerion = " + apiVersion + ", compApiVersion = " + compApiVersion ) ; boolean match = false ; if ( ( apiVersion != null ) && ( ! apiVersion . isEmpty ( ) ) && ( compApiVersion != null ) && ( ! compApiVersion . isEmpty ( ) ) ) { if ( apiVersion . equals ( compApiVersion ) ) { match = true ; } else { String grp_version [ ] = apiVersion . split ( "/" ) ; String comp_grp_version [ ] = compApiVersion . split ( "/" ) ; if ( ( grp_version . length == 2 ) && ( comp_grp_version . length == 2 ) ) { if ( grp_version [ GROUP ] . equals ( comp_grp_version [ GROUP ] ) || ( grp_version [ GROUP ] . equals ( WILDCARD ) ) ) if ( grp_version [ VERSION ] . equals ( comp_grp_version [ VERSION ] ) || ( grp_version [ VERSION ] . equals ( WILDCARD ) ) ) { match = true ; } } else if ( ( grp_version . length == 1 ) && ( comp_grp_version . length == 1 ) ) { if ( grp_version [ GROUPLESS_VERSION ] . equals ( comp_grp_version [ GROUPLESS_VERSION ] ) || ( grp_version [ GROUPLESS_VERSION ] . equals ( WILDCARD ) ) ) { match = true ; } } } } if ( Logger . isExitEnabled ( ) ) Logger . log ( CLASS_NAME , methodName , Logger . LogType . EXIT , "match = " + match ) ; return match ; }
Check to see if the apiVersions of a component and a mapping are matching
Check to see if the apiVersions of a component and a mapping are matching
// group/version - exact match // group/version - wildcard match // verion only