src/main/java/application/rest/v1/configmaps/KindActionMappingProcessor.java
/**
     * Test to see if the given component resource KSN value matches exactly or matches via wildcard
     * to the kam mapping KSN value
     * 
     * @param compKSNValue  can be KSN, KS, KN, K
     * @param kamKSNValue can be KSN, KS, KN, K
     * @param kamName kam name property
     * @param kamSubkind kam subkind property
     * @param kamKind kam kind property
     * @return true if kam KSN value matches component KSN value; otherwise false
     */
Test to see if the given component resource KSN value matches exactly or matches via wildcard
to the kam mapping KSN value


Test to see if the given component resource KSN value matches exactly or matches via wildcard to the kam mapping KSN value
private boolean isResourceMatchesRule(int compKSNValue, int kamKSNValue,
                                          String kamName, String kamSubkind, String kamKind) {
        String methodName = "isResourceMatchesRule";
        if (Logger.isEntryEnabled()) 
                Logger.log(CLASS_NAME, methodName, Logger.LogType.ENTRY, 
                           "cNumField = " + compKSNValue + " kNumField = " + kamKSNValue);
        if ( (compKSNValue == NO_KSN) || (kamKSNValue == NO_KSN)) {
            if (Logger.isErrorEnabled()) 
                Logger.log(CLASS_NAME, methodName, Logger.LogType.ERROR, "return false");
            return false;
        }
        boolean match = false;
        if (compKSNValue == kamKSNValue) {
            switch (kamKSNValue) {
            case KSN:
                if ((kamName.equals(this.compName)) || (kamName.equals(WILDCARD)))
                    if ((kamSubkind.equals(this.compSubkind)) || (kamSubkind.equals(WILDCARD)))
                        if ((kamKind.equals(this.compKind)) || (kamKind.equals(WILDCARD)))
                            match = true;
                break;
            case KS:
                if ((kamSubkind.equals(this.compSubkind)) || (kamSubkind.equals(WILDCARD)))
                    if ((kamKind.equals(this.compKind)) || (kamKind.equals(WILDCARD)))
                        match = true;
                break;
            case KN:
                if ((kamName.equals(this.compName)) || (kamName.equals(WILDCARD)))
                    if ((kamKind.equals(this.compKind)) || (kamKind.equals(WILDCARD)))
                        match = true;
                break;
            case K:
                if (compKSNValue == K)
                    if ((kamKind.equals(this.compKind)) || (kamKind.equals(WILDCARD)))
                        match = true;
            }
        } else if ((compKSNValue == KSN) && (kamKSNValue == KS)) {
            if ( (kamSubkind.equals(this.compSubkind)) || (kamSubkind.equals(WILDCARD)) ) 
                if ( (kamKind.equals(this.compKind)) || (kamKind.equals(WILDCARD)) ) 
                    match = true;
        } else if (kamKSNValue == K) {
            if ((kamKind.equals(this.compKind)) || (kamKind.equals(WILDCARD)))
                match = true;
        }
        if (Logger.isExitEnabled()) 
                Logger.log(CLASS_NAME, methodName, Logger.LogType.EXIT, "return = " + match);
        return match;
    }
private boolean isResourceMatchesRule ( int compKSNValue , int kamKSNValue , String kamName , String kamSubkind , String kamKind ) { String methodName = "isResourceMatchesRule" ; if ( Logger . isEntryEnabled ( ) ) Logger . log ( CLASS_NAME , methodName , Logger . LogType . ENTRY , "cNumField = " + compKSNValue + " kNumField = " + kamKSNValue ) ; if ( ( compKSNValue == NO_KSN ) || ( kamKSNValue == NO_KSN ) ) { if ( Logger . isErrorEnabled ( ) ) Logger . log ( CLASS_NAME , methodName , Logger . LogType . ERROR , "return false" ) ; return false ; } boolean match = false ; if ( compKSNValue == kamKSNValue ) { switch ( kamKSNValue ) { case KSN : if ( ( kamName . equals ( this . compName ) ) || ( kamName . equals ( WILDCARD ) ) ) if ( ( kamSubkind . equals ( this . compSubkind ) ) || ( kamSubkind . equals ( WILDCARD ) ) ) if ( ( kamKind . equals ( this . compKind ) ) || ( kamKind . equals ( WILDCARD ) ) ) match = true ; break ; case KS : if ( ( kamSubkind . equals ( this . compSubkind ) ) || ( kamSubkind . equals ( WILDCARD ) ) ) if ( ( kamKind . equals ( this . compKind ) ) || ( kamKind . equals ( WILDCARD ) ) ) match = true ; break ; case KN : if ( ( kamName . equals ( this . compName ) ) || ( kamName . equals ( WILDCARD ) ) ) if ( ( kamKind . equals ( this . compKind ) ) || ( kamKind . equals ( WILDCARD ) ) ) match = true ; break ; case K : if ( compKSNValue == K ) if ( ( kamKind . equals ( this . compKind ) ) || ( kamKind . equals ( WILDCARD ) ) ) match = true ; } } else if ( ( compKSNValue == KSN ) && ( kamKSNValue == KS ) ) { if ( ( kamSubkind . equals ( this . compSubkind ) ) || ( kamSubkind . equals ( WILDCARD ) ) ) if ( ( kamKind . equals ( this . compKind ) ) || ( kamKind . equals ( WILDCARD ) ) ) match = true ; } else if ( kamKSNValue == K ) { if ( ( kamKind . equals ( this . compKind ) ) || ( kamKind . equals ( WILDCARD ) ) ) match = true ; } if ( Logger . isExitEnabled ( ) ) Logger . log ( CLASS_NAME , methodName , Logger . LogType . EXIT , "return = " + match ) ; return match ; }
Test to see if the given component resource KSN value matches exactly or matches via wildcard
 to the kam mapping KSN value
Test to see if the given component resource KSN value matches exactly or matches via wildcard to the kam mapping KSN value