node = peek(node, MAPPING, CLASSIC, MAPPING_MODULE);
if (node == null) { return false; }
for (Property moduleProperty : node.asPropertyList()) {
ModelNode module = moduleProperty.getValue();
MappingInfo mappingInfo = new MappingInfo(securityDomain);
String codeName = extractCode(context, module, ModulesMap.MAPPING_MAP);
String mappingType;
if (module.hasDefined(TYPE)) {
mappingType = MappingModuleDefinition.TYPE.resolveModelAttribute(context, module).asString();
} else {
mappingType = MappingType.ROLE.toString();
}
Map<String, Object> options = extractOptions(context, module);
MappingModuleEntry entry = new MappingModuleEntry(codeName, options, mappingType);
mappingInfo.add(entry);
applicationPolicy.setMappingInfo(mappingType, mappingInfo);
ModelNode moduleName = LoginModuleResourceDefinition.MODULE.resolveModelAttribute(context, module);
if (moduleName.isDefined() && moduleName.asString().length() > 0) {
mappingInfo.setJBossModuleName(moduleName.asString());
}
}
return true;
}