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