private boolean processAudit(OperationContext context, String securityDomain, ModelNode node, ApplicationPolicy applicationPolicy)
throws OperationFailedException {
node = peek(node, AUDIT, CLASSIC, PROVIDER_MODULE);
if (node == null) { return false; }
AuditInfo auditInfo = new AuditInfo(securityDomain);
for (Property moduleProperty : node.asPropertyList()) {
ModelNode module = moduleProperty.getValue();
String codeName = LoginModuleResourceDefinition.CODE.resolveModelAttribute(context, module).asString();
Map<String, Object> options = extractOptions(context, module);
AuditProviderEntry entry = new AuditProviderEntry(codeName, options);
auditInfo.add(entry);
ModelNode moduleName = LoginModuleResourceDefinition.MODULE.resolveModelAttribute(context, module);
if (moduleName.isDefined() && moduleName.asString().length() > 0) {
auditInfo.setJBossModuleName(moduleName.asString());
}
}
applicationPolicy.setAuditInfo(auditInfo);
return true;
}