View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.syncope.client.console;
20  
21  import org.apache.syncope.client.console.commons.AMAccessPolicyConfProvider;
22  import org.apache.syncope.client.console.commons.AMPolicyTabProvider;
23  import org.apache.syncope.client.console.commons.AMRealmPolicyProvider;
24  import org.apache.syncope.client.console.commons.AccessPolicyConfProvider;
25  import org.apache.syncope.client.console.commons.PolicyTabProvider;
26  import org.apache.syncope.client.console.commons.RealmPolicyProvider;
27  import org.apache.syncope.client.console.init.AMClassPathScanImplementationContributor;
28  import org.apache.syncope.client.console.init.ClassPathScanImplementationContributor;
29  import org.apache.syncope.client.console.rest.AttrRepoRestClient;
30  import org.apache.syncope.client.console.rest.AuthModuleRestClient;
31  import org.apache.syncope.client.console.rest.AuthProfileRestClient;
32  import org.apache.syncope.client.console.rest.ClientAppRestClient;
33  import org.apache.syncope.client.console.rest.OIDCJWKSRestClient;
34  import org.apache.syncope.client.console.rest.PolicyRestClient;
35  import org.apache.syncope.client.console.rest.SAML2IdPEntityRestClient;
36  import org.apache.syncope.client.console.rest.SAML2SPEntityRestClient;
37  import org.apache.syncope.client.console.rest.SRARouteRestClient;
38  import org.apache.syncope.client.console.rest.SRAStatisticsRestClient;
39  import org.apache.syncope.client.console.rest.WAConfigRestClient;
40  import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
41  import org.springframework.context.annotation.Bean;
42  import org.springframework.context.annotation.Configuration;
43  
44  @Configuration(proxyBeanMethods = false)
45  public class AMConsoleContext {
46  
47      @Bean
48      public ClassPathScanImplementationContributor amClassPathScanImplementationContributor() {
49          return new AMClassPathScanImplementationContributor();
50      }
51  
52      @Bean
53      public RealmPolicyProvider realmPolicyProvider(final PolicyRestClient policyRestClient) {
54          return new AMRealmPolicyProvider(policyRestClient);
55      }
56  
57      @Bean
58      public PolicyTabProvider amPolicyTabProvider(final PolicyRestClient policyRestClient) {
59          return new AMPolicyTabProvider(policyRestClient);
60      }
61  
62      @Bean
63      public AccessPolicyConfProvider accessPolicyConfProvider() {
64          return new AMAccessPolicyConfProvider();
65      }
66  
67      @ConditionalOnMissingBean
68      @Bean
69      public AttrRepoRestClient attrRepoRestClient() {
70          return new AttrRepoRestClient();
71      }
72  
73      @ConditionalOnMissingBean
74      @Bean
75      public AuthModuleRestClient authModuleRestClient() {
76          return new AuthModuleRestClient();
77      }
78  
79      @ConditionalOnMissingBean
80      @Bean
81      public AuthProfileRestClient authProfileRestClient() {
82          return new AuthProfileRestClient();
83      }
84  
85      @ConditionalOnMissingBean
86      @Bean
87      public ClientAppRestClient clientAppRestClient() {
88          return new ClientAppRestClient();
89      }
90  
91      @ConditionalOnMissingBean
92      @Bean
93      public OIDCJWKSRestClient oidcJWKSRestClient() {
94          return new OIDCJWKSRestClient();
95      }
96  
97      @ConditionalOnMissingBean
98      @Bean
99      public SAML2IdPEntityRestClient saml2IdPEntityRestClient() {
100         return new SAML2IdPEntityRestClient();
101     }
102 
103     @ConditionalOnMissingBean
104     @Bean
105     public SAML2SPEntityRestClient saml2SPEntityRestClient() {
106         return new SAML2SPEntityRestClient();
107     }
108 
109     @ConditionalOnMissingBean
110     @Bean
111     public SRARouteRestClient sraRouteRestClient() {
112         return new SRARouteRestClient();
113     }
114 
115     @ConditionalOnMissingBean
116     @Bean
117     public SRAStatisticsRestClient sRAStatisticsRestClient() {
118         return new SRAStatisticsRestClient();
119     }
120 
121     @ConditionalOnMissingBean
122     @Bean
123     public WAConfigRestClient waConfigRestClient() {
124         return new WAConfigRestClient();
125     }
126 }