diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/lifecycle/util/AnnotationProcessor.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/lifecycle/util/AnnotationProcessor.java index dfc8dd74540..a1b6f16d8f6 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/lifecycle/util/AnnotationProcessor.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/lifecycle/util/AnnotationProcessor.java @@ -30,6 +30,7 @@ import javax.servlet.ServletContext; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; +import javax.ws.rs.HEAD; import javax.ws.rs.HttpMethod; import javax.ws.rs.OPTIONS; import javax.ws.rs.POST; @@ -314,6 +315,9 @@ public class AnnotationProcessor { if (annotation.annotationType().getName().equals(OPTIONS.class.getName())) { resource.setHttpVerb(HttpMethod.OPTIONS); } + if (annotation.annotationType().getName().equals(HEAD.class.getName())) { + resource.setHttpVerb(HttpMethod.HEAD); + } if (annotation.annotationType().getName().equals(DELETE.class.getName())) { resource.setHttpVerb(HttpMethod.DELETE); } @@ -330,6 +334,8 @@ public class AnnotationProcessor { return true; } else if (annotation.annotationType().getName().equals(OPTIONS.class.getName())) { return true; + } else if (annotation.annotationType().getName().equals(HEAD.class.getName())) { + return true; } else if (annotation.annotationType().getName().equals(DELETE.class.getName())) { return true; } else if (annotation.annotationType().getName().equals(PUT.class.getName())) { diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationInstallResponseTmp.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationInstallResponseTmp.java deleted file mode 100644 index 1e95b7e0ee3..00000000000 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationInstallResponseTmp.java +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (c) 2019, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. - * - * Entgra (Pvt) Ltd. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.wso2.carbon.device.application.mgt.common; - -import io.swagger.annotations.ApiModelProperty; -import org.wso2.carbon.device.mgt.common.DeviceIdentifier; -import org.wso2.carbon.device.mgt.common.operation.mgt.Activity; - -import java.util.List; - -public class ApplicationInstallResponseTmp { - @ApiModelProperty( - name = "successfulDevices", - value = "List of successful devices", - dataType = "List[org.wso2.carbon.device.mgt.common.DeviceIdentifier]" - ) - private List successfulDevices; - - @ApiModelProperty( - name = "failedDevices", - value = "List of failed devices", - dataType = "List[org.wso2.carbon.device.mgt.common.DeviceIdentifier]" - ) - private List failedDevices; - - @ApiModelProperty( - name = "activity", - value = "Activity corresponding to the operation" - ) - private Activity activity; - - public List getSuccessfulDevices() { - return successfulDevices; - } - - public void setSuccessfulDevices(List successfulDevices) { - this.successfulDevices = successfulDevices; - } - - public List getFailedDevices() { - return failedDevices; - } - - public void setFailedDevices(List failedDevices) { - this.failedDevices = failedDevices; - } - - public Activity getActivity() { - return activity; - } - - public void setActivity(Activity activity) { - this.activity = activity; - } -} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/pom.xml b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/pom.xml index 0c363561a65..6df63c3de04 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/pom.xml +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/pom.xml @@ -171,10 +171,26 @@ org.wso2.carbon.devicemgt org.wso2.carbon.device.mgt.common + + + objenesis + org.objenesis + + org.wso2.carbon.devicemgt org.wso2.carbon.device.mgt.core + + + org.wso2.securevault + org.wso2.securevault + + + axis2-client + org.apache.axis2.wso2 + + org.wso2.carbon @@ -183,10 +199,26 @@ org.wso2.carbon org.wso2.carbon.ndatasource.core + + + log4j + log4j + + org.wso2.carbon org.wso2.carbon.core + + + stax2-api + org.codehaus.woodstox + + + woodstox-core-asl + org.codehaus.woodstox + + @@ -201,6 +233,12 @@ commons-validator commons-validator 1.6 + + + commons-collections + commons-collections + + org.apache.cxf @@ -213,12 +251,10 @@ 3.2.7 compile - org.apache.tomcat.wso2 jdbc-pool - mysql mysql-connector-java @@ -236,19 +272,82 @@ 1.4.0.wso2v1 test - commons-pool.wso2 commons-pool 1.5.6.wso2v1 test - org.wso2.carbon.devicemgt org.wso2.carbon.apimgt.application.extension + + + org.wso2.carbon.registry.servlet + org.wso2.carbon.registry + + + org.wso2.carbon.registry.admin.api + org.wso2.carbon.registry + + + org.wso2.carbon.registry.uddi + org.wso2.carbon.registry + + + org.wso2.carbon.registry.extensions + org.wso2.carbon.registry + + + commons-collections + commons-collections + + + commons-lang + commons-lang + + + slf4j-api + org.slf4j + + + axiom-impl + org.apache.ws.commons.axiom + + + woodstox-core-asl + org.codehaus.woodstox + + + axiom-api + org.apache.ws.commons.axiom + + + commons-digester + commons-digester + + + commons-beanutils + commons-beanutils + + + org.wso2.securevault + org.wso2.securevault + + + jackson-databind + com.fasterxml.jackson.core + + + org.wso2.carbon.feature.mgt.core + org.wso2.carbon + + + joda-time + joda-time + + - diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/ApplicationManagementPublisherAPI.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/ApplicationManagementPublisherAPI.java index e566eda6082..85b62e60e55 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/ApplicationManagementPublisherAPI.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/ApplicationManagementPublisherAPI.java @@ -787,7 +787,8 @@ public interface ApplicationManagementPublisherAPI { "ApplicationDTO artifact updating payload contains unacceptable or vulnerable data"), @ApiResponse( code = 404, - message = "NOT FOUND. \n Couldn't found application/application release to update applocation release artifact."), + message = "NOT FOUND. \n Couldn't found application/application release to update " + + "application release artifact."), @ApiResponse( code = 500, message = "Internal Server Error. \n Error occurred while getting the application list.", diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/ApplicationManagementPublisherAPIImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/ApplicationManagementPublisherAPIImpl.java index 52cd45fc28a..5c6bcf36219 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/ApplicationManagementPublisherAPIImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/ApplicationManagementPublisherAPIImpl.java @@ -75,7 +75,7 @@ import javax.ws.rs.core.Response; @Path("/applications") public class ApplicationManagementPublisherAPIImpl implements ApplicationManagementPublisherAPI { - private static Log log = LogFactory.getLog(ApplicationManagementPublisherAPIImpl.class); + private static final Log log = LogFactory.getLog(ApplicationManagementPublisherAPIImpl.class); @POST @Override @@ -97,7 +97,7 @@ public class ApplicationManagementPublisherAPIImpl implements ApplicationManagem return Response.status(Response.Status.BAD_REQUEST).entity(msg).build(); } catch (UnexpectedServerErrorException e) { String msg = "Error Occured when getting supported device types by Entgra IoTS"; - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } catch (ApplicationManagementException e) { String msg = "Error occurred while getting the application list for publisher "; @@ -127,7 +127,7 @@ public class ApplicationManagementPublisherAPIImpl implements ApplicationManagem return Response.status(Response.Status.NOT_FOUND).entity(msg).build(); } catch(ForbiddenException e){ String msg = "You don't have permission to access the application. application id: " + appId; - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.FORBIDDEN).entity(msg).build(); } catch (ApplicationManagementException e) { @@ -158,7 +158,7 @@ public class ApplicationManagementPublisherAPIImpl implements ApplicationManagem } catch(ForbiddenException e){ String msg = "You don't have permission to access the application release. application release UUID: : " + uuid; - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.FORBIDDEN).entity(msg).build(); } catch (ApplicationManagementException e) { @@ -426,10 +426,10 @@ public class ApplicationManagementPublisherAPIImpl implements ApplicationManagem .entity("Successfully uploaded artifacts for the application " + applicationReleaseUuid).build(); } catch (NotFoundException e) { String msg = "Couldn't found an application release which has application release UUID " - + applicationReleaseUuid + ". HEnce please verify the application release UUID again and execute " + + applicationReleaseUuid + ". Hence please verify the application release UUID again and execute " + "the operation"; log.error(msg, e); - return Response.status(Response.Status.NOT_FOUND).entity(e.getMessage()).build(); + return Response.status(Response.Status.NOT_FOUND).entity(msg).build(); } catch (ApplicationManagementException e) { String msg = "Error occurred while updating the application image artifacts for application release uuid: " + applicationReleaseUuid; @@ -441,7 +441,7 @@ public class ApplicationManagementPublisherAPIImpl implements ApplicationManagem @Override @PUT @Consumes({"multipart/mixed", MediaType.MULTIPART_FORM_DATA}) - @Path("/ent-app-artifact/{deviceType}//{uuid}") + @Path("/ent-app-artifact/{deviceType}/{uuid}") public Response updateApplicationArtifact( @PathParam("deviceType") String deviceType, @PathParam("uuid") String applicationReleaseUuid, @@ -456,15 +456,24 @@ public class ApplicationManagementPublisherAPIImpl implements ApplicationManagem .entity("Successfully uploaded artifacts for the application release. UUID is " + applicationReleaseUuid).build(); } catch (RequestValidatingException e) { - log.error(e.getMessage(), e); - return Response.status(Response.Status.BAD_REQUEST).entity(e.getMessage()).build(); + String msg = + "Couldn't find the binary file with the request. Hence invoke the API with updating application" + + " artifact"; + log.error(msg, e); + return Response.status(Response.Status.BAD_REQUEST).entity(msg).build(); } catch (NotFoundException e) { - log.error(e.getMessage(), e); - return Response.status(Response.Status.NOT_FOUND).entity(e.getMessage()).build(); + String msg = "Couldn't find an application which has application release UUID: " + applicationReleaseUuid; + log.error(msg, e); + return Response.status(Response.Status.NOT_FOUND).entity(msg).build(); + } catch (BadRequestException e) { + String msg = "Found an invalid device type: " + deviceType + " with the request"; + log.error(msg); + return Response.status(Response.Status.BAD_REQUEST).entity(msg).build(); } catch (ApplicationManagementException e) { - log.error("Error occurred while updating the image artifacts of the application with the uuid " - + applicationReleaseUuid, e); - return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).build(); + String msg = "Error occurred while updating the image artifacts of the application with the uuid " + + applicationReleaseUuid; + log.error(msg, e); + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } } @@ -479,8 +488,9 @@ public class ApplicationManagementPublisherAPIImpl implements ApplicationManagem Application application = applicationManager.updateApplication(applicationId, applicationUpdateWrapper); return Response.status(Response.Status.OK).entity(application).build(); } catch (NotFoundException e) { - log.error(e.getMessage()); - return Response.status(Response.Status.NOT_FOUND).entity(e.getMessage()).build(); + String msg = "Couldn't find an application for application id: " + applicationId; + log.error(msg, e); + return Response.status(Response.Status.NOT_FOUND).entity(msg).build(); } catch (BadRequestException e) { String msg = "Error occurred while modifying the application. Found bad request payload for updating the " + "application"; @@ -711,11 +721,10 @@ public class ApplicationManagementPublisherAPIImpl implements ApplicationManagem return Response.status(Response.Status.OK).entity(lifecycleStates).build(); } catch (NotFoundException e) { String msg = "Couldn't found an application release for UUID: " + releaseUuid; - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.NOT_FOUND).entity(msg).build(); } catch (ApplicationManagementException e) { - String msg = - "Error occurred while getting lifecycle states for application release UUID: " + releaseUuid; + String msg = "Error occurred while getting lifecycle states for application release UUID: " + releaseUuid; log.error(msg, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); } @@ -761,7 +770,7 @@ public class ApplicationManagementPublisherAPIImpl implements ApplicationManagem return Response.status(Response.Status.OK).entity(dataHandler.getLifecycleConfiguration()).build(); } catch (LifecycleManagementException e) { String msg = "Error Occurred while accessing lifecycle manager."; - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } } @@ -777,7 +786,7 @@ public class ApplicationManagementPublisherAPIImpl implements ApplicationManagem return Response.status(Response.Status.OK).entity(tags).build(); } catch (ApplicationManagementException e) { String msg = "Error Occurred while getting registered tags."; - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } } @@ -796,15 +805,15 @@ public class ApplicationManagementPublisherAPIImpl implements ApplicationManagem return Response.status(Response.Status.OK).entity(msg).build(); } catch (NotFoundException e) { String msg = e.getMessage(); - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.NOT_FOUND).entity(msg).build(); } catch (BadRequestException e) { String msg = e.getMessage(); - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.BAD_REQUEST).entity(msg).build(); } catch (ApplicationManagementException e) { String msg = "Error Occurred while deleting registered tag."; - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } } @@ -822,15 +831,15 @@ public class ApplicationManagementPublisherAPIImpl implements ApplicationManagem return Response.status(Response.Status.OK).entity(msg).build(); } catch (NotFoundException e) { String msg = e.getMessage(); - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.NOT_FOUND).entity(msg).build(); } catch (ForbiddenException e) { String msg = e.getMessage(); - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.FORBIDDEN).entity(msg).build(); } catch (ApplicationManagementException e) { String msg = "Error Occurred while deleting unused tag."; - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } } @@ -849,15 +858,15 @@ public class ApplicationManagementPublisherAPIImpl implements ApplicationManagem return Response.status(Response.Status.OK).entity(msg).build(); } catch (BadRequestException e) { String msg = e.getMessage(); - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.BAD_REQUEST).entity(msg).build(); } catch (NotFoundException e) { String msg = e.getMessage(); - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.NOT_FOUND).entity(msg).build(); } catch (ApplicationManagementException e) { String msg = "Error Occurred while updating registered tag."; - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } } @@ -874,11 +883,11 @@ public class ApplicationManagementPublisherAPIImpl implements ApplicationManagem return Response.status(Response.Status.OK).entity(tags).build(); } catch (BadRequestException e) { String msg = e.getMessage(); - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.BAD_REQUEST).entity(msg).build(); } catch (ApplicationManagementException e) { String msg = "Error Occurred while adding new tag."; - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } } @@ -896,11 +905,11 @@ public class ApplicationManagementPublisherAPIImpl implements ApplicationManagem return Response.status(Response.Status.OK).entity(applicationTags).build(); } catch (NotFoundException e) { String msg = e.getMessage(); - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.NOT_FOUND).entity(msg).build(); } catch (ApplicationManagementException e) { String msg = "Error Occurred while adding new tags for application which has application ID: " + appId + "."; - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } } @@ -916,7 +925,7 @@ public class ApplicationManagementPublisherAPIImpl implements ApplicationManagem return Response.status(Response.Status.OK).entity(categories).build(); } catch (ApplicationManagementException e) { String msg = "Error Occurred while getting registered categories."; - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/admin/ApplicationManagementPublisherAdminAPIImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/admin/ApplicationManagementPublisherAdminAPIImpl.java index 000816cba81..1e84dd140e9 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/admin/ApplicationManagementPublisherAdminAPIImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/admin/ApplicationManagementPublisherAdminAPIImpl.java @@ -46,7 +46,7 @@ import java.util.List; @Path("/admin/applications") public class ApplicationManagementPublisherAdminAPIImpl implements ApplicationManagementPublisherAdminAPI { - private static Log log = LogFactory.getLog(ApplicationManagementPublisherAdminAPIImpl.class); + private static final Log log = LogFactory.getLog(ApplicationManagementPublisherAdminAPIImpl.class); @DELETE @Consumes(MediaType.WILDCARD) @@ -56,8 +56,8 @@ public class ApplicationManagementPublisherAdminAPIImpl implements ApplicationMa ApplicationManager applicationManager = APIUtil.getApplicationManager(); try { applicationManager.deleteApplicationRelease(releaseUuid); - String responseMsg = "Successfully deleted the application release for uuid: " + releaseUuid + ""; - return Response.status(Response.Status.OK).entity(responseMsg).build(); + return Response.status(Response.Status.OK) + .entity("Successfully deleted the application release for uuid: " + releaseUuid).build(); } catch (NotFoundException e) { String msg = "Couldn't found application release which is having application release UUID:" + releaseUuid; @@ -84,11 +84,10 @@ public class ApplicationManagementPublisherAdminAPIImpl implements ApplicationMa ApplicationManager applicationManager = APIUtil.getApplicationManager(); try { applicationManager.deleteApplication(applicationId); - String responseMsg = "Successfully deleted the application which has ID: " + applicationId + ""; - return Response.status(Response.Status.OK).entity(responseMsg).build(); + return Response.status(Response.Status.OK) + .entity("Successfully deleted the application which has ID: " + applicationId).build(); } catch (NotFoundException e) { - String msg = - "Couldn't found application release which is having the ID:" + applicationId; + String msg = "Couldn't found application release which is having the ID:" + applicationId; log.error(msg, e); return Response.status(Response.Status.NOT_FOUND).entity(msg).build(); } catch (ForbiddenException e) { @@ -111,15 +110,14 @@ public class ApplicationManagementPublisherAdminAPIImpl implements ApplicationMa ApplicationManager applicationManager = APIUtil.getApplicationManager(); try { applicationManager.deleteTag(tagName); - String msg = "Tag " + tagName + " is deleted successfully."; - return Response.status(Response.Status.OK).entity(msg).build(); + return Response.status(Response.Status.OK).entity("Tag " + tagName + " is deleted successfully.").build(); } catch (NotFoundException e) { String msg = e.getMessage(); - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.NOT_FOUND).entity(msg).build(); } catch (ApplicationManagementException e) { String msg = "Error Occurred while deleting registered tag."; - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } } @@ -136,11 +134,11 @@ public class ApplicationManagementPublisherAdminAPIImpl implements ApplicationMa return Response.status(Response.Status.OK).entity(categories).build(); } catch (BadRequestException e) { String msg = e.getMessage(); - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.BAD_REQUEST).entity(msg).build(); } catch (ApplicationManagementException e) { String msg = "Error Occurred while adding new categories."; - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } } @@ -155,15 +153,15 @@ public class ApplicationManagementPublisherAdminAPIImpl implements ApplicationMa ApplicationManager applicationManager = APIUtil.getApplicationManager(); try { applicationManager.updateCategory(oldCategoryName, newCategoryName); - String msg = "Category is updated from " + oldCategoryName + " to " + newCategoryName; - return Response.status(Response.Status.OK).entity(msg).build(); + return Response.status(Response.Status.OK) + .entity("Category is updated from " + oldCategoryName + " to " + newCategoryName).build(); } catch (NotFoundException e) { String msg = e.getMessage(); - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.NOT_FOUND).entity(msg).build(); } catch (ApplicationManagementException e) { String msg = "Error Occurred while rename registered category."; - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } } @@ -177,15 +175,15 @@ public class ApplicationManagementPublisherAdminAPIImpl implements ApplicationMa ApplicationManager applicationManager = APIUtil.getApplicationManager(); try { applicationManager.deleteCategory(categoryName); - String msg = "Category " + categoryName + " is deleted successfully."; - return Response.status(Response.Status.OK).entity(msg).build(); + return Response.status(Response.Status.OK).entity("Category " + categoryName + " is deleted successfully.") + .build(); } catch (NotFoundException e) { String msg = e.getMessage(); - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.NOT_FOUND).entity(msg).build(); } catch (ApplicationManagementException e) { String msg = "Error Occurred while deleting registered category."; - log.error(msg); + log.error(msg, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/admin/ReviewManagementPublisherAdminAPIImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/admin/ReviewManagementPublisherAdminAPIImpl.java index 87aab159976..c572004e1e2 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/admin/ReviewManagementPublisherAdminAPIImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/admin/ReviewManagementPublisherAdminAPIImpl.java @@ -41,7 +41,7 @@ import javax.ws.rs.core.Response; @Path("/admin/reviews") public class ReviewManagementPublisherAdminAPIImpl implements ReviewManagementPublisherAdminAPI { - private static Log log = LogFactory.getLog(ReviewManagementPublisherAdminAPIImpl.class); + private static final Log log = LogFactory.getLog(ReviewManagementPublisherAdminAPIImpl.class); @Override @GET diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ApplicationManagementAPIImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ApplicationManagementAPIImpl.java index 754bd7a3521..ac0b3b283b0 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ApplicationManagementAPIImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ApplicationManagementAPIImpl.java @@ -45,7 +45,7 @@ import javax.ws.rs.core.Response; @Path("/applications") public class ApplicationManagementAPIImpl implements ApplicationManagementAPI { - private static Log log = LogFactory.getLog(ApplicationManagementAPIImpl.class); + private static final Log log = LogFactory.getLog(ApplicationManagementAPIImpl.class); @POST @Override diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ReviewManagementAPIImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ReviewManagementAPIImpl.java index f630c9335ec..c617671de77 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ReviewManagementAPIImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ReviewManagementAPIImpl.java @@ -51,7 +51,7 @@ import javax.ws.rs.core.Response; @Path("/reviews") public class ReviewManagementAPIImpl implements ReviewManagementAPI { - private static Log log = LogFactory.getLog(ReviewManagementAPIImpl.class); + private static final Log log = LogFactory.getLog(ReviewManagementAPIImpl.class); @Override @GET diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/SubscriptionManagementAPIImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/SubscriptionManagementAPIImpl.java index 56824c17c67..13a2afb8cd7 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/SubscriptionManagementAPIImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/SubscriptionManagementAPIImpl.java @@ -64,7 +64,7 @@ import java.util.List; @Path("/subscription") public class SubscriptionManagementAPIImpl implements SubscriptionManagementAPI{ - private static Log log = LogFactory.getLog(SubscriptionManagementAPIImpl.class); + private static final Log log = LogFactory.getLog(SubscriptionManagementAPIImpl.class); @Override @POST diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/admin/ReviewManagementStoreAdminAPIImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/admin/ReviewManagementStoreAdminAPIImpl.java index d2725e7d9ff..5cca42852f9 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/admin/ReviewManagementStoreAdminAPIImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/admin/ReviewManagementStoreAdminAPIImpl.java @@ -39,7 +39,7 @@ import javax.ws.rs.core.Response; @Path("/admin/reviews") public class ReviewManagementStoreAdminAPIImpl implements ReviewManagementStoreAdminAPI { - private static Log log = LogFactory.getLog(ReviewManagementStoreAdminAPIImpl.class); + private static final Log log = LogFactory.getLog(ReviewManagementStoreAdminAPIImpl.class); @Override @DELETE diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/admin/SubscriptionManagementAdminAPIImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/admin/SubscriptionManagementAdminAPIImpl.java index 5dde7a6a379..24625565706 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/admin/SubscriptionManagementAdminAPIImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/admin/SubscriptionManagementAdminAPIImpl.java @@ -44,7 +44,7 @@ import javax.ws.rs.core.Response; @Path("/admin/subscription") public class SubscriptionManagementAdminAPIImpl implements SubscriptionManagementAdminAPI { - private static Log log = LogFactory.getLog(SubscriptionManagementAdminAPIImpl.class); + private static final Log log = LogFactory.getLog(SubscriptionManagementAdminAPIImpl.class); @GET @Consumes("application/json") diff --git a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/pom.xml b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/pom.xml index a5fdbb18349..10bb0670854 100644 --- a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/pom.xml +++ b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/pom.xml @@ -142,6 +142,152 @@ org.wso2.carbon.devicemgt org.wso2.carbon.device.application.mgt.core provided + + + commons-httpclient + commons-httpclient + + + commons-lang + commons-lang + + + commons-collections + commons-collections + + + commons-digester + commons-digester + + + commons-beanutils + commons-beanutils + + + javax.annotation-api + javax.annotation + + + xml-apis + xml-apis + + + org.wso2.securevault + org.wso2.securevault + + + wsdl4j + wsdl4j.wso2 + + + commons-fileupload + commons-fileupload + + + jaxen + jaxen + + + validation-api + javax.validation + + + jackson-databind + com.fasterxml.jackson.core + + + wsdl4j + wsdl4j + + + slf4j-api + org.slf4j + + + woodstox-core-asl + org.codehaus.woodstox + + + guava + com.google.guava + + + asm + asm + + + hibernate + org.hibernate + + + geronimo-jta_1.1_spec + org.apache.geronimo.specs + + + objenesis + org.objenesis + + + commons-pool + commons-pool + + + XmlSchema + org.apache.ws.commons.schema + + + geronimo-stax-api_1.0_spec + org.apache.geronimo.specs.wso2 + + + org.eclipse.core.runtime + org.eclipse.core + + + org.wso2.carbon.feature.mgt.core + org.wso2.carbon + + + axis2-client + org.apache.axis2.wso2 + + + joda-time + joda-time + + + stax2-api + org.codehaus.woodstox + + + asm + org.ow2.asm + + + maven-scm-provider-svnexe + org.apache.maven.scm + + + codemodel + com.sun.codemodel + + + jackson-mapper-asl + org.codehaus.jackson + + + cglib-nodep + cglib + + + plexus-utils + org.codehaus.plexus + + + httpcore + org.apache.httpcomponents.wso2 + + org.wso2.carbon.devicemgt