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.POST;
22 import javax.ws.rs.Path;
23 import javax.ws.rs.PathParam;
24 import javax.ws.rs.Produces;
25 import javax.ws.rs.core.Context;
26 import javax.ws.rs.core.Response;
28 import org.openo.baseservice.remoteservice.exception.ServiceException;
31 * API for restful interface.<br/>
36 * @version GSO 0.5 2016/8/4
38 @Path("/servicegateway/v1/services")
39 @Consumes({"application/json"})
40 @Produces({"application/json"})
41 public interface IServiceGatewayRoaModule {
44 * Create service instance.<br/>
46 * @param servletReq http request
48 * @throws ServiceException when operate database or parameter is wrong.
52 @Produces({"application/json"})
53 @Consumes({"application/json"})
54 Response createService(@Context HttpServletRequest servletReq) throws ServiceException;
57 * Delete service instance.<br/>
59 * @param serviceId service instance id
60 * @param servletReq http request
62 * @throws ServiceException when operate database or parameter is wrong.
66 @Produces({"application/json"})
67 @Consumes({"application/json"})
68 @Path("/{serviceId}/terminate")
69 Response deleteService(@PathParam("serviceId") String serviceId, @Context HttpServletRequest servletReq)
70 throws ServiceException;