if(wildCardExcludeList != null && wildCardExcludeList.getMethods() != null) { handleExcludeMethods(componentDescription, wildCardExcludeList); if (excludeList != null && excludeList.getMethods() != null) { handleExcludeMethods(componentDescription, excludeList);
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)); } } } }
/** * Create a new ExcludedMethod iterator * * @param excluded the excluded methods */ public ExcludedMethodMetaDataIterator(ExcludeListMetaData excluded) { if (excluded == null) return; this.excludeList = excluded; MethodsMetaData methods = excluded.getMethods(); if (methods == null) return; delegate = methods.iterator(); }
/** * Create a new ExcludedMethod iterator * * @param excluded the excluded methods */ public ExcludedMethodMetaDataIterator(ExcludeListMetaData excluded) { if (excluded == null) return; this.excludeList = excluded; MethodsMetaData methods = excluded.getMethods(); if (methods == null) return; delegate = methods.iterator(); }
private void addExcludeAnnotations(EJBContainer container, ExcludeListMetaData list, String ejbName) throws ClassNotFoundException, NoSuchMethodException, NoSuchFieldException { if (list != null && list.getMethods() != null) { for(MethodMetaData method : list.getMethods()) { if (method.getEjbName().equals(ejbName)) { DenyAllImpl annotation = new DenyAllImpl(); addAnnotations(DenyAll.class, annotation, container, method); } } } }
public void process(ExcludeListMetaData metaData, Method method) { DenyAll deny = finder.getAnnotation(method, DenyAll.class); if(deny == null) return; MethodsMetaData methods = metaData.getMethods(); if(methods == null) { methods = new MethodsMetaData(); metaData.setMethods(methods); } String ejbName = EjbNameThreadLocal.ejbName.get(); if(ejbName == null) ejbName = "*"; MethodMetaData mmd = ProcessorUtils.createMethod(ejbName, method); Descriptions descriptions = ProcessorUtils.getDescription("@DenyAll for: "+method); mmd.setDescriptions(descriptions); log.trace("add " + mmd); methods.add(mmd); }
public void process(ExcludeListMetaData metaData, Method method) { DenyAll deny = finder.getAnnotation(method, DenyAll.class); if(deny == null) return; MethodsMetaData methods = metaData.getMethods(); if(methods == null) { methods = new MethodsMetaData(); metaData.setMethods(methods); } String ejbName = EjbNameThreadLocal.ejbName.get(); if(ejbName == null) ejbName = "*"; MethodMetaData mmd = ProcessorUtils.createMethod(ejbName, method); Descriptions descriptions = ProcessorUtils.getDescription("@DenyAll for: "+method); mmd.setDescriptions(descriptions); log.trace("add " + mmd); methods.add(mmd); }
public void process(ExcludeListMetaData metaData, Method method) { DenyAll deny = finder.getAnnotation(method, DenyAll.class); if(deny == null) return; MethodsMetaData methods = metaData.getMethods(); if(methods == null) { methods = new MethodsMetaData(); metaData.setMethods(methods); } String ejbName = EjbNameThreadLocal.ejbName.get(); if(ejbName == null) ejbName = "*"; MethodMetaData mmd = ProcessorUtils.createMethod(ejbName, method); Descriptions descriptions = ProcessorUtils.getDescription("@DenyAll for: "+method); mmd.setDescriptions(descriptions); log.trace("add " + mmd); methods.add(mmd); }
if (excluded != null) MethodsMetaData methods = excluded.getMethods(); if (methods != null) for (org.jboss.metadata.ejb.spec.MethodMetaData mmd : methods)
if (excludeList != null && excludeList.getMethods() != null) { for (final MethodMetaData method : excludeList.getMethods()) { final String methodName = method.getMethodName(); final MethodIntf methodIntf = this.getMethodIntf(method.getMethodIntf());