Search in sources :

Example 1 with DefaultAuditTrailExecutionPlan

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

the class CasCoreAuditConfiguration method auditTrailExecutionPlan.

@Autowired
@ConditionalOnMissingBean(name = "auditTrailExecutionPlan")
@Bean
public AuditTrailExecutionPlan auditTrailExecutionPlan(final List<AuditTrailExecutionPlanConfigurer> configurers) {
    final DefaultAuditTrailExecutionPlan plan = new DefaultAuditTrailExecutionPlan();
    configurers.forEach(c -> {
        final String name = StringUtils.removePattern(c.getClass().getSimpleName(), "\\$.+");
        LOGGER.debug("Registering audit trail manager [{}]", name);
        c.configureAuditTrailExecutionPlan(plan);
    });
    return plan;
}
Also used : DefaultAuditTrailExecutionPlan(org.apereo.cas.audit.spi.DefaultAuditTrailExecutionPlan) 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

DefaultAuditTrailExecutionPlan (org.apereo.cas.audit.spi.DefaultAuditTrailExecutionPlan)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