use of org.apache.syncope.core.provisioning.api.data.JEXLItemTransformer in project syncope by apache.
the class MappingUtils method getItemTransformers.
public static List<ItemTransformer> getItemTransformers(final Item item) {
List<ItemTransformer> result = new ArrayList<>();
// First consider the JEXL transformation expressions
if (StringUtils.isNotBlank(item.getPropagationJEXLTransformer()) || StringUtils.isNotBlank(item.getPullJEXLTransformer())) {
JEXLItemTransformer jexlTransformer = (JEXLItemTransformer) ApplicationContextProvider.getBeanFactory().createBean(JEXLItemTransformerImpl.class, AbstractBeanDefinition.AUTOWIRE_BY_NAME, false);
jexlTransformer.setPropagationJEXL(item.getPropagationJEXLTransformer());
jexlTransformer.setPullJEXL(item.getPullJEXLTransformer());
result.add(jexlTransformer);
}
// Then other custom transformers
item.getTransformers().forEach(impl -> {
try {
result.add(ImplementationManager.build(impl));
} catch (Exception e) {
LOG.error("While building {}", impl, e);
}
});
return result;
}
Aggregations