2 * ============LICENSE_START=======================================================
4 * Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
5 * Modifications Copyright (C) 2023 Nordix Foundation.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.policy.drools.server.restful;
23 import javax.ws.rs.Consumes;
24 import javax.ws.rs.GET;
25 import javax.ws.rs.Path;
26 import javax.ws.rs.Produces;
27 import javax.ws.rs.core.MediaType;
28 import javax.ws.rs.core.Response;
29 import org.onap.policy.common.endpoints.http.server.YamlMessageBodyHandler;
30 import org.onap.policy.drools.legacy.config.LegacyConfigFeature;
33 * REST Legacy Configuration Manager.
36 @Path("/policy/pdp/engine/legacy/config")
37 @Produces({MediaType.APPLICATION_JSON, YamlMessageBodyHandler.APPLICATION_YAML})
38 @Consumes({MediaType.APPLICATION_JSON, YamlMessageBodyHandler.APPLICATION_YAML})
39 public class RestLegacyConfigManager implements LegacyApi {
47 public Response properties() {
48 return Response.status(Response.Status.OK)
49 .entity(LegacyConfigFeature.getLegacyConfig().getProperties()).build();
53 * GET the topic source.
58 public Response source() {
59 return Response.status(Response.Status.OK)
60 .entity(LegacyConfigFeature.getLegacyConfig().getSource()).build();