Examples of RunAsMetaData


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

                                              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

                    annotations.add(annotationMD);
                }
                if (annotation.value() == null) {
                    throw new DeploymentUnitProcessingException(MESSAGES.invalidRunAsAnnotation(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

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

            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

    protected void processBeanMetaData(EnterpriseBeanMetaData beanMetaData, DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
        final SecurityIdentityMetaData securityIdentity = beanMetaData.getSecurityIdentity();
        if (securityIdentity == null) {
            return;
        }
        final RunAsMetaData runAs = securityIdentity.getRunAs();
        if (runAs == null) {
            return;
        }
        final String runAsRole = runAs.getRoleName();
        if (runAsRole != null && !runAsRole.trim().isEmpty()) {
            final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
            final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION);
            final EJBComponentDescription ejbComponentDescription = (EJBComponentDescription) moduleDescription.getComponentByName(beanMetaData.getEjbName());
            ejbComponentDescription.setRunAs(runAsRole);
View Full Code Here

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

                    annotations.add(annotationMD);
                }
                if (annotation.value() == null) {
                    throw new DeploymentUnitProcessingException(MESSAGES.invalidRunAsAnnotation(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

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

   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
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.