1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.syncope.client.enduser;
20
21 import org.apache.syncope.client.enduser.commons.PreviewUtils;
22 import org.apache.syncope.client.enduser.init.ClassPathScanImplementationLookup;
23 import org.apache.syncope.client.enduser.rest.AnyTypeRestClient;
24 import org.apache.syncope.client.enduser.rest.GroupRestClient;
25 import org.apache.syncope.client.enduser.rest.SchemaRestClient;
26 import org.apache.syncope.client.enduser.rest.SecurityQuestionRestClient;
27 import org.apache.syncope.client.enduser.rest.SyncopeRestClient;
28 import org.apache.syncope.client.enduser.rest.UserSelfRestClient;
29 import org.apache.syncope.client.ui.commons.MIMETypesLoader;
30 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
31 import org.springframework.context.annotation.Bean;
32 import org.springframework.context.annotation.Configuration;
33
34 @Configuration(proxyBeanMethods = false)
35 public class IdRepoEnduserContext {
36
37 @ConditionalOnMissingBean
38 @Bean
39 public ClassPathScanImplementationLookup classPathScanImplementationLookup() {
40 ClassPathScanImplementationLookup lookup = new ClassPathScanImplementationLookup();
41 lookup.load();
42 return lookup;
43 }
44
45 @ConditionalOnMissingBean
46 @Bean
47 public MIMETypesLoader mimeTypesLoader() {
48 MIMETypesLoader mimeTypesLoader = new MIMETypesLoader();
49 mimeTypesLoader.load();
50 return mimeTypesLoader;
51 }
52
53 @ConditionalOnMissingBean
54 @Bean
55 public PreviewUtils previewUtils(final ClassPathScanImplementationLookup lookup) {
56 return new PreviewUtils(lookup);
57 }
58
59 @ConditionalOnMissingBean
60 @Bean
61 public AnyTypeRestClient anyTypeRestClient() {
62 return new AnyTypeRestClient();
63 }
64
65 @ConditionalOnMissingBean
66 @Bean
67 public GroupRestClient groupRestClient() {
68 return new GroupRestClient();
69 }
70
71 @ConditionalOnMissingBean
72 @Bean
73 public SchemaRestClient schemaRestClient() {
74 return new SchemaRestClient();
75 }
76
77 @ConditionalOnMissingBean
78 @Bean
79 public SecurityQuestionRestClient securityQuestionRestClient() {
80 return new SecurityQuestionRestClient();
81 }
82
83 @ConditionalOnMissingBean
84 @Bean
85 public SyncopeRestClient syncopeRestClient() {
86 return new SyncopeRestClient();
87 }
88
89 @ConditionalOnMissingBean
90 @Bean
91 public UserSelfRestClient userSelfRestClient() {
92 return new UserSelfRestClient();
93 }
94 }