2 * ========================LICENSE_START=================================
3 * Copyright (C) 2020-2023 Nordix Foundation. All rights reserved.
4 * ======================================================================
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 * ========================LICENSE_END===================================
19 package org.onap.ccsdk.oran.a1policymanagementservice.controllers.v3;
21 import io.swagger.v3.oas.annotations.tags.Tag;
22 import org.onap.ccsdk.oran.a1policymanagementservice.controllers.api.v3.ConfigurationApi;
23 import org.onap.ccsdk.oran.a1policymanagementservice.controllers.v2.ConfigurationController;
24 import org.onap.ccsdk.oran.a1policymanagementservice.controllers.v2.Consts;
25 import org.springframework.beans.factory.annotation.Autowired;
26 import org.springframework.http.ResponseEntity;
27 import org.springframework.web.bind.annotation.RequestMapping;
28 import org.springframework.web.bind.annotation.RestController;
29 import org.springframework.web.server.ServerWebExchange;
30 import reactor.core.publisher.Mono;
32 @RestController("ConfigurationControllerV3")
34 name = ConfigurationControllerV3.API_NAME, //
35 description = ConfigurationControllerV3.API_DESCRIPTION //
37 @RequestMapping(Consts.V3_API_ROOT)
38 public class ConfigurationControllerV3 implements ConfigurationApi {
40 public static final String API_NAME = "Management of configuration";
41 public static final String API_DESCRIPTION = "API used to create or fetch the application configuration";
44 private ConfigurationController configurationController;
47 public Mono<ResponseEntity<String>> getConfiguration(ServerWebExchange exchange) throws Exception {
48 return configurationController.getConfiguration(exchange);
52 public Mono<ResponseEntity<Object>> putConfiguration(Mono<Object> body, ServerWebExchange exchange) throws Exception {
53 return configurationController.putConfiguration(body, exchange);