Search in sources :

Example 1 with DefaultServiceTicketResourceEntityResponseFactoryPlan

use of org.apereo.cas.rest.plan.DefaultServiceTicketResourceEntityResponseFactoryPlan in project cas by apereo.

the class CasRestConfiguration method serviceTicketResourceEntityResponseFactory.

@Bean
@ConditionalOnMissingBean(name = "serviceTicketResourceEntityResponseFactory")
@Autowired
public ServiceTicketResourceEntityResponseFactory serviceTicketResourceEntityResponseFactory(final List<ServiceTicketResourceEntityResponseFactoryConfigurer> configurers) {
    final DefaultServiceTicketResourceEntityResponseFactoryPlan plan = new DefaultServiceTicketResourceEntityResponseFactoryPlan();
    configurers.forEach(c -> c.configureEntityResponseFactory(plan));
    return new CompositeServiceTicketResourceEntityResponseFactory(plan.getFactories());
}
Also used : CompositeServiceTicketResourceEntityResponseFactory(org.apereo.cas.rest.factory.CompositeServiceTicketResourceEntityResponseFactory) DefaultServiceTicketResourceEntityResponseFactoryPlan(org.apereo.cas.rest.plan.DefaultServiceTicketResourceEntityResponseFactoryPlan) Autowired(org.springframework.beans.factory.annotation.Autowired) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

CompositeServiceTicketResourceEntityResponseFactory (org.apereo.cas.rest.factory.CompositeServiceTicketResourceEntityResponseFactory)1 DefaultServiceTicketResourceEntityResponseFactoryPlan (org.apereo.cas.rest.plan.DefaultServiceTicketResourceEntityResponseFactoryPlan)1 Autowired (org.springframework.beans.factory.annotation.Autowired)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 Bean (org.springframework.context.annotation.Bean)1