Package org.jboss.security.config

Examples of org.jboss.security.config.MappingInfo


    * @see org.jboss.security.microcontainer.beans.BasePolicyBean#getPolicyInfo(java.lang.String)
    */
   @Override
   public MappingInfo getPolicyInfo(String domainName)
   {
      MappingInfo info = new MappingInfo(domainName);
      for (MappingPolicyModule module : super.modules)
      {
         MappingModuleEntry entry = new MappingModuleEntry(module.getCode(), module.getOptions(), module.getType());
         info.add(entry);
      }
      return info;
   }
View Full Code Here


      // create a MappingInfo instance of each group of mapping modules.
      for (String type : this.moduleEntries.keySet())
      {
         // application policy name will be reset in ApplicationPolicyContainer.
         MappingInfo mapping = new MappingInfo("dummy");
         mapping.add(this.moduleEntries.get(type));
         infos.put(type, mapping);
      }
      return infos;
   }
View Full Code Here

      if(aPolicy == null )
         throw new IllegalStateException("Application Policy is null for the security domain:"
               + securityDomain);
     
      MappingContext<T> mc = null;
      MappingInfo rmi = aPolicy.getMappingInfo(mappingType);
     
      if(rmi != null)
      {
         MappingModuleEntry[] mpe = rmi.getMappingModuleEntry();
         ArrayList<MappingProvider<T>> al = new ArrayList<MappingProvider<T>>();
        
         for(int i = 0 ; i < mpe.length; i++)
         {
            MappingProvider<T> mp = getMappingProvider(mpe[i]);
View Full Code Here

      {
         child = new ACLInfo(aPolicy.getName());
      }
      else if (child == null && "mapping".equals(localName))
      {
         child = new MappingInfo(aPolicy.getName());
      }
      else if (child == null && "rolemapping".equals(localName))
      {
         child = new MappingInfo(aPolicy.getName());
      }
      else if (child == null && "audit".equals(localName))
      {
         child = new AuditInfo(aPolicy.getName());
      }
View Full Code Here

         }
      }
      // now set all mapping infos by type.
      for(Map.Entry<String,List<MappingModuleEntry>> entry : mappings.entrySet())
      {
         MappingInfo info = new MappingInfo(authInfo.getName());
         info.add(entry.getValue());
         aPolicy.setMappingInfo(entry.getKey(), info);
      }
      if (trace)
         log.trace("addChild.ApplicationPolicy, name: " + aPolicy.getName());
   }
View Full Code Here

   {
      /**
       * Currently we do not have the name of the application policy
       * This will be rectified in the ApplicationPolicyContainer
       */
      MappingInfo ri = new RoleMappingInfo("dummy");
      ri.add(moduleEntries);
      return ri;
   }
View Full Code Here

            return false;

        List<ModelNode> modules = node.get(MAPPING_MODULES).asList();

        for (ModelNode module : modules) {
            MappingInfo mappingInfo = new MappingInfo(securityDomain);
            String codeName = extractCode(module, ModulesMap.MAPPING_MAP);

            String mappingType;
            if (module.hasDefined(TYPE))
                mappingType = module.get(TYPE).asString();
            else
                mappingType = MappingType.ROLE.toString();

            Map<String, Object> options = extractOptions(module);
            MappingModuleEntry entry = new MappingModuleEntry(codeName, options, mappingType);
            mappingInfo.add(entry);
            applicationPolicy.setMappingInfo(mappingType, mappingInfo);

            String moduleName = module.get(MODULE).asString();
            if(module.hasDefined(MODULE) && moduleName != null &&  moduleName.length() > 0 ) {
                mappingInfo.setJBossModuleName(moduleName);
            }
        }

        return true;
    }
View Full Code Here

         aPolicy = SecurityConfiguration.getApplicationPolicy(defaultDomain);
      }
      if(aPolicy == null )
         throw new IllegalStateException("Application Policy is null for the security domain:"
               + securityDomain);
      MappingInfo rmi = null;
      MappingContext mc = null;
      if(mappingType == Group.class)
      {
         rmi = aPolicy.getRoleMappingInfo();
         if(rmi != null)
         {
            MappingModuleEntry[] mpe = rmi.getMappingModuleEntry();
            ArrayList<MappingProvider> al = new ArrayList<MappingProvider>();
           
            for(int i = 0 ; i < mpe.length; i++)
            {
               MappingProvider mp = getMappingProvider(mpe[i]);
View Full Code Here

         aPolicy = SecurityConfiguration.getApplicationPolicy(defaultDomain);
      }
      if(aPolicy == null )
         throw new IllegalStateException("Application Policy is null for the security domain:"
               + securityDomain);
      MappingInfo rmi = null;
      MappingContext mc = null;
      if(mappingType == Group.class)
      {
         rmi = aPolicy.getRoleMappingInfo();         
      }
      else if(mappingType == Principal.class)
      {
         rmi = aPolicy.getPrincipalMappingInfo()
      }
     
      if(rmi != null)
      {
         MappingModuleEntry[] mpe = rmi.getMappingModuleEntry();
         ArrayList<MappingProvider> al = new ArrayList<MappingProvider>();
        
         for(int i = 0 ; i < mpe.length; i++)
         {
            MappingProvider mp = getMappingProvider(mpe[i]);
View Full Code Here

            return false;

        List<ModelNode> modules = node.get(MAPPING_MODULES).asList();

        for (ModelNode module : modules) {
            MappingInfo mappingInfo = new MappingInfo(securityDomain);
            String codeName = extractCode(module, ModulesMap.MAPPING_MAP);

            String mappingType;
            if (module.hasDefined(TYPE))
                mappingType = module.get(TYPE).asString();
            else
                mappingType = MappingType.ROLE.toString();

            Map<String, Object> options = extractOptions(module);
            MappingModuleEntry entry = new MappingModuleEntry(codeName, options, mappingType);
            mappingInfo.add(entry);
            applicationPolicy.setMappingInfo(mappingType, mappingInfo);

            String moduleName = module.get(MODULE).asString();
            if(module.hasDefined(MODULE) && moduleName != null &&  moduleName.length() > 0 ) {
                mappingInfo.setJBossModuleName(moduleName);
            }
        }

        return true;
    }
View Full Code Here

TOP

Related Classes of org.jboss.security.config.MappingInfo

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.