diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/pom.xml
new file mode 100644
index 000000000..f22c2e2a8
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/pom.xml
@@ -0,0 +1,360 @@
+
+
+
+
+
+ android-plugin
+ org.wso2.carbon.devicemgt-plugins
+ 4.0.102-SNAPSHOT
+ ../pom.xml
+
+
+ 4.0.0
+ org.wso2.carbon.device.mgt.mobile.android.v09.api
+ WSO2 Carbon - Android JAX-RS v09 API
+ Android JAX-RS v09 API
+ war
+
+
+
+
+ maven-compiler-plugin
+
+
+ 1.8
+
+ 2.3.2
+
+
+ maven-war-plugin
+ 2.2
+
+ WEB-INF/lib/*cxf*.jar
+ api#device-mgt#android#v0.9
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+ file:src/test/resources/log4j.properties
+
+
+ src/test/resources/testng.xml
+
+
+
+
+
+
+
+
+ deploy
+
+ compile
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+ 1.7
+
+
+ compile
+
+ run
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
+
+
+
+
+
+ client
+
+ test
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 1.2.1
+
+
+ test
+
+ java
+
+
+
+
+
+
+
+
+
+
+
+
+ org.apache.cxf
+ cxf-rt-frontend-jaxws
+
+
+ org.apache.cxf
+ cxf-rt-frontend-jaxrs
+
+
+ org.apache.cxf
+ cxf-rt-transports-http
+
+
+ javax.ws.rs
+ jsr311-api
+ provided
+
+
+ org.wso2.carbon
+ org.wso2.carbon.utils
+ provided
+
+
+ org.wso2.carbon
+ org.wso2.carbon.logging
+ provided
+
+
+
+
+ org.wso2.carbon.devicemgt
+ org.wso2.carbon.device.mgt.common
+ provided
+
+
+ org.wso2.carbon.devicemgt
+ org.wso2.carbon.apimgt.annotations
+ provided
+
+
+ org.wso2.carbon.devicemgt
+ org.wso2.carbon.device.mgt.core
+ provided
+
+
+ org.slf4j
+ slf4j-api
+
+
+
+
+ org.wso2.carbon.devicemgt
+ org.wso2.carbon.policy.mgt.common
+ provided
+
+
+ org.wso2.carbon.devicemgt
+ org.wso2.carbon.policy.mgt.core
+ provided
+
+
+ org.wso2.carbon.devicemgt-plugins
+ org.wso2.carbon.device.mgt.mobile.android
+ provided
+
+
+ commons-httpclient.wso2
+ commons-httpclient
+ provided
+
+
+ com.google.code.gson
+ gson
+
+
+ org.wso2.carbon.devicemgt
+ org.wso2.carbon.device.mgt.analytics.data.publisher
+ provided
+
+
+ org.slf4j
+ slf4j-api
+
+
+
+
+ org.wso2.carbon.analytics
+ org.wso2.carbon.analytics.api
+ provided
+
+
+ io.swagger
+ swagger-annotations
+
+
+ io.swagger
+ swagger-core
+
+
+ org.slf4j
+ slf4j-api
+
+
+
+
+ io.swagger
+ swagger-jaxrs
+
+
+ org.slf4j
+ slf4j-api
+
+
+
+
+ javax.servlet
+ servlet-api
+ provided
+
+
+ org.hibernate
+ hibernate-validator
+
+
+ javax.ws.rs
+ javax.ws.rs-api
+
+
+ org.testng
+ testng
+ test
+
+
+ org.powermock
+ powermock-module-testng
+ test
+
+
+ org.powermock
+ powermock-api-mockito
+ test
+
+
+ com.h2database.wso2
+ h2-database-engine
+ test
+
+
+ org.wso2.carbon
+ org.wso2.carbon.queuing
+ test
+
+
+ org.wso2.carbon
+ org.wso2.carbon.ndatasource.core
+ test
+
+
+ commons-dbcp.wso2
+ commons-dbcp
+ test
+
+
+ commons-pool.wso2
+ commons-pool
+ test
+
+
+ org.wso2.carbon
+ javax.cache.wso2
+ test
+
+
+ javassist
+ javassist
+ test
+
+
+ org.codehaus.jackson
+ jackson-core-asl
+
+
+
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/AndroidOperation.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/AndroidOperation.java
new file mode 100644
index 000000000..3361b90dc
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/AndroidOperation.java
@@ -0,0 +1,36 @@
+/*
+ * 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.mdm.services.android.bean;
+
+import com.google.gson.Gson;
+/*
+* This abstract class is used for extending generic functions with regard to operation.
+*/
+public abstract class AndroidOperation {
+
+ /*
+ * This method is used to convert operation object to a json format.
+ *
+ * @return json formatted String.
+ */
+ public String toJSON() {
+ Gson gson = new Gson();
+ return gson.toJson(this);
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/AndroidPlatformConfiguration.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/AndroidPlatformConfiguration.java
new file mode 100644
index 000000000..9832c3f03
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/AndroidPlatformConfiguration.java
@@ -0,0 +1,81 @@
+/*
+ * 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.mdm.services.android.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.List;
+
+@XmlRootElement(
+ name = "PlatformConfiguration"
+)
+@XmlAccessorType(XmlAccessType.NONE)
+@ApiModel(
+ value = "PlatformConfiguration",
+ description = "This class carries all the information related to Android platform configurations."
+)
+public class AndroidPlatformConfiguration implements Serializable {
+ public static final int INVALID_NOTIFIER_FREQUENCY = -1;
+ @XmlElement(
+ name = "type"
+ )
+ @ApiModelProperty(
+ name = "type",
+ value = "type of device",
+ required = true
+ )
+ @Size(min = 2, max = 10)
+ private String type;
+ @ApiModelProperty(
+ name = "configuration",
+ value = "List of Configuration Entries",
+ required = true
+ )
+ @XmlElement(
+ name = "configuration"
+ )
+ private List configuration;
+
+ public AndroidPlatformConfiguration() {
+ }
+
+ public String getType() {
+ return this.type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public List getConfiguration() {
+ return this.configuration;
+ }
+
+ public void setConfiguration(List configuration) {
+ this.configuration = configuration;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/AppRestriction.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/AppRestriction.java
new file mode 100644
index 000000000..2c8d8c93d
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/AppRestriction.java
@@ -0,0 +1,54 @@
+/*
+ * 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.mdm.services.android.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * This class represents information of configuring App Restriction ex: White list and Black list
+ */
+@ApiModel(value = "AppRestriction",
+ description = "This class carries all information related to application restriction.")
+public class AppRestriction extends AndroidOperation implements Serializable {
+
+ @ApiModelProperty(name = "restrictionType", value = "Restriction type of the application.", required = true)
+ private String restrictionType;
+ @ApiModelProperty(name = "restrictedList", value = "Device id list of the operation to be executed.", required = true)
+ private List restrictedList;
+
+ public String getRestrictionType() {
+ return restrictionType;
+ }
+
+ public void setRestrictionType(String restrictionType) {
+ this.restrictionType = restrictionType;
+ }
+
+ public List getRestrictedList() {
+ return restrictedList;
+ }
+
+ public void setRestrictedList(List restrictedList) {
+ this.restrictedList = restrictedList;
+ }
+
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/ApplicationInstallation.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/ApplicationInstallation.java
new file mode 100644
index 000000000..4c90d42cb
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/ApplicationInstallation.java
@@ -0,0 +1,84 @@
+/*
+ * 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.mdm.services.android.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+import java.io.Serializable;
+
+/**
+ * This class represents the information of install application operation.
+ */
+@ApiModel(value = "ApplicationInstallation",
+ description = "This class carries all information related to install application")
+public class ApplicationInstallation extends AndroidOperation implements Serializable {
+
+ @ApiModelProperty(name = "appIdentifier", value = "Application Identifier", required = true)
+ @Size(min = 2, max = 45)
+ @Pattern(regexp = "^[A-Za-z0-9]*$")
+ private String appIdentifier;
+
+ @ApiModelProperty(name = "type", value = "Application type(Enterprise/Web/public)", required = true)
+ @Size(min = 2, max = 12)
+ @Pattern(regexp = "^[A-Za-z]*$")
+ private String type;
+
+ @ApiModelProperty(name = "url", value = "Application URL", required = true)
+ private String url;
+
+ @ApiModelProperty(name = "schedule", value = "Schedule of the App installation.")
+ private String schedule;
+
+ public String getAppIdentifier() {
+ return appIdentifier;
+ }
+
+ public void setAppIdentifier(String appIdentifier) {
+ this.appIdentifier = appIdentifier;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ @SuppressWarnings("unused")
+ public String getSchedule() {
+ return schedule;
+ }
+
+ @SuppressWarnings("unused")
+ public void setSchedule(String schedule) {
+ this.schedule = schedule;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/ApplicationUninstallation.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/ApplicationUninstallation.java
new file mode 100644
index 000000000..a5356ae59
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/ApplicationUninstallation.java
@@ -0,0 +1,62 @@
+/*
+ * 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.mdm.services.android.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+import java.io.Serializable;
+
+/**
+ * This class represents the information of uninstall application operation.
+ */
+@ApiModel(value = "ApplicationUninstallation",
+ description = "This class carries all information related to application uninstallation.")
+public class ApplicationUninstallation extends AndroidOperation implements Serializable {
+
+ @ApiModelProperty(name = "appIdentifier", value = "The package name of the application to be uninstalled.", required = true)
+ @Size(min = 2, max = 45)
+ @Pattern(regexp = "^[A-Za-z0-9]*$")
+ private String appIdentifier;
+
+ @ApiModelProperty(name = "type", value = "The type of the application. The following types of applications " +
+ "are supported: enterprise, public and webapp.", required = true)
+ @Size(min = 2, max = 12)
+ @Pattern(regexp = "^[A-Za-z]*$")
+ private String type;
+
+ public String getAppIdentifier() {
+ return appIdentifier;
+ }
+
+ public void setAppIdentifier(String appIdentifier) {
+ this.appIdentifier = appIdentifier;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/ApplicationUpdate.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/ApplicationUpdate.java
new file mode 100644
index 000000000..95241b444
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/ApplicationUpdate.java
@@ -0,0 +1,81 @@
+/*
+ * 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.mdm.services.android.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+import java.io.Serializable;
+
+/**
+ * This class represents the information of Update application operation.
+ */
+@ApiModel(value = "ApplicationUpdate",
+ description = "This class carries all information related to application update.")
+public class ApplicationUpdate extends AndroidOperation implements Serializable {
+
+ @ApiModelProperty(name = "appIdentifier", value = "The package name of the application " +
+ "to be update.", required = true)
+ @Size(min = 2, max = 45)
+ @Pattern(regexp = "^[A-Za-z0-9]*$")
+ private String appIdentifier;
+ @ApiModelProperty(name = "type", value = "The type of the application. The following types of applications " +
+ "are supported: enterprise, public and webapp.", required = true)
+ @Size(min = 2, max = 12)
+ @Pattern(regexp = "^[A-Za-z]*$")
+ private String type;
+ @ApiModelProperty(name = "url", value = "The URL of the application.", required = true)
+ private String url;
+ @ApiModelProperty(name = "schedule", value = "Application update schedule.", required = false)
+ private String schedule;
+
+ public String getAppIdentifier() {
+ return appIdentifier;
+ }
+
+ public void setAppIdentifier(String appIdentifier) {
+ this.appIdentifier = appIdentifier;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public String getSchedule() {
+ return schedule;
+ }
+
+ public void setSchedule(String schedule) {
+ this.schedule = schedule;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/BlacklistApplications.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/BlacklistApplications.java
new file mode 100644
index 000000000..b7db28976
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/BlacklistApplications.java
@@ -0,0 +1,48 @@
+/*
+ * 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.mdm.services.android.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.Size;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * This class represents the blacklist applications information.
+ */
+@ApiModel(value = "BlacklistApplications",
+ description = "This class represents the blacklist applications information.")
+public class BlacklistApplications extends AndroidOperation implements Serializable {
+
+ @ApiModelProperty(name = "appIdentifiers", value = "A list of application package names to be blacklisted.",
+ required = true)
+ @Size(min = 1, max = 45)
+ private List appIdentifiers;
+
+ public List getAppIdentifier() {
+ return appIdentifiers;
+ }
+
+ public void setAppIdentifier(List appIdentifiers) {
+ this.appIdentifiers = appIdentifiers;
+ }
+
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/Camera.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/Camera.java
new file mode 100644
index 000000000..0dad70364
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/Camera.java
@@ -0,0 +1,44 @@
+/*
+ * 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.mdm.services.android.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * This class represents the information of camera operation.
+ */
+@ApiModel(value = "Camera",
+ description = "This class represents the information of camera operation.")
+public class Camera extends AndroidOperation implements Serializable {
+
+ @ApiModelProperty(name = "enabled", value = "Disable the camera on the device by assigning false as the value or " +
+ "enable the camera on the device to function by defining true as the value.", required = true)
+ private boolean enabled;
+
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/DeviceEncryption.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/DeviceEncryption.java
new file mode 100644
index 000000000..68ab6ae94
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/DeviceEncryption.java
@@ -0,0 +1,44 @@
+/*
+ * 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.mdm.services.android.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * This class represents the information of encrypt operation.
+ */
+
+@ApiModel(value = "DeviceEncryption",
+ description = "Details related device encryption.")
+public class DeviceEncryption extends AndroidOperation implements Serializable {
+
+ @ApiModelProperty(name = "encrypted", value = "Whether to enable encryption or not.", required = true)
+ private boolean encrypted;
+
+ public boolean isEncrypted() {
+ return encrypted;
+ }
+
+ public void setEncrypted(boolean encrypted) {
+ this.encrypted = encrypted;
+ }
+}
\ No newline at end of file
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/DeviceLock.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/DeviceLock.java
new file mode 100644
index 000000000..e76ff6f1a
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/DeviceLock.java
@@ -0,0 +1,49 @@
+/*
+ * 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.mdm.services.android.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+@ApiModel(value = "DeviceLock",
+ description = "This class carries all information related to device lock operation.")
+public class DeviceLock extends AndroidOperation implements Serializable {
+
+ @ApiModelProperty(name = "message", value = "Pop up message of the lock operation.", required = false)
+ private String message;
+ @ApiModelProperty(name = "isHardLockEnabled", value = "Hard lock enable status of the Device", required = true)
+ private boolean isHardLockEnabled;
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public boolean isHardLockEnabled() {
+ return isHardLockEnabled;
+ }
+
+ public void setHardLockEnabled(boolean hardLockEnabled) {
+ isHardLockEnabled = hardLockEnabled;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/DeviceState.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/DeviceState.java
new file mode 100644
index 000000000..fb23b0fcc
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/DeviceState.java
@@ -0,0 +1,92 @@
+/*
+ * 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.mdm.services.android.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+@XmlRootElement
+/**
+ * Store Device state event/data for androidDevice.
+ */
+@ApiModel(value = "DeviceState",
+ description = "This class carries all information related to device state.")
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class DeviceState {
+
+ @XmlElementWrapper(required = true, name = "values")
+ @ApiModelProperty(name = "values", value = "Device and its statuses.", required = true)
+ private Map values;
+
+ /** The id. */
+ @XmlElement(required = false, name = "id")
+ @ApiModelProperty(name = "id", value = "Identification code.", required = true)
+ private String id;
+
+ /**
+ * Gets the values.
+ * @return the values
+ */
+ public Map getValues() {
+ return values;
+ }
+
+ /**
+ * Sets the values.
+ * @param values the values
+ */
+ public void setValues(Map values) {
+ this.values = values;
+ }
+
+ /**
+ * Sets the id.
+ * @param id the new id
+ */
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ * Gets the id.
+ * @return the id
+ */
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public String toString(){
+ List valueList = new ArrayList();
+ for (Map.Entry entry : values.entrySet()) {
+ valueList.add(entry.getKey() + ":" + entry.getValue());
+ }
+ return valueList.toString();
+
+ }
+
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/Disenrollment.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/Disenrollment.java
new file mode 100644
index 000000000..c591d2ae0
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/Disenrollment.java
@@ -0,0 +1,40 @@
+/*
+ * 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.mdm.services.android.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
+import java.io.Serializable;
+
+@ApiModel(value = "Disenrollment",
+ description = "Details related to disenrolling a device.")
+public class Disenrollment extends AndroidOperation implements Serializable {
+
+ @ApiModelProperty(name = "enabled", value = "Whether to enable disenrollment or not.", required = true)
+ private boolean enabled;
+
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/ErrorListItem.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/ErrorListItem.java
new file mode 100644
index 000000000..1e48b0183
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/ErrorListItem.java
@@ -0,0 +1,77 @@
+/*
+ * 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.mdm.services.android.bean;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.NotNull;
+
+@ApiModel(description = "")
+public class ErrorListItem {
+
+ @NotNull
+ private String code = null;
+ @NotNull
+ private String message = null;
+
+ @ApiModelProperty(required = true, value = "")
+ @JsonProperty("code")
+ public String getCode() {
+ return code;
+ }
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ public ErrorListItem() {}
+
+ public ErrorListItem(String code, String msg) {
+ this.code = code;
+ this.message = msg;
+ }
+
+
+ /**
+ * Description about individual errors occurred
+ **/
+ @ApiModelProperty(required = true, value = "Description about individual errors occurred")
+ @JsonProperty("message")
+ public String getMessage() {
+ return message;
+ }
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("errorItem {\n");
+
+ sb.append(" code: ").append(code).append("\n");
+ sb.append(" message: ").append(message).append("\n");
+ sb.append("}\n");
+ return sb.toString();
+ }
+
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/ErrorResponse.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/ErrorResponse.java
new file mode 100644
index 000000000..457782ade
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/ErrorResponse.java
@@ -0,0 +1,190 @@
+/*
+ * 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.mdm.services.android.bean;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@ApiModel(description = "")
+public class ErrorResponse {
+
+ private Long code = null;
+ private String message = null;
+ private String description = null;
+ private String moreInfo = null;
+ private List errorItems = new ArrayList<>();
+
+ @JsonProperty(value = "code")
+ @ApiModelProperty(required = true, value = "")
+ public Long getCode() {
+ return code;
+ }
+
+ public void setCode(Long code) {
+ this.code = code;
+ }
+
+ @JsonProperty(value = "message")
+ @ApiModelProperty(required = true, value = "ErrorResponse message.")
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ @JsonProperty(value = "description")
+ @ApiModelProperty(value = "A detail description about the error message.")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @JsonProperty(value = "moreInfo")
+ @ApiModelProperty(value = "Preferably an url with more details about the error.")
+ public String getMoreInfo() {
+ return moreInfo;
+ }
+
+ public void setMoreInfo(String moreInfo) {
+ this.moreInfo = moreInfo;
+ }
+
+ public void addErrorListItem(ErrorListItem item) {
+ this.errorItems.add(item);
+ }
+
+ /**
+ * If there are more than one error list them out. \nFor example, list out validation errors by each field.
+ */
+ @JsonProperty(value = "errorItems")
+ @ApiModelProperty(value = "If there are more than one error list them out. \n" +
+ "For example, list out validation errors by each field.")
+ public List getErrorItems() {
+ return errorItems;
+ }
+
+ public void setErrorItems(List error) {
+ this.errorItems = error;
+ }
+
+ @Override
+ public String toString() {
+// StringBuilder sb = new StringBuilder();
+// sb.append("{");
+// boolean cont = false;
+// if (code != null) {
+// cont = true;
+// sb.append(" \"code\": ").append(code);
+// }
+// if (message != null) {
+// if (cont) {
+// sb.append(",");
+// }
+// cont = true;
+// sb.append(" \"message\": \"").append(message).append("\"");
+// }
+// if (description != null) {
+// if (cont) {
+// sb.append(",");
+// }
+// cont = true;
+// sb.append(" \"description\": ").append(description).append("\"");
+// }
+// if (moreInfo != null) {
+// if (cont) {
+// sb.append(",");
+// }
+// cont = true;
+// sb.append(" \"moreInfo\": \"").append(moreInfo).append("\"");
+// }
+// if (error != null && error.size() > 0) {
+// if (cont) {
+// sb.append(",");
+// }
+// sb.append(" \"errorItems\": ").append(error);
+// }
+// sb.append("}");
+// return sb.toString();
+ return null;
+ }
+
+ public static class ErrorResponseBuilder {
+
+ private Long code = null;
+ private String message = null;
+ private String description = null;
+ private String moreInfo = null;
+ private List error;
+
+
+ public ErrorResponseBuilder() {
+ this.error = new ArrayList<>();
+ }
+
+ public ErrorResponseBuilder setCode(long code) {
+ this.code = code;
+ return this;
+ }
+
+ public ErrorResponseBuilder setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ public ErrorResponseBuilder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public ErrorResponseBuilder setMoreInfo(String moreInfo) {
+ this.moreInfo = moreInfo;
+ return this;
+ }
+
+ public ErrorResponseBuilder addErrorItem(String code, String msg) {
+ ErrorListItem item = new ErrorListItem();
+ item.setCode(code);
+ item.setMessage(msg);
+ this.error.add(item);
+ return this;
+ }
+
+ public ErrorResponse build() {
+ ErrorResponse errorResponse = new ErrorResponse();
+ errorResponse.setCode(code);
+ errorResponse.setMessage(message);
+ errorResponse.setErrorItems(error);
+ errorResponse.setDescription(description);
+ errorResponse.setMoreInfo(moreInfo);
+ return errorResponse;
+ }
+ }
+
+}
+
+
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/FileTransfer.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/FileTransfer.java
new file mode 100644
index 000000000..2e8af23a7
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/FileTransfer.java
@@ -0,0 +1,76 @@
+/*
+* 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.mdm.services.android.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.mdm.services.android.bean.AndroidOperation;
+
+import java.io.Serializable;
+
+/**
+ * This class represents the information of file transfer operation payload.
+ */
+@ApiModel(value = "FileTransfer",
+ description = "This class carries all information related to file transfer operation.")
+public class FileTransfer extends AndroidOperation implements Serializable {
+
+ @ApiModelProperty(name = "fileURL", value = "File URL", required = true)
+ private String fileURL;
+
+ @ApiModelProperty(name = "userName", value = "User Name", required = true)
+ private String userName;
+
+ @ApiModelProperty(name = "ftpPassword", value = "FTP password", required = true)
+ private String ftpPassword;
+
+ @ApiModelProperty(name = "fileLocation", value = "fileLocation", required = true)
+ private String fileLocation;
+
+ public String getFileURL() {
+ return fileURL;
+ }
+
+ public void setFileURL(String fileURL) {
+ this.fileURL = fileURL;
+ }
+
+ public String getFtpPassword() {
+ return ftpPassword;
+ }
+
+ public void setFtpPassword(String ftpPassword) {
+ this.ftpPassword = ftpPassword;
+ }
+
+ public String getFileLocation() {
+ return fileLocation;
+ }
+
+ public void setFileLocation(String fileLocation) {
+ this.fileLocation = fileLocation;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/LockCode.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/LockCode.java
new file mode 100644
index 000000000..4c2764dad
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/LockCode.java
@@ -0,0 +1,43 @@
+/*
+ * 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.mdm.services.android.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * This class represents the information of changing lock code operation.
+ */
+@ApiModel(value = "LockCode",
+ description = "Details related to lock code sent on device.")
+public class LockCode extends AndroidOperation implements Serializable {
+
+ @ApiModelProperty(name = "lockCode", value = "The lock code to be sent to the device.", required = true)
+ private String lockCode;
+
+ public String getLockCode() {
+ return lockCode;
+ }
+
+ public void setLockCode(String lockCode) {
+ this.lockCode = lockCode;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/Notification.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/Notification.java
new file mode 100644
index 000000000..7cc4d4627
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/Notification.java
@@ -0,0 +1,54 @@
+/*
+ * 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.mdm.services.android.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * This class represents the information of sending notification operation.
+ */
+@ApiModel(value = "Notification",
+ description = "Details related to notifications passed to device.")
+public class Notification extends AndroidOperation implements Serializable {
+
+ @ApiModelProperty(name = "messageText", value = "The message text to be sent to the device.", required = true)
+ private String messageText;
+
+ @ApiModelProperty(name = "messageTitle", value = "The message title to be sent to the device.", required = true)
+ private String messageTitle;
+
+ public String getMessageText() {
+ return messageText;
+ }
+
+ public void setMessageText(String messageText) {
+ this.messageText = messageText;
+ }
+
+ public String getMessageTitle() {
+ return messageTitle;
+ }
+
+ public void setMessageTitle(String messageTitle) {
+ this.messageTitle = messageTitle;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/PasscodePolicy.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/PasscodePolicy.java
new file mode 100644
index 000000000..c2e48ce70
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/PasscodePolicy.java
@@ -0,0 +1,121 @@
+/*
+ * 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.mdm.services.android.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.Max;
+import java.io.Serializable;
+
+/**
+ * This class represents the information of setting up password policy.
+ */
+@ApiModel(value = "PasscodePolicy", description = "This class represents the information of setting up "
+ + "password policy")
+public class PasscodePolicy extends AndroidOperation implements Serializable {
+
+ @ApiModelProperty(name = "maxFailedAttempts", value = "The maximum number of times the end-user can enter"
+ + " his/her device passcode incorrectly. EMM will take different courses of action based on the"
+ + " OS when the failed attempts exceed the maximum failed attempts. Android devices will be "
+ + "automatically reset to the original factory settings", required = true)
+
+ @Max(10)
+ private int maxFailedAttempts;
+ @ApiModelProperty(name = "minLength", value = "The minimum number of alphanumerical values that the "
+ + "end-user can enter as his/her passcode", required = true)
+ @Max(15)
+ private int minLength;
+ @ApiModelProperty(name = "pinHistory", value = "The end-user will not be allowed to reuse a passcode that"
+ + " he/she previously entered until he/she exceeds the set pin history length", required = true)
+ @Max(50)
+ private int pinHistory;
+ @ApiModelProperty(name = "minComplexChars", value = "The minimum number of special characters that the "
+ + "end-user will have to enter in his/her passcode", required = true)
+ @Max(5)
+ private int minComplexChars;
+ @ApiModelProperty(name = "maxPINAgeInDays", value = "The number of days after which the device owner has"
+ + " to change his/her passcode", required = true)
+ @Max(730)
+ private int maxPINAgeInDays;
+ @ApiModelProperty(name = "requireAlphanumeric", value = "Whether or not it is mandatory for the end-user"
+ + " to have a mix of digits and characters in his/her passcode", required = true)
+ private boolean requireAlphanumeric;
+ @ApiModelProperty(name = "allowSimple", value = "If this field is set to 'true', the device owner will be"
+ + " able to have a simple passcode and the following criteria in the passcode policy will not be"
+ + " applicable:\n"
+ + "Minimum length\n" + "Minimum complex characters", required = true)
+ private boolean allowSimple;
+
+ public int getMaxFailedAttempts() {
+ return maxFailedAttempts;
+ }
+
+ public void setMaxFailedAttempts(int maxFailedAttempts) {
+ this.maxFailedAttempts = maxFailedAttempts;
+ }
+
+ public int getMinLength() {
+ return minLength;
+ }
+
+ public void setMinLength(int minLength) {
+ this.minLength = minLength;
+ }
+
+ public int getPinHistory() {
+ return pinHistory;
+ }
+
+ public void setPinHistory(int pinHistory) {
+ this.pinHistory = pinHistory;
+ }
+
+ public int getMinComplexChars() {
+ return minComplexChars;
+ }
+
+ public void setMinComplexChars(int minComplexChars) {
+ this.minComplexChars = minComplexChars;
+ }
+
+ public int getMaxPINAgeInDays() {
+ return maxPINAgeInDays;
+ }
+
+ public void setMaxPINAgeInDays(int maxPINAgeInDays) {
+ this.maxPINAgeInDays = maxPINAgeInDays;
+ }
+
+ public boolean isRequireAlphanumeric() {
+ return requireAlphanumeric;
+ }
+
+ public void setRequireAlphanumeric(boolean requireAlphanumeric) {
+ this.requireAlphanumeric = requireAlphanumeric;
+ }
+
+ public boolean isAllowSimple() {
+ return allowSimple;
+ }
+
+ public void setAllowSimple(boolean allowSimple) {
+ this.allowSimple = allowSimple;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/UpgradeFirmware.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/UpgradeFirmware.java
new file mode 100644
index 000000000..748ee0e59
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/UpgradeFirmware.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2015, 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.mdm.services.android.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * This class represents the information of sending Upgrade Firmware operation.
+ */
+@ApiModel(value = "UpgradeFirmware",
+ description = "This class carries all information related to UpgradeFirmware.")
+public class UpgradeFirmware extends AndroidOperation implements Serializable {
+
+ @ApiModelProperty(name = "schedule", value = "Schedule of the UpgradeFirmware.")
+ private String schedule;
+
+ @ApiModelProperty(name = "server", value = "Firmware package server.")
+ private String server;
+
+ @SuppressWarnings("unused")
+ public String getSchedule() {
+ return schedule;
+ }
+
+ @SuppressWarnings("unused")
+ public void setSchedule(String schedule) {
+ this.schedule = schedule;
+ }
+
+ @SuppressWarnings("unused")
+ public String getServer() {
+ return server;
+ }
+
+ @SuppressWarnings("unused")
+ public void setServer(String server) {
+ this.server = server;
+ }
+
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/Vpn.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/Vpn.java
new file mode 100644
index 000000000..188d44f8f
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/Vpn.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2015, 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.mdm.services.android.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * This class represents the information of configuring VPN operation.
+ */
+@ApiModel(value = "Vpn",
+ description = "This class carries all information related to VPN.")
+public class Vpn extends AndroidOperation implements Serializable {
+ @ApiModelProperty(name = "serverAddress", value = "Server Address.", required = true)
+ private String serverAddress;
+ @ApiModelProperty(name = "serverPort", value = "Server Port.", required = true)
+ private String serverPort;
+ @ApiModelProperty(name = "sharedSecret", value = "Shared secret.", required = true)
+ private String sharedSecret;
+ @ApiModelProperty(name = "dnsServer", value = "DNS server.", required = true)
+ private String dnsServer;
+
+ public String getServerAddress() {
+ return serverAddress;
+ }
+
+ public void setServerAddress(String serverAddress) {
+ this.serverAddress = serverAddress;
+ }
+
+ public String getServerPort() {
+ return serverPort;
+ }
+
+ public void setServerPort(String serverPort) {
+ this.serverPort = serverPort;
+ }
+
+ public String getSharedSecret() {
+ return sharedSecret;
+ }
+
+ public void setSharedSecret(String sharedSecret) {
+ this.sharedSecret = sharedSecret;
+ }
+
+ public String getDnsServer() {
+ return dnsServer;
+ }
+
+ public void setDnsServer(String dnsServer) {
+ this.dnsServer = dnsServer;
+ }
+
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/WebClip.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/WebClip.java
new file mode 100644
index 000000000..cf39b1070
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/WebClip.java
@@ -0,0 +1,64 @@
+/*
+ * 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.mdm.services.android.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * This class represents the information of setting up webclip.
+ */
+@ApiModel(value = "WebClip", description = "This class represents the information of setting up webclip")
+public class WebClip extends AndroidOperation implements Serializable {
+
+ @ApiModelProperty(name = "identity", value = "The URL of the application", required = true)
+ private String identity;
+ @ApiModelProperty(name = "title", value = "The name of the web application", required = true)
+ private String title;
+ @ApiModelProperty(name = "type", value = "The type of the operation. Following are the possible operation"
+ + " types: install and uninstall. If the operation type is install, the web clip is added, and "
+ + "if the operation type is uninstall, the existing web clip is removed", required = true)
+ private String type;
+
+ public String getIdentity() {
+ return identity;
+ }
+
+ public void setIdentity(String identity) {
+ this.identity = identity;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/Wifi.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/Wifi.java
new file mode 100644
index 000000000..8cdf3c58b
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/Wifi.java
@@ -0,0 +1,54 @@
+/*
+ * 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.mdm.services.android.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * This class represents the information of configuring wifi operation.
+ */
+@ApiModel(value = "Wifi", description = "This class represents the information of configuring wifi operation")
+public class Wifi extends AndroidOperation implements Serializable {
+
+ @ApiModelProperty(name = "ssid", value = "The name of the Wifi network that you wish to configure",
+ required = true)
+ private String ssid;
+ @ApiModelProperty(name = "password", value = "The password to connect to the specified Wifi network",
+ required = true)
+ private String password;
+
+ public String getSsid() {
+ return ssid;
+ }
+
+ public void setSsid(String ssid) {
+ this.ssid = ssid;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/WipeData.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/WipeData.java
new file mode 100644
index 000000000..83efddc12
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/WipeData.java
@@ -0,0 +1,42 @@
+/*
+ * 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.mdm.services.android.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * This class represents the information of wipedata operation.
+ */
+@ApiModel(value = "WipeData", description = "This class represents the information of wipedata operation")
+public class WipeData extends AndroidOperation implements Serializable {
+
+ @ApiModelProperty(name = "pin", value = "PIN number to proceed with the data wipe", required = true)
+ private String pin;
+
+ public String getPin() {
+ return pin;
+ }
+
+ public void setPin(String pin) {
+ this.pin = pin;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/AndroidApplication.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/AndroidApplication.java
new file mode 100644
index 000000000..8dee1a60d
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/AndroidApplication.java
@@ -0,0 +1,206 @@
+package org.wso2.carbon.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Properties;
+
+@ApiModel(
+ value = "Application",
+ description = "This class carries all information related application"
+)
+public class AndroidApplication implements Serializable{
+ private static final long serialVersionUID = 1998101711L;
+ @ApiModelProperty(
+ name = "id",
+ value = "The ID given to the application when it is stored in the EMM database",
+ required = true
+ )
+ private int id;
+ @ApiModelProperty(
+ name = "platform",
+ value = "The mobile device platform. It can be android, ios or windows",
+ required = true
+ )
+ private String platform;
+ @ApiModelProperty(
+ name = "category",
+ value = "The application category",
+ required = true
+ )
+ private String category;
+ @ApiModelProperty(
+ name = "name",
+ value = "The application\'s name",
+ required = true
+ )
+ private String name;
+ private String locationUrl;
+ @ApiModelProperty(
+ name = "imageUrl",
+ value = "The icon url of the application",
+ required = true
+ )
+ private String imageUrl;
+ @ApiModelProperty(
+ name = "version",
+ value = "The application\'s version",
+ required = true
+ )
+ private String version;
+ @ApiModelProperty(
+ name = "type",
+ value = "The application type",
+ required = true
+ )
+ private String type;
+ @ApiModelProperty(
+ name = "appProperties",
+ value = "The properties of the application",
+ required = true
+ )
+ private Properties appProperties;
+ @ApiModelProperty(
+ name = "applicationIdentifier",
+ value = "The application identifier",
+ required = true
+ )
+ private String applicationIdentifier;
+ @ApiModelProperty(
+ name = "memoryUsage",
+ value = "Amount of memory used by the application",
+ required = true
+ )
+ private int memoryUsage;
+ @ApiModelProperty(
+ name = "isActive",
+ value = "Is the application actively running",
+ required = true
+ )
+ private boolean isActive;
+
+ public AndroidApplication() {
+ }
+
+ public String getType() {
+ return this.type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public int getId() {
+ return this.id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public String getLocationUrl() {
+ return this.locationUrl;
+ }
+
+ public void setLocationUrl(String locationUrl) {
+ this.locationUrl = locationUrl;
+ }
+
+ public String getImageUrl() {
+ return this.imageUrl;
+ }
+
+ public void setImageUrl(String imageUrl) {
+ this.imageUrl = imageUrl;
+ }
+
+ public String getVersion() {
+ return this.version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getPlatform() {
+ return this.platform;
+ }
+
+ public void setPlatform(String platform) {
+ this.platform = platform;
+ }
+
+ public String getCategory() {
+ return this.category;
+ }
+
+ public void setCategory(String category) {
+ this.category = category;
+ }
+
+ public String getApplicationIdentifier() {
+ return this.applicationIdentifier;
+ }
+
+ public void setApplicationIdentifier(String applicationIdentifier) {
+ this.applicationIdentifier = applicationIdentifier;
+ }
+
+ public int getMemoryUsage() {
+ return this.memoryUsage;
+ }
+
+ public void setMemoryUsage(int memoryUsage) {
+ this.memoryUsage = memoryUsage;
+ }
+
+ public boolean equals(Object o) {
+ if(this == o) {
+ return true;
+ } else if(o != null && this.getClass() == o.getClass()) {
+ AndroidApplication that = (AndroidApplication)o;
+ if(this.applicationIdentifier != null) {
+ if(!this.applicationIdentifier.equals(that.applicationIdentifier)) {
+ return false;
+ }
+ } else if(that.applicationIdentifier != null) {
+ return false;
+ }
+
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public int hashCode() {
+ int result = this.id;
+ result = 31 * result + (this.applicationIdentifier != null?this.applicationIdentifier.hashCode():0);
+ return result;
+ }
+
+ public Properties getAppProperties() {
+ return this.appProperties;
+ }
+
+ public void setAppProperties(Properties appProperties) {
+ this.appProperties = appProperties;
+ }
+
+ public boolean isActive() {
+ return this.isActive;
+ }
+
+ public void setActive(boolean active) {
+ this.isActive = active;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/AndroidDevice.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/AndroidDevice.java
new file mode 100644
index 000000000..6c5fcec34
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/AndroidDevice.java
@@ -0,0 +1,201 @@
+/*
+ * 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.device.mgt.common.Device;
+import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
+import org.wso2.carbon.device.mgt.common.Feature;
+import org.wso2.carbon.device.mgt.common.app.mgt.Application;
+import org.wso2.carbon.device.mgt.common.device.details.DeviceInfo;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+import java.io.Serializable;
+import java.util.List;
+
+public class AndroidDevice implements Serializable {
+ private static final long serialVersionUID = 1998101711L;
+
+ @ApiModelProperty(
+ name = "name",
+ value = "The device name that can be set on the device by the device user.",
+ required = true
+ )
+ @Size(min = 2, max = 45)
+ private String name;
+ @ApiModelProperty(
+ name = "description",
+ value = "Additional information on the device.",
+ required = true
+ )
+ private String description;
+ @ApiModelProperty(
+ name = "deviceIdentifier",
+ value = "This is a 64-bit number (as a hex string) that is randomly generated when the user first sets up the device and should remain constant for the lifetime of the user\'s device. The value may change if a factory reset is performed on the device.",
+ required = true
+ )
+ @NotNull
+ @Size(min = 2, max = 45)
+ private String deviceIdentifier;
+ @ApiModelProperty(
+ name = "enrolmentInfo",
+ value = "This defines the device registration related information. It is mandatory to define this information.",
+ required = true
+ )
+ private EnrolmentInfo enrolmentInfo;
+ @ApiModelProperty(
+ name = "features",
+ value = "List of features.",
+ required = true
+ )
+ private List features;
+ private List properties;
+ @ApiModelProperty(
+ name = "advanceInfo",
+ value = "This defines the device registration related information. It is mandatory to define this information.",
+ required = false
+ )
+ private DeviceInfo deviceInfo;
+ @ApiModelProperty(
+ name = "applications",
+ value = "This represents the application list installed into the device",
+ required = false
+ )
+ private List applications;
+
+ public AndroidDevice() {
+ }
+
+ public AndroidDevice(String name, String description, String deviceId, EnrolmentInfo enrolmentInfo, List features, List properties) {
+ this.name = name;
+ this.description = description;
+ this.deviceIdentifier = deviceId;
+ this.enrolmentInfo = enrolmentInfo;
+ this.features = features;
+ this.properties = properties;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getDeviceIdentifier() {
+ return this.deviceIdentifier;
+ }
+
+ public void setDeviceIdentifier(String deviceIdentifier) {
+ this.deviceIdentifier = deviceIdentifier;
+ }
+
+ public EnrolmentInfo getEnrolmentInfo() {
+ return this.enrolmentInfo;
+ }
+
+ public void setEnrolmentInfo(EnrolmentInfo enrolmentInfo) {
+ this.enrolmentInfo = enrolmentInfo;
+ }
+
+ public List getFeatures() {
+ return this.features;
+ }
+
+ public void setFeatures(List features) {
+ this.features = features;
+ }
+
+ public List getProperties() {
+ return this.properties;
+ }
+
+ public void setProperties(List properties) {
+ this.properties = properties;
+ }
+
+ public DeviceInfo getDeviceInfo() {
+ return this.deviceInfo;
+ }
+
+ public void setDeviceInfo(DeviceInfo deviceInfo) {
+ this.deviceInfo = deviceInfo;
+ }
+
+ public List getApplications() {
+ return this.applications;
+ }
+
+ public void setApplications(List applications) {
+ this.applications = applications;
+ }
+
+ public String toString() {
+ return "device [name=" + this.name + ";" + ";" + "description=" + this.description + ";" + "identifier=" + this.deviceIdentifier + ";" + "]";
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ } else if (!(o instanceof AndroidDevice)) {
+ return false;
+ } else {
+ AndroidDevice device = (AndroidDevice) o;
+ return this.getDeviceIdentifier().equals(device.getDeviceIdentifier());
+ }
+ }
+
+ public int hashCode() {
+ return this.getDeviceIdentifier().hashCode();
+ }
+
+ public static class Property {
+ private String name;
+ private String value;
+
+ public Property() {
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getValue() {
+ return this.value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/AndroidDeviceInfo.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/AndroidDeviceInfo.java
new file mode 100644
index 000000000..41fbb5857
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/AndroidDeviceInfo.java
@@ -0,0 +1,321 @@
+package org.wso2.carbon.mdm.services.android.bean.wrapper;
+
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.device.mgt.common.device.details.DeviceInfo;
+import org.wso2.carbon.device.mgt.common.device.details.DeviceLocation;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+@ApiModel(
+ value = "DeviceInfo",
+ description = "This class carries all information related to the device information provided by a device."
+)
+public class AndroidDeviceInfo extends DeviceInfo implements Serializable {
+ private static final long serialVersionUID = 1998101733L;
+ @ApiModelProperty(
+ name = "IMEI",
+ value = "IMEI number of the device.",
+ required = true
+ )
+ private String IMEI;
+ @ApiModelProperty(
+ name = "IMSI",
+ value = "IMSI number of the device.",
+ required = true
+ )
+ private String IMSI;
+ @ApiModelProperty(
+ name = "deviceModel",
+ value = "Model of the device.",
+ required = true
+ )
+ private String deviceModel;
+ @ApiModelProperty(
+ name = "vendor",
+ value = "Vendor of the device.",
+ required = true
+ )
+ private String vendor;
+ @ApiModelProperty(
+ name = "osVersion",
+ value = "Operating system version.",
+ required = true
+ )
+ private String osVersion;
+ @ApiModelProperty(
+ name = "batteryLevel",
+ value = "Battery level of the device.",
+ required = true
+ )
+ private Double batteryLevel;
+ @ApiModelProperty(
+ name = "internalTotalMemory",
+ value = "Total internal memory of the device.",
+ required = true
+ )
+ private Double internalTotalMemory;
+ @ApiModelProperty(
+ name = "internalAvailableMemory",
+ value = "Total available memory of the device.",
+ required = true
+ )
+ private Double internalAvailableMemory;
+ @ApiModelProperty(
+ name = "externalTotalMemory",
+ value = "Total external memory of the device.",
+ required = true
+ )
+ private Double externalTotalMemory;
+ @ApiModelProperty(
+ name = "externalAvailableMemory",
+ value = "Total external memory avilable of the device.",
+ required = true
+ )
+ private Double externalAvailableMemory;
+ @ApiModelProperty(
+ name = "operator",
+ value = "Mobile operator of the device.",
+ required = true
+ )
+ private String operator;
+ @ApiModelProperty(
+ name = "connectionType",
+ value = "How the device is connected to the network.",
+ required = true
+ )
+ private String connectionType;
+ @ApiModelProperty(
+ name = "mobileSignalStrength",
+ value = "Current mobile signal strength.",
+ required = true
+ )
+ private Double mobileSignalStrength;
+ @ApiModelProperty(
+ name = "ssid",
+ value = "ssid of the connected WiFi.",
+ required = true
+ )
+ private String ssid;
+ @ApiModelProperty(
+ name = "cpuUsage",
+ value = "Current total cpu usage.",
+ required = true
+ )
+ private Double cpuUsage;
+ @ApiModelProperty(
+ name = "totalRAMMemory",
+ value = "Total Ram memory size.",
+ required = true
+ )
+ private Double totalRAMMemory;
+ @ApiModelProperty(
+ name = "availableRAMMemory",
+ value = "Available total memory of RAM.",
+ required = true
+ )
+ private Double availableRAMMemory;
+ @ApiModelProperty(
+ name = "pluggedIn",
+ value = "Whether the device is plugged into power or not.",
+ required = true
+ )
+ private boolean pluggedIn;
+ @ApiModelProperty(
+ name = "updatedTime",
+ value = "Device updated time.",
+ required = true
+ )
+ private Date updatedTime;
+ @ApiModelProperty(
+ name = "location",
+ value = "Last updated location of the device",
+ required = false
+ )
+ private DeviceLocation location;
+ @ApiModelProperty(
+ name = "deviceDetailsMap",
+ value = ".",
+ required = true
+ )
+ private Map deviceDetailsMap = new HashMap();
+
+ public AndroidDeviceInfo() {
+ }
+
+ public DeviceLocation getLocation() {
+ return this.location;
+ }
+
+ public void setLocation(DeviceLocation location) {
+ this.location = location;
+ }
+
+ public String getIMEI() {
+ return this.IMEI != null?this.IMEI:"";
+ }
+
+ public void setIMEI(String IMEI) {
+ this.IMEI = IMEI;
+ }
+
+ public String getIMSI() {
+ return this.IMSI != null?this.IMSI:"";
+ }
+
+ public void setIMSI(String IMSI) {
+ this.IMSI = IMSI;
+ }
+
+ public String getDeviceModel() {
+ return this.deviceModel != null?this.deviceModel:"";
+ }
+
+ public void setDeviceModel(String deviceModel) {
+ this.deviceModel = deviceModel;
+ }
+
+ public String getVendor() {
+ return this.vendor != null?this.vendor:"";
+ }
+
+ public void setVendor(String vendor) {
+ this.vendor = vendor;
+ }
+
+ public String getOsVersion() {
+ return this.osVersion != null?this.osVersion:"";
+ }
+
+ public void setOsVersion(String osVersion) {
+ this.osVersion = osVersion;
+ }
+
+ public Double getBatteryLevel() {
+ return this.batteryLevel != null?this.batteryLevel:Double.valueOf(0.0D);
+ }
+
+ public void setBatteryLevel(Double batteryLevel) {
+ this.batteryLevel = batteryLevel;
+ }
+
+ public Double getInternalTotalMemory() {
+ return this.internalTotalMemory != null?this.internalTotalMemory:Double.valueOf(0.0D);
+ }
+
+ public void setInternalTotalMemory(Double internalTotalMemory) {
+ this.internalTotalMemory = internalTotalMemory;
+ }
+
+ public Double getInternalAvailableMemory() {
+ return this.internalAvailableMemory != null?this.internalAvailableMemory:Double.valueOf(0.0D);
+ }
+
+ public void setInternalAvailableMemory(Double internalAvailableMemory) {
+ this.internalAvailableMemory = internalAvailableMemory;
+ }
+
+ public Double getExternalTotalMemory() {
+ return this.externalTotalMemory != null?this.externalTotalMemory:Double.valueOf(0.0D);
+ }
+
+ public void setExternalTotalMemory(Double externalTotalMemory) {
+ this.externalTotalMemory = externalTotalMemory;
+ }
+
+ public Double getExternalAvailableMemory() {
+ return this.externalAvailableMemory != null?this.externalAvailableMemory:Double.valueOf(0.0D);
+ }
+
+ public void setExternalAvailableMemory(Double externalAvailableMemory) {
+ this.externalAvailableMemory = externalAvailableMemory;
+ }
+
+ public String getOperator() {
+ return this.operator != null?this.operator:"";
+ }
+
+ public void setOperator(String operator) {
+ this.operator = operator;
+ }
+
+ public String getConnectionType() {
+ return this.connectionType != null?this.connectionType:"";
+ }
+
+ public void setConnectionType(String connectionType) {
+ this.connectionType = connectionType;
+ }
+
+ public Double getMobileSignalStrength() {
+ return this.mobileSignalStrength != null?this.mobileSignalStrength:Double.valueOf(0.0D);
+ }
+
+ public void setMobileSignalStrength(Double mobileSignalStrength) {
+ this.mobileSignalStrength = mobileSignalStrength;
+ }
+
+ public String getSsid() {
+ return this.ssid != null?this.ssid:"";
+ }
+
+ public void setSsid(String ssid) {
+ this.ssid = ssid;
+ }
+
+ public Double getCpuUsage() {
+ return this.cpuUsage != null?this.cpuUsage:Double.valueOf(0.0D);
+ }
+
+ public void setCpuUsage(Double cpuUsage) {
+ this.cpuUsage = cpuUsage;
+ }
+
+ public Double getTotalRAMMemory() {
+ return this.totalRAMMemory != null?this.totalRAMMemory:Double.valueOf(0.0D);
+ }
+
+ public void setTotalRAMMemory(Double totalRAMMemory) {
+ this.totalRAMMemory = totalRAMMemory;
+ }
+
+ public Double getAvailableRAMMemory() {
+ return this.availableRAMMemory != null?this.availableRAMMemory:Double.valueOf(0.0D);
+ }
+
+ public void setAvailableRAMMemory(Double availableRAMMemory) {
+ this.availableRAMMemory = availableRAMMemory;
+ }
+
+ public boolean isPluggedIn() {
+ return this.pluggedIn;
+ }
+
+ public void setPluggedIn(boolean pluggedIn) {
+ this.pluggedIn = pluggedIn;
+ }
+
+ public Date getUpdatedTime() {
+ if(this.updatedTime == null) {
+ this.updatedTime = new Date();
+ }
+
+ return this.updatedTime;
+ }
+
+ public void setUpdatedTime(Date updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ public void setDeviceDetailsMap(Map deviceDetailsMap) {
+ this.deviceDetailsMap = deviceDetailsMap;
+ }
+
+ public Map getDeviceDetailsMap() {
+ return this.deviceDetailsMap;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/AppRestrictionBeanWrapper.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/AppRestrictionBeanWrapper.java
new file mode 100644
index 000000000..64412336e
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/AppRestrictionBeanWrapper.java
@@ -0,0 +1,53 @@
+/*
+ * 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.mdm.services.android.bean.AppRestriction;
+
+import java.util.List;
+
+/**
+ * This class is used to wrap AppRestriction bean with devices
+ */
+@ApiModel(value = "AppRestrictionBeanWrapper",
+ description = "Application Restriction related information.")
+public class AppRestrictionBeanWrapper {
+
+ @ApiModelProperty(name = "operation", value = "AppRestriction related information.", required = true)
+ private AppRestriction operation;
+ @ApiModelProperty(name = "deviceIDs", value = "Device id list of the operation to be executed.", required = true)
+ private List deviceIDs;
+
+ public AppRestriction getOperation() {
+ return operation;
+ }
+
+ public void setOperation(AppRestriction operation) {
+ this.operation = operation;
+ }
+
+ public List getDeviceIDs() {
+ return deviceIDs;
+ }
+
+ public void setDeviceIDs(List deviceIDs) {
+ this.deviceIDs = deviceIDs;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/ApplicationInstallationBeanWrapper.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/ApplicationInstallationBeanWrapper.java
new file mode 100644
index 000000000..b0bd54cf3
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/ApplicationInstallationBeanWrapper.java
@@ -0,0 +1,54 @@
+/*
+ * 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.mdm.services.android.bean.ApplicationInstallation;
+
+import java.util.List;
+
+/**
+ * This class is used to wrap the InstallApplication bean with devices.
+ */
+
+@ApiModel(value = "ApplicationInstallationBeanWrapper",
+ description = "This class carries all information related to a InstallApplication")
+public class ApplicationInstallationBeanWrapper {
+
+ @ApiModelProperty(name = "deviceIDs", value = "List of Devices", required = true)
+ private List deviceIDs;
+ @ApiModelProperty(name = "operation", value = "App Installation property", required = true)
+ private ApplicationInstallation operation;
+
+ public List getDeviceIDs() {
+ return deviceIDs;
+ }
+
+ public void setDeviceIDs(List deviceIDs) {
+ this.deviceIDs = deviceIDs;
+ }
+
+ public ApplicationInstallation getOperation() {
+ return operation;
+ }
+
+ public void setOperation(ApplicationInstallation operation) {
+ this.operation = operation;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/ApplicationUninstallationBeanWrapper.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/ApplicationUninstallationBeanWrapper.java
new file mode 100644
index 000000000..28c72c6cd
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/ApplicationUninstallationBeanWrapper.java
@@ -0,0 +1,54 @@
+/*
+ * 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.mdm.services.android.bean.ApplicationUninstallation;
+
+import java.util.List;
+
+/**
+ * This class is used to wrap the UninstallApplication bean with devices.
+ */
+@ApiModel(value = "ApplicationUninstallationBeanWrapper",
+ description = "This class carries all information related to Uninstall Application")
+public class ApplicationUninstallationBeanWrapper {
+
+ @ApiModelProperty(name = "deviceIDs", value = "List of device Ids", required = true)
+ private List deviceIDs;
+
+ @ApiModelProperty(name = "operation", value = "Name of the device", required = true)
+ private ApplicationUninstallation operation;
+
+ public List getDeviceIDs() {
+ return deviceIDs;
+ }
+
+ public void setDeviceIDs(List deviceIDs) {
+ this.deviceIDs = deviceIDs;
+ }
+
+ public ApplicationUninstallation getOperation() {
+ return operation;
+ }
+
+ public void setOperation(ApplicationUninstallation operation) {
+ this.operation = operation;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/ApplicationUpdateBeanWrapper.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/ApplicationUpdateBeanWrapper.java
new file mode 100644
index 000000000..b202bf883
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/ApplicationUpdateBeanWrapper.java
@@ -0,0 +1,53 @@
+/*
+ * 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.mdm.services.android.bean.ApplicationUpdate;
+
+import java.util.List;
+
+/**
+ * This class is used to wrap the UpdateApplication bean with devices.
+ */
+@ApiModel(value = "ApplicationUpdateBeanWrapper",
+ description = "Application Update related Info.")
+public class ApplicationUpdateBeanWrapper {
+
+ @ApiModelProperty(name = "deviceIDs", value = "Device id list of the operation to be executed.", required = true)
+ private List deviceIDs;
+ @ApiModelProperty(name = "operation", value = "Application Update related information.", required = true)
+ private ApplicationUpdate operation;
+
+ public List getDeviceIDs() {
+ return deviceIDs;
+ }
+
+ public void setDeviceIDs(List deviceIDs) {
+ this.deviceIDs = deviceIDs;
+ }
+
+ public ApplicationUpdate getOperation() {
+ return operation;
+ }
+
+ public void setOperation(ApplicationUpdate operation) {
+ this.operation = operation;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/BlacklistApplicationsBeanWrapper.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/BlacklistApplicationsBeanWrapper.java
new file mode 100644
index 000000000..32b107bf4
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/BlacklistApplicationsBeanWrapper.java
@@ -0,0 +1,54 @@
+/*
+ * 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.mdm.services.android.bean.BlacklistApplications;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * This class is used to wrap the BlacklistApplications bean with devices.
+ */
+@ApiModel(value = "BlacklistApplicationsBeanWrapper",
+ description = "Mapping between blacklist application and the device ids.")
+public class BlacklistApplicationsBeanWrapper {
+
+ @ApiModelProperty(name = "operation", value = "Blacklist applications information", required = true)
+ private @Valid BlacklistApplications operation;
+ @ApiModelProperty(name = "deviceIDs", value = "List of device Ids", required = true)
+ private List deviceIDs;
+
+ public @Valid BlacklistApplications getOperation() {
+ return operation;
+ }
+
+ public void setOperation(@Valid BlacklistApplications operation) {
+ this.operation = operation;
+ }
+
+ public List getDeviceIDs() {
+ return deviceIDs;
+ }
+
+ public void setDeviceIDs(List deviceIDs) {
+ this.deviceIDs = deviceIDs;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/CameraBeanWrapper.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/CameraBeanWrapper.java
new file mode 100644
index 000000000..9f9a014f2
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/CameraBeanWrapper.java
@@ -0,0 +1,54 @@
+/*
+ * 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.mdm.services.android.bean.Camera;
+
+import java.util.List;
+
+/**
+ * This class is used to wrap the Camera bean with devices.
+ */
+
+@ApiModel(value = "CameraBeanWrapper",
+ description = "Mapping between camera operation and device list to be applied.")
+public class CameraBeanWrapper {
+
+ @ApiModelProperty(name = "operation", value = "Information of camera operation", required = true)
+ private Camera operation;
+ @ApiModelProperty(name = "deviceIDs", value = "List of device Ids", required = true)
+ private List deviceIDs;
+
+ public Camera getOperation() {
+ return operation;
+ }
+
+ public void setOperation(Camera operation) {
+ this.operation = operation;
+ }
+
+ public List getDeviceIDs() {
+ return deviceIDs;
+ }
+
+ public void setDeviceIDs(List deviceIDs) {
+ this.deviceIDs = deviceIDs;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/DeviceEnrollmentInfo.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/DeviceEnrollmentInfo.java
new file mode 100644
index 000000000..b2f77cc31
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/DeviceEnrollmentInfo.java
@@ -0,0 +1,126 @@
+/*
+ * 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.device.mgt.common.Device;
+import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
+
+import java.io.Serializable;
+
+@ApiModel(value = "EnrolmentInfo", description = "This class carries all information related to a devices enrollment" +
+ " status.")
+public class DeviceEnrollmentInfo extends EnrolmentInfo implements Serializable {
+ private static final long serialVersionUID = 1998101712L;
+
+ @ApiModelProperty(name = "device", value = "Enrolled device.", required = true)
+ private Device device;
+ @ApiModelProperty(name = "dateOfEnrolment", value = "Date of the device enrollment.", required = true)
+ private Long dateOfEnrolment;
+ @ApiModelProperty(name = "dateOfLastUpdate", value = "Date of the device's last update.", required = true)
+ private Long dateOfLastUpdate;
+ @ApiModelProperty(name = "ownership", value = "Defines the ownership details. The ownership type can be any of the" +
+ " following values.\n" +
+ "BYOD - Bring your own device (BYOD).\n" +
+ "COPE - Corporate owned personally enabled (COPE).", required = true)
+ private OwnerShip ownership;
+ @ApiModelProperty(name = "status", value = "Current status of the device, such as whether the device " +
+ "is active, removed etc.", required = true)
+ private Status status;
+ @ApiModelProperty(name = "owner", value = "The device owner's name.", required = true)
+ private String owner;
+
+ public DeviceEnrollmentInfo() {
+ }
+
+ public DeviceEnrollmentInfo(Device device, String owner, OwnerShip ownership, Status status) {
+ this.device = device;
+ this.owner = owner;
+ this.ownership = ownership;
+ this.status = status;
+ }
+
+ public Long getDateOfEnrolment() {
+ return dateOfEnrolment;
+ }
+
+ public void setDateOfEnrolment(Long dateOfEnrolment) {
+ this.dateOfEnrolment = dateOfEnrolment;
+ }
+
+ public Long getDateOfLastUpdate() {
+ return dateOfLastUpdate;
+ }
+
+ public void setDateOfLastUpdate(Long dateOfLastUpdate) {
+ this.dateOfLastUpdate = dateOfLastUpdate;
+ }
+
+ public OwnerShip getOwnership() {
+ return ownership;
+ }
+
+ public void setOwnership(OwnerShip ownership) {
+ this.ownership = ownership;
+ }
+
+ public Status getStatus() {
+ return status;
+ }
+
+ public void setStatus(Status status) {
+ this.status = status;
+ }
+
+ public String getOwner() {
+ return owner;
+ }
+
+ public void setOwner(String owner) {
+ this.owner = owner;
+ }
+
+ public Device getDevice() {
+ return device;
+ }
+
+ public void setDevice(Device device) {
+ this.device = device;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof DeviceEnrollmentInfo) {
+ DeviceEnrollmentInfo tempInfo = (DeviceEnrollmentInfo) obj;
+ if (this.owner != null && this.ownership != null) {
+ if (this.owner.equals(tempInfo.getOwner()) && this.ownership.equals(tempInfo.getOwnership())) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return owner.hashCode() ^ ownership.hashCode();
+ }
+
+
+}
\ No newline at end of file
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/DeviceLockBeanWrapper.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/DeviceLockBeanWrapper.java
new file mode 100644
index 000000000..bd668faba
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/DeviceLockBeanWrapper.java
@@ -0,0 +1,55 @@
+/*
+ * 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.mdm.services.android.bean.DeviceLock;
+
+import java.util.List;
+
+/**
+ * This class is used to wrap the Notification bean with devices.
+ */
+@ApiModel(value = "DeviceLockBeanWrapper",
+ description = "DeviceLock related Information.")
+public class DeviceLockBeanWrapper {
+
+ @ApiModelProperty(name = "deviceIDs", value = "Device id list of the operation to be executed.", required = true)
+ private List deviceIDs;
+ @ApiModelProperty(name = "operation", value = "Information of the Device lock operation.", required = true)
+ private DeviceLock operation;
+
+ public List getDeviceIDs() {
+ return deviceIDs;
+ }
+
+ public void setDeviceIDs(List deviceIDs) {
+ this.deviceIDs = deviceIDs;
+ }
+
+ public DeviceLock getOperation() {
+ return operation;
+ }
+
+ public void setOperation(DeviceLock operation) {
+ this.operation = operation;
+ }
+
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/DisenrollmentBeanWrapper.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/DisenrollmentBeanWrapper.java
new file mode 100644
index 000000000..fdcab0120
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/DisenrollmentBeanWrapper.java
@@ -0,0 +1,50 @@
+/*
+ * 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.mdm.services.android.bean.Disenrollment;
+
+import java.util.List;
+
+@ApiModel(value = "DisenrollmentBeanWrapper", description = "Disenrollment details are mapped to devices list.")
+public class DisenrollmentBeanWrapper {
+
+ @ApiModelProperty(name = "operation", value = "Disenrollment operation.", required = true)
+ private Disenrollment operation;
+ @ApiModelProperty(name = "deviceIDs", value = "Device id list of the operation to be executed.", required = true)
+ private List deviceIDs;
+
+ public Disenrollment getOperation() {
+ return operation;
+ }
+
+ public void setOperation(Disenrollment operation) {
+ this.operation = operation;
+ }
+
+ public List getDeviceIDs() {
+ return deviceIDs;
+ }
+
+ public void setDeviceIDs(List deviceIDs) {
+ this.deviceIDs = deviceIDs;
+ }
+
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/EncryptionBeanWrapper.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/EncryptionBeanWrapper.java
new file mode 100644
index 000000000..aeb01400a
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/EncryptionBeanWrapper.java
@@ -0,0 +1,53 @@
+/*
+ * 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.mdm.services.android.bean.DeviceEncryption;
+
+import java.util.List;
+
+/**
+ * This class is used to wrap the Encrypt bean with devices.
+ */
+@ApiModel(value = "EncryptionBeanWrapper",
+ description = "Mapping between encryption operation and device list to be applied.")
+public class EncryptionBeanWrapper {
+
+ @ApiModelProperty(name = "operation", value = "The information of encrypt operation", required = true)
+ private DeviceEncryption operation;
+ @ApiModelProperty(name = "deviceIDs", value = "List of device Ids", required = true)
+ private List deviceIDs;
+
+ public DeviceEncryption getOperation() {
+ return operation;
+ }
+
+ public void setOperation(DeviceEncryption operation) {
+ this.operation = operation;
+ }
+
+ public List getDeviceIDs() {
+ return deviceIDs;
+ }
+
+ public void setDeviceIDs(List deviceIDs) {
+ this.deviceIDs = deviceIDs;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/EventBeanWrapper.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/EventBeanWrapper.java
new file mode 100644
index 000000000..c4fb13e07
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/EventBeanWrapper.java
@@ -0,0 +1,66 @@
+/*
+ * 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.Size;
+
+/**
+ * This class is used to wrap the events which receive from the agent application.
+ */
+@ApiModel(value = "EventBeanWrapper",
+ description = "Android agent's event related Information.")
+public class EventBeanWrapper {
+
+ @ApiModelProperty(name = "deviceIdentifier", value = "DeviceIdentifier to be need to retrieve/publish Event.", required = true)
+ @Size(min = 2, max = 45)
+ private String deviceIdentifier;
+ @ApiModelProperty(name = "payload", value = "Event payload.", required = true)
+ private String payload;
+ @ApiModelProperty(name = "type", value = "Type of the event.", required = true)
+ @Size(min = 2, max = 20)
+ private String type;
+
+ public String getPayload() {
+ return payload;
+ }
+
+ public void setPayload(String payload) {
+ this.payload = payload;
+ }
+
+ public String getDeviceIdentifier() {
+ return deviceIdentifier;
+ }
+
+ public void setDeviceIdentifier(String deviceIdentifier) {
+ this.deviceIdentifier = deviceIdentifier;
+ }
+
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/FileTransferBeanWrapper.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/FileTransferBeanWrapper.java
new file mode 100644
index 000000000..d34b00e66
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/FileTransferBeanWrapper.java
@@ -0,0 +1,66 @@
+/*
+* 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.mdm.services.android.bean.FileTransfer;
+
+import java.util.List;
+
+/**
+ * This class is used to wrap the File Transfer bean with devices.
+ */
+@ApiModel(value = "FileTransferBeanWrapper",
+ description = "FileTransfer related Information.")
+public class FileTransferBeanWrapper {
+
+ @ApiModelProperty(name = "deviceIDs", value = "Device id list of the operation to be executed.", required = true)
+ private List deviceIDs;
+
+ @ApiModelProperty(name = "upload", value = "Upload / Download w.r.t device.",
+ notes = "upload = true , If file is to be uploaded to the device.", required = true)
+ private boolean upload;
+
+ @ApiModelProperty(name = "operation", value = "Information of the File Transfer Operation.", required = true)
+ private FileTransfer operation;
+
+ public List getDeviceIDs() {
+ return deviceIDs;
+ }
+
+ public void setDeviceIDs(List deviceIDs) {
+ this.deviceIDs = deviceIDs;
+ }
+
+ public FileTransfer getOperation() {
+ return operation;
+ }
+
+ public void setOperation(FileTransfer operation) {
+ this.operation = operation;
+ }
+
+ public boolean isUpload() {
+ return upload;
+ }
+
+ public void setUpload(boolean upload) {
+ this.upload = upload;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/LockCodeBeanWrapper.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/LockCodeBeanWrapper.java
new file mode 100644
index 000000000..364fd39d2
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/LockCodeBeanWrapper.java
@@ -0,0 +1,54 @@
+/*
+ * 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.mdm.services.android.bean.LockCode;
+
+import java.util.List;
+
+/**
+ * This class is used to wrap the LockCode bean with devices.
+ */
+
+@ApiModel(value = "LockCodeBeanWrapper",
+ description = "Mapping between lock operation and device list to be applied.")
+public class LockCodeBeanWrapper {
+
+ @ApiModelProperty(name = "operation", value = "The information of device lock operation", required = true)
+ private LockCode operation;
+ @ApiModelProperty(name = "deviceIDs", value = "List of device Ids", required = true)
+ private List deviceIDs;
+
+ public LockCode getOperation() {
+ return operation;
+ }
+
+ public void setOperation(LockCode operation) {
+ this.operation = operation;
+ }
+
+ public List getDeviceIDs() {
+ return deviceIDs;
+ }
+
+ public void setDeviceIDs(List deviceIDs) {
+ this.deviceIDs = deviceIDs;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/NotificationBeanWrapper.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/NotificationBeanWrapper.java
new file mode 100644
index 000000000..eb82e49ee
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/NotificationBeanWrapper.java
@@ -0,0 +1,55 @@
+/*
+ * 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.mdm.services.android.bean.Notification;
+
+import java.util.List;
+
+/**
+ * This class is used to wrap the Notification bean with devices.
+ */
+
+@ApiModel(value = "NotificationBeanWrapper",
+ description = "Mapping between notification operation and device list to be applied.")
+public class NotificationBeanWrapper {
+
+ @ApiModelProperty(name = "deviceIDs", value = "List of device Ids", required = true)
+ private List deviceIDs;
+ @ApiModelProperty(name = "operation", value = "The information of notification operation", required = true)
+ private Notification operation;
+
+ public List getDeviceIDs() {
+ return deviceIDs;
+ }
+
+ public void setDeviceIDs(List deviceIDs) {
+ this.deviceIDs = deviceIDs;
+ }
+
+ public Notification getOperation() {
+ return operation;
+ }
+
+ public void setOperation(Notification operation) {
+ this.operation = operation;
+ }
+
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/PasswordPolicyBeanWrapper.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/PasswordPolicyBeanWrapper.java
new file mode 100644
index 000000000..e47ece1c5
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/PasswordPolicyBeanWrapper.java
@@ -0,0 +1,54 @@
+/*
+ * 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.mdm.services.android.bean.PasscodePolicy;
+
+import java.util.List;
+
+/**
+ * This class is used to wrap the PasswordPolicy bean with devices.
+ */
+
+@ApiModel(value = "PasswordPolicyBeanWrapper",
+ description = "Mapping between passcode policy and device list to be applied.")
+public class PasswordPolicyBeanWrapper {
+
+ @ApiModelProperty(name = "operation", value = "The information of setting up password policy", required = true)
+ private PasscodePolicy operation;
+ @ApiModelProperty(name = "deviceIDs", value = "List of device Ids", required = true)
+ private List deviceIDs;
+
+ public PasscodePolicy getOperation() {
+ return operation;
+ }
+
+ public void setOperation(PasscodePolicy operation) {
+ this.operation = operation;
+ }
+
+ public List getDeviceIDs() {
+ return deviceIDs;
+ }
+
+ public void setDeviceIDs(List deviceIDs) {
+ this.deviceIDs = deviceIDs;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/UpgradeFirmwareBeanWrapper.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/UpgradeFirmwareBeanWrapper.java
new file mode 100644
index 000000000..b881422c2
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/UpgradeFirmwareBeanWrapper.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2015, 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.mdm.services.android.bean.UpgradeFirmware;
+
+import java.util.List;
+
+/**
+ * This class is used to wrap the UpgradeFirmware bean with devices.
+ */
+@ApiModel(value = "UpgradeFirmwareBeanWrapper",
+ description = "Information related to UpgradeFirmware.")
+public class UpgradeFirmwareBeanWrapper {
+ @ApiModelProperty(name = "deviceIDs",
+ value = "List of device Ids to be need to execute UpgradeFirmware operation.", required = true)
+ private List deviceIDs;
+ @ApiModelProperty(name = "operation", value = "Information related to UpgradeFirmware operation.", required = true)
+ private UpgradeFirmware operation;
+
+ public List getDeviceIDs() {
+ return deviceIDs;
+ }
+
+ public void setDeviceIDs(List deviceIDs) {
+ this.deviceIDs = deviceIDs;
+ }
+
+ public UpgradeFirmware getOperation() {
+ return operation;
+ }
+
+ public void setOperation(UpgradeFirmware operation) {
+ this.operation = operation;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/VpnBeanWrapper.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/VpnBeanWrapper.java
new file mode 100644
index 000000000..e71270d22
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/VpnBeanWrapper.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2015, 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.mdm.services.android.bean.Vpn;
+
+import java.util.List;
+
+/**
+ * This class is used to wrap the Vpn bean with devices.
+ */
+@ApiModel(value = "VpnBeanWrapper",
+ description = "Information related to VPN Configuration.")
+public class VpnBeanWrapper {
+ @ApiModelProperty(name = "operation",
+ value = "List of device Ids to be need to execute VPN operation.", required = true)
+ private Vpn operation;
+ @ApiModelProperty(name = "deviceIDs",
+ value = "List of device Ids to be need to execute VPN operation.", required = true)
+ private List deviceIDs;
+
+ public Vpn getOperation() {
+ return operation;
+ }
+
+ public void setOperation(Vpn operation) {
+ this.operation = operation;
+ }
+
+ public List getDeviceIDs() {
+ return deviceIDs;
+ }
+
+ public void setDeviceIDs(List deviceIDs) {
+ this.deviceIDs = deviceIDs;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/WebClipBeanWrapper.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/WebClipBeanWrapper.java
new file mode 100644
index 000000000..fb2edc239
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/WebClipBeanWrapper.java
@@ -0,0 +1,54 @@
+/*
+ * 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.mdm.services.android.bean.WebClip;
+
+import java.util.List;
+
+/**
+ * This class is used to wrap the WebClip bean with devices.
+ */
+
+@ApiModel(value = "WebClipBeanWrapper",
+ description = "Mapping between web clip operation and device list to be applied.")
+public class WebClipBeanWrapper {
+
+ @ApiModelProperty(name = "operation", value = "the information of setting up webclip.", required = true)
+ private WebClip operation;
+ @ApiModelProperty(name = "deviceIDs", value = "List of device Ids", required = true)
+ private List deviceIDs;
+
+ public WebClip getOperation() {
+ return operation;
+ }
+
+ public void setOperation(WebClip operation) {
+ this.operation = operation;
+ }
+
+ public List getDeviceIDs() {
+ return deviceIDs;
+ }
+
+ public void setDeviceIDs(List deviceIDs) {
+ this.deviceIDs = deviceIDs;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/WifiBeanWrapper.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/WifiBeanWrapper.java
new file mode 100644
index 000000000..2d63a27d9
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/WifiBeanWrapper.java
@@ -0,0 +1,53 @@
+/*
+ * 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.mdm.services.android.bean.Wifi;
+
+import java.util.List;
+
+/**
+ * This class is used to wrap the Wifi bean with devices.
+ */
+@ApiModel(value = "WifiBeanWrapper",
+ description = "Mapping between wifi operation and device list to be applied.")
+public class WifiBeanWrapper {
+
+ @ApiModelProperty(name = "operation", value = "Information of configuring wifi operation", required = true)
+ private Wifi operation;
+ @ApiModelProperty(name = "deviceIDs", value = "List of device Ids", required = true)
+ private List deviceIDs;
+
+ public Wifi getOperation() {
+ return operation;
+ }
+
+ public void setOperation(Wifi operation) {
+ this.operation = operation;
+ }
+
+ public List getDeviceIDs() {
+ return deviceIDs;
+ }
+
+ public void setDeviceIDs(List deviceIDs) {
+ this.deviceIDs = deviceIDs;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/WipeDataBeanWrapper.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/WipeDataBeanWrapper.java
new file mode 100644
index 000000000..b7ebb2903
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/wrapper/WipeDataBeanWrapper.java
@@ -0,0 +1,53 @@
+/*
+ * 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.mdm.services.android.bean.wrapper;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.mdm.services.android.bean.WipeData;
+
+import java.util.List;
+
+/**
+ * This class is used to wrap the WipeData bean with devices.
+ */
+@ApiModel(value = "WipeDataBeanWrapper",
+ description = "Mapping between wipe operation and device list to be applied.")
+public class WipeDataBeanWrapper {
+
+ @ApiModelProperty(name = "operation", value = "The information of wipedata operation", required = true)
+ private WipeData operation;
+ @ApiModelProperty(name = "deviceIDs", value = "List of device Ids", required = true)
+ private List deviceIDs;
+
+ public WipeData getOperation() {
+ return operation;
+ }
+
+ public void setOperation(WipeData operation) {
+ this.operation = operation;
+ }
+
+ public List getDeviceIDs() {
+ return deviceIDs;
+ }
+
+ public void setDeviceIDs(List deviceIDs) {
+ this.deviceIDs = deviceIDs;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/common/ErrorHandler.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/common/ErrorHandler.java
new file mode 100644
index 000000000..542cd6078
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/common/ErrorHandler.java
@@ -0,0 +1,35 @@
+/*
+ * 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.mdm.services.android.common;
+
+import org.wso2.carbon.mdm.services.android.exception.AndroidAgentException;
+
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.ext.ExceptionMapper;
+
+
+@Produces({ "application/json", "application/xml" })
+public class ErrorHandler implements ExceptionMapper {
+
+ public Response toResponse(AndroidAgentException exception) {
+ ErrorMessage errorMessage = new ErrorMessage();
+ errorMessage.setErrorMessage(exception.getErrorMessage());
+ return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(errorMessage).build();
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/common/ErrorMessage.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/common/ErrorMessage.java
new file mode 100644
index 000000000..fd880c04c
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/common/ErrorMessage.java
@@ -0,0 +1,41 @@
+/*
+ * 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.mdm.services.android.common;
+
+
+public class ErrorMessage {
+
+ private String errorMessage;
+ private String errorCode;
+
+ public String getErrorMessage() {
+ return errorMessage;
+ }
+
+ public void setErrorMessage(String errorMessage) {
+ this.errorMessage = errorMessage;
+ }
+
+ public String getErrorCode() {
+ return errorCode;
+ }
+
+ public void setErrorCode(String errorCode) {
+ this.errorCode = errorCode;
+ }
+}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/common/GsonMessageBodyHandler.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/common/GsonMessageBodyHandler.java
new file mode 100644
index 000000000..297630029
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/common/GsonMessageBodyHandler.java
@@ -0,0 +1,91 @@
+/*
+ * 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.mdm.services.android.common;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.Produces;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.ext.MessageBodyReader;
+import javax.ws.rs.ext.MessageBodyWriter;
+import javax.ws.rs.ext.Provider;
+
+import java.io.*;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+
+import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
+
+@Provider
+@Produces(APPLICATION_JSON)
+@Consumes(APPLICATION_JSON)
+public class GsonMessageBodyHandler implements MessageBodyWriter