diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2023-08-16 08:01:39 +0000 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2023-08-16 08:20:05 +0000 |
commit | 473792061d40a0027b57d65a97f3da06e4b8c7bd (patch) | |
tree | 0a22c16eb86f080e0ad7d19f6d8c2b045f37f54f /lib | |
parent | f4b789cd3d86eb96a1e012910a3e7111fd4fdfed (diff) |
Consistently use the bff name in the bff code base
- rename package name from org.onap.portal.bff to org.onap.portalng.bff
- replace all other occurences of portal-bff with bff
Other:
- remove Sonarqube plugin
Issue-ID: PORTALNG-40
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Change-Id: I50548630212e46a0ab84c88ff5fef743dafe9d38
Diffstat (limited to 'lib')
-rw-r--r-- | lib/build.gradle | 23 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/config/BeansConfig.java (renamed from lib/src/main/java/org/onap/portal/bff/config/BeansConfig.java) | 6 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/config/BffConfig.java (renamed from lib/src/main/java/org/onap/portal/bff/config/PortalBffConfig.java) | 6 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/config/ConversionServiceConfig.java (renamed from lib/src/main/java/org/onap/portal/bff/config/ConversionServiceConfig.java) | 10 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/config/IdTokenExchangeFilterFunction.java (renamed from lib/src/main/java/org/onap/portal/bff/config/IdTokenExchangeFilterFunction.java) | 2 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/config/LoggerInterceptor.java (renamed from lib/src/main/java/org/onap/portal/bff/config/LoggerInterceptor.java) | 4 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/config/MapperSpringConfig.java (renamed from lib/src/main/java/org/onap/portal/bff/config/MapperSpringConfig.java) | 2 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/config/SecurityConfig.java (renamed from lib/src/main/java/org/onap/portal/bff/config/SecurityConfig.java) | 2 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/config/clients/AbstractClientConfig.java (renamed from lib/src/main/java/org/onap/portal/bff/config/clients/AbstractClientConfig.java) | 4 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/config/clients/KeycloakConfig.java (renamed from lib/src/main/java/org/onap/portal/bff/config/clients/KeycloakConfig.java) | 20 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/config/clients/PortalHistoryConfig.java (renamed from lib/src/main/java/org/onap/portal/bff/config/clients/PortalHistoryConfig.java) | 20 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/config/clients/PortalPrefsConfig.java (renamed from lib/src/main/java/org/onap/portal/bff/config/clients/PortalPrefsConfig.java) | 20 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/controller/AbstractBffController.java (renamed from lib/src/main/java/org/onap/portal/bff/controller/AbstractBffController.java) | 10 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/controller/ActionsController.java (renamed from lib/src/main/java/org/onap/portal/bff/controller/ActionsController.java) | 16 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/controller/BffControllerAdvice.java (renamed from lib/src/main/java/org/onap/portal/bff/controller/BffControllerAdvice.java) | 2 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/controller/PreferencesController.java (renamed from lib/src/main/java/org/onap/portal/bff/controller/PreferencesController.java) | 14 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/controller/RolesController.java (renamed from lib/src/main/java/org/onap/portal/bff/controller/RolesController.java) | 12 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/controller/UsersController.java (renamed from lib/src/main/java/org/onap/portal/bff/controller/UsersController.java) | 26 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/exceptions/DownstreamApiProblemException.java (renamed from lib/src/main/java/org/onap/portal/bff/exceptions/DownstreamApiProblemException.java) | 6 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/mappers/ActionsMapper.java (renamed from lib/src/main/java/org/onap/portal/bff/mappers/ActionsMapper.java) | 8 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/mappers/CredentialMapper.java (renamed from lib/src/main/java/org/onap/portal/bff/mappers/CredentialMapper.java) | 8 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/mappers/PreferencesMapper.java (renamed from lib/src/main/java/org/onap/portal/bff/mappers/PreferencesMapper.java) | 8 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/mappers/RolesMapper.java (renamed from lib/src/main/java/org/onap/portal/bff/mappers/RolesMapper.java) | 8 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/mappers/UsersMapper.java (renamed from lib/src/main/java/org/onap/portal/bff/mappers/UsersMapper.java) | 14 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/services/ActionService.java (renamed from lib/src/main/java/org/onap/portal/bff/services/ActionService.java) | 18 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/services/KeycloakService.java (renamed from lib/src/main/java/org/onap/portal/bff/services/KeycloakService.java) | 18 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/services/PreferencesService.java (renamed from lib/src/main/java/org/onap/portal/bff/services/PreferencesService.java) | 14 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/utils/ErrorHandler.java (renamed from lib/src/main/java/org/onap/portal/bff/utils/ErrorHandler.java) | 6 | ||||
-rw-r--r-- | lib/src/main/java/org/onap/portalng/bff/utils/Logger.java (renamed from lib/src/main/java/org/onap/portal/bff/utils/Logger.java) | 11 |
29 files changed, 158 insertions, 160 deletions
diff --git a/lib/build.gradle b/lib/build.gradle index 594dd9c..ea7dc98 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -5,9 +5,8 @@ apply plugin: 'maven-publish' apply plugin: 'java-library' apply plugin: 'com.diffplug.spotless' apply plugin: 'com.github.spotbugs' -apply plugin: 'org.sonarqube' -group 'org.onap.portal-ng' +group 'org.onap.portalng' version rootProject.file('version').text.trim() dependencies { @@ -53,12 +52,21 @@ publishing { artifacts = ["build/libs/bff-$version-all.jar"] pom { name = rootProject.name - description = 'ONAP community edition of bff' + description = 'portal-ng backend-for-frontend service' } } } + // https://gitlab.devops.telekom.de/tnap/development/tesla-team/portal-community/bff/-/blob/pipeline/lib/build.gradle#L60 repositories{ mavenCentral() + // maven { + // url "${maven_central_url}" + // credentials { + // username = "${artifactory_user}" + // password = "${artifactory_password}" + // } + // } + } } @@ -84,13 +92,4 @@ spotbugs { effort = "max" reportLevel = "high" excludeFilter = file("$rootProject.projectDir/spotbugs-exclude.xml") -} - -sonarqube { - properties { - property "sonar.projectKey", "tnap.SONAR.portal.portal-bff-ce" - property "sonar.projectName", "portal-bff-ce" - property "sonar.projectDescription", "Community edition of the the ONAP portal" - property "sonar.exclusions", "**/build**" - } }
\ No newline at end of file diff --git a/lib/src/main/java/org/onap/portal/bff/config/BeansConfig.java b/lib/src/main/java/org/onap/portalng/bff/config/BeansConfig.java index ca4333b..926108a 100644 --- a/lib/src/main/java/org/onap/portal/bff/config/BeansConfig.java +++ b/lib/src/main/java/org/onap/portalng/bff/config/BeansConfig.java @@ -19,7 +19,7 @@ * */ -package org.onap.portal.bff.config; +package org.onap.portalng.bff.config; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; @@ -31,8 +31,8 @@ import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import java.time.Clock; import java.util.List; import lombok.extern.slf4j.Slf4j; -import org.onap.portal.bff.exceptions.DownstreamApiProblemException; -import org.onap.portal.bff.utils.Logger; +import org.onap.portalng.bff.exceptions.DownstreamApiProblemException; +import org.onap.portalng.bff.utils.Logger; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.annotation.Bean; diff --git a/lib/src/main/java/org/onap/portal/bff/config/PortalBffConfig.java b/lib/src/main/java/org/onap/portalng/bff/config/BffConfig.java index b80fe20..0a78da1 100644 --- a/lib/src/main/java/org/onap/portal/bff/config/PortalBffConfig.java +++ b/lib/src/main/java/org/onap/portalng/bff/config/BffConfig.java @@ -19,7 +19,7 @@ * */ -package org.onap.portal.bff.config; +package org.onap.portalng.bff.config; import java.util.List; import java.util.Map; @@ -39,9 +39,9 @@ import reactor.core.publisher.Mono; */ @Valid @ConstructorBinding -@ConfigurationProperties("portal-bff") +@ConfigurationProperties("bff") @Data -public class PortalBffConfig { +public class BffConfig { @NotBlank private final String realm; @NotBlank private final String portalServiceUrl; diff --git a/lib/src/main/java/org/onap/portal/bff/config/ConversionServiceConfig.java b/lib/src/main/java/org/onap/portalng/bff/config/ConversionServiceConfig.java index 18830ef..517de13 100644 --- a/lib/src/main/java/org/onap/portal/bff/config/ConversionServiceConfig.java +++ b/lib/src/main/java/org/onap/portalng/bff/config/ConversionServiceConfig.java @@ -19,13 +19,13 @@ * */ -package org.onap.portal.bff.config; +package org.onap.portalng.bff.config; import java.util.List; -import org.onap.portal.bff.mappers.ActionsMapper; -import org.onap.portal.bff.mappers.PreferencesMapper; -import org.onap.portal.bff.mappers.RolesMapper; -import org.onap.portal.bff.mappers.UsersMapper; +import org.onap.portalng.bff.mappers.ActionsMapper; +import org.onap.portalng.bff.mappers.PreferencesMapper; +import org.onap.portalng.bff.mappers.RolesMapper; +import org.onap.portalng.bff.mappers.UsersMapper; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; diff --git a/lib/src/main/java/org/onap/portal/bff/config/IdTokenExchangeFilterFunction.java b/lib/src/main/java/org/onap/portalng/bff/config/IdTokenExchangeFilterFunction.java index 9cd8ac0..d747f3a 100644 --- a/lib/src/main/java/org/onap/portal/bff/config/IdTokenExchangeFilterFunction.java +++ b/lib/src/main/java/org/onap/portalng/bff/config/IdTokenExchangeFilterFunction.java @@ -19,7 +19,7 @@ * */ -package org.onap.portal.bff.config; +package org.onap.portalng.bff.config; import com.nimbusds.jwt.JWTParser; import java.text.ParseException; diff --git a/lib/src/main/java/org/onap/portal/bff/config/LoggerInterceptor.java b/lib/src/main/java/org/onap/portalng/bff/config/LoggerInterceptor.java index 4fa2d82..5b9b492 100644 --- a/lib/src/main/java/org/onap/portal/bff/config/LoggerInterceptor.java +++ b/lib/src/main/java/org/onap/portalng/bff/config/LoggerInterceptor.java @@ -19,10 +19,10 @@ * */ -package org.onap.portal.bff.config; +package org.onap.portalng.bff.config; import java.util.List; -import org.onap.portal.bff.utils.Logger; +import org.onap.portalng.bff.utils.Logger; import org.springframework.stereotype.Component; import org.springframework.web.filter.reactive.ServerWebExchangeContextFilter; import org.springframework.web.server.ServerWebExchange; diff --git a/lib/src/main/java/org/onap/portal/bff/config/MapperSpringConfig.java b/lib/src/main/java/org/onap/portalng/bff/config/MapperSpringConfig.java index c7e3711..cc48080 100644 --- a/lib/src/main/java/org/onap/portal/bff/config/MapperSpringConfig.java +++ b/lib/src/main/java/org/onap/portalng/bff/config/MapperSpringConfig.java @@ -19,7 +19,7 @@ * */ -package org.onap.portal.bff.config; +package org.onap.portalng.bff.config; import org.mapstruct.MapperConfig; import org.mapstruct.extensions.spring.converter.ConversionServiceAdapterGenerator; diff --git a/lib/src/main/java/org/onap/portal/bff/config/SecurityConfig.java b/lib/src/main/java/org/onap/portalng/bff/config/SecurityConfig.java index 0d33980..2a0f701 100644 --- a/lib/src/main/java/org/onap/portal/bff/config/SecurityConfig.java +++ b/lib/src/main/java/org/onap/portalng/bff/config/SecurityConfig.java @@ -19,7 +19,7 @@ * */ -package org.onap.portal.bff.config; +package org.onap.portalng.bff.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/lib/src/main/java/org/onap/portal/bff/config/clients/AbstractClientConfig.java b/lib/src/main/java/org/onap/portalng/bff/config/clients/AbstractClientConfig.java index 85ee8ba..75dce3d 100644 --- a/lib/src/main/java/org/onap/portal/bff/config/clients/AbstractClientConfig.java +++ b/lib/src/main/java/org/onap/portalng/bff/config/clients/AbstractClientConfig.java @@ -19,13 +19,13 @@ * */ -package org.onap.portal.bff.config.clients; +package org.onap.portalng.bff.config.clients; import java.time.Duration; import java.util.List; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.onap.portal.bff.exceptions.DownstreamApiProblemException; +import org.onap.portalng.bff.exceptions.DownstreamApiProblemException; import org.springframework.http.HttpStatus; import org.springframework.http.client.reactive.ClientHttpConnector; import org.springframework.http.client.reactive.ReactorClientHttpConnector; diff --git a/lib/src/main/java/org/onap/portal/bff/config/clients/KeycloakConfig.java b/lib/src/main/java/org/onap/portalng/bff/config/clients/KeycloakConfig.java index 168c350..d96db71 100644 --- a/lib/src/main/java/org/onap/portal/bff/config/clients/KeycloakConfig.java +++ b/lib/src/main/java/org/onap/portalng/bff/config/clients/KeycloakConfig.java @@ -19,18 +19,18 @@ * */ -package org.onap.portal.bff.config.clients; +package org.onap.portalng.bff.config.clients; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.List; import java.util.function.Function; -import org.onap.portal.bff.config.BeansConfig; -import org.onap.portal.bff.config.PortalBffConfig; -import org.onap.portal.bff.exceptions.DownstreamApiProblemException; -import org.onap.portal.bff.openapi.client_portal_keycloak.ApiClient; -import org.onap.portal.bff.openapi.client_portal_keycloak.api.KeycloakApi; -import org.onap.portal.bff.openapi.client_portal_keycloak.model.ErrorResponseKeycloakDto; -import org.onap.portal.bff.openapi.server.model.ProblemApiDto; +import org.onap.portalng.bff.config.BeansConfig; +import org.onap.portalng.bff.config.BffConfig; +import org.onap.portalng.bff.exceptions.DownstreamApiProblemException; +import org.onap.portalng.bff.openapi.client_portal_keycloak.ApiClient; +import org.onap.portalng.bff.openapi.client_portal_keycloak.api.KeycloakApi; +import org.onap.portalng.bff.openapi.client_portal_keycloak.model.ErrorResponseKeycloakDto; +import org.onap.portalng.bff.openapi.server.model.ProblemApiDto; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -42,14 +42,14 @@ import org.springframework.web.reactive.function.client.WebClient; @Configuration public class KeycloakConfig extends AbstractClientConfig<ErrorResponseKeycloakDto> { private final ObjectMapper objectMapper; - private final PortalBffConfig bffConfig; + private final BffConfig bffConfig; private final ExchangeFilterFunction oauth2ExchangeFilterFunction; public KeycloakConfig( @Qualifier(BeansConfig.OAUTH2_EXCHANGE_FILTER_FUNCTION) ExchangeFilterFunction oauth2ExchangeFilterFunction, ObjectMapper objectMapper, - PortalBffConfig bffConfig) { + BffConfig bffConfig) { super(ErrorResponseKeycloakDto.class); this.objectMapper = objectMapper; this.bffConfig = bffConfig; diff --git a/lib/src/main/java/org/onap/portal/bff/config/clients/PortalHistoryConfig.java b/lib/src/main/java/org/onap/portalng/bff/config/clients/PortalHistoryConfig.java index b71608f..00cda73 100644 --- a/lib/src/main/java/org/onap/portal/bff/config/clients/PortalHistoryConfig.java +++ b/lib/src/main/java/org/onap/portalng/bff/config/clients/PortalHistoryConfig.java @@ -19,7 +19,7 @@ * */ -package org.onap.portal.bff.config.clients; +package org.onap.portalng.bff.config.clients; import com.fasterxml.jackson.databind.ObjectMapper; import java.net.MalformedURLException; @@ -27,13 +27,13 @@ import java.net.URL; import java.util.List; import java.util.function.Function; import lombok.extern.slf4j.Slf4j; -import org.onap.portal.bff.config.BeansConfig; -import org.onap.portal.bff.config.PortalBffConfig; -import org.onap.portal.bff.exceptions.DownstreamApiProblemException; -import org.onap.portal.bff.openapi.client_portal_history.ApiClient; -import org.onap.portal.bff.openapi.client_portal_history.api.ActionsApi; -import org.onap.portal.bff.openapi.client_portal_history.model.ProblemPortalHistoryDto; -import org.onap.portal.bff.openapi.server.model.ProblemApiDto; +import org.onap.portalng.bff.config.BeansConfig; +import org.onap.portalng.bff.config.BffConfig; +import org.onap.portalng.bff.exceptions.DownstreamApiProblemException; +import org.onap.portalng.bff.openapi.client_portal_history.ApiClient; +import org.onap.portalng.bff.openapi.client_portal_history.api.ActionsApi; +import org.onap.portalng.bff.openapi.client_portal_history.model.ProblemPortalHistoryDto; +import org.onap.portalng.bff.openapi.server.model.ProblemApiDto; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; @@ -46,7 +46,7 @@ import org.springframework.web.reactive.function.client.WebClient; @Configuration public class PortalHistoryConfig extends AbstractClientConfig<ProblemPortalHistoryDto> { private final ObjectMapper objectMapper; - private final PortalBffConfig bffConfig; + private final BffConfig bffConfig; private final ExchangeFilterFunction oauth2ExchangeFilterFunction; @Autowired @@ -54,7 +54,7 @@ public class PortalHistoryConfig extends AbstractClientConfig<ProblemPortalHisto @Qualifier(BeansConfig.OAUTH2_EXCHANGE_FILTER_FUNCTION) ExchangeFilterFunction oauth2ExchangeFilterFunction, ObjectMapper objectMapper, - PortalBffConfig bffConfig) { + BffConfig bffConfig) { super(ProblemPortalHistoryDto.class); this.objectMapper = objectMapper; this.bffConfig = bffConfig; diff --git a/lib/src/main/java/org/onap/portal/bff/config/clients/PortalPrefsConfig.java b/lib/src/main/java/org/onap/portalng/bff/config/clients/PortalPrefsConfig.java index 5e23348..c1aacbe 100644 --- a/lib/src/main/java/org/onap/portal/bff/config/clients/PortalPrefsConfig.java +++ b/lib/src/main/java/org/onap/portalng/bff/config/clients/PortalPrefsConfig.java @@ -19,7 +19,7 @@ * */ -package org.onap.portal.bff.config.clients; +package org.onap.portalng.bff.config.clients; import com.fasterxml.jackson.databind.ObjectMapper; import java.net.MalformedURLException; @@ -27,13 +27,13 @@ import java.net.URL; import java.util.List; import java.util.function.Function; import lombok.extern.slf4j.Slf4j; -import org.onap.portal.bff.config.BeansConfig; -import org.onap.portal.bff.config.PortalBffConfig; -import org.onap.portal.bff.exceptions.DownstreamApiProblemException; -import org.onap.portal.bff.openapi.client_portal_prefs.ApiClient; -import org.onap.portal.bff.openapi.client_portal_prefs.api.PreferencesApi; -import org.onap.portal.bff.openapi.client_portal_prefs.model.ProblemPortalPrefsDto; -import org.onap.portal.bff.openapi.server.model.ProblemApiDto; +import org.onap.portalng.bff.config.BeansConfig; +import org.onap.portalng.bff.config.BffConfig; +import org.onap.portalng.bff.exceptions.DownstreamApiProblemException; +import org.onap.portalng.bff.openapi.client_portal_prefs.ApiClient; +import org.onap.portalng.bff.openapi.client_portal_prefs.api.PreferencesApi; +import org.onap.portalng.bff.openapi.client_portal_prefs.model.ProblemPortalPrefsDto; +import org.onap.portalng.bff.openapi.server.model.ProblemApiDto; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -45,14 +45,14 @@ import org.springframework.web.reactive.function.client.WebClient; @Configuration public class PortalPrefsConfig extends AbstractClientConfig<ProblemPortalPrefsDto> { private final ObjectMapper objectMapper; - private final PortalBffConfig bffConfig; + private final BffConfig bffConfig; private final ExchangeFilterFunction oauth2ExchangeFilterFunction; public PortalPrefsConfig( @Qualifier(BeansConfig.OAUTH2_EXCHANGE_FILTER_FUNCTION) ExchangeFilterFunction oauth2ExchangeFilterFunction, ObjectMapper objectMapper, - PortalBffConfig bffConfig) { + BffConfig bffConfig) { super(ProblemPortalPrefsDto.class); this.objectMapper = objectMapper; this.bffConfig = bffConfig; diff --git a/lib/src/main/java/org/onap/portal/bff/controller/AbstractBffController.java b/lib/src/main/java/org/onap/portalng/bff/controller/AbstractBffController.java index bc92b68..afcb448 100644 --- a/lib/src/main/java/org/onap/portal/bff/controller/AbstractBffController.java +++ b/lib/src/main/java/org/onap/portalng/bff/controller/AbstractBffController.java @@ -19,18 +19,18 @@ * */ -package org.onap.portal.bff.controller; +package org.onap.portalng.bff.controller; -import org.onap.portal.bff.config.IdTokenExchangeFilterFunction; -import org.onap.portal.bff.config.PortalBffConfig; +import org.onap.portalng.bff.config.BffConfig; +import org.onap.portalng.bff.config.IdTokenExchangeFilterFunction; import org.springframework.web.server.ServerWebExchange; import reactor.core.publisher.Mono; public abstract class AbstractBffController { - protected PortalBffConfig bffConfig; + protected BffConfig bffConfig; - protected AbstractBffController(PortalBffConfig bffConfig) { + protected AbstractBffController(BffConfig bffConfig) { this.bffConfig = bffConfig; } diff --git a/lib/src/main/java/org/onap/portal/bff/controller/ActionsController.java b/lib/src/main/java/org/onap/portalng/bff/controller/ActionsController.java index ece6683..8b8f615 100644 --- a/lib/src/main/java/org/onap/portal/bff/controller/ActionsController.java +++ b/lib/src/main/java/org/onap/portalng/bff/controller/ActionsController.java @@ -19,14 +19,14 @@ * */ -package org.onap.portal.bff.controller; +package org.onap.portalng.bff.controller; -import org.onap.portal.bff.config.PortalBffConfig; -import org.onap.portal.bff.openapi.server.api.ActionsApi; -import org.onap.portal.bff.openapi.server.model.ActionsListResponseApiDto; -import org.onap.portal.bff.openapi.server.model.ActionsResponseApiDto; -import org.onap.portal.bff.openapi.server.model.CreateActionRequestApiDto; -import org.onap.portal.bff.services.ActionService; +import org.onap.portalng.bff.config.BffConfig; +import org.onap.portalng.bff.openapi.server.api.ActionsApi; +import org.onap.portalng.bff.openapi.server.model.ActionsListResponseApiDto; +import org.onap.portalng.bff.openapi.server.model.ActionsResponseApiDto; +import org.onap.portalng.bff.openapi.server.model.CreateActionRequestApiDto; +import org.onap.portalng.bff.services.ActionService; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.server.ServerWebExchange; @@ -40,7 +40,7 @@ public class ActionsController extends AbstractBffController implements ActionsA private final ActionService actionService; - public ActionsController(PortalBffConfig bffConfig, ActionService actionService) { + public ActionsController(BffConfig bffConfig, ActionService actionService) { super(bffConfig); this.actionService = actionService; } diff --git a/lib/src/main/java/org/onap/portal/bff/controller/BffControllerAdvice.java b/lib/src/main/java/org/onap/portalng/bff/controller/BffControllerAdvice.java index 3580495..7bd6efa 100644 --- a/lib/src/main/java/org/onap/portal/bff/controller/BffControllerAdvice.java +++ b/lib/src/main/java/org/onap/portalng/bff/controller/BffControllerAdvice.java @@ -19,7 +19,7 @@ * */ -package org.onap.portal.bff.controller; +package org.onap.portalng.bff.controller; import org.springframework.web.bind.annotation.RestControllerAdvice; import org.zalando.problem.spring.webflux.advice.ProblemHandling; diff --git a/lib/src/main/java/org/onap/portal/bff/controller/PreferencesController.java b/lib/src/main/java/org/onap/portalng/bff/controller/PreferencesController.java index 625d034..c43b4c2 100644 --- a/lib/src/main/java/org/onap/portal/bff/controller/PreferencesController.java +++ b/lib/src/main/java/org/onap/portalng/bff/controller/PreferencesController.java @@ -19,14 +19,14 @@ * */ -package org.onap.portal.bff.controller; +package org.onap.portalng.bff.controller; import javax.validation.Valid; -import org.onap.portal.bff.config.PortalBffConfig; -import org.onap.portal.bff.openapi.server.api.PreferencesApi; -import org.onap.portal.bff.openapi.server.model.CreatePreferencesRequestApiDto; -import org.onap.portal.bff.openapi.server.model.PreferencesResponseApiDto; -import org.onap.portal.bff.services.PreferencesService; +import org.onap.portalng.bff.config.BffConfig; +import org.onap.portalng.bff.openapi.server.api.PreferencesApi; +import org.onap.portalng.bff.openapi.server.model.CreatePreferencesRequestApiDto; +import org.onap.portalng.bff.openapi.server.model.PreferencesResponseApiDto; +import org.onap.portalng.bff.services.PreferencesService; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.server.ServerWebExchange; @@ -40,7 +40,7 @@ public class PreferencesController extends AbstractBffController implements Pref private final PreferencesService preferencesService; - public PreferencesController(PortalBffConfig bffConfig, PreferencesService preferencesService) { + public PreferencesController(BffConfig bffConfig, PreferencesService preferencesService) { super(bffConfig); this.preferencesService = preferencesService; } diff --git a/lib/src/main/java/org/onap/portal/bff/controller/RolesController.java b/lib/src/main/java/org/onap/portalng/bff/controller/RolesController.java index 34d495f..3958811 100644 --- a/lib/src/main/java/org/onap/portal/bff/controller/RolesController.java +++ b/lib/src/main/java/org/onap/portalng/bff/controller/RolesController.java @@ -19,12 +19,12 @@ * */ -package org.onap.portal.bff.controller; +package org.onap.portalng.bff.controller; -import org.onap.portal.bff.config.PortalBffConfig; -import org.onap.portal.bff.openapi.server.api.RolesApi; -import org.onap.portal.bff.openapi.server.model.RoleListResponseApiDto; -import org.onap.portal.bff.services.KeycloakService; +import org.onap.portalng.bff.config.BffConfig; +import org.onap.portalng.bff.openapi.server.api.RolesApi; +import org.onap.portalng.bff.openapi.server.model.RoleListResponseApiDto; +import org.onap.portalng.bff.services.KeycloakService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RestController; @@ -39,7 +39,7 @@ public class RolesController extends AbstractBffController implements RolesApi { private final KeycloakService keycloakService; @Autowired - public RolesController(PortalBffConfig bffConfig, KeycloakService keycloakService) { + public RolesController(BffConfig bffConfig, KeycloakService keycloakService) { super(bffConfig); this.keycloakService = keycloakService; } diff --git a/lib/src/main/java/org/onap/portal/bff/controller/UsersController.java b/lib/src/main/java/org/onap/portalng/bff/controller/UsersController.java index 9214ebe..f2c5653 100644 --- a/lib/src/main/java/org/onap/portal/bff/controller/UsersController.java +++ b/lib/src/main/java/org/onap/portalng/bff/controller/UsersController.java @@ -19,18 +19,18 @@ * */ -package org.onap.portal.bff.controller; - -import org.onap.portal.bff.config.PortalBffConfig; -import org.onap.portal.bff.openapi.server.api.UsersApi; -import org.onap.portal.bff.openapi.server.model.CreateUserRequestApiDto; -import org.onap.portal.bff.openapi.server.model.RoleApiDto; -import org.onap.portal.bff.openapi.server.model.RoleListResponseApiDto; -import org.onap.portal.bff.openapi.server.model.UpdateUserPasswordRequestApiDto; -import org.onap.portal.bff.openapi.server.model.UpdateUserRequestApiDto; -import org.onap.portal.bff.openapi.server.model.UserListResponseApiDto; -import org.onap.portal.bff.openapi.server.model.UserResponseApiDto; -import org.onap.portal.bff.services.KeycloakService; +package org.onap.portalng.bff.controller; + +import org.onap.portalng.bff.config.BffConfig; +import org.onap.portalng.bff.openapi.server.api.UsersApi; +import org.onap.portalng.bff.openapi.server.model.CreateUserRequestApiDto; +import org.onap.portalng.bff.openapi.server.model.RoleApiDto; +import org.onap.portalng.bff.openapi.server.model.RoleListResponseApiDto; +import org.onap.portalng.bff.openapi.server.model.UpdateUserPasswordRequestApiDto; +import org.onap.portalng.bff.openapi.server.model.UpdateUserRequestApiDto; +import org.onap.portalng.bff.openapi.server.model.UserListResponseApiDto; +import org.onap.portalng.bff.openapi.server.model.UserResponseApiDto; +import org.onap.portalng.bff.services.KeycloakService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RestController; @@ -54,7 +54,7 @@ public class UsersController extends AbstractBffController implements UsersApi { private final KeycloakService keycloakService; @Autowired - public UsersController(PortalBffConfig bffConfig, KeycloakService keycloakService) { + public UsersController(BffConfig bffConfig, KeycloakService keycloakService) { super(bffConfig); this.keycloakService = keycloakService; } diff --git a/lib/src/main/java/org/onap/portal/bff/exceptions/DownstreamApiProblemException.java b/lib/src/main/java/org/onap/portalng/bff/exceptions/DownstreamApiProblemException.java index 35b895e..0c90473 100644 --- a/lib/src/main/java/org/onap/portal/bff/exceptions/DownstreamApiProblemException.java +++ b/lib/src/main/java/org/onap/portalng/bff/exceptions/DownstreamApiProblemException.java @@ -19,7 +19,7 @@ * */ -package org.onap.portal.bff.exceptions; +package org.onap.portalng.bff.exceptions; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -31,13 +31,13 @@ import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.ToString; -import org.onap.portal.bff.openapi.server.model.ConstraintViolationApiDto; +import org.onap.portalng.bff.openapi.server.model.ConstraintViolationApiDto; import org.zalando.problem.AbstractThrowableProblem; import org.zalando.problem.Problem; import org.zalando.problem.Status; import org.zalando.problem.StatusType; -/** The default portal-bff exception */ +/** The default bff exception */ @Getter @Builder @AllArgsConstructor diff --git a/lib/src/main/java/org/onap/portal/bff/mappers/ActionsMapper.java b/lib/src/main/java/org/onap/portalng/bff/mappers/ActionsMapper.java index 588deba..3f0ebdf 100644 --- a/lib/src/main/java/org/onap/portal/bff/mappers/ActionsMapper.java +++ b/lib/src/main/java/org/onap/portalng/bff/mappers/ActionsMapper.java @@ -19,13 +19,13 @@ * */ -package org.onap.portal.bff.mappers; +package org.onap.portalng.bff.mappers; import org.mapstruct.Mapper; import org.mapstruct.Mapping; -import org.onap.portal.bff.config.MapperSpringConfig; -import org.onap.portal.bff.openapi.client_portal_history.model.ActionsListResponsePortalHistoryDto; -import org.onap.portal.bff.openapi.server.model.ActionsListResponseApiDto; +import org.onap.portalng.bff.config.MapperSpringConfig; +import org.onap.portalng.bff.openapi.client_portal_history.model.ActionsListResponsePortalHistoryDto; +import org.onap.portalng.bff.openapi.server.model.ActionsListResponseApiDto; import org.springframework.core.convert.converter.Converter; @Mapper(config = MapperSpringConfig.class) diff --git a/lib/src/main/java/org/onap/portal/bff/mappers/CredentialMapper.java b/lib/src/main/java/org/onap/portalng/bff/mappers/CredentialMapper.java index e1db8de..b3c7f05 100644 --- a/lib/src/main/java/org/onap/portal/bff/mappers/CredentialMapper.java +++ b/lib/src/main/java/org/onap/portalng/bff/mappers/CredentialMapper.java @@ -19,13 +19,13 @@ * */ -package org.onap.portal.bff.mappers; +package org.onap.portalng.bff.mappers; import org.mapstruct.Mapper; import org.mapstruct.ReportingPolicy; -import org.onap.portal.bff.config.MapperSpringConfig; -import org.onap.portal.bff.openapi.client_portal_keycloak.model.CredentialKeycloakDto; -import org.onap.portal.bff.openapi.server.model.UpdateUserPasswordRequestApiDto; +import org.onap.portalng.bff.config.MapperSpringConfig; +import org.onap.portalng.bff.openapi.client_portal_keycloak.model.CredentialKeycloakDto; +import org.onap.portalng.bff.openapi.server.model.UpdateUserPasswordRequestApiDto; @Mapper(config = MapperSpringConfig.class, unmappedTargetPolicy = ReportingPolicy.IGNORE) public interface CredentialMapper { diff --git a/lib/src/main/java/org/onap/portal/bff/mappers/PreferencesMapper.java b/lib/src/main/java/org/onap/portalng/bff/mappers/PreferencesMapper.java index 8a554fe..6e615c3 100644 --- a/lib/src/main/java/org/onap/portal/bff/mappers/PreferencesMapper.java +++ b/lib/src/main/java/org/onap/portalng/bff/mappers/PreferencesMapper.java @@ -19,13 +19,13 @@ * */ -package org.onap.portal.bff.mappers; +package org.onap.portalng.bff.mappers; import org.mapstruct.Mapper; import org.mapstruct.Mapping; -import org.onap.portal.bff.config.MapperSpringConfig; -import org.onap.portal.bff.openapi.client_portal_prefs.model.PreferencesPortalPrefsDto; -import org.onap.portal.bff.openapi.server.model.PreferencesResponseApiDto; +import org.onap.portalng.bff.config.MapperSpringConfig; +import org.onap.portalng.bff.openapi.client_portal_prefs.model.PreferencesPortalPrefsDto; +import org.onap.portalng.bff.openapi.server.model.PreferencesResponseApiDto; import org.springframework.core.convert.converter.Converter; @Mapper(config = MapperSpringConfig.class) diff --git a/lib/src/main/java/org/onap/portal/bff/mappers/RolesMapper.java b/lib/src/main/java/org/onap/portalng/bff/mappers/RolesMapper.java index 68d00d8..6e14d7e 100644 --- a/lib/src/main/java/org/onap/portal/bff/mappers/RolesMapper.java +++ b/lib/src/main/java/org/onap/portalng/bff/mappers/RolesMapper.java @@ -19,13 +19,13 @@ * */ -package org.onap.portal.bff.mappers; +package org.onap.portalng.bff.mappers; import org.mapstruct.Mapper; import org.mapstruct.ReportingPolicy; -import org.onap.portal.bff.config.MapperSpringConfig; -import org.onap.portal.bff.openapi.client_portal_keycloak.model.RoleKeycloakDto; -import org.onap.portal.bff.openapi.server.model.RoleApiDto; +import org.onap.portalng.bff.config.MapperSpringConfig; +import org.onap.portalng.bff.openapi.client_portal_keycloak.model.RoleKeycloakDto; +import org.onap.portalng.bff.openapi.server.model.RoleApiDto; import org.springframework.core.convert.converter.Converter; @Mapper(config = MapperSpringConfig.class, unmappedTargetPolicy = ReportingPolicy.IGNORE) diff --git a/lib/src/main/java/org/onap/portal/bff/mappers/UsersMapper.java b/lib/src/main/java/org/onap/portalng/bff/mappers/UsersMapper.java index 19cb4c7..f494c5d 100644 --- a/lib/src/main/java/org/onap/portal/bff/mappers/UsersMapper.java +++ b/lib/src/main/java/org/onap/portalng/bff/mappers/UsersMapper.java @@ -19,18 +19,18 @@ * */ -package org.onap.portal.bff.mappers; +package org.onap.portalng.bff.mappers; import java.util.List; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.ReportingPolicy; -import org.onap.portal.bff.config.MapperSpringConfig; -import org.onap.portal.bff.openapi.client_portal_keycloak.model.RequiredActionsKeycloakDto; -import org.onap.portal.bff.openapi.client_portal_keycloak.model.UserKeycloakDto; -import org.onap.portal.bff.openapi.server.model.CreateUserRequestApiDto; -import org.onap.portal.bff.openapi.server.model.UpdateUserRequestApiDto; -import org.onap.portal.bff.openapi.server.model.UserResponseApiDto; +import org.onap.portalng.bff.config.MapperSpringConfig; +import org.onap.portalng.bff.openapi.client_portal_keycloak.model.RequiredActionsKeycloakDto; +import org.onap.portalng.bff.openapi.client_portal_keycloak.model.UserKeycloakDto; +import org.onap.portalng.bff.openapi.server.model.CreateUserRequestApiDto; +import org.onap.portalng.bff.openapi.server.model.UpdateUserRequestApiDto; +import org.onap.portalng.bff.openapi.server.model.UserResponseApiDto; import org.springframework.core.convert.converter.Converter; @Mapper(config = MapperSpringConfig.class, unmappedTargetPolicy = ReportingPolicy.IGNORE) diff --git a/lib/src/main/java/org/onap/portal/bff/services/ActionService.java b/lib/src/main/java/org/onap/portalng/bff/services/ActionService.java index 0358d29..17afa39 100644 --- a/lib/src/main/java/org/onap/portal/bff/services/ActionService.java +++ b/lib/src/main/java/org/onap/portalng/bff/services/ActionService.java @@ -19,17 +19,17 @@ * */ -package org.onap.portal.bff.services; +package org.onap.portalng.bff.services; import lombok.RequiredArgsConstructor; -import org.onap.portal.bff.exceptions.DownstreamApiProblemException; -import org.onap.portal.bff.openapi.client_portal_history.api.ActionsApi; -import org.onap.portal.bff.openapi.client_portal_history.model.CreateActionRequestPortalHistoryDto; -import org.onap.portal.bff.openapi.server.model.ActionsListResponseApiDto; -import org.onap.portal.bff.openapi.server.model.ActionsResponseApiDto; -import org.onap.portal.bff.openapi.server.model.CreateActionRequestApiDto; -import org.onap.portal.bff.openapi.server.model.ProblemApiDto; -import org.onap.portal.bff.utils.Logger; +import org.onap.portalng.bff.exceptions.DownstreamApiProblemException; +import org.onap.portalng.bff.openapi.client_portal_history.api.ActionsApi; +import org.onap.portalng.bff.openapi.client_portal_history.model.CreateActionRequestPortalHistoryDto; +import org.onap.portalng.bff.openapi.server.model.ActionsListResponseApiDto; +import org.onap.portalng.bff.openapi.server.model.ActionsResponseApiDto; +import org.onap.portalng.bff.openapi.server.model.CreateActionRequestApiDto; +import org.onap.portalng.bff.openapi.server.model.ProblemApiDto; +import org.onap.portalng.bff.utils.Logger; import org.springframework.core.convert.support.ConfigurableConversionService; import org.springframework.stereotype.Service; import reactor.core.publisher.Mono; diff --git a/lib/src/main/java/org/onap/portal/bff/services/KeycloakService.java b/lib/src/main/java/org/onap/portalng/bff/services/KeycloakService.java index 765efa7..b902128 100644 --- a/lib/src/main/java/org/onap/portal/bff/services/KeycloakService.java +++ b/lib/src/main/java/org/onap/portalng/bff/services/KeycloakService.java @@ -19,7 +19,7 @@ * */ -package org.onap.portal.bff.services; +package org.onap.portalng.bff.services; import java.net.URI; import java.util.Collections; @@ -29,14 +29,14 @@ import java.util.Optional; import java.util.stream.Collectors; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.onap.portal.bff.exceptions.DownstreamApiProblemException; -import org.onap.portal.bff.mappers.CredentialMapper; -import org.onap.portal.bff.mappers.RolesMapper; -import org.onap.portal.bff.mappers.UsersMapper; -import org.onap.portal.bff.openapi.client_portal_keycloak.api.KeycloakApi; -import org.onap.portal.bff.openapi.client_portal_keycloak.model.RequiredActionsKeycloakDto; -import org.onap.portal.bff.openapi.server.model.*; -import org.onap.portal.bff.utils.Logger; +import org.onap.portalng.bff.exceptions.DownstreamApiProblemException; +import org.onap.portalng.bff.mappers.CredentialMapper; +import org.onap.portalng.bff.mappers.RolesMapper; +import org.onap.portalng.bff.mappers.UsersMapper; +import org.onap.portalng.bff.openapi.client_portal_keycloak.api.KeycloakApi; +import org.onap.portalng.bff.openapi.client_portal_keycloak.model.RequiredActionsKeycloakDto; +import org.onap.portalng.bff.openapi.server.model.*; +import org.onap.portalng.bff.utils.Logger; import org.springframework.core.convert.support.ConfigurableConversionService; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Service; diff --git a/lib/src/main/java/org/onap/portal/bff/services/PreferencesService.java b/lib/src/main/java/org/onap/portalng/bff/services/PreferencesService.java index ee0a5df..af62d28 100644 --- a/lib/src/main/java/org/onap/portal/bff/services/PreferencesService.java +++ b/lib/src/main/java/org/onap/portalng/bff/services/PreferencesService.java @@ -19,15 +19,15 @@ * */ -package org.onap.portal.bff.services; +package org.onap.portalng.bff.services; import lombok.RequiredArgsConstructor; -import org.onap.portal.bff.exceptions.DownstreamApiProblemException; -import org.onap.portal.bff.openapi.client_portal_prefs.api.PreferencesApi; -import org.onap.portal.bff.openapi.client_portal_prefs.model.PreferencesPortalPrefsDto; -import org.onap.portal.bff.openapi.server.model.CreatePreferencesRequestApiDto; -import org.onap.portal.bff.openapi.server.model.PreferencesResponseApiDto; -import org.onap.portal.bff.utils.Logger; +import org.onap.portalng.bff.exceptions.DownstreamApiProblemException; +import org.onap.portalng.bff.openapi.client_portal_prefs.api.PreferencesApi; +import org.onap.portalng.bff.openapi.client_portal_prefs.model.PreferencesPortalPrefsDto; +import org.onap.portalng.bff.openapi.server.model.CreatePreferencesRequestApiDto; +import org.onap.portalng.bff.openapi.server.model.PreferencesResponseApiDto; +import org.onap.portalng.bff.utils.Logger; import org.springframework.core.convert.support.ConfigurableConversionService; import org.springframework.stereotype.Service; import reactor.core.publisher.Mono; diff --git a/lib/src/main/java/org/onap/portal/bff/utils/ErrorHandler.java b/lib/src/main/java/org/onap/portalng/bff/utils/ErrorHandler.java index 8bec189..0b198ac 100644 --- a/lib/src/main/java/org/onap/portal/bff/utils/ErrorHandler.java +++ b/lib/src/main/java/org/onap/portalng/bff/utils/ErrorHandler.java @@ -19,12 +19,12 @@ * */ -package org.onap.portal.bff.utils; +package org.onap.portalng.bff.utils; import java.util.List; import java.util.Objects; -import org.onap.portal.bff.exceptions.DownstreamApiProblemException; -import org.onap.portal.bff.openapi.server.model.ProblemApiDto; +import org.onap.portalng.bff.exceptions.DownstreamApiProblemException; +import org.onap.portalng.bff.openapi.server.model.ProblemApiDto; import org.springframework.http.HttpStatus; public class ErrorHandler { diff --git a/lib/src/main/java/org/onap/portal/bff/utils/Logger.java b/lib/src/main/java/org/onap/portalng/bff/utils/Logger.java index b985ad5..3c431fb 100644 --- a/lib/src/main/java/org/onap/portal/bff/utils/Logger.java +++ b/lib/src/main/java/org/onap/portalng/bff/utils/Logger.java @@ -19,7 +19,7 @@ * */ -package org.onap.portal.bff.utils; +package org.onap.portalng.bff.utils; import java.net.URI; import lombok.extern.slf4j.Slf4j; @@ -36,22 +36,21 @@ public class Logger { private Logger() {} public static void requestLog(String xRequestId, HttpMethod methode, URI path) { - log.info("Portal-bff - request - X-Request-Id {} {} {}", xRequestId, methode, path); + log.info("bff - request - X-Request-Id {} {} {}", xRequestId, methode, path); } public static void responseLog(String xRequestId, HttpStatus code) { - log.info("Portal-bff - response - X-Request-Id {} {}", xRequestId, code); + log.info("bff - response - X-Request-Id {} {}", xRequestId, code); } public static void errorLog(String xRequestId, String msg, String id, String app) { - log.info( - "Portal-bff - error - X-Request-Id {} {} {} not found in {}", xRequestId, msg, id, app); + log.info("bff - error - X-Request-Id {} {} {} not found in {}", xRequestId, msg, id, app); } public static void errorLog( String xRequestId, String msg, String id, String app, String errorDetails) { log.info( - "Portal-bff - error - X-Request-Id {} {} {} not found in {} error message: {}", + "bff - error - X-Request-Id {} {} {} not found in {} error message: {}", xRequestId, msg, id, |