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; }
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; }
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; }
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 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 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; }
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 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 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 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 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 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; }
for (Method method : permission.getMethod()) { if (method.getEjbName() == null) { fail("MethodPermission", "methodPermission.ejbNameRequired", method.getMethodName(), join(",", permission.getRoleName())); } else if (method.getEjbName().equals("*")){ } else if (!ejbsByName.containsKey(method.getEjbName())){ fail("MethodPermission", "methodPermission.noSuchEjbName", method.getEjbName(), method.getMethodName(), join(",", permission.getRoleName())); for (Method method : transaction.getMethod()) { if (method.getEjbName() == null) { fail("ContainerTransaction", "containerTransaction.ejbNameRequired", method.getMethodName(), transaction.getTransAttribute()); } else if (method.getEjbName().equals("*")){ } else if (!ejbsByName.containsKey(method.getEjbName())){ fail("ContainerTransaction", "containerTransaction.noSuchEjbName", method.getEjbName(), method.getMethodName(), transaction.getTransAttribute());
String methodName = method.getMethodName(); String methodName = method.getMethodName(); if ("*".equals(methodName)) {
for (final Method method : permission.getMethod()) { if (method.getEjbName() == null) { fail("MethodPermission", "methodPermission.ejbNameRequired", method.getMethodName(), join(",", permission.getRoleName())); } else if (method.getEjbName().equals("*")) { //NOPMD fail("MethodPermission", "methodPermission.noSuchEjbName", method.getEjbName(), method.getMethodName(), join(",", permission.getRoleName())); for (final Method method : transaction.getMethod()) { if (method.getEjbName() == null) { fail("ContainerTransaction", "containerTransaction.ejbNameRequired", method.getMethodName(), transaction.getTransAttribute()); } else if (method.getEjbName().equals("*")) { //NOPMD fail("ContainerTransaction", "containerTransaction.noSuchEjbName", method.getEjbName(), method.getMethodName(), transaction.getTransAttribute());
for (final Method method : permission.getMethod()) { if (method.getEjbName() == null) { fail("MethodPermission", "methodPermission.ejbNameRequired", method.getMethodName(), join(",", permission.getRoleName())); } else if (method.getEjbName().equals("*")) { //NOPMD fail("MethodPermission", "methodPermission.noSuchEjbName", method.getEjbName(), method.getMethodName(), join(",", permission.getRoleName())); for (final Method method : transaction.getMethod()) { if (method.getEjbName() == null) { fail("ContainerTransaction", "containerTransaction.ejbNameRequired", method.getMethodName(), transaction.getTransAttribute()); } else if (method.getEjbName().equals("*")) { //NOPMD fail("ContainerTransaction", "containerTransaction.noSuchEjbName", method.getEjbName(), method.getMethodName(), transaction.getTransAttribute());