Search in sources :

Example 1 with PluckNodeTransformer

use of org.hisp.dhis.node.transformers.PluckNodeTransformer in project dhis2-core by dhis2.

the class DefaultFieldFilterServiceTest method setUp.

@BeforeEach
public void setUp() {
    final Set<NodeTransformer> nodeTransformers = new HashSet<>();
    nodeTransformers.add(new PluckNodeTransformer());
    final SchemaService schemaService = new DefaultSchemaService(new DefaultPropertyIntrospectorService(new JacksonPropertyIntrospector()), sessionFactory);
    CacheProvider cacheProvider = mock(CacheProvider.class);
    when(cacheProvider.createPropertyTransformerCache()).thenReturn(new NoOpCache<>());
    service = new DefaultFieldFilterService(new DefaultFieldParser(), schemaService, aclService, currentUserService, attributeService, cacheProvider, userGroupService, userService, nodeTransformers);
    service.init();
}
Also used : NodeTransformer(org.hisp.dhis.node.NodeTransformer) PluckNodeTransformer(org.hisp.dhis.node.transformers.PluckNodeTransformer) DefaultSchemaService(org.hisp.dhis.schema.DefaultSchemaService) SchemaService(org.hisp.dhis.schema.SchemaService) PluckNodeTransformer(org.hisp.dhis.node.transformers.PluckNodeTransformer) DefaultSchemaService(org.hisp.dhis.schema.DefaultSchemaService) CacheProvider(org.hisp.dhis.cache.CacheProvider) JacksonPropertyIntrospector(org.hisp.dhis.schema.introspection.JacksonPropertyIntrospector) HashSet(java.util.HashSet) DefaultPropertyIntrospectorService(org.hisp.dhis.schema.DefaultPropertyIntrospectorService) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

HashSet (java.util.HashSet)1 CacheProvider (org.hisp.dhis.cache.CacheProvider)1 NodeTransformer (org.hisp.dhis.node.NodeTransformer)1 PluckNodeTransformer (org.hisp.dhis.node.transformers.PluckNodeTransformer)1 DefaultPropertyIntrospectorService (org.hisp.dhis.schema.DefaultPropertyIntrospectorService)1 DefaultSchemaService (org.hisp.dhis.schema.DefaultSchemaService)1 SchemaService (org.hisp.dhis.schema.SchemaService)1 JacksonPropertyIntrospector (org.hisp.dhis.schema.introspection.JacksonPropertyIntrospector)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1