if (node.isDefined()) {
ACLInfo aclInfo = new ACLInfo(securityDomain);
modules = node.asList();
for (ModelNode module : modules) {
String codeName = module.require(Attribute.CODE.getLocalName()).asString();
ControlFlag controlFlag = ControlFlag.valueOf(module.require(Attribute.FLAG.getLocalName()).asString());
Map<String, Object> options = new HashMap<String, Object>();
if (module.hasDefined(MODULE_OPTIONS)) {
for (Property prop : module.get(MODULE_OPTIONS).asPropertyList()) {
options.put(prop.getName(), prop.getValue().asString());
}
}
ACLProviderEntry entry = new ACLProviderEntry(codeName, options);
entry.setControlFlag(controlFlag);
aclInfo.add(entry);
}
applicationPolicy.setAclInfo(aclInfo);
}
// audit
node = operation.get(Element.AUDIT.getLocalName());
if (node.isDefined()) {
AuditInfo auditInfo = new AuditInfo(securityDomain);
modules = node.asList();
for (ModelNode module : modules) {
String codeName = module.require(Attribute.CODE.getLocalName()).asString();
Map<String, Object> options = new HashMap<String, Object>();
if (module.hasDefined(MODULE_OPTIONS)) {
for (Property prop : module.get(MODULE_OPTIONS).asPropertyList()) {
options.put(prop.getName(), prop.getValue().asString());
}
}
AuditProviderEntry entry = new AuditProviderEntry(codeName, options);
auditInfo.add(entry);
}
applicationPolicy.setAuditInfo(auditInfo);
}
// authorization
node = operation.get(Element.AUTHORIZATION.getLocalName());
if (node.isDefined()) {
AuthorizationInfo authorizationInfo = new AuthorizationInfo(securityDomain);
modules = node.asList();
for (ModelNode module : modules) {
String codeName = module.require(Attribute.CODE.getLocalName()).asString();
ControlFlag controlFlag = ControlFlag.valueOf(module.require(Attribute.FLAG.getLocalName()).asString());
Map<String, Object> options = new HashMap<String, Object>();
if (module.hasDefined(MODULE_OPTIONS)) {
for (Property prop : module.get(MODULE_OPTIONS).asPropertyList()) {
options.put(prop.getName(), prop.getValue().asString());
}
}
AuthorizationModuleEntry entry = new AuthorizationModuleEntry(codeName, options);
entry.setControlFlag(controlFlag);
authorizationInfo.add(entry);
}
applicationPolicy.setAuthorizationInfo(authorizationInfo);
}
// identity trust
node = operation.get(Element.IDENTITY_TRUST.getLocalName());
if (node.isDefined()) {
IdentityTrustInfo identityTrustInfo = new IdentityTrustInfo(securityDomain);
modules = node.asList();
for (ModelNode module : modules) {
String codeName = module.require(Attribute.CODE.getLocalName()).asString();
ControlFlag controlFlag = ControlFlag.valueOf(module.require(Attribute.FLAG.getLocalName()).asString());
Map<String, Object> options = new HashMap<String, Object>();
if (module.hasDefined(MODULE_OPTIONS)) {
for (Property prop : module.get(MODULE_OPTIONS).asPropertyList()) {
options.put(prop.getName(), prop.getValue().asString());
}