From 56de095599255aee96db8d6ecf92b1550e3432b1 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Fri, 3 Feb 2017 05:00:57 +0530 Subject: [PATCH] resolved app connector build slowness issue --- .../pom.xml | 74 +++---------------- .../ApplicationOperationsImpl.java | 2 +- .../authorization/client/dto/Activity.java | 63 ++++++++++++++++ .../ApplicationManagementAdminService.java | 1 - .../client/dto/BasePaginatedResult.java | 39 ---------- .../authorization/client/dto/Device.java | 30 -------- .../authorization/client/dto/DeviceList.java | 16 ++-- pom.xml | 10 +++ 8 files changed, 94 insertions(+), 141 deletions(-) create mode 100644 components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/authorization/client/dto/Activity.java delete mode 100644 components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/authorization/client/dto/BasePaginatedResult.java diff --git a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/pom.xml b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/pom.xml index 36bd4b271..1a646e738 100644 --- a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/pom.xml +++ b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/pom.xml @@ -27,28 +27,6 @@ bundle WSO2 Carbon - App Manager WSO2 MDM REST Connector Component http://maven.apache.org - - - wso2-maven2-repository - WSO2 Maven2 Repository - http://dist.wso2.org/maven2/ - - - wso2-maven2-snapshot-repository - WSO2 Maven2 Snapshot Repository - http://dist.wso2.org/snapshots/maven2/ - - - wso2-nexus - WSO2 internal Repository - http://maven.wso2.org/nexus/content/groups/wso2-public/ - - true - daily - ignore - - - @@ -74,6 +52,8 @@ ${project.artifactId} org.wso2.carbon.appmgt.mdm.restconnector.internal + org.osgi.framework, + org.osgi.service.component, org.wso2.carbon.appmgt.mobile.utils.*, org.wso2.carbon.appmgt.mobile.mdm.*, org.wso2.carbon.appmgt.mobile.interfaces.*, @@ -85,7 +65,9 @@ feign.auth, feign.codec, feign.gson, - *;resolution:=optional + org.json.simple.*, + org.wso2.carbon.appmgt.mobile.beans, + org.wso2.carbon.context !org.wso2.carbon.appmgt.mdm.restconnector.internal, @@ -93,8 +75,7 @@ jsr311-api, - feign-jaxrs, - org.wso2.carbon.device.mgt.common + feign-jaxrs @@ -103,38 +84,14 @@ - - commons-io.wso2 - commons-io - com.googlecode.json-simple.wso2 json-simple - - com.googlecode.plist - dd-plist - org.wso2.carbon org.wso2.carbon.logging - - org.apache.felix - org.apache.felix.scr - - - org.wso2.carbon - org.wso2.carbon.ndatasource.core - - - org.wso2.carbon.governance - org.wso2.carbon.governance.api - - - org.wso2.carbon.appmgt - org.wso2.carbon.appmgt.mobile - org.wso2.carbon.devicemgt org.wso2.carbon.identity.jwt.client.extension @@ -159,21 +116,10 @@ io.swagger swagger-jaxrs - - org.wso2.carbon.devicemgt - org.wso2.carbon.device.mgt.common - - - org.apache.ws.commons.axiom - axiom-api - - - org.apache.ws.commons.axiom - axiom-impl - - - - + + org.wso2.carbon.appmgt + org.wso2.carbon.appmgt.mobile + diff --git a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/ApplicationOperationsImpl.java b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/ApplicationOperationsImpl.java index 4f3580165..949407f02 100644 --- a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/ApplicationOperationsImpl.java +++ b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/ApplicationOperationsImpl.java @@ -27,6 +27,7 @@ import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; import org.wso2.carbon.appmgt.mdm.restconnector.authorization.client.OAuthRequestInterceptor; +import org.wso2.carbon.appmgt.mdm.restconnector.authorization.client.dto.Activity; import org.wso2.carbon.appmgt.mdm.restconnector.authorization.client.dto.ApplicationManagementAdminService; import org.wso2.carbon.appmgt.mdm.restconnector.authorization.client.dto.ApplicationWrapper; import org.wso2.carbon.appmgt.mdm.restconnector.authorization.client.dto.DeviceManagementAdminService; @@ -42,7 +43,6 @@ import org.wso2.carbon.appmgt.mobile.mdm.Device; import org.wso2.carbon.appmgt.mobile.utils.MobileApplicationException; import org.wso2.carbon.appmgt.mobile.utils.MobileConfigurations; import org.wso2.carbon.context.PrivilegedCarbonContext; -import org.wso2.carbon.device.mgt.common.operation.mgt.Activity; import java.util.ArrayList; import java.util.HashMap; diff --git a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/authorization/client/dto/Activity.java b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/authorization/client/dto/Activity.java new file mode 100644 index 000000000..b373a1c63 --- /dev/null +++ b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/authorization/client/dto/Activity.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. 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.appmgt.mdm.restconnector.authorization.client.dto; + + +public class Activity { + + public enum Type { + CONFIG, MESSAGE, INFO, COMMAND, PROFILE, POLICY + } + private String activityId; + private String code; + private Type type; + private String createdTimeStamp; + + public String getActivityId() { + return activityId; + } + + public void setActivityId(String activityId) { + this.activityId = activityId; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public Type getType() { + return type; + } + + public void setType(Type type) { + this.type = type; + } + + public String getCreatedTimeStamp() { + return createdTimeStamp; + } + + public void setCreatedTimeStamp(String createdTimeStamp) { + this.createdTimeStamp = createdTimeStamp; + } +} + diff --git a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/authorization/client/dto/ApplicationManagementAdminService.java b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/authorization/client/dto/ApplicationManagementAdminService.java index 3b390a7a8..e48e8e5c1 100644 --- a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/authorization/client/dto/ApplicationManagementAdminService.java +++ b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/authorization/client/dto/ApplicationManagementAdminService.java @@ -17,7 +17,6 @@ */ package org.wso2.carbon.appmgt.mdm.restconnector.authorization.client.dto; -import org.wso2.carbon.device.mgt.common.operation.mgt.Activity; import javax.ws.rs.Consumes; import javax.ws.rs.POST; diff --git a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/authorization/client/dto/BasePaginatedResult.java b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/authorization/client/dto/BasePaginatedResult.java deleted file mode 100644 index 64527d32f..000000000 --- a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/authorization/client/dto/BasePaginatedResult.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. 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.appmgt.mdm.restconnector.authorization.client.dto; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - -/** - * Number of Resources. - */ -public class BasePaginatedResult { - @ApiModelProperty(value = "Number of total resources.", example = "2") - @JsonProperty("count") - private int count; - - public int getCount() { - return count; - } - - public void setCount(int count) { - this.count = count; - } -} \ No newline at end of file diff --git a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/authorization/client/dto/Device.java b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/authorization/client/dto/Device.java index 24916c1fa..96af8865a 100644 --- a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/authorization/client/dto/Device.java +++ b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/authorization/client/dto/Device.java @@ -17,10 +17,7 @@ */ package org.wso2.carbon.appmgt.mdm.restconnector.authorization.client.dto; -import org.wso2.carbon.device.mgt.common.Feature; - import java.io.Serializable; -import java.util.List; /** * The DTO class of device. @@ -37,15 +34,6 @@ public class Device implements Serializable { public Device() { } - public Device(String name, String type, String description, String deviceId, EnrolmentInfo enrolmentInfo, - List features, List properties) { - this.name = name; - this.type = type; - this.description = description; - this.deviceIdentifier = deviceId; - this.enrolmentInfo = enrolmentInfo; - } - public int getId() { return id; } @@ -130,22 +118,4 @@ public class Device implements Serializable { "]" + "]"; } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - if (!(o instanceof org.wso2.carbon.device.mgt.common.Device)) - return false; - - org.wso2.carbon.device.mgt.common.Device device = (org.wso2.carbon.device.mgt.common.Device) o; - - return getDeviceIdentifier().equals(device.getDeviceIdentifier()); - - } - - @Override - public int hashCode() { - return getDeviceIdentifier().hashCode(); - } } diff --git a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/authorization/client/dto/DeviceList.java b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/authorization/client/dto/DeviceList.java index cbb866175..6470910c2 100644 --- a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/authorization/client/dto/DeviceList.java +++ b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/src/main/java/org/wso2/carbon/appmgt/mdm/restconnector/authorization/client/dto/DeviceList.java @@ -17,17 +17,21 @@ */ package org.wso2.carbon.appmgt.mdm.restconnector.authorization.client.dto; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; - import java.util.ArrayList; import java.util.List; -public class DeviceList extends BasePaginatedResult { +public class DeviceList { private List devices = new ArrayList<>(); + private int count; + + public int getCount() { + return count; + } + + public void setCount(int count) { + this.count = count; + } - @ApiModelProperty(value = "List of devices returned") - @JsonProperty("devices") public List getList() { return devices; } diff --git a/pom.xml b/pom.xml index 04c05eca3..94348d161 100644 --- a/pom.xml +++ b/pom.xml @@ -528,6 +528,16 @@ org.wso2.carbon.appmgt org.wso2.carbon.appmgt.mobile ${carbon.appmgt.version} + + + org.apache.ws.commons.axiom + axiom-api + + + org.apache.ws.commons.axiom + axiom-impl + +