Package org.jboss.ejb3.annotation.impl

Examples of org.jboss.ejb3.annotation.impl.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


               {
                  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

               {
                  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);
                        }
                       
                        // Log and add
                        log.debug("Adding @" + RolesAllowed.class.getSimpleName() + " for method "
                              + method.getMethodName() + "("
                              + method.getMethodParams() + ") of EJB " + method.getEjbName() + ": "
                              + Arrays.asList(annotation.value()));
                        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

               {
                  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);
                        }
                       
                        // Log and add
                        log.debug("Adding @" + RolesAllowed.class.getSimpleName() + " for method "
                              + method.getMethodName() + "("
                              + method.getMethodParams() + ") of EJB " + method.getEjbName() + ": "
                              + Arrays.asList(annotation.value()));
                        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

               {
                  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);
                        }
                       
                        // Log and add
                        log.debug("Adding @" + RolesAllowed.class.getSimpleName() + " for method "
                              + method.getMethodName() + "("
                              + method.getMethodParams() + ") of EJB " + method.getEjbName() + ": "
                              + Arrays.asList(annotation.value()));
                        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

               {
                  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

      this.beanClass = classloader.loadClass(beanClassName);

      // We can't type cast the direct container, because we just loaded the beanClass
      // so assuming we have an object is a safe bet.
      this.beanContainer = new BeanContainer(this);

      this.ejbName = ejbName;

      String on = createObjectName(ejbName);
      try
View Full Code Here

      // must match JNDI name in jboss-client.xml or display-name in application-client.xml
      String name = new Date().toString();
      String applicationClientName = "ee5client_test";
      String args[] = { name };
     
      ClientLauncher launcher = new ClientLauncher();
      Properties env = getENCProps(applicationClientName);
      launcher.launch(mainClassName, applicationClientName, args, env);
     
      Class<?> clientClass = ClientLauncher.getTheMainClass();
      Class<?> empty[] = {};
      {
         Method getResult = clientClass.getDeclaredMethod("getResult", empty);
View Full Code Here

   {
      String mainClassName = SimpleResourceClient.class.getName();
      String applicationClientName = "ee5client-simpleresource-client"; // must match JNDI name in jboss-client.xml or display-name in application-client.xml
      String args[] = { };

      ClientLauncher launcher = new ClientLauncher();
      launcher.launch(mainClassName, applicationClientName, args);
   }
View Full Code Here

   {
      String mainClassName = SimpleResourceClient.class.getName();
      String applicationClientName = "ee5client-simpleresource-client"; // must match JNDI name in jboss-client.xml or display-name in application-client.xml
      String args[] = { };
     
      ClientLauncher launcher = new ClientLauncher();
      launcher.launch(mainClassName, applicationClientName, args);
   }
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.annotation.impl.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.