aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java/org/onap/portal/history/controller
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-08-29 10:56:22 +0200
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-08-29 10:56:22 +0200
commit7f439188b428a3799a1baba4218e25853b66c882 (patch)
treec95b6a70ba7d09e10b6c65dca1904328a558ffaa /app/src/main/java/org/onap/portal/history/controller
parent04102c3c3ea38e489f6d777c31f2f65d38e3d047 (diff)
Consistently use the history name in the history codebase
- remove portal prefix Issue-ID: PORTALNG-51 Change-Id: I2a0b68bdb6e972813a8a8f048c5d05add97754d2 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'app/src/main/java/org/onap/portal/history/controller')
-rw-r--r--app/src/main/java/org/onap/portal/history/controller/ActionsController.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/src/main/java/org/onap/portal/history/controller/ActionsController.java b/app/src/main/java/org/onap/portal/history/controller/ActionsController.java
index 8339d65..ce781f5 100644
--- a/app/src/main/java/org/onap/portal/history/controller/ActionsController.java
+++ b/app/src/main/java/org/onap/portal/history/controller/ActionsController.java
@@ -23,7 +23,7 @@ package org.onap.portal.history.controller;
import java.util.Optional;
-import org.onap.portal.history.configuration.PortalHistoryConfig;
+import org.onap.portal.history.configuration.HistoryConfig;
import org.onap.portal.history.openapi.api.ActionsApi;
import org.onap.portal.history.openapi.model.ActionResponse;
import org.onap.portal.history.openapi.model.ActionsListResponse;
@@ -40,11 +40,11 @@ import reactor.core.publisher.Mono;
public class ActionsController implements ActionsApi {
private final ActionsService actionsService;
- private final PortalHistoryConfig portalHistoryConfig;
+ private final HistoryConfig historyConfig;
- public ActionsController(ActionsService actionsService, PortalHistoryConfig portalHistoryConfig){
+ public ActionsController(ActionsService actionsService, HistoryConfig historyConfig){
this.actionsService = actionsService;
- this.portalHistoryConfig = portalHistoryConfig;
+ this.historyConfig = historyConfig;
}
@Override
@@ -52,7 +52,7 @@ public class ActionsController implements ActionsApi {
return IdTokenExchange
.validateUserId(userId, exchange, xRequestId)
- .then(createActionRequest.flatMap(action -> actionsService.createActions(userId, action, portalHistoryConfig.getSaveInterval(), xRequestId)))
+ .then(createActionRequest.flatMap(action -> actionsService.createActions(userId, action, historyConfig.getSaveInterval(), xRequestId)))
.map(ResponseEntity::ok);
}
@@ -70,7 +70,7 @@ public class ActionsController implements ActionsApi {
return IdTokenExchange
.validateUserId(userId, exchange, xRequestId)
- .then(actionsService.getActions(userId, page.orElse(1), pageSize.orElse(10), showLastHours.orElse(portalHistoryConfig.getSaveInterval()), portalHistoryConfig.getSaveInterval(), xRequestId))
+ .then(actionsService.getActions(userId, page.orElse(1), pageSize.orElse(10), showLastHours.orElse(historyConfig.getSaveInterval()), historyConfig.getSaveInterval(), xRequestId))
.map(ResponseEntity::ok);
}
@@ -78,7 +78,7 @@ public class ActionsController implements ActionsApi {
public Mono<ResponseEntity<ActionsListResponse>> listActions(String xRequestId, Optional<Integer> page, Optional<Integer> pageSize, Optional<Integer> showLastHours, ServerWebExchange exchange) {
return actionsService
- .listActions(page.orElse(1), pageSize.orElse(10), showLastHours.orElse(portalHistoryConfig.getSaveInterval()), portalHistoryConfig.getSaveInterval(), xRequestId)
+ .listActions(page.orElse(1), pageSize.orElse(10), showLastHours.orElse(historyConfig.getSaveInterval()), historyConfig.getSaveInterval(), xRequestId)
.map(ResponseEntity::ok);
}
}