2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
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=========================================================
24 package org.onap.dmaap.dbcapi.resources;
28 import io.swagger.annotations.Api;
29 import io.swagger.annotations.ApiOperation;
30 import io.swagger.annotations.ApiResponse;
31 import io.swagger.annotations.ApiResponses;
33 import javax.ws.rs.Consumes;
34 import javax.ws.rs.GET;
35 import javax.ws.rs.POST;
36 import javax.ws.rs.PUT;
37 import javax.ws.rs.Path;
38 import javax.ws.rs.Produces;
39 import javax.ws.rs.core.Context;
40 import javax.ws.rs.core.MediaType;
41 import javax.ws.rs.core.Response;
42 import javax.ws.rs.core.UriInfo;
44 import org.onap.dmaap.dbcapi.logging.BaseLoggingClass;
45 import org.onap.dmaap.dbcapi.model.ApiError;
46 import org.onap.dmaap.dbcapi.model.Dmaap;
47 import org.onap.dmaap.dbcapi.service.ApiService;
48 import org.onap.dmaap.dbcapi.service.DmaapService;
53 @Api( value= "info", description = "Endpoint for this instance of DBCL. Returns health info." )
54 @Consumes(MediaType.APPLICATION_JSON)
55 @Produces(MediaType.APPLICATION_JSON)
57 public class InfoResource extends BaseLoggingClass {
60 DmaapService dmaapService = new DmaapService();
63 @ApiOperation( value = "return info details", notes = "returns the `info` object", response = Dmaap.class)
64 @ApiResponses( value = {
65 @ApiResponse( code = 200, message = "Success", response = Dmaap.class),
66 @ApiResponse( code = 400, message = "Error", response = ApiError.class )
69 public Response getInfo(@Context UriInfo uriInfo) {
70 ApiService check = new ApiService();
72 return check.success(204, null);