From 3e7145fc12ed8475ba10bb2a3c63004d41aa42bc Mon Sep 17 00:00:00 2001 From: "Christopher Lott (cl778h)" Date: Fri, 7 Jul 2017 07:21:10 -0400 Subject: [PORTAL-25] Role Centralization Bump EP SDK version to 1.3.0-SNAPSHOT Support Role Centralization & Common Set of Roles across All ONAP On-Boarded Applications Change-Id: Icfc1bbfddaf2c7c7176b4cf7bb7017d853c63100 Signed-off-by: Christopher Lott (cl778h) --- .../core/service/AccessConfiguration.java | 132 +++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/AccessConfiguration.java (limited to 'ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/AccessConfiguration.java') diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/AccessConfiguration.java b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/AccessConfiguration.java new file mode 100644 index 00000000..ae6bd309 --- /dev/null +++ b/ecomp-sdk/epsdk-core/src/main/java/org/openecomp/portalsdk/core/service/AccessConfiguration.java @@ -0,0 +1,132 @@ +package org.openecomp.portalsdk.core.service; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Conditional; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class AccessConfiguration { + + + + /** + * + * @returns RoleServiceImpl bean if LocalAccessCondition is true + */ + @Bean + @Conditional(LocalAccessCondition.class) + public RoleService roleServiceImpl() { + return new RoleServiceImpl(); + } + + + /** + * + * @returns RoleServiceCentralizedAccess bean if CentralAccessCondition is true + */ + @Bean + @Conditional(CentralAccessCondition.class) + public RoleService roleServiceCentralizedAccess() { + return new RoleServiceCentralizedAccess(); + } + + + /** + * + * @returns LoginServiceImpl bean if LocalAccessCondition is true + */ + @Bean + @Conditional(LocalAccessCondition.class) + public LoginService loginServiceImpl() { + return new LoginServiceImpl(); + } + + + /** + * + * @returns LoginServiceCentralizedImpl bean if CentralAccessCondition is true + */ + @Bean + @Conditional(CentralAccessCondition.class) + public LoginService loginServiceCEntralizedImpl() { + return new LoginServiceCentralizedImpl(); + } + + /** + * + * @returns UserProfileServiceImpl bean if LocalAccessCondition is true + */ + @Bean + @Conditional(LocalAccessCondition.class) + public UserProfileService userProfileServiceImpl() { + return new UserProfileServiceImpl(); + } + + + /** + * + * @returns returns UserProfileServiceCentalizedImpl bean if CentralAccessCondition is true + */ + @Bean + @Conditional(CentralAccessCondition.class) + public UserProfileService userProfileServiceCentalizedImpl() { + return new UserProfileServiceCentalizedImpl(); + } + + + + /** + * + * @returns returns ProfileServiceImpl bean if LocalAccessCondition is true + */ + @Bean + @Conditional(LocalAccessCondition.class) + public ProfileService profileServiceImpl() { + return new ProfileServiceImpl(); + } + + + /** + * + * @returns returns ProfileServiceCentralizedImpl bean if CentralAccessCondition is true + */ + + @Bean + @Conditional(CentralAccessCondition.class) + public ProfileService profileServiceCentralizedImpl() { + return new ProfileServiceCentralizedImpl(); + } + + /** + * + * @returns returns UrlAccessCentalizedImpl bean if CentralAccessCondition is true + */ + @Bean + @Conditional(CentralAccessCondition.class) + public UrlAccessService userUtilsCentalizedImpl() { + return new UrlAccessCentalizedImpl(); + } + + + /** + * + * @returns returns UrlAccessImpl bean if LocalAccessCondition is true + */ + @Bean + @Conditional(LocalAccessCondition.class) + public UrlAccessService urlAccessImpl() { + return new UrlAccessImpl(); + } + + + /** + * + * @returns returns RestApiRequestBuilder bean if CentralAccessCondition is true + */ + @Bean + @Conditional(CentralAccessCondition.class) + public RestApiRequestBuilder restApiRequestBuilder() { + return new RestApiRequestBuilder(); + } + +} -- cgit 1.2.3-korg