returnthe annoation type this annotation handler is handling return DeclareRoles.class;
return DeclareRoles.class;
returnan array of annotation types this annotation handler would require to be processed (if present) before it processes it's own annotation type. return getEjbAnnotationTypes();
return getEjbAnnotationTypes();
DeclareRoles rolesRefAn = (DeclareRoles)ainfo.getAnnotation(); for (EjbContext ejbContext : ejbContexts) { EjbDescriptor ejbDescriptor = ejbContext.getDescriptor(); for (String roleName : rolesRefAn.value()) { if (ejbDescriptor.getRoleReferenceByName(roleName) == null) { RoleReference roleRef = new RoleReference(roleName, ""); roleRef.setRolename(roleName); roleRef.setSecurityRoleLink( new SecurityRoleDescriptor(roleName, "")); ejbDescriptor.addRoleReference(roleRef); } Role role = new Role(roleName); ejbDescriptor.getEjbBundleDescriptor().addRole(role); } } return getDefaultProcessedResult();
WebBundleDescriptor webBundleDesc = webCompContexts[0].getDescriptor().getWebBundleDescriptor(); return processAnnotation(ainfo, webBundleDesc);
WebBundleDescriptor webBundleDesc = webBundleContext.getDescriptor(); return processAnnotation(ainfo, webBundleDesc);
DeclareRoles rolesRefAn = (DeclareRoles)ainfo.getAnnotation(); for (String roleName : rolesRefAn.value()) { Role role = new Role(roleName); webBundleDesc.addRole(role); } return getDefaultProcessedResult();
return true;