public static final void getXMLMethodsDenied(boolean[] denyAll,
                                                 int type,
                                                 String[] methodNames,
                                                 Class<?>[][] methodParamTypes,
                                                 ExcludeList excludeList,
                                                 BeanMetaData bmd) //PK93643
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "getXMLMethodsDenied", Arrays.toString(denyAll));

        if (excludeList != null) {
            if (isTraceOn && tc.isDebugEnabled()) {
                Tr.debug(tc, "*** Exclude List has " + excludeList.getMethodElements().size() + " entries to process ***");
            }

            // array to keep track of what kind of style last set the method-specific behavior
            int[] highestStyleOnMethod = new int[methodNames.length];

            // Elements of highestStyleOnMethod[] are initialized to zero by Java rules.

            // j : MethodElements loop
            // k : Method loop

            List<com.ibm.ws.javaee.dd.ejb.Method> methodElements = excludeList.getMethodElements();

            for (int j = 0; j < methodElements.size(); j++) {
                com.ibm.ws.javaee.dd.ejb.Method me = methodElements.get(j);
                String ejbNameFromMethodElement = me.getEnterpriseBeanName();
                int meType = me.getInterfaceTypeValue();

                // If ejbNameFromMethodElement is null the customer most likely has an xml
                // coding error in the method element where the ejb-name is incorrect.
                if (ejbNameFromMethodElement == null) { //PK93643
                    Tr.warning(tc, "INVALID_EXCLUDE_LIST_XML_CNTR0124W",
                               new Object[] { bmd.getJ2EEName().getModule(), bmd.enterpriseBeanName }); //PK93643
                }

                if ((ejbNameFromMethodElement != null) && (ejbNameFromMethodElement.equals(bmd.enterpriseBeanName))) { //PK93643
                    String meName = me.getMethodName().trim();
                    if (meName.equals("*")) {
                        if (meType == com.ibm.ws.javaee.dd.ejb.Method.INTERFACE_TYPE_UNSPECIFIED) {
                            // style type 1 -- wildcard on all bean methods
                            for (int k = 0; k < methodNames.length; ++k) {
                                if (highestStyleOnMethod[k] <= 1) {
                                    if (isTraceOn && tc.isDebugEnabled()) {
                                        trace(me, "Style 1 - assigning denyAll " + true);
                                    }
                                    // set denyAll for this method as true.
                                    denyAll[k] = true;

                                    highestStyleOnMethod[k] = 1;
                                }
                            }

                        } else if (meType == type) { //LIDB2257.19
                            // style type 2 -- wildcard on home or remote interface methods
                            for (int k = 0; k < methodNames.length; ++k) {
                                if (highestStyleOnMethod[k] <= 2) {
                                    if (isTraceOn && tc.isDebugEnabled()) {
                                        trace(me, "Style 2 - assigning denyAll " + true);
                                    }
                                    // set denyAll for this method as true.
                                    denyAll[k] = true;

                                    highestStyleOnMethod[k] = 2;
                                }
                            }
                        }
                    } else if (meType == com.ibm.ws.javaee.dd.ejb.Method.INTERFACE_TYPE_UNSPECIFIED || meType == type) { //LIDB2257.19
                        // It is not a wildcard, and either has an unspecified
                        // type, or is of the right type (Remote/Home/Local),
                        // so check for a method name match.             d123321
                        for (int k = 0; k < methodNames.length; ++k) {
                            if (meName.equals(methodNames[k])) {
                                List<String> meParms = me.getMethodParamList();
                                if (meParms == null) {
                                    // style type 3 - matching method name, no signature
                                    //                specified
                                    if (highestStyleOnMethod[k] <= 3) {
                                        if (isTraceOn && tc.isDebugEnabled()) {
                                            trace(me, "Style 3 - assigning denyAll " + true);
                                        }
                                        // set denyAll for this method as true.
                                        denyAll[k] = true;

                                        highestStyleOnMethod[k] = 3;
                                    }
                                } else {
                                    if (DDUtil.methodParamsMatch(meParms, methodParamTypes[k])) {
                                        // style type 4 - matching method name and signature
                                        if (isTraceOn && tc.isDebugEnabled()) {
                                            trace(me, "Style 4 - assigning denyAll " + true);
                                        }
                                        // set denyAll for this method as true.
                                        denyAll[k] = true;

                                        highestStyleOnMethod[k] = 4;

                                    } // method parms match specified parms
                                } // method parms were specified
                            } // methodExtension name matches method name
                        } // method loop (k)
                    } // if/then/else for meName='*'
                } // enterpriseBean name matches parm in methodExtension
            } // methodElements loop (j)
        } // permissionsList != null

        if (isTraceOn && tc.isEntryEnabled()) {
            Tr.exit(tc, "getXMLMethodsDenied", Arrays.toString(denyAll));
        }

    }
public static final void getXMLMethodsDenied ( boolean [ ] denyAll , int type , String [ ] methodNames , Class < ? > [ ] [ ] methodParamTypes , ExcludeList excludeList , BeanMetaData bmd ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getXMLMethodsDenied" , Arrays . toString ( denyAll ) ) ; if ( excludeList != null ) { if ( isTraceOn && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "*** Exclude List has " + excludeList . getMethodElements ( ) . size ( ) + " entries to process ***" ) ; } int [ ] highestStyleOnMethod = new int [ methodNames . length ] ; List < com . ibm . ws . javaee . dd . ejb . Method > methodElements = excludeList . getMethodElements ( ) ; for ( int j = 0 ; j < methodElements . size ( ) ; j ++ ) { com . ibm . ws . javaee . dd . ejb . Method me = methodElements . get ( j ) ; String ejbNameFromMethodElement = me . getEnterpriseBeanName ( ) ; int meType = me . getInterfaceTypeValue ( ) ; if ( ejbNameFromMethodElement == null ) { Tr . warning ( tc , "INVALID_EXCLUDE_LIST_XML_CNTR0124W" , new Object [ ] { bmd . getJ2EEName ( ) . getModule ( ) , bmd . enterpriseBeanName } ) ; } if ( ( ejbNameFromMethodElement != null ) && ( ejbNameFromMethodElement . equals ( bmd . enterpriseBeanName ) ) ) { String meName = me . getMethodName ( ) . trim ( ) ; if ( meName . equals ( "*" ) ) { if ( meType == com . ibm . ws . javaee . dd . ejb . Method . INTERFACE_TYPE_UNSPECIFIED ) { for ( int k = 0 ; k < methodNames . length ; ++ k ) { if ( highestStyleOnMethod [ k ] <= 1 ) { if ( isTraceOn && tc . isDebugEnabled ( ) ) { trace ( me , "Style 1 - assigning denyAll " + true ) ; } denyAll [ k ] = true ; highestStyleOnMethod [ k ] = 1 ; } } } else if ( meType == type ) { for ( int k = 0 ; k < methodNames . length ; ++ k ) { if ( highestStyleOnMethod [ k ] <= 2 ) { if ( isTraceOn && tc . isDebugEnabled ( ) ) { trace ( me , "Style 2 - assigning denyAll " + true ) ; } denyAll [ k ] = true ; highestStyleOnMethod [ k ] = 2 ; } } } } else if ( meType == com . ibm . ws . javaee . dd . ejb . Method . INTERFACE_TYPE_UNSPECIFIED || meType == type ) { for ( int k = 0 ; k < methodNames . length ; ++ k ) { if ( meName . equals ( methodNames [ k ] ) ) { List < String > meParms = me . getMethodParamList ( ) ; if ( meParms == null ) { if ( highestStyleOnMethod [ k ] <= 3 ) { if ( isTraceOn && tc . isDebugEnabled ( ) ) { trace ( me , "Style 3 - assigning denyAll " + true ) ; } denyAll [ k ] = true ; highestStyleOnMethod [ k ] = 3 ; } } else { if ( DDUtil . methodParamsMatch ( meParms , methodParamTypes [ k ] ) ) { if ( isTraceOn && tc . isDebugEnabled ( ) ) { trace ( me , "Style 4 - assigning denyAll " + true ) ; } denyAll [ k ] = true ; highestStyleOnMethod [ k ] = 4 ; } } } } } } } } if ( isTraceOn && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "getXMLMethodsDenied" , Arrays . toString ( denyAll ) ) ; } }
366845.11.1