Package org.jboss.security.config

Examples of org.jboss.security.config.MappingInfo


         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


/*     */     {
/*  62 */       child = new AuthorizationInfo(aPolicy.getName());
/*     */     }
/*  65 */     else if ((child == null) && ("rolemapping".equals(localName)))
/*     */     {
/*  67 */       MappingInfo mi = new MappingInfo();
/*  68 */       mi.setName(aPolicy.getName());
/*  69 */       child = mi;
/*     */     }
/*  72 */     else if ((child == null) && ("audit".equals(localName)))
/*     */     {
/*  74 */       AuditInfo ai = new AuditInfo(aPolicy.getName());
View Full Code Here

/*  74 */       aPolicy = SecurityConfiguration.getApplicationPolicy(defaultDomain);
/*     */     }
/*  76 */     if (aPolicy == null) {
/*  77 */       throw new IllegalStateException("Application Policy is null for the security domain:" + this.securityDomain);
/*     */     }
/*  79 */     MappingInfo rmi = null;
/*  80 */     MappingContext mc = null;
/*  81 */     if (mappingType == Group.class)
/*     */     {
/*  83 */       rmi = aPolicy.getRoleMappingInfo();
/*     */     }
/*  85 */     else if (mappingType == Principal.class)
/*     */     {
/*  87 */       rmi = aPolicy.getPrincipalMappingInfo();
/*     */     }
/*     */
/*  90 */     if (rmi != null)
/*     */     {
/*  92 */       MappingModuleEntry[] mpe = rmi.getMappingModuleEntry();
/*  93 */       ArrayList al = new ArrayList();
/*     */
/*  95 */       for (int i = 0; i < mpe.length; i++)
/*     */       {
/*  97 */         MappingProvider mp = getMappingProvider(mpe[i]);
View Full Code Here

/*    */     }
/*    */   }
/*    */
/*    */   public Object instantiate()
/*    */   {
/* 71 */     MappingInfo ri = new RoleMappingInfo("dummy");
/* 72 */     ri.add(this.moduleEntries);
/* 73 */     return ri;
/*    */   }
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

            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);
        }

        return true;
    }
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

         child = new AuthorizationInfo(aPolicy.getName())
      }
      else
         if(child == null && "rolemapping".equals(localName))
         {
            MappingInfo mi = new MappingInfo();
            mi.setName(aPolicy.getName());
            child = mi; 
         }
      return child;
   }
View Full Code Here

         aPolicy = Util.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

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.