Package org.jboss.metadata.javaee.spec

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


        //merge security roles from the ear
        DeploymentUnit parent = deploymentUnit.getParent();
        if (parent != null) {
            final EarMetaData earMetaData = parent.getAttachment(org.jboss.as.ee.structure.Attachments.EAR_METADATA);
            if (earMetaData != null) {
                SecurityRolesMetaData earSecurityRolesMetaData = earMetaData.getSecurityRoles();
                if(earSecurityRolesMetaData != null) {
                    if(mergedMetaData.getSecurityRoles() == null) {
                        mergedMetaData.setSecurityRoles(new SecurityRolesMetaData());
                    }
                    SecurityRolesMetaDataMerger.merge(mergedMetaData.getSecurityRoles(), mergedMetaData.getSecurityRoles(), earSecurityRolesMetaData);
                }
            }
        }
View Full Code Here


                context.addConstraint(constraint);
            }
        }

        // Security roles
        SecurityRolesMetaData roles = metaData.getSecurityRoles();
        if (roles != null) {
            for (SecurityRoleMetaData value : roles) {
                context.addSecurityRole(value.getRoleName());
            }
        }
View Full Code Here

            context.addConstraint(constraint);
         }
      }

      // Security roles
      SecurityRolesMetaData roles = metaData.getSecurityRoles();
      if (roles != null)
      {
         for (SecurityRoleMetaData value : roles)
         {
            context.addSecurityRole(value.getRoleName());
View Full Code Here

      throws ClassNotFoundException, NoSuchMethodException, NoSuchFieldException
   {
      JBossAssemblyDescriptorMetaData assembly = dd.getAssemblyDescriptor();
      if (assembly != null)
      {
         SecurityRolesMetaData securityRoles = assembly.getSecurityRoles();

         if (securityRoles != null && securityRoles.size() > 0)
         {
            List<String> roleList = new ArrayList<String>();
            for (SecurityRoleMetaData securityRole : securityRoles)
            {
               roleList.add(securityRole.getRoleName());
View Full Code Here

      throws ClassNotFoundException, NoSuchMethodException, NoSuchFieldException
   {
      JBossAssemblyDescriptorMetaData assembly = dd.getAssemblyDescriptor();
      if (assembly != null)
      {
         SecurityRolesMetaData securityRoles = assembly.getSecurityRoles();

         if (securityRoles != null && securityRoles.size() > 0)
         {
            List<String> roleList = new ArrayList<String>();
            for (SecurityRoleMetaData securityRole : securityRoles)
            {
               roleList.add(securityRole.getRoleName());
View Full Code Here

         // Security domain
         String securityDomain = earMetaData.getSecurityDomain();
         if (securityDomain != null && mergedMetaData.getSecurityDomain() == null)
            mergedMetaData.setSecurityDomain(securityDomain);
         //Security Roles
         SecurityRolesMetaData earSecurityRolesMetaData = earMetaData.getSecurityRoles();
         if (earSecurityRolesMetaData != null)
         {
            JBossAssemblyDescriptorMetaData jadmd = mergedMetaData.getAssemblyDescriptor();
            if (jadmd == null)
            {
               jadmd = new JBossAssemblyDescriptorMetaData();
               mergedMetaData.setAssemblyDescriptor(jadmd);
            }

            SecurityRolesMetaData mergedSecurityRolesMetaData = jadmd.getSecurityRoles();
            if (mergedSecurityRolesMetaData == null)
               jadmd.setSecurityRoles(earSecurityRolesMetaData);

            //perform a merge to rebuild the principalVersusRolesMap
            if (mergedSecurityRolesMetaData != null)
            {
               mergedSecurityRolesMetaData.merge(mergedSecurityRolesMetaData, earSecurityRolesMetaData);
            }
         }
      }

      // Output the merged JBossMetaData
View Full Code Here

   {
      JBossAssemblyDescriptorMetaData assemblyDescriptor = getJBossMetaDataWithCheck().getAssemblyDescriptor();
      if (assemblyDescriptor == null)
         return null;
     
      SecurityRolesMetaData securityRolesMetaData = assemblyDescriptor.getSecurityRoles();
      return securityRolesMetaData != null ? securityRolesMetaData.getPrincipalVersusRolesMap() : null;
   }
View Full Code Here

      {
         assembly = new AssemblyDescriptorMetaData();
         ejbJarMetaData.setAssemblyDescriptor(assembly);
      }
      // @DeclareRoles
      SecurityRolesMetaData securityRoles = assembly.getSecurityRoles();
      if(securityRoles == null)
      {
         securityRoles = new SecurityRolesMetaData();
         assembly.setSecurityRoles(securityRoles);
      }
      super.processClass(securityRoles, beanClass);
      // @DenyAll
      ExcludeListMetaData excludes = assembly.getExcludeList();
View Full Code Here

     
      if(override != null && override.runAsIdentity!= null)
         setRunAsIdentity(override.runAsIdentity);

      if(securityRoles == null)
         securityRoles = new SecurityRolesMetaData();
      SecurityRolesMetaData overrideRoles = null;
      SecurityRolesMetaData originalRoles = null;
      if(override != null)
         overrideRoles = override.getSecurityRoles();
      if(original != null)
         originalRoles = original.getSecurityRoles();
      securityRoles.merge(overrideRoles, originalRoles);
View Full Code Here

         metaData.setServlets(servlets);
      }
      super.processClass(servlets, type);
     
      // @DeclareRoles
      SecurityRolesMetaData securityRoles = metaData.getSecurityRoles();
      if(securityRoles == null)
      {
         securityRoles = new SecurityRolesMetaData();
         metaData.setSecurityRoles(securityRoles);
      }
      super.processClass(securityRoles, type);
   }
View Full Code Here

TOP

Related Classes of org.jboss.metadata.javaee.spec.SecurityRolesMetaData

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.