Repository: stratos Updated Branches: refs/heads/stratos-4.1.x f882ca630 -> 8cd43f08c
Fix response message format for updateCartridge API method Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/3b76e344 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/3b76e344 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/3b76e344 Branch: refs/heads/stratos-4.1.x Commit: 3b76e344e9193ff0f9e0edad6ad0e4cbd8297747 Parents: f882ca6 Author: Akila Perera <[email protected]> Authored: Wed Oct 7 10:55:29 2015 +0530 Committer: Akila Perera <[email protected]> Committed: Wed Oct 7 10:55:29 2015 +0530 ---------------------------------------------------------------------- .../rest/endpoint/api/StratosApiV41.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/3b76e344/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java index b55a2f0..9639970 100644 --- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java +++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java @@ -308,14 +308,14 @@ public class StratosApiV41 extends AbstractApi { @Produces("application/json") @Consumes("application/json") @AuthorizationAction("/permission/admin/stratos/cartridges/manage") - public Response updateCartridge( - CartridgeBean cartridgeDefinitionBean) throws RestAPIException { - StratosApiV41Utils.updateCartridge(cartridgeDefinitionBean); - URI url = uriInfo.getAbsolutePathBuilder().path(cartridgeDefinitionBean.getType()).build(); - return Response.ok(url) - .entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS, "Cartridge updated successfully")) - .build(); + public Response updateCartridge(CartridgeBean cartridgeDefinitionBean) + throws RestAPIException { + String cartridgeType = cartridgeDefinitionBean.getType(); + StratosApiV41Utils.updateCartridge(cartridgeDefinitionBean); + URI url = uriInfo.getAbsolutePathBuilder().path(cartridgeType).build(); + return Response.ok(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS, + String.format("Cartridge added successfully: [cartridge-type] %s", cartridgeType))).build(); } /** @@ -1133,7 +1133,7 @@ public class StratosApiV41 extends AbstractApi { * * @param applicationId the application id * @param applicationSignUpBean the application sign up bean - * @param tenantDomain the tenant domain + * @param tenantDomain the tenant domain * @return 200 if application sign up was successfull * @throws RestAPIException the rest api exception */ @@ -1164,7 +1164,7 @@ public class StratosApiV41 extends AbstractApi { * Removes the application sign up on behalf of tenant. * * @param applicationId the application id - * @param tenantDomain the tenant domain + * @param tenantDomain the tenant domain * @return 200 if specified application sign up is removed * @throws RestAPIException the rest api exception */ @@ -1300,7 +1300,7 @@ public class StratosApiV41 extends AbstractApi { throws RestAPIException { ApplicationBean applicationDefinition = StratosApiV41Utils.getApplication(applicationId); - int tenantId= CarbonContext.getThreadLocalCarbonContext().getTenantId(); + int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); if (applicationDefinition == null) { String message = String.format("Application does not exist [application-id] %s", applicationId); log.error(message);
