diff --git a/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/pom.xml b/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/pom.xml index 4797e881c..365ad97d2 100644 --- a/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/pom.xml +++ b/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt-plugins iot-analytics - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml diff --git a/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/pom.xml b/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/pom.xml index 1cfdd6154..7ae789cd2 100644 --- a/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/pom.xml +++ b/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt-plugins iot-analytics - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml diff --git a/components/analytics/iot-analytics/pom.xml b/components/analytics/iot-analytics/pom.xml index 7b87adf6c..467fcaf2c 100644 --- a/components/analytics/iot-analytics/pom.xml +++ b/components/analytics/iot-analytics/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins analytics - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml diff --git a/components/analytics/pom.xml b/components/analytics/pom.xml index 966f91ddb..8df45e52e 100644 --- a/components/analytics/pom.xml +++ b/components/analytics/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../../pom.xml diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/pom.xml index 062763ddb..9dcbe6a5a 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/pom.xml +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../../pom.xml 4.0.0 @@ -57,22 +57,22 @@ ${project.artifactId} ${project.artifactId} - - org.wso2.carbon.device.mgt.input.adapter.extension.internal, - org.wso2.carbon.device.mgt.input.adapter.extension.internal.* - + + org.wso2.carbon.device.mgt.input.adapter.extension.internal, + org.wso2.carbon.device.mgt.input.adapter.extension.internal.* + org.wso2.carbon.device.mgt.input.adapter.extension.*, - !org.wso2.carbon.device.mgt.input.adapter.extension.internal, + !org.wso2.carbon.device.mgt.input.adapter.extension.internal, - - org.osgi.framework, - org.osgi.service.component, - com.jayway.jsonpath, - org.apache.commons.logging, - org.json.simple, - org.json.simple.parser - + + org.osgi.framework.*;version="${imp.package.version.osgi.framework}", + org.osgi.service.*;version="${imp.package.version.osgi.service}", + com.jayway.jsonpath, + org.apache.commons.logging, + org.json.simple, + org.json.simple.parser + diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/pom.xml index c47a517fd..a6d946523 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/pom.xml +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../../pom.xml @@ -140,8 +140,8 @@ com.nimbusds.jose, com.nimbusds.jose.crypto, com.nimbusds.jwt, - org.osgi.framework, - org.osgi.service.component, + org.osgi.framework.*;version="${imp.package.version.osgi.framework}", + org.osgi.service.*;version="${imp.package.version.osgi.service}", javax.servlet, javax.servlet.http, org.osgi.service.http, diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/pom.xml index f08ddcbd9..aa8e500b2 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/pom.xml +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../../pom.xml 4.0.0 @@ -142,9 +142,8 @@ org.apache.commons.codec.binary, org.apache.commons.logging, org.apache.http.entity, - org.osgi.framework, - org.osgi.service.component, - org.osgi.service.http, + org.osgi.framework.*;version="${imp.package.version.osgi.framework}", + org.osgi.service.*;version="${imp.package.version.osgi.service}", org.wso2.carbon.context, org.wso2.carbon.core, org.wso2.carbon.device.mgt.input.adapter.extension, diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml index a5805bd16..517d3646b 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../../pom.xml @@ -111,8 +111,8 @@ !javax.xml.namespace, javax.xml.namespace; version=0.0.0, org.apache.commons.logging, - org.osgi.framework, - org.osgi.service.component, + org.osgi.framework.*;version="${imp.package.version.osgi.framework}", + org.osgi.service.*;version="${imp.package.version.osgi.service}", org.wso2.carbon.context, org.wso2.carbon.databridge.commons, org.wso2.carbon.databridge.core, diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/src/main/java/org/wso2/carbon/device/mgt/input/adapter/thrift/internal/ThriftEventAdapterServiceComponent.java b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/src/main/java/org/wso2/carbon/device/mgt/input/adapter/thrift/internal/ThriftEventAdapterServiceComponent.java index 4d85851a2..5deaefe0e 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/src/main/java/org/wso2/carbon/device/mgt/input/adapter/thrift/internal/ThriftEventAdapterServiceComponent.java +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/src/main/java/org/wso2/carbon/device/mgt/input/adapter/thrift/internal/ThriftEventAdapterServiceComponent.java @@ -36,7 +36,7 @@ import java.util.concurrent.ConcurrentHashMap; /** - * @scr.component name="input.wso2EventAdapterService.component" immediate="true" + * @scr.component name="input.iot.thrift.AdapterService.component" immediate="true" * @scr.reference name="agentserverservice.service" * interface="org.wso2.carbon.databridge.core.DataBridgeSubscriberService" cardinality="1..1" * policy="dynamic" bind="setDataBridgeSubscriberService" unbind="unSetDataBridgeSubscriberService" diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.xmpp/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.xmpp/pom.xml index 7e0ff15a8..07a6a8751 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.xmpp/pom.xml +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.xmpp/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../../pom.xml 4.0.0 @@ -117,14 +117,13 @@ org.apache.log4j, org.wso2.carbon.base, org.wso2.carbon.core.util, - org.apache.commons.logging, - org.osgi.framework, - org.osgi.service.component, - org.osgi.service.http, - org.wso2.carbon.context, - org.wso2.carbon.core, - org.wso2.carbon.device.mgt.input.adapter.extension, - org.wso2.carbon.user.core.service + org.apache.commons.logging, + org.osgi.framework.*;version="${imp.package.version.osgi.framework}", + org.osgi.service.*;version="${imp.package.version.osgi.service}", + org.wso2.carbon.context, + org.wso2.carbon.core, + org.wso2.carbon.device.mgt.input.adapter.extension, + org.wso2.carbon.user.core.service diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.http/pom.xml b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.http/pom.xml index 6c7e8dfd1..9a933ddb0 100644 --- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.http/pom.xml +++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.http/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../../pom.xml 4.0.0 @@ -118,8 +118,8 @@ org.eclipse.paho.client.mqttv3.persist, org.json.simple, org.json.simple.parser, - org.osgi.framework, - org.osgi.service.component, + org.osgi.framework.*;version="${imp.package.version.osgi.framework}", + org.osgi.service.*;version="${imp.package.version.osgi.service}", org.wso2.carbon.context, org.apache.commons.codec.binary, org.apache.http.client.entity, diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/pom.xml b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/pom.xml index 2ad3c6ba5..afd7b34a7 100644 --- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/pom.xml +++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../../pom.xml 4.0.0 @@ -127,8 +127,8 @@ org.eclipse.paho.client.mqttv3.persist, org.json.simple, org.json.simple.parser, - org.osgi.framework, - org.osgi.service.component, + org.osgi.framework.*;version="${imp.package.version.osgi.framework}", + org.osgi.service.*;version="${imp.package.version.osgi.service}", org.wso2.carbon.context, org.apache.commons.codec.binary, org.apache.http.client.entity, diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket.endpoint/pom.xml b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket.endpoint/pom.xml index e089d3035..ada3bcbef 100644 --- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket.endpoint/pom.xml +++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket.endpoint/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../../pom.xml diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/pom.xml b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/pom.xml index 5c6064735..684c7f707 100644 --- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/pom.xml +++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/pom.xml @@ -21,7 +21,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../../pom.xml @@ -154,8 +154,8 @@ com.google.gson, javax.websocket, org.apache.commons.logging, - org.osgi.framework, - org.osgi.service.component, + org.osgi.framework.*;version="${imp.package.version.osgi.framework}", + org.osgi.service.*;version="${imp.package.version.osgi.service}", org.wso2.carbon.context, org.wso2.carbon.databridge.commons, org.wso2.carbon.event.stream.core, diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.xmpp/pom.xml b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.xmpp/pom.xml index 0a12b176a..0e582e574 100644 --- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.xmpp/pom.xml +++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.xmpp/pom.xml @@ -20,7 +20,7 @@ org.wso2.carbon.devicemgt-plugins cdmf-transport-adapters - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../../pom.xml @@ -96,8 +96,8 @@ org.wso2.carbon.event.output.adapter.core.*, org.jivesoftware.smack.*, org.apache.commons.logging, - org.osgi.framework, - org.osgi.service.component, + org.osgi.framework.*;version="${imp.package.version.osgi.framework}", + org.osgi.service.*;version="${imp.package.version.osgi.service}", org.wso2.carbon.context diff --git a/components/extensions/cdmf-transport-adapters/pom.xml b/components/extensions/cdmf-transport-adapters/pom.xml index be2200247..11416e067 100644 --- a/components/extensions/cdmf-transport-adapters/pom.xml +++ b/components/extensions/cdmf-transport-adapters/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins extensions - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml diff --git a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/pom.xml b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/pom.xml index 1e169d496..bbbfe100f 100644 --- a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/pom.xml +++ b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins mb-extensions - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml diff --git a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/pom.xml b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/pom.xml index 21a4df1ed..ecdf9c59c 100644 --- a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/pom.xml +++ b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins mb-extensions - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml diff --git a/components/extensions/mb-extensions/pom.xml b/components/extensions/mb-extensions/pom.xml index 374bdf821..ace5a114f 100644 --- a/components/extensions/mb-extensions/pom.xml +++ b/components/extensions/mb-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins extensions - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml diff --git a/components/extensions/pom.xml b/components/extensions/pom.xml index e32623074..c8f61b219 100644 --- a/components/extensions/pom.xml +++ b/components/extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../../pom.xml @@ -34,7 +34,7 @@ cdmf-transport-adapters - mb-extensions + pull-notification-listeners diff --git a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml index 9e094a66b..1209643d9 100644 --- a/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml +++ b/components/extensions/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins pull-notification-listeners - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml @@ -86,8 +86,8 @@ org.wso2.carbon.device.mgt.mqtt.notification.listener.* - org.osgi.framework, - org.osgi.service.component, + org.osgi.framework.*;version="${imp.package.version.osgi.framework}", + org.osgi.service.*;version="${imp.package.version.osgi.service}", org.apache.commons.logging, org.wso2.carbon.device.mgt.common.*, org.wso2.carbon.device.mgt.core.service, diff --git a/components/extensions/pull-notification-listeners/pom.xml b/components/extensions/pull-notification-listeners/pom.xml index 6e282be35..f5c0bb8dc 100644 --- a/components/extensions/pull-notification-listeners/pom.xml +++ b/components/extensions/pull-notification-listeners/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins extensions - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/pom.xml index b5157d6ae..d40e0d75c 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/pom.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/pom.xml @@ -21,7 +21,7 @@ android-plugin org.wso2.carbon.devicemgt-plugins - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml @@ -172,6 +172,15 @@ + + org.springframework + spring-web + provided + + + org.json.wso2 + json + org.apache.cxf @@ -247,22 +256,6 @@ 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 diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementAdminService.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementAdminService.java index c8bd68d9c..0f59e0666 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementAdminService.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementAdminService.java @@ -71,156 +71,182 @@ import java.util.List; name = "Lock Device", description = "Hard lock own device", key = "perm:android:lock-devices", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/lock"} ), @Scope( name = "Unlock Device", description = "Unlock permanently locked device", key = "perm:android:unlock-devices", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/unlock"} ), @Scope( name = "Get Location", description = "Request device location coordinates", key = "perm:android:location", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/location"} ), @Scope( name = "Clear Password", description = "Clear the password on Android devices", key = "perm:android:clear-password", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/clear-password"} ), @Scope( name = "Control Camera", description = "Enabling or Disabling the Camera on Android Devices", key = "perm:android:control-camera", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/camera"} ), @Scope( name = "Get Info", description = "Requesting device information from Android Devices", key = "perm:android:info", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/info"} ), @Scope( name = "Get Logs", description = "Requesting Logcat Details from Android Devices", key = "perm:android:logcat", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/logcat"} ), @Scope( name = "Enterprise Wipe", description = "Enterprise Wiping Android Devices", key = "perm:android:enterprise-wipe", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/enterprise-wipe"} ), @Scope( name = "Factory Reset", description = "Factory Resetting Android Devices", key = "perm:android:wipe", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/wipe"} ), @Scope( name = "Get Installed Applications", description = "Get list of installed applications", key = "perm:android:applications", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/applications"} ), @Scope( name = "Ring Device", description = "Ring Android devices", key = "perm:android:ring", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/ring"} ), @Scope( name = "Reboot Device", description = "Reboot Android devices", key = "perm:android:reboot", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/reboot"} ), @Scope( name = "Mute Device", description = "Mute Android devices", key = "perm:android:mute", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/mute"} ), @Scope( name = "Install Applications", description = "Installing an Application on Android Devices", key = "perm:android:install-application", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/install-app"} ), @Scope( name = "Update Applications", description = "Updating an Application on Android Devices", key = "perm:android:update-application", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/update-app"} ), @Scope( name = "Uninstall Applications", description = "Uninstalling an Application on Android Devices", key = "perm:android:uninstall-application", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/uninstall-app"} ), @Scope( name = "Blacklist Applications", description = "Blacklisting applications on Android Devices", key = "perm:android:blacklist-applications", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/blacklist-app"} ), @Scope( name = "Upgrade Firmware", description = "Upgrading Firmware of Android Devices", key = "perm:android:upgrade-firmware", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/upgrade"} ), @Scope( name = "Configure VPN", description = "Configure VPN on Android Device", key = "perm:android:configure-vpn", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/vpn"} ), @Scope( name = "Send Notification", description = "Sending a notification to Android Device", key = "perm:android:send-notification", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/send-notification"} ), @Scope( name = "Configure Wi-Fi", description = "Configure Wi-Fi on Android Device", key = "perm:android:configure-wifi", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/wifi"} ), @Scope( name = "Encrypt Storage", description = "Encrypting storage on Android Device", key = "perm:android:encrypt-storage", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/encrypt"} ), @Scope( name = "Change Password", description = "Changing the lock code of an Android Device", key = "perm:android:change-lock-code", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/change-lock-code"} ), @Scope( name = "Password Policy", description = "Set password policy of an Android Device", key = "perm:android:set-password-policy", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/password-policy"} ), @Scope( name = "Add Web clip", description = "Setting a Web Clip on Android Devices", key = "perm:android:set-webclip", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/webclip"} ), @Scope( name = "File Transfer", description = "Transferring a file to android devices", key = "perm:android:file-transfer", + roles = {"Internal/devicemgt-admin"}, permissions = {"/device-mgt/devices/owning-device/operations/android/file-transfer"} ) } diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementService.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementService.java index 48c95f82e..48cf3ee0a 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementService.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementService.java @@ -71,12 +71,14 @@ import java.util.List; name = "Enroll Device", description = "Register an Android device", key = "perm:android:enroll", + roles = {"Internal/devicemgt-user"}, permissions = {"/device-mgt/devices/enroll/android"} ), @Scope( name = "Un-enroll Device", description = "Unregister an Android device", key = "perm:android:disenroll", + roles = {"Internal/devicemgt-user"}, permissions = {"/device-mgt/devices/disenroll/android"} ) } diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceTypeConfigurationService.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceTypeConfigurationService.java index 5e2440941..dc7bc1262 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceTypeConfigurationService.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceTypeConfigurationService.java @@ -68,18 +68,21 @@ import javax.ws.rs.core.Response; name = "Enroll Device", description = "Register an Android device", key = "perm:android:enroll", + roles = {"Internal/devicemgt-user"}, permissions = {"/device-mgt/devices/enroll/android"} ), @Scope( name = "View Configurations", description = "Getting Android Platform Configurations", key = "perm:android:view-configuration", + roles = {"Internal/devicemgt-user"}, permissions = {"/device-mgt/devices/enroll/android"} ), @Scope( name = "Manage Configurations", description = "Updating Android Platform Configurations", key = "perm:android:manage-configuration", + roles = {"Internal/devicemgt-user"}, permissions = {"/device-mgt/platform-configurations/manage"} ) } diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/EventReceiverService.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/EventReceiverService.java index 7888f11a8..e76e76e0f 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/EventReceiverService.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/EventReceiverService.java @@ -68,6 +68,7 @@ import javax.ws.rs.core.Response; name = "Enroll Device", description = "Register an Android device", key = "perm:android:enroll", + roles = {"Internal/devicemgt-user"}, permissions = {"/device-mgt/devices/enroll/android"} ) } diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/EventReceiverServiceImpl.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/EventReceiverServiceImpl.java index 0de1ac7ab..8ac430183 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/EventReceiverServiceImpl.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/EventReceiverServiceImpl.java @@ -22,8 +22,6 @@ import com.google.gson.Gson; import com.google.gson.JsonObject; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException; -import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DataPublisherConfigurationException; import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException; @@ -69,58 +67,58 @@ public class EventReceiverServiceImpl implements EventReceiverService { if (log.isDebugEnabled()) { log.debug("Invoking Android device event logging."); } - Device device; - try { - if (!DeviceManagerUtil.isPublishLocationResponseEnabled()) { - return Response.status(Response.Status.ACCEPTED).entity("Event is publishing has not enabled.").build(); - } - DeviceIdentifier deviceIdentifier = new DeviceIdentifier(eventBeanWrapper.getDeviceIdentifier(), - AndroidConstants.DEVICE_TYPE_ANDROID); - device = AndroidAPIUtils.getDeviceManagementService().getDevice(deviceIdentifier, false); - if (device != null && EnrolmentInfo.Status.ACTIVE != device.getEnrolmentInfo().getStatus()){ - return Response.status(Response.Status.ACCEPTED).entity("Device is not in Active state.").build(); - } else if (device == null){ - return Response.status(Response.Status.ACCEPTED).entity("Device is not enrolled yet.").build(); - } - } catch (DeviceManagementException e) { - log.error("Error occurred while checking Operation Analytics is Enabled.", e); - return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).build(); - } - String eventType = eventBeanWrapper.getType(); - if (!LOCATION_EVENT_TYPE.equals(eventType)) { - String msg = "Dropping Android " + eventType + " Event.Only Location Event Type is supported."; - log.warn(msg); - return Response.status(Response.Status.BAD_REQUEST).entity(msg).build(); - } - Message message = new Message(); - Object[] metaData = {eventBeanWrapper.getDeviceIdentifier(), device.getEnrolmentInfo().getOwner(), - AndroidConstants.DEVICE_TYPE_ANDROID}; - String eventPayload = eventBeanWrapper.getPayload(); - JsonObject jsonObject = gson.fromJson(eventPayload, JsonObject.class); - Object[] payload = { - jsonObject.get(TIME_STAMP).getAsLong(), - jsonObject.get(LATITUDE).getAsDouble(), - jsonObject.get(LONGITUDE).getAsDouble() - }; - try { - if (AndroidAPIUtils.getEventPublisherService().publishEvent( - EVENT_STREAM_DEFINITION, "1.0.0", metaData, new Object[0], payload)) { - message.setResponseCode("Event is published successfully."); - return Response.status(Response.Status.CREATED).entity(message).build(); - } else { - log.warn("Error occurred while trying to publish the event. This could be due to unavailability " + - "of the publishing service. Please make sure that analytics server is running and accessible " + - "by this server"); - throw new UnexpectedServerErrorException( - new ErrorResponse.ErrorResponseBuilder().setCode(503l).setMessage("Error occurred due to " + - "unavailability of the publishing service.").build()); - } - } catch (DataPublisherConfigurationException e) { +// Device device; +// try { +// if (!DeviceManagerUtil.isPublishLocationResponseEnabled()) { +// return Response.status(Response.Status.ACCEPTED).entity("Event is publishing has not enabled.").build(); +// } +// DeviceIdentifier deviceIdentifier = new DeviceIdentifier(eventBeanWrapper.getDeviceIdentifier(), +// AndroidConstants.DEVICE_TYPE_ANDROID); +// device = AndroidAPIUtils.getDeviceManagementService().getDevice(deviceIdentifier, false); +// if (device != null && EnrolmentInfo.Status.ACTIVE != device.getEnrolmentInfo().getStatus()){ +// return Response.status(Response.Status.ACCEPTED).entity("Device is not in Active state.").build(); +// } else if (device == null){ +// return Response.status(Response.Status.ACCEPTED).entity("Device is not enrolled yet.").build(); +// } +// } catch (DeviceManagementException e) { +// log.error("Error occurred while checking Operation Analytics is Enabled.", e); +// return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).build(); +// } +// String eventType = eventBeanWrapper.getType(); +// if (!LOCATION_EVENT_TYPE.equals(eventType)) { +// String msg = "Dropping Android " + eventType + " Event.Only Location Event Type is supported."; +// log.warn(msg); +// return Response.status(Response.Status.BAD_REQUEST).entity(msg).build(); +// } +// Message message = new Message(); +// Object[] metaData = {eventBeanWrapper.getDeviceIdentifier(), device.getEnrolmentInfo().getOwner(), +// AndroidConstants.DEVICE_TYPE_ANDROID}; +// String eventPayload = eventBeanWrapper.getPayload(); +// JsonObject jsonObject = gson.fromJson(eventPayload, JsonObject.class); +// Object[] payload = { +// jsonObject.get(TIME_STAMP).getAsLong(), +// jsonObject.get(LATITUDE).getAsDouble(), +// jsonObject.get(LONGITUDE).getAsDouble() +// }; +// try { +// if (AndroidAPIUtils.getEventPublisherService().publishEvent( +// EVENT_STREAM_DEFINITION, "1.0.0", metaData, new Object[0], payload)) { +// message.setResponseCode("Event is published successfully."); +// return Response.status(Response.Status.CREATED).entity(message).build(); +// } else { +// log.warn("Error occurred while trying to publish the event. This could be due to unavailability " + +// "of the publishing service. Please make sure that analytics server is running and accessible " + +// "by this server"); +// throw new UnexpectedServerErrorException( +// new ErrorResponse.ErrorResponseBuilder().setCode(503l).setMessage("Error occurred due to " + +// "unavailability of the publishing service.").build()); +// } +// } catch (DataPublisherConfigurationException e) { String msg = "Error occurred while getting the Data publisher Service instance."; - log.error(msg, e); +// log.error(msg, e); throw new UnexpectedServerErrorException( new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(msg).build()); - } +// } } @GET @@ -134,94 +132,94 @@ public class EventReceiverServiceImpl implements EventReceiverService { @QueryParam("type") String type, @HeaderParam("If-Modified-Since") String ifModifiedSince) { - if (from != 0l && to != 0l && deviceId != null) { - return retrieveAlertFromDate(deviceId, from, to); - } else if (deviceId != null && type != null) { - return retrieveAlertByType(deviceId, type); - } else if (deviceId != null) { - return retrieveAlert(deviceId); - } else { +// if (from != 0l && to != 0l && deviceId != null) { +// return retrieveAlertFromDate(deviceId, from, to); +// } else if (deviceId != null && type != null) { +// return retrieveAlertByType(deviceId, type); +// } else if (deviceId != null) { +// return retrieveAlert(deviceId); +// } else { throw new BadRequestException( new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage("Request must contain " + "the device identifier. Optionally, both from and to value should be present to get " + "alerts between times.").build()); - } - } - - private Response retrieveAlert(String deviceId) { - if (log.isDebugEnabled()) { - log.debug("Retrieving events for given device Identifier."); - } - String query = "deviceIdentifier:" + deviceId; - List deviceStates; - try { - deviceStates = AndroidDeviceUtils.getAllEventsForDevice(EVENT_STREAM_DEFINITION, query); - if (deviceStates == null) { - throw new NotFoundException( - new ErrorResponse.ErrorResponseBuilder().setCode(404l).setMessage("No any alerts are " + - "published for Device: " + deviceId + ".").build()); - } else { - return Response.status(Response.Status.OK).entity(deviceStates).build(); - } - } catch (AnalyticsException e) { - String msg = "Error occurred while getting published events for specific device: " + deviceId + "."; - log.error(msg, e); - throw new UnexpectedServerErrorException( - new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(msg).build()); - } +// } } - private Response retrieveAlertFromDate(String deviceId, long from, long to) { - String fromDate = String.valueOf(from); - String toDate = String.valueOf(to); - if (log.isDebugEnabled()) { - log.debug("Retrieving events for given device Identifier and time period."); - } - - String query = "deviceIdentifier:" + deviceId + " AND _timestamp: [" + fromDate + " TO " + toDate + "]"; - List deviceStates; - try { - deviceStates = AndroidDeviceUtils.getAllEventsForDevice(EVENT_STREAM_DEFINITION, query); - if (deviceStates == null) { - throw new NotFoundException( - new ErrorResponse.ErrorResponseBuilder().setCode(404l).setMessage("No any alerts are " + - "published on given date for given Device: " + deviceId + ".").build()); - - } else { - return Response.status(Response.Status.OK).entity(deviceStates).build(); - } - } catch (AnalyticsException e) { - String msg = "Error occurred while getting published events for specific " + - "Device: " + deviceId + " on given Date."; - log.error(msg, e); - throw new UnexpectedServerErrorException( - new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(msg).build()); - } - } - - private Response retrieveAlertByType(String deviceId, String type) { - if (log.isDebugEnabled()) { - log.debug("Retrieving events for given device identifier and type."); - } - String query = "deviceIdentifier:" + deviceId + " AND type:" + type; - List deviceStates; - try { - deviceStates = AndroidDeviceUtils.getAllEventsForDevice(EVENT_STREAM_DEFINITION, query); - if (deviceStates == null) { - throw new NotFoundException( - new ErrorResponse.ErrorResponseBuilder().setCode(404l).setMessage("No any alerts are " + - "published for given Device: '" + deviceId + "' and given specific Type.").build()); - - } else { - return Response.status(Response.Status.OK).entity(deviceStates).build(); - } - } catch (AnalyticsException e) { - String msg = "Error occurred while getting published events for specific " + - "Device: " + deviceId + "and given specific Type."; - log.error(msg, e); - throw new UnexpectedServerErrorException( - new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(msg).build()); - } - } +// private Response retrieveAlert(String deviceId) { +// if (log.isDebugEnabled()) { +// log.debug("Retrieving events for given device Identifier."); +// } +// String query = "deviceIdentifier:" + deviceId; +// List deviceStates; +// try { +// deviceStates = AndroidDeviceUtils.getAllEventsForDevice(EVENT_STREAM_DEFINITION, query); +// if (deviceStates == null) { +// throw new NotFoundException( +// new ErrorResponse.ErrorResponseBuilder().setCode(404l).setMessage("No any alerts are " + +// "published for Device: " + deviceId + ".").build()); +// } else { +// return Response.status(Response.Status.OK).entity(deviceStates).build(); +// } +// } catch (AnalyticsException e) { +// String msg = "Error occurred while getting published events for specific device: " + deviceId + "."; +// log.error(msg, e); +// throw new UnexpectedServerErrorException( +// new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(msg).build()); +// } +// } +// +// private Response retrieveAlertFromDate(String deviceId, long from, long to) { +// String fromDate = String.valueOf(from); +// String toDate = String.valueOf(to); +// if (log.isDebugEnabled()) { +// log.debug("Retrieving events for given device Identifier and time period."); +// } +// +// String query = "deviceIdentifier:" + deviceId + " AND _timestamp: [" + fromDate + " TO " + toDate + "]"; +// List deviceStates; +// try { +// deviceStates = AndroidDeviceUtils.getAllEventsForDevice(EVENT_STREAM_DEFINITION, query); +// if (deviceStates == null) { +// throw new NotFoundException( +// new ErrorResponse.ErrorResponseBuilder().setCode(404l).setMessage("No any alerts are " + +// "published on given date for given Device: " + deviceId + ".").build()); +// +// } else { +// return Response.status(Response.Status.OK).entity(deviceStates).build(); +// } +// } catch (AnalyticsException e) { +// String msg = "Error occurred while getting published events for specific " + +// "Device: " + deviceId + " on given Date."; +// log.error(msg, e); +// throw new UnexpectedServerErrorException( +// new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(msg).build()); +// } +// } +// +// private Response retrieveAlertByType(String deviceId, String type) { +// if (log.isDebugEnabled()) { +// log.debug("Retrieving events for given device identifier and type."); +// } +// String query = "deviceIdentifier:" + deviceId + " AND type:" + type; +// List deviceStates; +// try { +// deviceStates = AndroidDeviceUtils.getAllEventsForDevice(EVENT_STREAM_DEFINITION, query); +// if (deviceStates == null) { +// throw new NotFoundException( +// new ErrorResponse.ErrorResponseBuilder().setCode(404l).setMessage("No any alerts are " + +// "published for given Device: '" + deviceId + "' and given specific Type.").build()); +// +// } else { +// return Response.status(Response.Status.OK).entity(deviceStates).build(); +// } +// } catch (AnalyticsException e) { +// String msg = "Error occurred while getting published events for specific " + +// "Device: " + deviceId + "and given specific Type."; +// log.error(msg, e); +// throw new UnexpectedServerErrorException( +// new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(msg).build()); +// } +// } } diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidAPIUtils.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidAPIUtils.java index 336801721..15928d80e 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidAPIUtils.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidAPIUtils.java @@ -20,9 +20,7 @@ package org.wso2.carbon.mdm.services.android.util; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.wso2.carbon.analytics.api.AnalyticsDataAPI; import org.wso2.carbon.context.PrivilegedCarbonContext; -import org.wso2.carbon.device.mgt.analytics.data.publisher.service.EventsPublisherService; import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementService; import org.wso2.carbon.device.mgt.core.app.mgt.ApplicationManagementProviderService; import org.wso2.carbon.device.mgt.core.device.details.mgt.DeviceInformationManager; @@ -41,8 +39,8 @@ public class AndroidAPIUtils { private static PolicyManagerService policyManagerService = null; private static ApplicationManagementProviderService applicationManagementProviderService = null; private static NotificationManagementService notificationManagementService = null; - private static EventsPublisherService eventsPublisherService = null; - private static AnalyticsDataAPI analyticsDataAPI = null; +// private static EventsPublisherService eventsPublisherService = null; +// private static AnalyticsDataAPI analyticsDataAPI = null; private AndroidAPIUtils() { throw new IllegalStateException("Utility class"); @@ -126,30 +124,30 @@ public class AndroidAPIUtils { return notificationManagementService; } - public static EventsPublisherService getEventPublisherService() { - if (eventsPublisherService == null) { - PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); - eventsPublisherService = (EventsPublisherService) ctx.getOSGiService(EventsPublisherService.class, null); - if (eventsPublisherService == null) { - String msg = "Event Publisher service has not initialized."; - log.error(msg); - throw new IllegalStateException(msg); - } - } - return eventsPublisherService; - } +// public static EventsPublisherService getEventPublisherService() { +// if (eventsPublisherService == null) { +// PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); +// eventsPublisherService = (EventsPublisherService) ctx.getOSGiService(EventsPublisherService.class, null); +// if (eventsPublisherService == null) { +// String msg = "Event Publisher service has not initialized."; +// log.error(msg); +// throw new IllegalStateException(msg); +// } +// } +// return eventsPublisherService; +// } - public static AnalyticsDataAPI getAnalyticsDataAPI() { - if (analyticsDataAPI == null) { - PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); - analyticsDataAPI = (AnalyticsDataAPI) ctx.getOSGiService(AnalyticsDataAPI.class, null); - if (analyticsDataAPI == null) { - String msg = "Analytics api service has not initialized."; - log.error(msg); - throw new IllegalStateException(msg); - } - } - return analyticsDataAPI; - } +// public static AnalyticsDataAPI getAnalyticsDataAPI() { +// if (analyticsDataAPI == null) { +// PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); +// analyticsDataAPI = (AnalyticsDataAPI) ctx.getOSGiService(AnalyticsDataAPI.class, null); +// if (analyticsDataAPI == null) { +// String msg = "Analytics api service has not initialized."; +// log.error(msg); +// throw new IllegalStateException(msg); +// } +// } +// return analyticsDataAPI; +// } } diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidDeviceUtils.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidDeviceUtils.java index 7617047c9..542875b98 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidDeviceUtils.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidDeviceUtils.java @@ -26,12 +26,6 @@ import com.google.gson.JsonObject; import com.google.gson.JsonParser; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.wso2.carbon.analytics.api.AnalyticsDataAPI; -import org.wso2.carbon.analytics.api.AnalyticsDataAPIUtil; -import org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse; -import org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry; -import org.wso2.carbon.analytics.datasource.commons.Record; -import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException; import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.device.mgt.common.Device; @@ -108,53 +102,53 @@ public class AndroidDeviceUtils { DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_ANDROID, operation, deviceIdentifiers); } - public static List getAllEventsForDevice(String tableName, String query) throws AnalyticsException { - int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); - AnalyticsDataAPI analyticsDataAPI = AndroidAPIUtils.getAnalyticsDataAPI(); - int eventCount = analyticsDataAPI.searchCount(tenantId, tableName, query); - if (eventCount == 0) { - return null; - } - List resultEntries = analyticsDataAPI.search(tenantId, tableName, query, 0, eventCount); - List recordIds = getRecordIds(resultEntries); - AnalyticsDataResponse response = analyticsDataAPI.get(tenantId, tableName, 1, null, recordIds); - Map deviceStateses = createDeviceStatusData(AnalyticsDataAPIUtil.listRecords( - analyticsDataAPI, response)); - return getSortedDeviceStateData(deviceStateses, resultEntries); - } - - private static List getRecordIds(List searchResults) { - List ids = new ArrayList<>(); - for (SearchResultEntry searchResult : searchResults) { - ids.add(searchResult.getId()); - } - return ids; - } - - public static Map createDeviceStatusData(List records) { - Map deviceStatuses = new HashMap<>(); - for (Record record : records) { - DeviceState deviceState = createDeviceStatusData(record); - deviceStatuses.put(deviceState.getId(), deviceState); - } - return deviceStatuses; - } - - private static DeviceState createDeviceStatusData(Record record) { - DeviceState deviceState = new DeviceState(); - deviceState.setId(record.getId()); - deviceState.setValues(record.getValues()); - return deviceState; - } - - public static List getSortedDeviceStateData(Map sensorDatas, - List searchResults) { - List sortedRecords = new ArrayList<>(); - for (SearchResultEntry searchResultEntry : searchResults) { - sortedRecords.add(sensorDatas.get(searchResultEntry.getId())); - } - return sortedRecords; - } +// public static List getAllEventsForDevice(String tableName, String query) throws AnalyticsException { +// int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); +// AnalyticsDataAPI analyticsDataAPI = AndroidAPIUtils.getAnalyticsDataAPI(); +// int eventCount = analyticsDataAPI.searchCount(tenantId, tableName, query); +// if (eventCount == 0) { +// return null; +// } +// List resultEntries = analyticsDataAPI.search(tenantId, tableName, query, 0, eventCount); +// List recordIds = getRecordIds(resultEntries); +// AnalyticsDataResponse response = analyticsDataAPI.get(tenantId, tableName, 1, null, recordIds); +// Map deviceStateses = createDeviceStatusData(AnalyticsDataAPIUtil.listRecords( +// analyticsDataAPI, response)); +// return getSortedDeviceStateData(deviceStateses, resultEntries); +// } + +// private static List getRecordIds(List searchResults) { +// List ids = new ArrayList<>(); +// for (SearchResultEntry searchResult : searchResults) { +// ids.add(searchResult.getId()); +// } +// return ids; +// } + +// public static Map createDeviceStatusData(List records) { +// Map deviceStatuses = new HashMap<>(); +// for (Record record : records) { +// DeviceState deviceState = createDeviceStatusData(record); +// deviceStatuses.put(deviceState.getId(), deviceState); +// } +// return deviceStatuses; +// } + +// private static DeviceState createDeviceStatusData(Record record) { +// DeviceState deviceState = new DeviceState(); +// deviceState.setId(record.getId()); +// deviceState.setValues(record.getValues()); +// return deviceState; +// } + +// public static List getSortedDeviceStateData(Map sensorDatas, +// List searchResults) { +// List sortedRecords = new ArrayList<>(); +// for (SearchResultEntry searchResultEntry : searchResults) { +// sortedRecords.add(sensorDatas.get(searchResultEntry.getId())); +// } +// return sortedRecords; +// } public static void updateOperation(Device device, Operation operation) throws OperationManagementException, PolicyComplianceException, ApplicationManagementException { diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/webapp/META-INF/webapp-classloading.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/webapp/META-INF/webapp-classloading.xml index 185de22d4..8cbf41f9f 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/webapp/META-INF/webapp-classloading.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/webapp/META-INF/webapp-classloading.xml @@ -31,5 +31,5 @@ Tomcat environment is the default and every webapps gets it even if they didn't specify it. e.g. If a webapps requires CXF, they will get both Tomcat and CXF. --> - CXF,Carbon + CXF3,Carbon diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/test/java/org/wso2/carbon/mdm/services/android/mocks/DeviceManagementProviderServiceMock.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/test/java/org/wso2/carbon/mdm/services/android/mocks/DeviceManagementProviderServiceMock.java index 5212c2c07..7f6d9a3de 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/test/java/org/wso2/carbon/mdm/services/android/mocks/DeviceManagementProviderServiceMock.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/test/java/org/wso2/carbon/mdm/services/android/mocks/DeviceManagementProviderServiceMock.java @@ -809,4 +809,10 @@ public class DeviceManagementProviderServiceMock implements DeviceManagementProv @Override public License getLicenseConfig(String s) throws DeviceManagementException { return null; } + + @Override + public PaginationResult getDevicesDetails(PaginationRequest paginationRequest, List list, String s) + throws DeviceManagementException { + return null; + } } diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml index d3290d669..57578f0da 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/pom.xml @@ -21,7 +21,7 @@ android-plugin org.wso2.carbon.devicemgt-plugins - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml index bdf958f89..534c6e706 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml @@ -23,7 +23,7 @@ android-plugin org.wso2.carbon.devicemgt-plugins - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/pom.xml index 4e65a5a0f..3d0c0662e 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/pom.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/pom.xml @@ -22,7 +22,7 @@ android-plugin org.wso2.carbon.devicemgt-plugins - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml @@ -56,8 +56,8 @@ Device Management Mobile Android Impl Bundle org.wso2.carbon.device.mgt.mobile.android.internal - org.osgi.framework, - org.osgi.service.component, + org.osgi.framework.*;version="${imp.package.version.osgi.framework}", + org.osgi.service.*;version="${imp.package.version.osgi.service}", org.apache.commons.logging, javax.xml, javax.xml.stream, diff --git a/components/mobile-plugins/android-plugin/pom.xml b/components/mobile-plugins/android-plugin/pom.xml index e26308b99..e7a0819b5 100644 --- a/components/mobile-plugins/android-plugin/pom.xml +++ b/components/mobile-plugins/android-plugin/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins mobile-plugins - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml diff --git a/components/mobile-plugins/pom.xml b/components/mobile-plugins/pom.xml index 46f2e6805..0a123940c 100644 --- a/components/mobile-plugins/pom.xml +++ b/components/mobile-plugins/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../../pom.xml diff --git a/components/test-coverage/pom.xml b/components/test-coverage/pom.xml index a3de32c03..a4aae1ad7 100644 --- a/components/test-coverage/pom.xml +++ b/components/test-coverage/pom.xml @@ -22,7 +22,7 @@ carbon-device-mgt-plugins-parent org.wso2.carbon.devicemgt-plugins - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/features/analytics-feature/org.wso2.carbon.device.mgt.iot.analytics.feature/pom.xml b/features/analytics-feature/org.wso2.carbon.device.mgt.iot.analytics.feature/pom.xml index 0ccbeb002..bd51a078c 100644 --- a/features/analytics-feature/org.wso2.carbon.device.mgt.iot.analytics.feature/pom.xml +++ b/features/analytics-feature/org.wso2.carbon.device.mgt.iot.analytics.feature/pom.xml @@ -23,13 +23,12 @@ org.wso2.carbon.devicemgt-plugins analytics-feature - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.iot.analytics.feature - 5.0.16-SNAPSHOT pom WSO2 Carbon - IoT Server Analytics Feature http://wso2.org diff --git a/features/analytics-feature/org.wso2.carbon.iot.geo.dashboard.feature/pom.xml b/features/analytics-feature/org.wso2.carbon.iot.geo.dashboard.feature/pom.xml index 617e66176..944309f48 100644 --- a/features/analytics-feature/org.wso2.carbon.iot.geo.dashboard.feature/pom.xml +++ b/features/analytics-feature/org.wso2.carbon.iot.geo.dashboard.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins analytics-feature - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml diff --git a/features/analytics-feature/pom.xml b/features/analytics-feature/pom.xml index 2509814b2..ea052c514 100644 --- a/features/analytics-feature/pom.xml +++ b/features/analytics-feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../../pom.xml diff --git a/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.api.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.api.feature/pom.xml index ecfd02619..485effe2e 100644 --- a/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.api.feature/pom.xml +++ b/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.api.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml diff --git a/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature/pom.xml index 17acc45c9..27eee7da2 100644 --- a/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature/pom.xml +++ b/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml diff --git a/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml index 3f656cf0b..0b602daef 100644 --- a/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml +++ b/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml @@ -23,14 +23,13 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.adapter.feature pom - 5.0.16-SNAPSHOT WSO2 Carbon - Device Management Adapters Feature http://wso2.org This feature contains the adapter bundles required for IoT Server @@ -86,11 +85,6 @@ feign-gson ${io.github.openfeign.version} - - org.wso2.carbon.identity.carbon.auth.jwt - org.wso2.carbon.identity.authenticator.signedjwt - ${identity.carbon.auth.jwt.version} - @@ -219,9 +213,6 @@ io.github.openfeign:feign-gson:${io.github.openfeign.version} - - org.wso2.carbon.identity.carbon.auth.jwt:org.wso2.carbon.identity.authenticator.signedjwt:${identity.carbon.auth.jwt.version} - diff --git a/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml index e3075b299..9d1965194 100644 --- a/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml +++ b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml @@ -3,14 +3,13 @@ org.wso2.carbon.devicemgt-plugins extensions-feature - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.notification.listener.feature pom - 5.0.16-SNAPSHOT WSO2 Carbon - Notification Listener http://wso2.org This feature contains the core bundles required iot core listeners diff --git a/features/extensions-feature/pom.xml b/features/extensions-feature/pom.xml index 616bf07fc..5e32e4d0b 100644 --- a/features/extensions-feature/pom.xml +++ b/features/extensions-feature/pom.xml @@ -22,21 +22,20 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../../pom.xml 4.0.0 extensions-feature - 5.0.16-SNAPSHOT pom WSO2 Carbon - Device Management Extensions http://wso2.org org.wso2.carbon.device.mgt.adapter.feature - org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature - org.wso2.carbon.andes.extensions.device.mgt.api.feature + + org.wso2.carbon.device.mgt.notification.listener.feature diff --git a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml index e9373a23f..e237258d3 100644 --- a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml +++ b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt-plugins android-plugin-feature - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml diff --git a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/apis/admin--Android-Mutual-SSL-Configuration-Management.xml b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/apis/admin--Android-Mutual-SSL-Configuration-Management.xml index 41596567a..7cddba927 100644 --- a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/apis/admin--Android-Mutual-SSL-Configuration-Management.xml +++ b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/apis/admin--Android-Mutual-SSL-Configuration-Management.xml @@ -14,7 +14,6 @@ - @@ -30,7 +29,6 @@ - diff --git a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/apis/admin--Android-Mutual-SSL-Device-Management.xml b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/apis/admin--Android-Mutual-SSL-Device-Management.xml index d7fa119de..055e6fbf2 100644 --- a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/apis/admin--Android-Mutual-SSL-Device-Management.xml +++ b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/apis/admin--Android-Mutual-SSL-Device-Management.xml @@ -13,7 +13,6 @@ - @@ -29,7 +28,6 @@ - @@ -45,7 +43,6 @@ - @@ -61,7 +58,6 @@ - @@ -77,7 +73,6 @@ - diff --git a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/apis/admin--Android-Mutual-SSL-Event-Receiver.xml b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/apis/admin--Android-Mutual-SSL-Event-Receiver.xml index e39eb25e9..2d116a9ad 100644 --- a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/apis/admin--Android-Mutual-SSL-Event-Receiver.xml +++ b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/apis/admin--Android-Mutual-SSL-Event-Receiver.xml @@ -13,7 +13,6 @@ - @@ -29,7 +28,6 @@ - diff --git a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/android-datasources.xml.j2 b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/android-datasources.xml.j2 new file mode 100644 index 000000000..fd8ba5576 --- /dev/null +++ b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/android-datasources.xml.j2 @@ -0,0 +1,63 @@ + + + + + org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader + + + + + Android_DB + The datasource used as the Android Device Management database + + jdbc/MobileAndroidDM_DS + + + + {% if database.android is defined %} + {{database.android.url}} + {{database.android.username}} + {{database.android.password}} + {{database.android.driver}} + {{database.android.validationQuery}} + {% for property_name,property_value in database.android.pool_options.items() %} + <{{property_name}}>{{property_value}} + {% endfor %} + {% else %} + jdbc:h2:./repository/database/WSO2MobileAndroid_DB;DB_CLOSE_ON_EXIT=FALSE + wso2carbon + wso2carbon + org.h2.Driver + 50 + 60000 + true + SELECT 1 + 30000 + {% endif %} + + + + + + diff --git a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/conf_templates/templates/repository/conf/mobile-config.xml.j2 b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/conf_templates/templates/repository/conf/mobile-config.xml.j2 new file mode 100644 index 000000000..42a2e9fb5 --- /dev/null +++ b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/conf_templates/templates/repository/conf/mobile-config.xml.j2 @@ -0,0 +1,71 @@ + + + + + + + + + {% if mobile_conf.datasource.android.name is defined %} + {{mobile_conf.datasource.android.name}} + {% else %} + jdbc/MobileAndroidDM_DS + {% endif %} + + + + + + + + + appmanager + admin + /devices + 1.0.0 + http://localhost:9763/test/app + http,https + + + enrol + admin + /enroll + 1.0.0 + http://localhost:9763/mdm-android-agent/enrollment + http,https + + + license + admin + /license + 1.0.0 + http://localhost:9763/mdm-android-agent/devices/license + http,https + + + operation + admin + /operation + 1.0.0 + http://localhost:9763/mdm-android-agent/operations + http,https + + + + diff --git a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/datasources/android-datasources.xml b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/datasources/android-datasources.xml index a0c8b0393..1b879009c 100644 --- a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/datasources/android-datasources.xml +++ b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/datasources/android-datasources.xml @@ -30,8 +30,7 @@ - jdbc:h2:repository/database/WSO2MobileAndroid_DB;DB_CLOSE_ON_EXIT=FALSE - + jdbc:h2:./repository/database/WSO2MobileAndroid_DB;DB_CLOSE_ON_EXIT=FALSE wso2carbon wso2carbon org.h2.Driver diff --git a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/p2.inf b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/p2.inf index e188ddf4e..989103e63 100644 --- a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/p2.inf +++ b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/p2.inf @@ -1,8 +1,8 @@ instructions.configure = \ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/webapps/api#device-mgt#android#v1.0.war,target:${installFolder}/../../deployment/server/webapps/api#device-mgt#android#v1.0.war,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/jaggeryapps/devicemgt,target:${installFolder}/../../deployment/server/jaggeryapps/devicemgt,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/datasources/,target:${installFolder}/../../conf/datasources/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/conf/mobile-config.xml,target:${installFolder}/../../conf/mobile-config.xml,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/datasources/,target:${installFolder}/../../repository/conf/datasources/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/conf/mobile-config.xml,target:${installFolder}/../../repository/conf/mobile-config.xml,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/dbscripts/plugins/,target:${installFolder}/../../../dbscripts/cdm/plugins/android,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../database/);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/database/,target:${installFolder}/../../database/,overwrite:true);\ @@ -12,10 +12,11 @@ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../featur org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/apis/admin--Android-Mutual-SSL-Configuration-Management.xml,target:${installFolder}/../../deployment/server/synapse-configs/default/api/admin--Android-Mutual-SSL-Configuration-Management.xml,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/apis/admin--Android-Mutual-SSL-Device-Management.xml,target:${installFolder}/../../deployment/server/synapse-configs/default/api/admin--Android-Mutual-SSL-Device-Management.xml,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/apis/admin--Android-Mutual-SSL-Event-Receiver.xml,target:${installFolder}/../../deployment/server/synapse-configs/default/api/admin--Android-Mutual-SSL-Event-Receiver.xml,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/conf_templates/,target:${installFolder}/../../resources/conf/,overwrite:true);\ instructions.unconfigure = \ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/webapps/mdm-android-agent.war);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../conf/datasources/android-datasources.xml);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../repository/conf/datasources/android-datasources.xml);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/webapps/mdm-android-agent);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view);\ diff --git a/features/mobile-plugins-feature/android-plugin-feature/pom.xml b/features/mobile-plugins-feature/android-plugin-feature/pom.xml index 9f5e348cb..f79404bf7 100644 --- a/features/mobile-plugins-feature/android-plugin-feature/pom.xml +++ b/features/mobile-plugins-feature/android-plugin-feature/pom.xml @@ -22,13 +22,12 @@ org.wso2.carbon.devicemgt-plugins mobile-plugins-feature - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../pom.xml 4.0.0 android-plugin-feature - 5.0.16-SNAPSHOT pom WSO2 Carbon - Device Management Android Plugin Feature http://wso2.org diff --git a/features/mobile-plugins-feature/pom.xml b/features/mobile-plugins-feature/pom.xml index 65793fc07..3a01799d3 100644 --- a/features/mobile-plugins-feature/pom.xml +++ b/features/mobile-plugins-feature/pom.xml @@ -22,13 +22,12 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT ../../pom.xml 4.0.0 mobile-plugins-feature - 5.0.16-SNAPSHOT pom WSO2 Carbon - Device Management EMM Plugins Feature http://wso2.org diff --git a/pom.xml b/pom.xml index 6ded7706f..dc8327bb5 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt-plugins carbon-device-mgt-plugins-parent pom - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT WSO2 Carbon - Device Management Plugins Parent http://wso2.org WSO2 Carbon - Device Management Plugins Parent @@ -37,12 +37,12 @@ components/extensions components/mobile-plugins - - components/analytics - components/test-coverage - features/analytics-feature + + + + features/mobile-plugins-feature - + features/extensions-feature @@ -102,7 +102,7 @@ org.wso2.carbon org.wso2.carbon.logging - ${carbon.kernel.version} + ${carbon.logging.version} org.apache.log4j.wso2 @@ -300,22 +300,6 @@ org.wso2.carbon.certificate.mgt.core ${carbon.devicemgt.version} - - org.wso2.carbon.devicemgt - org.wso2.carbon.device.mgt.analytics.data.publisher - ${carbon.devicemgt.version} - - - jboss - javassist - - - - - org.wso2.carbon.devicemgt - org.wso2.carbon.dynamic.client.registration - ${carbon.devicemgt.version} - org.wso2.carbon.devicemgt org.wso2.carbon.identity.jwt.client.extension @@ -331,16 +315,6 @@ org.wso2.carbon.apimgt.webapp.publisher ${carbon.devicemgt.version} - - org.wso2.carbon.event-processing - org.wso2.carbon.siddhi.geo.event.fuser - ${carbon.event.processing.version} - - - org.wso2.carbon.event-processing - org.wso2.carbon.siddhi.geo.event.notifier - ${carbon.event.processing.version} - org.wso2.carbon.devicemgt org.wso2.carbon.apimgt.annotations @@ -403,11 +377,6 @@ org.wso2.carbon.databridge.core ${carbon.analytics.common.version} - - org.wso2.carbon.analytics - org.wso2.carbon.analytics.api - ${carbon.analytics.version} - org.wso2.carbon.analytics-common org.wso2.carbon.event.stream.core @@ -1154,11 +1123,11 @@ - 4.1.16-SNAPSHOT - [4.0.0, 5.0.0) + 5.0.0-SNAPSHOT + [5.0.0-SNAPSHOT, 6.0.0) - 5.0.16-SNAPSHOT + ${project.version} 4.0.0 @@ -1168,10 +1137,11 @@ 1.8 - 4.4.26 - [4.4.0, 4.5.0) + 4.6.2 + [4.5.0, 5.0.0) + 4.4.9 - 1.5.4 + 5.1.2 [1.6.1.wso2v11, 1.7.0) @@ -1188,7 +1158,7 @@ 3.6.100.v20120522-1841 - 3.9.1.v20130814-1242 + 3.9.1.v20140110-1610 1.2.140.wso2v3 @@ -1196,7 +1166,7 @@ 7.0.34.wso2v2 - 2.6.1 + 3.3.6 2.5.11 1.9.0 1.1.1 @@ -1208,22 +1178,22 @@ 4.7.15 - 5.11.148 - 5.6.63 - [5.2.0, 6.0.0) - 5.1.2 + 5.18.187 + 6.4.111 + [5.2.0, 7.0.0) + 5.1.5 - 4.6.11 + 4.9.10 - 4.6.28 + 4.7.39 - 4.7.23 + 4.8.21 - 6.2.201 + 9.0.174 3.0.4.wso2v1 @@ -1234,21 +1204,18 @@ 8.1.3.v20120416 - 1.5.8 + 1.5.10 - 5.1.37 - [5.1.3,6.0.0) - 1.3.25 - [1.3.0,2.0.0) - 2.1.23 + 5.2.34 + [5.2.0,6.0.0) 1.51.0.0 1.49 2.0.0 3.0.21 - 2.3.1 + 2.8.5 1.0.2 2.4.0.wso2v1 2.4 @@ -1265,8 +1232,8 @@ 1.2.11.wso2v10 1.2.17 - 3.0.5.RELEASE - 2.1.0.RELEASE + 5.1.13.RELEASE + 3.0.8.RELEASE 2.2.8 1.3.18 1.52.0.wso2v2 @@ -1292,8 +1259,8 @@ 4.5.6 - 2.26.1.wso2v3 - [2.26.1, 3.0.0) + 7.3.0.wso2v1 + [7.3, 8) 1.5.6.wso2v1 @@ -1313,7 +1280,7 @@ 3.2.34 3.2.50 - 2.6.1.wso2v1 + 2.9.8.wso2v1 3.2.34 @@ -1335,6 +1302,11 @@ 3.8.1 1.13.0 9.3.1 + + 2.7.18 + + [1.6.0, 2.0.0) + [1.2.0,1.3.0)