diff options
Diffstat (limited to 'servicegateway/service/src')
4 files changed, 4 insertions, 5 deletions
diff --git a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/roa/impl/ServiceGatewayRoaModuleImpl.java b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/roa/impl/ServiceGatewayRoaModuleImpl.java index cca5f604..bd91ff2c 100644 --- a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/roa/impl/ServiceGatewayRoaModuleImpl.java +++ b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/roa/impl/ServiceGatewayRoaModuleImpl.java @@ -108,7 +108,7 @@ public class ServiceGatewayRoaModuleImpl implements IServiceGatewayRoaModule { ValidateUtil.assertStringNotNull(reqContent); // 2. Delete service - result = serviceGateway.deleteService(serviceId, servletReq); + result = serviceGateway.deleteService(serviceId, reqContent, servletReq); } catch(ServiceException exception) { LOGGER.error("Fail to delete service instance."); return Response.serverError().build(); diff --git a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/service/impl/ServiceGatewayImpl.java b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/service/impl/ServiceGatewayImpl.java index bc716d5e..4f592f5b 100644 --- a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/service/impl/ServiceGatewayImpl.java +++ b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/service/impl/ServiceGatewayImpl.java @@ -131,14 +131,13 @@ public class ServiceGatewayImpl implements IServiceGateway { * @since GSO 0.5 */ @Override - public Map<String, Object> deleteService(String serviceId, HttpServletRequest httpRequest) throws ServiceException { + public Map<String, Object> deleteService(String serviceId, String reqContent, HttpServletRequest httpRequest) throws ServiceException { if(httpRequest == null) { LOGGER.error("ServiceGatewayImpl.deleteService httpRequest is null"); throw new ServiceException("ServiceGatewayImpl.deleteService httpRequest is null"); } // Parse request - String reqContent = RestUtils.getRequestBody(httpRequest); Map<String, Object> requestBody = JsonUtil.unMarshal(reqContent, Map.class); ValidateUtil.assertObjectNotNull(requestBody); diff --git a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/service/inf/IServiceGateway.java b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/service/inf/IServiceGateway.java index cba925c6..a5f6b6fa 100644 --- a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/service/inf/IServiceGateway.java +++ b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/service/inf/IServiceGateway.java @@ -52,6 +52,6 @@ public interface IServiceGateway { * @throws ServiceException operate DB or parameter is wrong. * @since GSO 0.5 */ - Map<String, Object> deleteService(String serviceId, HttpServletRequest httpRequest) throws ServiceException; + Map<String, Object> deleteService(String serviceId, String reqContent, HttpServletRequest httpRequest) throws ServiceException; } diff --git a/servicegateway/service/src/test/java/org/openo/gso/gui/servicegateway/service/impl/ServiceGatewayImplTest.java b/servicegateway/service/src/test/java/org/openo/gso/gui/servicegateway/service/impl/ServiceGatewayImplTest.java index d1cb3916..b7c1657f 100644 --- a/servicegateway/service/src/test/java/org/openo/gso/gui/servicegateway/service/impl/ServiceGatewayImplTest.java +++ b/servicegateway/service/src/test/java/org/openo/gso/gui/servicegateway/service/impl/ServiceGatewayImplTest.java @@ -66,7 +66,7 @@ public class ServiceGatewayImplTest { */ @Test(expected = ServiceException.class) public void testDeleteServiceFail() throws ServiceException { - serviceManager.deleteService(null, httpRequest); + serviceManager.deleteService(null, "", httpRequest); } } |