1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.openehealth.ipf.commons.spring.map;
18
19 import lombok.Getter;
20 import lombok.Setter;
21 import org.springframework.beans.factory.InitializingBean;
22 import org.springframework.core.io.Resource;
23
24 import java.util.List;
25
26
27
28
29
30
31
32
33
34 public class SpringBidiMappingServiceConfigurer implements InitializingBean {
35
36 @Getter @Setter
37 private SpringBidiMappingService mappingService;
38
39 @Getter @Setter
40 private List<? extends Resource> mappingResources;
41
42 @Getter @Setter
43 private Resource mappingResource;
44
45 public void afterPropertiesSet() {
46 if (mappingResources != null && !mappingResources.isEmpty()) {
47 mappingService.setMappingResources(mappingResources);
48 }
49 if (mappingResource != null) {
50 mappingService.setMappingResource(mappingResource);
51 }
52 }
53 }