public MethodAttribute(final A attribute, final Method method) { this.attribute = attribute; this.ejbName = method.getEjbName(); this.methodName = method.getMethodName(); this.methodParams = method.getMethodParams(); this.className = method.getClassName(); }
public ContainerConcurrency(final ConcurrentLockType lock, final String ejbName, final java.lang.reflect.Method method) { this(lock, new Method(ejbName, method)); }
public Method withInterface(final MethodIntf methodIntf) { setMethodIntf(methodIntf); return this; }
private MethodInfo getMethodInfo(Method method, Map ejbds) { MethodInfo methodInfo = new MethodInfo(); EjbDeployment d = (EjbDeployment) ejbds.get(method.getEjbName()); methodInfo.description = method.getDescription(); methodInfo.ejbDeploymentId = (d == null)?null:d.getDeploymentId(); methodInfo.ejbName = method.getEjbName(); methodInfo.methodIntf = (method.getMethodIntf() == null) ? null : method.getMethodIntf().toString(); methodInfo.methodName = method.getMethodName(); if (methodInfo.methodName == null || methodInfo.methodName.equals("")){ methodInfo.methodName = "*"; } methodInfo.className = method.getClassName(); if (methodInfo.className == null || methodInfo.className.equals("")){ methodInfo.className = "*"; } MethodParams mp = method.getMethodParams(); if (mp != null) { methodInfo.methodParams = mp.getMethodParam(); } return methodInfo; }
private List<String> getDeclaredClassPermissions(AssemblyDescriptor assemblyDescriptor, String ejbName) { List<MethodPermission> permissions = assemblyDescriptor.getMethodPermission(); List<String> classPermissions = new ArrayList<String>(); for (MethodPermission permission : permissions) { for (org.apache.openejb.jee.Method method : permission.getMethod()) { if (!method.getEjbName().equals(ejbName)) continue; if (!"*".equals(method.getMethodName())) continue; String className = method.getClassName(); if (className == null) { className = "*"; } classPermissions.add(className); } } return classPermissions; }
private Map<String, List<MethodAttribute>> getMethodAttributes(final String ejbName, final List<? extends AttributeBinding> bindings) { final Map<String, List<MethodAttribute>> methods = new LinkedHashMap<String, List<MethodAttribute>>(); for (final AttributeBinding<?> binding : bindings) { for (final Method method : binding.getMethod()) { if (method.getEjbName().equals(ejbName)) { final String methodName = method.getMethodName(); List<MethodAttribute> list = methods.get(methodName); if (list == null) { list = new ArrayList<MethodAttribute>(); methods.put(methodName, list); } list.add(new MethodAttribute(binding.getAttribute(), method)); } } } return methods; }
if (excludeList != null) { for (Method method : excludeList.getMethod()) { if (!ejbName.equals(method.getEjbName())) { continue; String methodName = method.getMethodName(); String methodIntf = method.getMethodIntf() == null? null: method.getMethodIntf().toString(); if (method.getMethodParams() != null) { List<String> paramList = method.getMethodParams().getMethodParam(); methodParams = paramList.toArray(new String[paramList.size()]); } else { if (!ejbName.equals(method.getEjbName())) { continue; String methodName = method.getMethodName(); if ("*".equals(methodName)) { String methodIntf = method.getMethodIntf() == null? null: method.getMethodIntf().toString(); if (method.getMethodParams() != null) { List<String> paramList = method.getMethodParams().getMethodParam(); methodParams = paramList.toArray(new String[paramList.size()]); } else {
for (final MethodPermission permission : copy(assemblyDescriptor.getMethodPermission())) { for (final Method method : copy(permission.getMethod())) { if (method.getEjbName().equals(ejbName)) { permission.getMethod().remove(method); if (method.getEjbName().equals(ejbName)) { transaction.getMethod().remove(method);
private void copyConcurrentMethods(final SessionBean bean, final EjbJarInfo ejbJarInfo, final Map ejbds) { for (final ConcurrentMethod method : bean.getConcurrentMethod()) { final MethodConcurrencyInfo info = new MethodConcurrencyInfo(); if (method.getLock() != null) { info.concurrencyAttribute = method.getLock().toString(); } info.accessTimeout = toInfo(method.getAccessTimeout()); final Method m = new Method(bean.getEjbName(), null, method.getMethod().getMethodName()); m.setMethodParams(method.getMethod().getMethodParams()); info.methods.add(getMethodInfo(m, ejbds)); ejbJarInfo.methodConcurrency.add(info); } }
private MethodInfo getMethodInfo(final Method method, final Map ejbds) { final MethodInfo methodInfo = new MethodInfo(); final EjbDeployment d = (EjbDeployment) ejbds.get(method.getEjbName()); methodInfo.description = method.getDescription(); methodInfo.ejbDeploymentId = d == null ? null : d.getDeploymentId(); methodInfo.ejbName = method.getEjbName(); methodInfo.methodIntf = method.getMethodIntf() == null ? null : method.getMethodIntf().toString(); methodInfo.methodName = method.getMethodName(); if (methodInfo.methodName == null || methodInfo.methodName.equals("")) { methodInfo.methodName = "*"; } methodInfo.className = method.getClassName(); if (methodInfo.className == null || methodInfo.className.equals("")) { methodInfo.className = "*"; } final MethodParams mp = method.getMethodParams(); if (mp != null) { methodInfo.methodParams = mp.getMethodParam(); } return methodInfo; }
private List<String> getDeclaredClassPermissions(final AssemblyDescriptor assemblyDescriptor, final String ejbName) { final List<MethodPermission> permissions = assemblyDescriptor.getMethodPermission(); final List<String> classPermissions = new ArrayList<String>(); for (final MethodPermission permission : permissions) { for (final org.apache.openejb.jee.Method method : permission.getMethod()) { if (!method.getEjbName().equals(ejbName)) { continue; } if (!"*".equals(method.getMethodName())) { continue; } String className = method.getClassName(); if (className == null) { className = "*"; } classPermissions.add(className); } } return classPermissions; }
private Map<String, List<MethodAttribute>> getMethodAttributes(final String ejbName, final List<? extends AttributeBinding> bindings) { final Map<String, List<MethodAttribute>> methods = new LinkedHashMap<String, List<MethodAttribute>>(); for (final AttributeBinding<?> binding : bindings) { for (final Method method : binding.getMethod()) { if (method.getEjbName().equals(ejbName)) { final String methodName = method.getMethodName(); List<MethodAttribute> list = methods.get(methodName); if (list == null) { list = new ArrayList<MethodAttribute>(); methods.put(methodName, list); } list.add(new MethodAttribute(binding.getAttribute(), method)); } } } return methods; }
for (MethodPermission permission : copy(assemblyDescriptor.getMethodPermission())) { for (Method method : copy(permission.getMethod())) { if (method.getEjbName().equals(ejbName)) { permission.getMethod().remove(method); if (method.getEjbName().equals(ejbName)) { transaction.getMethod().remove(method);
private void copyConcurrentMethods(final SessionBean bean, final EjbJarInfo ejbJarInfo, final Map ejbds) { for (final ConcurrentMethod method : bean.getConcurrentMethod()) { final MethodConcurrencyInfo info = new MethodConcurrencyInfo(); if (method.getLock() != null) { info.concurrencyAttribute = method.getLock().toString(); } info.accessTimeout = toInfo(method.getAccessTimeout()); final Method m = new Method(bean.getEjbName(), null, method.getMethod().getMethodName()); m.setMethodParams(method.getMethod().getMethodParams()); info.methods.add(getMethodInfo(m, ejbds)); ejbJarInfo.methodConcurrency.add(info); } }
private MethodInfo getMethodInfo(final Method method, final Map ejbds) { final MethodInfo methodInfo = new MethodInfo(); final EjbDeployment d = (EjbDeployment) ejbds.get(method.getEjbName()); methodInfo.description = method.getDescription(); methodInfo.ejbDeploymentId = d == null ? null : d.getDeploymentId(); methodInfo.ejbName = method.getEjbName(); methodInfo.methodIntf = method.getMethodIntf() == null ? null : method.getMethodIntf().toString(); methodInfo.methodName = method.getMethodName(); if (methodInfo.methodName == null || methodInfo.methodName.equals("")) { methodInfo.methodName = "*"; } methodInfo.className = method.getClassName(); if (methodInfo.className == null || methodInfo.className.equals("")) { methodInfo.className = "*"; } final MethodParams mp = method.getMethodParams(); if (mp != null) { methodInfo.methodParams = mp.getMethodParam(); } return methodInfo; }
public MethodAttribute(A attribute, Method method) { this.attribute = attribute; this.ejbName = method.getEjbName(); this.methodName = method.getMethodName(); this.methodParams = method.getMethodParams(); this.className = method.getClassName(); }
private List<String> getDeclaredClassPermissions(final AssemblyDescriptor assemblyDescriptor, final String ejbName) { final List<MethodPermission> permissions = assemblyDescriptor.getMethodPermission(); final List<String> classPermissions = new ArrayList<String>(); for (final MethodPermission permission : permissions) { for (final org.apache.openejb.jee.Method method : permission.getMethod()) { if (!method.getEjbName().equals(ejbName)) { continue; } if (!"*".equals(method.getMethodName())) { continue; } String className = method.getClassName(); if (className == null) { className = "*"; } classPermissions.add(className); } } return classPermissions; }
private Map<String, List<MethodAttribute>> getMethodAttributes(String ejbName, List<? extends AttributeBinding> bindings) { Map<String,List<MethodAttribute>> methods = new LinkedHashMap<String,List<MethodAttribute>>(); for (AttributeBinding<?> binding : bindings) { for (Method method : binding.getMethod()) { if (method.getEjbName().equals(ejbName)){ String methodName = method.getMethodName(); List<MethodAttribute> list = methods.get(methodName); if (list == null){ list = new ArrayList<MethodAttribute>(); methods.put(methodName, list); } list.add(new MethodAttribute(binding.getAttribute(), method)); } } } return methods; }
public ContainerConcurrency(ConcurrencyAttribute concurrencyAttribute, String className, String ejbName, String methodName) { this(concurrencyAttribute, new Method(ejbName, className, methodName)); }
for (final MethodPermission permission : copy(assemblyDescriptor.getMethodPermission())) { for (final Method method : copy(permission.getMethod())) { if (method.getEjbName().equals(ejbName)) { permission.getMethod().remove(method); if (method.getEjbName().equals(ejbName)) { transaction.getMethod().remove(method);