Search in sources :

Example 1 with DefaultKeyStoreHandlerProvider

use of org.forgerock.audit.providers.DefaultKeyStoreHandlerProvider in project OpenAM by OpenRock.

the class CsvAuditEventHandlerFactory method create.

@Override
public AuditEventHandler create(AuditEventHandlerConfiguration configuration) throws AuditException {
    Map<String, Set<String>> attributes = configuration.getAttributes();
    CsvAuditEventHandlerConfiguration csvHandlerConfiguration = new CsvAuditEventHandlerConfiguration();
    String location = getMapAttr(attributes, "location");
    csvHandlerConfiguration.setLogDirectory(location.replaceAll("%BASE_DIR%", SystemProperties.get(CONFIG_PATH)).replaceAll("%SERVER_URI%", SystemProperties.get(AM_SERVICES_DEPLOYMENT_DESCRIPTOR)));
    csvHandlerConfiguration.setTopics(attributes.get("topics"));
    csvHandlerConfiguration.setName(configuration.getHandlerName());
    csvHandlerConfiguration.setEnabled(getBooleanMapAttr(attributes, "enabled", true));
    setFileRotationPolicies(csvHandlerConfiguration, attributes);
    setFileRetentionPolicies(csvHandlerConfiguration, attributes);
    csvHandlerConfiguration.setBufferingConfiguration(getBufferingConfiguration(attributes));
    csvHandlerConfiguration.setSecurity(getCsvSecurity(attributes));
    return new CsvAuditEventHandler(csvHandlerConfiguration, configuration.getEventTopicsMetaData(), new DefaultKeyStoreHandlerProvider());
}
Also used : CsvAuditEventHandler(org.forgerock.audit.handlers.csv.CsvAuditEventHandler) Set(java.util.Set) DefaultKeyStoreHandlerProvider(org.forgerock.audit.providers.DefaultKeyStoreHandlerProvider) CsvAuditEventHandlerConfiguration(org.forgerock.audit.handlers.csv.CsvAuditEventHandlerConfiguration)

Aggregations

Set (java.util.Set)1 CsvAuditEventHandler (org.forgerock.audit.handlers.csv.CsvAuditEventHandler)1 CsvAuditEventHandlerConfiguration (org.forgerock.audit.handlers.csv.CsvAuditEventHandlerConfiguration)1 DefaultKeyStoreHandlerProvider (org.forgerock.audit.providers.DefaultKeyStoreHandlerProvider)1