use of org.apereo.cas.persondir.DefaultPersonDirectoryAttributeRepositoryPlan in project cas by apereo.
the class CasPersonDirectoryConfiguration method attributeRepositories.
@ConditionalOnMissingBean(name = "attributeRepositories")
@Bean
@RefreshScope
public List<IPersonAttributeDao> attributeRepositories() {
final List<IPersonAttributeDao> list = new ArrayList<>();
list.addAll(ldapAttributeRepositories());
list.addAll(jdbcAttributeRepositories());
list.addAll(jsonAttributeRepositories());
list.addAll(groovyAttributeRepositories());
list.addAll(grouperAttributeRepositories());
list.addAll(restfulAttributeRepositories());
list.addAll(scriptedAttributeRepositories());
list.addAll(stubAttributeRepositories());
final List<PersonDirectoryAttributeRepositoryPlanConfigurer> configurers = ObjectUtils.defaultIfNull(attributeRepositoryConfigurers.getIfAvailable(), new ArrayList<>());
final PersonDirectoryAttributeRepositoryPlan plan = new DefaultPersonDirectoryAttributeRepositoryPlan();
configurers.forEach(c -> c.configureAttributeRepositoryPlan(plan));
list.addAll(plan.getAttributeRepositories());
OrderComparator.sort(list);
LOGGER.debug("Final list of attribute repositories is [{}]", list);
return list;
}
Aggregations