Search in sources :

Example 1 with DefaultAuditTrailRecordResolutionPlan

use of org.apereo.cas.audit.spi.DefaultAuditTrailRecordResolutionPlan in project cas by apereo.

the class CasCoreAuditConfiguration method auditTrailRecordResolutionPlan.

@Autowired
@ConditionalOnMissingBean(name = "auditTrailRecordResolutionPlan")
@Bean
public AuditTrailRecordResolutionPlan auditTrailRecordResolutionPlan(final List<AuditTrailRecordResolutionPlanConfigurer> configurers) {
    final DefaultAuditTrailRecordResolutionPlan plan = new DefaultAuditTrailRecordResolutionPlan();
    configurers.forEach(c -> {
        final String name = StringUtils.removePattern(c.getClass().getSimpleName(), "\\$.+");
        LOGGER.debug("Registering audit trail manager [{}]", name);
        c.configureAuditTrailRecordResolutionPlan(plan);
    });
    return plan;
}
Also used : DefaultAuditTrailRecordResolutionPlan(org.apereo.cas.audit.spi.DefaultAuditTrailRecordResolutionPlan) Autowired(org.springframework.beans.factory.annotation.Autowired) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) FilterRegistrationBean(org.springframework.boot.web.servlet.FilterRegistrationBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

DefaultAuditTrailRecordResolutionPlan (org.apereo.cas.audit.spi.DefaultAuditTrailRecordResolutionPlan)1 Autowired (org.springframework.beans.factory.annotation.Autowired)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 FilterRegistrationBean (org.springframework.boot.web.servlet.FilterRegistrationBean)1 Bean (org.springframework.context.annotation.Bean)1