Examples of RunAsMetaData


Examples of org.jboss.metadata.javaee.spec.RunAsMetaData

                                              final EJBComponentDescription componentConfiguration) throws DeploymentUnitProcessingException {
        if (componentConfiguration.getDescriptorData() != null) {
            final SecurityIdentityMetaData identity = componentConfiguration.getDescriptorData().getSecurityIdentity();

            if (identity != null) {
                final RunAsMetaData runAs = identity.getRunAs();
                if (runAs != null) {
                    final String role = runAs.getRoleName();
                    if (role != null && !role.trim().isEmpty()) {
                        componentConfiguration.setRunAs(role.trim());
                    }
                }
            }
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.RunAsMetaData

   private void addSecurityIdentityAnnotation(EJBContainer container,
         SecurityIdentityMetaData identity)
   {
      if (identity != null && !identity.isUseCallerId())
      {
         RunAsMetaData runAs = identity.getRunAs();
         RunAsImpl annotation = null;
         if (runAs != null)
         {
            annotation = new RunAsImpl(runAs.getRoleName());
            addClassAnnotation(container, annotation.annotationType(),
                  annotation);
         }
        
         String runAsPrincipal = identity.getRunAsPrincipal();
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.RunAsMetaData

   private void addSecurityIdentityAnnotation(EJBContainer container,
         SecurityIdentityMetaData identity)
   {
      if (identity != null && !identity.isUseCallerId())
      {
         RunAsMetaData runAs = identity.getRunAs();
         RunAsImpl annotation = null;
         if (runAs != null)
         {
            annotation = new RunAsImpl(runAs.getRoleName());
            addClassAnnotation(container, annotation.annotationType(),
                  annotation);
         }
        
         String runAsPrincipal = identity.getRunAsPrincipal();
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.RunAsMetaData

     
      SecurityIdentityMetaData securityIdentity = metaData.getSecurityIdentity();
      if(securityIdentity == null)
         return null;
     
      RunAsMetaData runAs = securityIdentity.getRunAs();
      if(runAs == null)
         return null;
     
      // role-name is mandated by the xsd
      return annotationClass.cast(new RunAsImpl(runAs.getRoleName()));
   }
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.RunAsMetaData

            synchronized (runAsIdentity)
            {
               SecurityIdentityMetaData si = ejb.getSecurityIdentity();
               if(si != null)
               {
                  RunAsMetaData runAs = si.getRunAs();
                  if (runAs != null)
                  {
                     String roleName = runAs.getRoleName();
                     identity = new RunAsIdentityMetaData(roleName, null);
                     runAsIdentity.put(ejbName, identity);
                  }
               }
            }
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.RunAsMetaData

   {
      RunAs runAs = finder.getAnnotation(element, RunAs.class);
      if(runAs == null)
         return null;

      RunAsMetaData metaData = new RunAsMetaData();
      metaData.setRoleName(runAs.value());
      Descriptions descriptions = ProcessorUtils.getDescription("RunAs("+runAs.value()+") on class: "+element.getName());
      metaData.setDescriptions(descriptions);
      return metaData;
   }
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.RunAsMetaData

            if (servlet != null)
            {
               // Check for a web.xml run-as only specification
               synchronized (runAsIdentity)
               {
                  RunAsMetaData runAs = servlet.getRunAs();
                  if (runAs != null)
                  {
                     String roleName = runAs.getRoleName();
                     identity = new RunAsIdentityMetaData(roleName, null);
                     runAsIdentity.put(servletName, identity);
                  }
               }
            }
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.RunAsMetaData

   {
      RunAs annotation = finder.getAnnotation(type, RunAs.class);
      if(annotation == null)
         return;

      RunAsMetaData runAs = super.create(type);
      SecurityIdentityMetaData identity = metaData.getSecurityIdentity();
      if(identity == null)
      {
         identity = new SecurityIdentityMetaData();
         metaData.setSecurityIdentity(identity);        
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.RunAsMetaData

   private void addSecurityIdentityAnnotation(EJBContainer container,
         SecurityIdentityMetaData identity)
   {
      if (identity != null && !identity.isUseCallerId())
      {
         RunAsMetaData runAs = identity.getRunAs();
         RunAsImpl annotation = null;
         if (runAs != null)
         {
            annotation = new RunAsImpl(runAs.getRoleName());
            addClassAnnotation(container, annotation.annotationType(),
                  annotation);
         }
        
         String runAsPrincipal = identity.getRunAsPrincipal();
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.RunAsMetaData

                    annotations.add(annotationMD);
                }
                if (annotation.value() == null) {
                    throw new DeploymentUnitProcessingException("@RunAs needs to specify a role name on " + target);
                }
                RunAsMetaData runAs = new RunAsMetaData();
                runAs.setRoleName(annotation.value().asString());
                annotationMD.setRunAs(runAs);
            }
        }
        // @DeclareRoles
        final List<AnnotationInstance> declareRolesAnnotations = index.getAnnotations(declareRoles);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.