aboutsummaryrefslogtreecommitdiffstats
path: root/lib/src/main/java/org/onap/portalng/bff/services/PreferencesService.java
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-08-23 09:54:43 +0200
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-08-23 10:18:35 +0200
commit4b7cd5405dea9003f31af1aa9cd584d8ccf2141f (patch)
tree3ab06f13845946206260ffc3ad783882b99f9791 /lib/src/main/java/org/onap/portalng/bff/services/PreferencesService.java
parent7348ffad6bb027b2e815b2081a9d9a827a84836e (diff)
Consistently use the preferences and history names in the bff code base
- rename openapi clients (client-portal-prefs -> client-preferences, client-portal-history -> client-history, client-portal-keycloak -> client-keycloak) - rename related spring configurations (portal-prefs -> preferences, portal-history -> history) - rename related environment variables (PORTAL_PREFS_URL -> PREFERENCES_URL, PORTAL_HISTORY_URL -> HISTORY_URL) Note that the changes to the configurations and variables affect external services using it and the bff chart Issue-ID: PORTALNG-49 Change-Id: I434abdf130a5a81534c2387143b296122408d452 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'lib/src/main/java/org/onap/portalng/bff/services/PreferencesService.java')
-rw-r--r--lib/src/main/java/org/onap/portalng/bff/services/PreferencesService.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/src/main/java/org/onap/portalng/bff/services/PreferencesService.java b/lib/src/main/java/org/onap/portalng/bff/services/PreferencesService.java
index af62d28..53bceee 100644
--- a/lib/src/main/java/org/onap/portalng/bff/services/PreferencesService.java
+++ b/lib/src/main/java/org/onap/portalng/bff/services/PreferencesService.java
@@ -23,8 +23,8 @@ package org.onap.portalng.bff.services;
import lombok.RequiredArgsConstructor;
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.client_preferences.api.PreferencesApi;
+import org.onap.portalng.bff.openapi.client_preferences.model.PreferencesPreferencesDto;
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;
@@ -36,17 +36,17 @@ import reactor.core.publisher.Mono;
@Service
public class PreferencesService {
- private static final String PREFERENCES_APPLICATION_NAME = "PORTAL_PREFS";
+ private static final String PREFERENCES_APPLICATION_NAME = "PREFERENCES";
private final PreferencesApi preferencesApi;
private final ConfigurableConversionService conversionService;
public Mono<PreferencesResponseApiDto> createPreferences(
String xRequestId, CreatePreferencesRequestApiDto request) {
- PreferencesPortalPrefsDto preferencesPortalPrefsDto = new PreferencesPortalPrefsDto();
- preferencesPortalPrefsDto.setProperties(request.getProperties());
+ PreferencesPreferencesDto preferencesPreferencesDto = new PreferencesPreferencesDto();
+ preferencesPreferencesDto.setProperties(request.getProperties());
return preferencesApi
- .savePreferences(xRequestId, preferencesPortalPrefsDto)
+ .savePreferences(xRequestId, preferencesPreferencesDto)
.map(resp -> conversionService.convert(resp, PreferencesResponseApiDto.class))
.onErrorResume(
DownstreamApiProblemException.class,
@@ -59,10 +59,10 @@ public class PreferencesService {
public Mono<PreferencesResponseApiDto> updatePreferences(
String xRequestId, CreatePreferencesRequestApiDto request) {
- PreferencesPortalPrefsDto preferencesPortalPrefsDto = new PreferencesPortalPrefsDto();
- preferencesPortalPrefsDto.setProperties(request.getProperties());
+ PreferencesPreferencesDto preferencesPreferencesDto = new PreferencesPreferencesDto();
+ preferencesPreferencesDto.setProperties(request.getProperties());
return preferencesApi
- .updatePreferences(xRequestId, preferencesPortalPrefsDto)
+ .updatePreferences(xRequestId, preferencesPreferencesDto)
.map(resp -> conversionService.convert(resp, PreferencesResponseApiDto.class))
.onErrorResume(
DownstreamApiProblemException.class,