Package org.jboss.ejb

Examples of org.jboss.ejb.PermitAllImpl


               {
                  if (method.getEjbName().equals(ejbName))
                  {
                     if (permission.isNotChecked())
                     {
                        PermitAllImpl annotation = new PermitAllImpl();
                        addAnnotations(PermitAll.class, annotation, container, method);
                     } else
                     {
                        RolesAllowedImpl annotation = new RolesAllowedImpl();
  
                        for (String roleName : permission.getRoles())
                        {
                           annotation.addValue(roleName);
                        }
                        addAnnotations(RolesAllowed.class, annotation, container, method);
                     }
                  }
               }
            }
         }
      }

      if (enterpriseBean != null && enterpriseBean.getSecurityDomain() != null)
      {
         String securityDomain = enterpriseBean.getSecurityDomain();

         SecurityDomainImpl annotation = new SecurityDomainImpl(securityDomain);

         if (dd.getUnauthenticatedPrincipal() != null)
            annotation.setUnauthenticatedPrincipal(dd
                  .getUnauthenticatedPrincipal());

         addClassAnnotation(container, annotation.annotationType(), annotation);
      } else if (dd.getSecurityDomain() != null)
      {
         String securityDomain = dd.getSecurityDomain();

         SecurityDomainImpl annotation = new SecurityDomainImpl(securityDomain);

         if (dd.getUnauthenticatedPrincipal() != null)
            annotation.setUnauthenticatedPrincipal(dd
                  .getUnauthenticatedPrincipal());

         addClassAnnotation(container, annotation.annotationType(), annotation);
      } else if (dd.getUnauthenticatedPrincipal() != null)
      {
         SecurityDomain annotation = ejbClass.getAnnotation(SecurityDomain.class);
         SecurityDomainImpl override;
         if (annotation != null)
         {
            override = new SecurityDomainImpl(annotation.value());
            override.setUnauthenticatedPrincipal(dd
                  .getUnauthenticatedPrincipal());
         }
         else
         {
View Full Code Here


/*      */           {
/* 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();
View Full Code Here

TOP

Related Classes of org.jboss.ejb.PermitAllImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.