public static Method resolveMethod(final MethodMetaData methodData, final Class<?> componentClass, final DeploymentReflectionIndex reflectionIndex) throws DeploymentUnitProcessingException { return resolveMethod(methodData.getMethodName(), methodData.getMethodParams(), componentClass, reflectionIndex); }
private void handleExcludeMethods(final EJBComponentDescription componentDescription, final ExcludeListMetaData excludeList) { for (final MethodMetaData method : excludeList.getMethods()) { final String methodName = method.getMethodName(); final MethodIntf defaultMethodIntf = (componentDescription instanceof MessageDrivenComponentDescription) ? MethodIntf.MESSAGE_ENDPOINT : MethodIntf.BEAN; final MethodIntf methodIntf = this.getMethodIntf(method.getMethodIntf(), defaultMethodIntf); if (methodName.equals("*")) { componentDescription.getDescriptorMethodPermissions().setAttribute(methodIntf, null, EJBMethodSecurityAttribute.denyAll()); } else { final MethodParametersMetaData methodParams = method.getMethodParams(); // update the session bean description with the tx attribute info if (methodParams == null) { componentDescription.getDescriptorMethodPermissions().setAttribute(methodIntf, EJBMethodSecurityAttribute.denyAll(), methodName); } else { componentDescription.getDescriptorMethodPermissions().setAttribute(methodIntf, EJBMethodSecurityAttribute.denyAll(), null, methodName, this.getMethodParams(methodParams)); } } } }
if(!method.getMethodName().equals("*")) { throw EjbLogger.ROOT_LOGGER.wildcardContainerTransactionElementsMustHaveWildcardMethodName(); final MethodsMetaData methods = containerTx.getMethods(); for (final MethodMetaData method : methods) { final String methodName = method.getMethodName(); final MethodIntf defaultMethodIntf = (componentDescription instanceof MessageDrivenComponentDescription) ? MethodIntf.MESSAGE_ENDPOINT : MethodIntf.BEAN; final MethodIntf methodIntf = this.getMethodIntf(method.getMethodIntf(), defaultMethodIntf);
ejbMethodSecurityMetaData = EJBMethodSecurityAttribute.rolesAllowed(methodPermissionMetaData.getRoles()); final String methodName = method.getMethodName(); final MethodIntf defaultMethodIntf = (componentDescription instanceof MessageDrivenComponentDescription) ? MethodIntf.MESSAGE_ENDPOINT : MethodIntf.BEAN; final MethodIntf methodIntf = this.getMethodIntf(method.getMethodIntf(), defaultMethodIntf);
/** * Get the method name * * @return the method name */ public String getMethodName() { return methodDelegate.getMethodName(); }
/** * Get the method name * * @return the method name */ public String getMethodName() { return methodDelegate.getMethodName(); }
if (getMethodName().equals("*")) return true; if (getMethodName().equals(methodName) == false) return false;
if (getMethodName().equals("*")) return true; if (getMethodName().equals(methodName) == false) return false;
public static Method resolveMethod(final MethodMetaData methodData, final Class<?> componentClass, final DeploymentReflectionIndex reflectionIndex) throws DeploymentUnitProcessingException { return resolveMethod(methodData.getMethodName(), methodData.getMethodParams(), componentClass, reflectionIndex); }
/** * Whether this matches * * @param methodName the method name * @param params the parameters * @param interfaceType the interface type * @param bestMatch the previous best match * @return best match */ public MethodMetaData bestMatch(String methodName, String[] params, MethodInterfaceType interfaceType, MethodMetaData bestMatch) { if (isEmpty()) return bestMatch; for (MethodMetaData method : this) { if (method.matches(methodName, params, interfaceType)) { // No previous best match if (bestMatch == null) bestMatch = method; // better match because the previous was a wildcard else if ("*".equals(bestMatch.getMethodName())) bestMatch = method; // better because it specifies parameters else if (method.getMethodParams() != null) bestMatch = method; } } return bestMatch; }
/** * Whether this matches * * @param methodName the method name * @param params the parameters * @param interfaceType the interface type * @param bestMatch the previous best match * @return best match */ public MethodMetaData bestMatch(String methodName, String[] params, MethodInterfaceType interfaceType, MethodMetaData bestMatch) { if (isEmpty()) return bestMatch; for (MethodMetaData method : this) { if (method.matches(methodName, params, interfaceType)) { // No previous best match if (bestMatch == null) bestMatch = method; // better match because the previous was a wildcard else if ("*".equals(bestMatch.getMethodName())) bestMatch = method; // better because it specifies parameters else if (method.getMethodParams() != null) bestMatch = method; } } return bestMatch; }
private void addAnnotations(Class<? extends Annotation> annotationClass, Annotation annotation, EJBContainer container, MethodMetaData method) throws ClassNotFoundException, NoSuchMethodException, NoSuchFieldException { addAnnotations(annotationClass, annotation, container, method.getMethodName(), method.getMethodParams()); }
if (existingMethod.getMethodName().equals(mmd.getMethodName()) && existingMethod.getMethodParams().equals(mmd.getMethodParams()))
else params = null; String methodName = mmd.getMethodName(); if (methodName != null && methodName.equals("*")) methodName = null; else params = null; String methodName = mmd.getMethodName(); if (methodName != null && methodName.equals("*")) methodName = null;
+ method.getMethodName() + "(" + method.getMethodParams() + ") of EJB " + method.getEjbName() + ": " + Arrays.asList(annotation.value()));
if (excludeList != null && excludeList.getMethods() != null) { for (final MethodMetaData method : excludeList.getMethods()) { final String methodName = method.getMethodName(); final MethodIntf methodIntf = this.getMethodIntf(method.getMethodIntf()); if (methodName.equals("*")) { ejbMethodSecurityMetaData = EJBMethodSecurityAttribute.rolesAllowed(methodPermissionMetaData.getRoles()); final String methodName = method.getMethodName(); final MethodIntf methodIntf = this.getMethodIntf(method.getMethodIntf()); if (methodName.equals("*")) {
final MethodsMetaData methods = containerTx.getMethods(); for (final MethodMetaData method : methods) { final String methodName = method.getMethodName(); final MethodIntf methodIntf = this.getMethodIntf(method.getMethodIntf()); if (methodName.equals("*")) {