if ((parentConfPath != null) && (!parentConfPath.isEmpty())) {
path = parentConfPath + "," + confPath;//Ex. profile=standalone-ha,subsystem=security
}
String name;//name=security
Address address = new Address(path);
//process the specific nodes
//Then we need to find out which of subchildren of ModOpsComponent is used i)security-domain=*
//ii)[Authentication*,etc] or iii)[ModOptions]
//path should already be right
if (path.endsWith("security-domain")) {//individual security domain entries
//ex. path => /subsystem=security/security-domain=(entry name)
//find all children and iterate over and update name appropriately
Address typeAddress = new Address(path);
String childType = "security-domain";
Result result = connection.execute(new ReadChildrenNames(typeAddress, childType));
if (result.isSuccess()) {
@SuppressWarnings("unchecked")
List<String> children = (List<String>) result.getResult();
for (String child : children) {
//update the components for discovery
name = child;//ex. basic, databaseDomain
String currentChildPath = path + //ex. /subsystem=security,security-domain=jboss-web
"=" + child;
address = new Address(currentChildPath);
addDiscoveredResource(context, details, connection, currentChildPath, name, address);
}
}
} else if (ifResourceIsSupportedModuleType(path)) {//is ModOptions map child
//ex. path => /subsystem=security/security-domain=(entry name)/authentication=classic/login-modules
//Ex. String attribute = "login-modules";
String attribute = lookupAttributeType(path);
//query all the module-options defined and discover them here
//Ex. String typeAddress = "subsystem=security,security-domain=testDomain2,authentication=classic";
String typeAddress = parentConfPath;
ReadAttribute readModuleOptionType = new ReadAttribute(new Address(typeAddress), attribute);
Result result = connection.execute(readModuleOptionType);
if (result.isSuccess()) {
List<Value> loadedLoginModuleTypes = ModuleOptionsComponent.populateSecurityDomainModuleOptions(result,
ModuleOptionsComponent.loadModuleOptionType(attribute));
for (int moduleIndex = 0; moduleIndex < loadedLoginModuleTypes.size(); moduleIndex++) {