2 * Copyright (c) 2016, Huawei Technologies Co., Ltd.
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
17 package org.openo.gso.gui.servicegateway.roa.inf;
\r
19 import javax.servlet.http.HttpServletRequest;
\r
20 import javax.ws.rs.Consumes;
\r
21 import javax.ws.rs.DELETE;
\r
22 import javax.ws.rs.POST;
\r
23 import javax.ws.rs.Path;
\r
24 import javax.ws.rs.PathParam;
\r
25 import javax.ws.rs.Produces;
\r
26 import javax.ws.rs.core.Context;
\r
27 import javax.ws.rs.core.Response;
\r
29 import org.openo.baseservice.remoteservice.exception.ServiceException;
\r
32 * API for restful interface.<br/>
\r
37 * @version GSO 0.5 2016/8/4
\r
39 @Path("/servicegateway/v1/services")
\r
40 @Consumes({"application/json"})
\r
41 @Produces({"application/json"})
\r
42 public interface IServiceGatewayRoaModule {
\r
45 * Create service instance.<br/>
\r
47 * @param servletReq http request
\r
49 * @throws ServiceException when operate database or parameter is wrong.
\r
53 @Produces({"application/json"})
\r
54 @Consumes({"application/json"})
\r
55 Response createService(@Context HttpServletRequest servletReq) throws ServiceException;
\r
58 * Delete service instance.<br/>
\r
60 * @param serviceId service instance id
\r
61 * @param servletReq http request
\r
63 * @throws ServiceException when operate database or parameter is wrong.
\r
67 @Produces({"application/json"})
\r
68 @Consumes({"application/json"})
\r
69 @Path("/{serviceId}")
\r
70 Response deleteService(@PathParam("serviceId") String serviceId, @Context HttpServletRequest servletReq)
\r
71 throws ServiceException;
\r