aboutsummaryrefslogtreecommitdiffstats
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/org/onap/portalng/preferences/PreferencesApplication.java (renamed from app/src/main/java/org/onap/portal/prefs/PortalPrefsApplication.java)10
-rw-r--r--app/src/main/java/org/onap/portalng/preferences/configuration/BeansConfig.java (renamed from app/src/main/java/org/onap/portal/prefs/configuration/BeansConfig.java)2
-rw-r--r--app/src/main/java/org/onap/portalng/preferences/configuration/LogInterceptor.java (renamed from app/src/main/java/org/onap/portal/prefs/configuration/LogInterceptor.java)4
-rw-r--r--app/src/main/java/org/onap/portalng/preferences/configuration/PreferencesConfig.java (renamed from app/src/main/java/org/onap/portal/prefs/configuration/PortalPrefsConfig.java)6
-rw-r--r--app/src/main/java/org/onap/portalng/preferences/configuration/SecurityConfig.java (renamed from app/src/main/java/org/onap/portal/prefs/configuration/SecurityConfig.java)2
-rw-r--r--app/src/main/java/org/onap/portalng/preferences/controller/PreferencesController.java (renamed from app/src/main/java/org/onap/portal/prefs/controller/PreferencesController.java)18
-rw-r--r--app/src/main/java/org/onap/portalng/preferences/entities/PreferencesDto.java (renamed from app/src/main/java/org/onap/portal/prefs/entities/PreferencesDto.java)2
-rw-r--r--app/src/main/java/org/onap/portalng/preferences/exception/ProblemException.java (renamed from app/src/main/java/org/onap/portal/prefs/exception/ProblemException.java)4
-rw-r--r--app/src/main/java/org/onap/portalng/preferences/repository/PreferencesRepository.java (renamed from app/src/main/java/org/onap/portal/prefs/repository/PreferencesRepository.java)4
-rw-r--r--app/src/main/java/org/onap/portalng/preferences/services/PreferencesService.java (renamed from app/src/main/java/org/onap/portal/prefs/services/PreferencesService.java)14
-rw-r--r--app/src/main/java/org/onap/portalng/preferences/util/IdTokenExchange.java (renamed from app/src/main/java/org/onap/portal/prefs/util/IdTokenExchange.java)2
-rw-r--r--app/src/main/java/org/onap/portalng/preferences/util/Logger.java (renamed from app/src/main/java/org/onap/portal/prefs/util/Logger.java)10
-rw-r--r--app/src/main/resources/application-local.yml4
-rw-r--r--app/src/main/resources/application.yml13
-rw-r--r--app/src/test/java/org/onap/portalng/preferences/BaseIntegrationTest.java (renamed from app/src/test/java/org/onap/portal/prefs/BaseIntegrationTest.java)10
-rw-r--r--app/src/test/java/org/onap/portalng/preferences/TokenGenerator.java (renamed from app/src/test/java/org/onap/portal/prefs/TokenGenerator.java)2
-rw-r--r--app/src/test/java/org/onap/portalng/preferences/actuator/ActuatorIntegrationTest.java (renamed from app/src/test/java/org/onap/portal/prefs/actuator/ActuatorIntegrationTest.java)4
-rw-r--r--app/src/test/java/org/onap/portalng/preferences/preferences/PreferencesControllerIntegrationTest.java (renamed from app/src/test/java/org/onap/portal/prefs/preferences/PreferencesControllerIntegrationTest.java)8
-rw-r--r--app/src/test/resources/application.yml2
19 files changed, 60 insertions, 61 deletions
diff --git a/app/src/main/java/org/onap/portal/prefs/PortalPrefsApplication.java b/app/src/main/java/org/onap/portalng/preferences/PreferencesApplication.java
index 092c533..67171cd 100644
--- a/app/src/main/java/org/onap/portal/prefs/PortalPrefsApplication.java
+++ b/app/src/main/java/org/onap/portalng/preferences/PreferencesApplication.java
@@ -19,19 +19,19 @@
*
*/
-package org.onap.portal.prefs;
+package org.onap.portalng.preferences;
-import org.onap.portal.prefs.configuration.PortalPrefsConfig;
+import org.onap.portalng.preferences.configuration.PreferencesConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
-@EnableConfigurationProperties(PortalPrefsConfig.class)
+@EnableConfigurationProperties(PreferencesConfig.class)
@SpringBootApplication
-public class PortalPrefsApplication {
+public class PreferencesApplication {
public static void main(String[] args) {
- SpringApplication.run(PortalPrefsApplication.class, args);
+ SpringApplication.run(PreferencesApplication.class, args);
}
}
diff --git a/app/src/main/java/org/onap/portal/prefs/configuration/BeansConfig.java b/app/src/main/java/org/onap/portalng/preferences/configuration/BeansConfig.java
index 77ef7f0..f35d43c 100644
--- a/app/src/main/java/org/onap/portal/prefs/configuration/BeansConfig.java
+++ b/app/src/main/java/org/onap/portalng/preferences/configuration/BeansConfig.java
@@ -19,7 +19,7 @@
*
*/
-package org.onap.portal.prefs.configuration;
+package org.onap.portalng.preferences.configuration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
diff --git a/app/src/main/java/org/onap/portal/prefs/configuration/LogInterceptor.java b/app/src/main/java/org/onap/portalng/preferences/configuration/LogInterceptor.java
index b653fe3..7ceee06 100644
--- a/app/src/main/java/org/onap/portal/prefs/configuration/LogInterceptor.java
+++ b/app/src/main/java/org/onap/portalng/preferences/configuration/LogInterceptor.java
@@ -19,9 +19,9 @@
*
*/
-package org.onap.portal.prefs.configuration;
+package org.onap.portalng.preferences.configuration;
-import org.onap.portal.prefs.util.Logger;
+import org.onap.portalng.preferences.util.Logger;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.reactive.ServerWebExchangeContextFilter;
import org.springframework.web.server.ServerWebExchange;
diff --git a/app/src/main/java/org/onap/portal/prefs/configuration/PortalPrefsConfig.java b/app/src/main/java/org/onap/portalng/preferences/configuration/PreferencesConfig.java
index 2d415cd..1394fd5 100644
--- a/app/src/main/java/org/onap/portal/prefs/configuration/PortalPrefsConfig.java
+++ b/app/src/main/java/org/onap/portalng/preferences/configuration/PreferencesConfig.java
@@ -19,7 +19,7 @@
*
*/
-package org.onap.portal.prefs.configuration;
+package org.onap.portalng.preferences.configuration;
import org.springframework.boot.context.properties.ConfigurationProperties;
@@ -27,8 +27,8 @@ import jakarta.validation.constraints.NotBlank;
import lombok.Data;
@Data
-@ConfigurationProperties("portal-prefs")
-public class PortalPrefsConfig {
+@ConfigurationProperties("preferences")
+public class PreferencesConfig {
@NotBlank
private final String realm;
diff --git a/app/src/main/java/org/onap/portal/prefs/configuration/SecurityConfig.java b/app/src/main/java/org/onap/portalng/preferences/configuration/SecurityConfig.java
index 531e90b..31866fe 100644
--- a/app/src/main/java/org/onap/portal/prefs/configuration/SecurityConfig.java
+++ b/app/src/main/java/org/onap/portalng/preferences/configuration/SecurityConfig.java
@@ -19,7 +19,7 @@
*
*/
-package org.onap.portal.prefs.configuration;
+package org.onap.portalng.preferences.configuration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
diff --git a/app/src/main/java/org/onap/portal/prefs/controller/PreferencesController.java b/app/src/main/java/org/onap/portalng/preferences/controller/PreferencesController.java
index f2ae7f9..02357e4 100644
--- a/app/src/main/java/org/onap/portal/prefs/controller/PreferencesController.java
+++ b/app/src/main/java/org/onap/portalng/preferences/controller/PreferencesController.java
@@ -19,13 +19,13 @@
*
*/
-package org.onap.portal.prefs.controller;
-import org.onap.portal.prefs.exception.ProblemException;
-import org.onap.portal.prefs.openapi.api.PreferencesApi;
-import org.onap.portal.prefs.openapi.model.Preferences;
-import org.onap.portal.prefs.services.PreferencesService;
-import org.onap.portal.prefs.util.IdTokenExchange;
-import org.onap.portal.prefs.util.Logger;
+package org.onap.portalng.preferences.controller;
+import org.onap.portalng.preferences.exception.ProblemException;
+import org.onap.portalng.preferences.openapi.api.PreferencesApi;
+import org.onap.portalng.preferences.openapi.model.Preferences;
+import org.onap.portalng.preferences.services.PreferencesService;
+import org.onap.portalng.preferences.util.IdTokenExchange;
+import org.onap.portalng.preferences.util.Logger;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RestController;
@@ -51,7 +51,7 @@ public class PreferencesController implements PreferencesApi {
preferencesService.getPreferences(userid)
.map(ResponseEntity::ok))
.onErrorResume(ProblemException.class, ex -> {
- Logger.errorLog(xRequestId,"user preferences", null, "portal-prefs" );
+ Logger.errorLog(xRequestId,"user preferences", null, "preferences" );
return Mono.error(ex);
})
.onErrorReturn(new ResponseEntity<>(HttpStatus.BAD_REQUEST));
@@ -70,7 +70,7 @@ public class PreferencesController implements PreferencesApi {
.savePreferences(xRequestId, userid, pref)))
.map( ResponseEntity::ok)
.onErrorResume(ProblemException.class, ex -> {
- Logger.errorLog(xRequestId,"user preferences", null, "portal-prefs" );
+ Logger.errorLog(xRequestId,"user preferences", null, "preferences" );
return Mono.error(ex);
})
.onErrorReturn(new ResponseEntity<>(HttpStatus.BAD_REQUEST));
diff --git a/app/src/main/java/org/onap/portal/prefs/entities/PreferencesDto.java b/app/src/main/java/org/onap/portalng/preferences/entities/PreferencesDto.java
index 45616a9..a86c229 100644
--- a/app/src/main/java/org/onap/portal/prefs/entities/PreferencesDto.java
+++ b/app/src/main/java/org/onap/portalng/preferences/entities/PreferencesDto.java
@@ -19,7 +19,7 @@
*
*/
-package org.onap.portal.prefs.entities;
+package org.onap.portalng.preferences.entities;
import lombok.Getter;
import lombok.Setter;
diff --git a/app/src/main/java/org/onap/portal/prefs/exception/ProblemException.java b/app/src/main/java/org/onap/portalng/preferences/exception/ProblemException.java
index b9d2a3d..da7872f 100644
--- a/app/src/main/java/org/onap/portal/prefs/exception/ProblemException.java
+++ b/app/src/main/java/org/onap/portalng/preferences/exception/ProblemException.java
@@ -19,7 +19,7 @@
*
*/
-package org.onap.portal.prefs.exception;
+package org.onap.portalng.preferences.exception;
import lombok.AllArgsConstructor;
import lombok.Builder;
@@ -33,7 +33,7 @@ import org.zalando.problem.StatusType;
import java.net.URI;
-/** The default portal-prefs exception */
+/** The default preferences exception */
@Data
@Builder
@AllArgsConstructor
diff --git a/app/src/main/java/org/onap/portal/prefs/repository/PreferencesRepository.java b/app/src/main/java/org/onap/portalng/preferences/repository/PreferencesRepository.java
index 461ee1d..264cdf5 100644
--- a/app/src/main/java/org/onap/portal/prefs/repository/PreferencesRepository.java
+++ b/app/src/main/java/org/onap/portalng/preferences/repository/PreferencesRepository.java
@@ -19,9 +19,9 @@
*
*/
-package org.onap.portal.prefs.repository;
+package org.onap.portalng.preferences.repository;
-import org.onap.portal.prefs.entities.PreferencesDto;
+import org.onap.portalng.preferences.entities.PreferencesDto;
import org.springframework.data.mongodb.repository.ReactiveMongoRepository;
public interface PreferencesRepository extends ReactiveMongoRepository<PreferencesDto, String> {
diff --git a/app/src/main/java/org/onap/portal/prefs/services/PreferencesService.java b/app/src/main/java/org/onap/portalng/preferences/services/PreferencesService.java
index f96dfea..4e7dfb3 100644
--- a/app/src/main/java/org/onap/portal/prefs/services/PreferencesService.java
+++ b/app/src/main/java/org/onap/portalng/preferences/services/PreferencesService.java
@@ -19,13 +19,13 @@
*
*/
-package org.onap.portal.prefs.services;
+package org.onap.portalng.preferences.services;
-import org.onap.portal.prefs.entities.PreferencesDto;
-import org.onap.portal.prefs.exception.ProblemException;
-import org.onap.portal.prefs.openapi.model.Preferences;
-import org.onap.portal.prefs.repository.PreferencesRepository;
-import org.onap.portal.prefs.util.Logger;
+import org.onap.portalng.preferences.entities.PreferencesDto;
+import org.onap.portalng.preferences.exception.ProblemException;
+import org.onap.portalng.preferences.openapi.model.Preferences;
+import org.onap.portalng.preferences.repository.PreferencesRepository;
+import org.onap.portalng.preferences.util.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -54,7 +54,7 @@ public class PreferencesService {
.save(preferencesDto)
.map(this::toPreferences)
.onErrorResume(ProblemException.class, ex -> {
- Logger.errorLog(xRequestId,"user prefrences", userId, "portal-prefs" );
+ Logger.errorLog(xRequestId,"user prefrences", userId, "preferences" );
return Mono.error(ex);
});
diff --git a/app/src/main/java/org/onap/portal/prefs/util/IdTokenExchange.java b/app/src/main/java/org/onap/portalng/preferences/util/IdTokenExchange.java
index 9ac2794..7349d53 100644
--- a/app/src/main/java/org/onap/portal/prefs/util/IdTokenExchange.java
+++ b/app/src/main/java/org/onap/portalng/preferences/util/IdTokenExchange.java
@@ -19,7 +19,7 @@
*
*/
-package org.onap.portal.prefs.util;
+package org.onap.portalng.preferences.util;
import com.nimbusds.jwt.JWTClaimsSet;
import com.nimbusds.jwt.JWTParser;
diff --git a/app/src/main/java/org/onap/portal/prefs/util/Logger.java b/app/src/main/java/org/onap/portalng/preferences/util/Logger.java
index 4026b9f..ed8eae3 100644
--- a/app/src/main/java/org/onap/portal/prefs/util/Logger.java
+++ b/app/src/main/java/org/onap/portalng/preferences/util/Logger.java
@@ -19,7 +19,7 @@
*
*/
-package org.onap.portal.prefs.util;
+package org.onap.portalng.preferences.util;
import java.net.URI;
@@ -34,22 +34,22 @@ public class Logger {
private Logger(){}
public static void requestLog(String xRequestId, HttpMethod methode, URI path) {
- log.info("Portal-prefs - request - X-Request-Id {} {} {}", xRequestId, methode, path);
+ log.info("Preferences - request - X-Request-Id {} {} {}", xRequestId, methode, path);
}
public static void responseLog(String xRequestId, HttpStatusCode httpStatusCode) {
- log.info("Portal-prefs - response - X-Request-Id {} {}", xRequestId, httpStatusCode);
+ log.info("Preferences - response - X-Request-Id {} {}", xRequestId, httpStatusCode);
}
public static void errorLog(String xRequestId, String msg, String id, String app) {
log.info(
- "Portal-prefs - error - X-Request-Id {} {} {} not found in {}", xRequestId, msg, id, app);
+ "Preferences - 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-prefs - error - X-Request-Id {} {} {} not found in {} error message: {}",
+ "Preferences - error - X-Request-Id {} {} {} not found in {} error message: {}",
xRequestId,
msg,
id,
diff --git a/app/src/main/resources/application-local.yml b/app/src/main/resources/application-local.yml
index 71fe8db..1ca695e 100644
--- a/app/src/main/resources/application-local.yml
+++ b/app/src/main/resources/application-local.yml
@@ -14,13 +14,13 @@ spring:
jwk-set-uri: http://localhost:8080/auth/realms/ONAP/protocol/openid-connect/certs #Keycloak Endpoint
data:
mongodb:
- database: portal_prefs
+ database: portal_preferences
host: localhost
port: 27017
username: root
password: password
-portal-prefs:
+preferences:
realm: ONAP
management:
diff --git a/app/src/main/resources/application.yml b/app/src/main/resources/application.yml
index eb5b313..c7afccb 100644
--- a/app/src/main/resources/application.yml
+++ b/app/src/main/resources/application.yml
@@ -14,15 +14,14 @@ spring:
jwk-set-uri: ${KEYCLOAK_URL}/auth/realms/${KEYCLOAK_REALM}/protocol/openid-connect/certs #Keycloak Endpoint
data:
mongodb:
- database: ${PORTALPREFS_DATABASE}
- host: ${PORTALPREFS_HOST}
- port: ${PORTALPREFS_PORT}
- username: ${PORTALPREFS_USERNAME}
- password: ${PORTALPREFS_PASSWORD}
+ database: ${PREFERENCES_DATABASE}
+ host: ${PREFERENCES_HOST}
+ port: ${PREFERENCES_PORT}
+ username: ${PREFERENCES_USERNAME}
+ password: ${PREFERENCES_PASSWORD}
-portal-prefs:
+preferences:
realm: ${KEYCLOAK_REALM}
-
management:
endpoints:
web:
diff --git a/app/src/test/java/org/onap/portal/prefs/BaseIntegrationTest.java b/app/src/test/java/org/onap/portalng/preferences/BaseIntegrationTest.java
index 104b683..df8da62 100644
--- a/app/src/test/java/org/onap/portal/prefs/BaseIntegrationTest.java
+++ b/app/src/test/java/org/onap/portalng/preferences/BaseIntegrationTest.java
@@ -19,13 +19,13 @@
*
*/
-package org.onap.portal.prefs;
+package org.onap.portalng.preferences;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.tomakehurst.wiremock.client.WireMock;
import com.nimbusds.jose.jwk.JWKSet;
-import org.onap.portal.prefs.util.IdTokenExchange;
-import org.onap.portal.prefs.configuration.PortalPrefsConfig;
+import org.onap.portalng.preferences.util.IdTokenExchange;
+import org.onap.portalng.preferences.configuration.PreferencesConfig;
import io.restassured.RestAssured;
import io.restassured.filter.log.RequestLoggingFilter;
import io.restassured.filter.log.ResponseLoggingFilter;
@@ -48,12 +48,12 @@ import java.util.UUID;
public abstract class BaseIntegrationTest {
@LocalServerPort protected int port;
- @Value("${portal-prefs.realm}")
+ @Value("${preferences.realm}")
protected String realm;
@Autowired protected ObjectMapper objectMapper;
@Autowired private TokenGenerator tokenGenerator;
- @Autowired protected PortalPrefsConfig portalPrefsConfig;
+ @Autowired protected PreferencesConfig preferencesConfig;
@BeforeAll
public static void setup() {
diff --git a/app/src/test/java/org/onap/portal/prefs/TokenGenerator.java b/app/src/test/java/org/onap/portalng/preferences/TokenGenerator.java
index fb3a522..30ddbdc 100644
--- a/app/src/test/java/org/onap/portal/prefs/TokenGenerator.java
+++ b/app/src/test/java/org/onap/portalng/preferences/TokenGenerator.java
@@ -19,7 +19,7 @@
*
*/
-package org.onap.portal.prefs;
+package org.onap.portalng.preferences;
import java.time.Clock;
import java.time.Duration;
diff --git a/app/src/test/java/org/onap/portal/prefs/actuator/ActuatorIntegrationTest.java b/app/src/test/java/org/onap/portalng/preferences/actuator/ActuatorIntegrationTest.java
index 95e9b2a..e8f22d6 100644
--- a/app/src/test/java/org/onap/portal/prefs/actuator/ActuatorIntegrationTest.java
+++ b/app/src/test/java/org/onap/portalng/preferences/actuator/ActuatorIntegrationTest.java
@@ -19,11 +19,11 @@
*
*/
-package org.onap.portal.prefs.actuator;
+package org.onap.portalng.preferences.actuator;
import static org.assertj.core.api.Assertions.assertThat;
-import org.onap.portal.prefs.BaseIntegrationTest;
+import org.onap.portalng.preferences.BaseIntegrationTest;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.availability.ApplicationAvailability;
diff --git a/app/src/test/java/org/onap/portal/prefs/preferences/PreferencesControllerIntegrationTest.java b/app/src/test/java/org/onap/portalng/preferences/preferences/PreferencesControllerIntegrationTest.java
index b5f4cf1..6eb1148 100644
--- a/app/src/test/java/org/onap/portal/prefs/preferences/PreferencesControllerIntegrationTest.java
+++ b/app/src/test/java/org/onap/portalng/preferences/preferences/PreferencesControllerIntegrationTest.java
@@ -19,14 +19,14 @@
*
*/
-package org.onap.portal.prefs.preferences;
+package org.onap.portalng.preferences.preferences;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.jupiter.api.Test;
-import org.onap.portal.prefs.BaseIntegrationTest;
-import org.onap.portal.prefs.openapi.model.Preferences;
-import org.onap.portal.prefs.services.PreferencesService;
+import org.onap.portalng.preferences.BaseIntegrationTest;
+import org.onap.portalng.preferences.openapi.model.Preferences;
+import org.onap.portalng.preferences.services.PreferencesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
diff --git a/app/src/test/resources/application.yml b/app/src/test/resources/application.yml
index bdfadf4..ace8c84 100644
--- a/app/src/test/resources/application.yml
+++ b/app/src/test/resources/application.yml
@@ -19,7 +19,7 @@ spring:
jwt:
jwk-set-uri: http://localhost:${wiremock.server.port}/auth/realms/ONAP/protocol/openid-connect/certs #Keycloak Endpoint
-portal-prefs:
+preferences:
realm: ONAP
management: