/* 1062 */ for (SecurityRoleMetaData securityRole : securityRoles)
/* */ {
/* 1064 */ roleList.add(securityRole.getRoleName());
/* */ }
/* */
/* 1067 */ DeclareRolesImpl annotation = new DeclareRolesImpl((String[])roleList.toArray(new String[roleList.size()]));
/* 1068 */ addClassAnnotation(container, DeclareRoles.class, annotation);
/* */ }
/* */
/* 1071 */ MethodPermissionsMetaData methodPermissions = assembly.getMethodPermissions();
/* 1072 */ if (methodPermissions != null)
/* */ {
/* 1074 */ for (i$ = methodPermissions.iterator(); i$.hasNext(); ) { permission = (MethodPermissionMetaData)i$.next();
/* */
/* 1076 */ for (MethodMetaData method : permission.getMethods())
/* */ {
/* 1078 */ if (method.getEjbName().equals(ejbName))
/* */ {
/* 1080 */ if (permission.isNotChecked())
/* */ {
/* 1082 */ PermitAllImpl annotation = new PermitAllImpl();
/* 1083 */ addAnnotations(PermitAll.class, annotation, container, method);
/* */ }
/* */ else {
/* 1086 */ RolesAllowedImpl annotation = new RolesAllowedImpl();
/* */
/* 1088 */ for (String roleName : permission.getRoles())
/* */ {
/* 1090 */ annotation.addValue(roleName);
/* */ }
/* 1092 */ addAnnotations(RolesAllowed.class, annotation, container, method);
/* */ }
/* */ }
/* */ }
/* */ }
/* */ }
/* */ }
/* */ MethodPermissionMetaData permission;
/* 1100 */ if ((enterpriseBean != null) && (enterpriseBean.getSecurityDomain() != null))
/* */ {
/* 1102 */ String securityDomain = enterpriseBean.getSecurityDomain();
/* */
/* 1104 */ SecurityDomainImpl annotation = new SecurityDomainImpl(securityDomain);
/* */
/* 1106 */ if (this.dd.getUnauthenticatedPrincipal() != null) {
/* 1107 */ annotation.setUnauthenticatedPrincipal(this.dd.getUnauthenticatedPrincipal());
/* */ }
/* */
/* 1110 */ addClassAnnotation(container, annotation.annotationType(), annotation);
/* 1111 */ } else if (this.dd.getSecurityDomain() != null)
/* */ {
/* 1113 */ String securityDomain = this.dd.getSecurityDomain();
/* */
/* 1115 */ SecurityDomainImpl annotation = new SecurityDomainImpl(securityDomain);
/* */
/* 1117 */ if (this.dd.getUnauthenticatedPrincipal() != null) {
/* 1118 */ annotation.setUnauthenticatedPrincipal(this.dd.getUnauthenticatedPrincipal());
/* */ }
/* */
/* 1121 */ addClassAnnotation(container, annotation.annotationType(), annotation);
/* 1122 */ } else if (this.dd.getUnauthenticatedPrincipal() != null)
/* */ {
/* 1124 */ SecurityDomain annotation = (SecurityDomain)this.ejbClass.getAnnotation(SecurityDomain.class);
/* */ SecurityDomainImpl override;
/* 1126 */ if (annotation != null)
/* */ {
/* 1128 */ SecurityDomainImpl override = new SecurityDomainImpl(annotation.value());
/* 1129 */ override.setUnauthenticatedPrincipal(this.dd.getUnauthenticatedPrincipal());
/* */ }
/* */ else
/* */ {
/* 1134 */ override = new SecurityDomainImpl();