Resolved conflicts and merged

revert-dabc3590
Milan Perera 7 years ago
commit 489bb291cb

@ -21,7 +21,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>iot-analytics</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -21,7 +21,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>iot-analytics</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -21,7 +21,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>iot-analytics</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -21,7 +21,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>iot-analytics</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>analytics</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

@ -21,7 +21,7 @@
<parent>
<artifactId>androidsense-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -3,7 +3,7 @@
<parent>
<artifactId>androidsense-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<artifactId>androidsense-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -20,6 +20,7 @@ function onRequest(context) {
var log = new Log("device-view.js");
var deviceType = context.uriParams.deviceType;
var deviceId = request.getParameter("id");
var owner = request.getParameter("owner");
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var autoCompleteParams = [
{"name" : "deviceId", "value" : deviceId}
@ -27,7 +28,7 @@ function onRequest(context) {
if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var device = deviceModule.viewDevice(deviceType, deviceId);
var device = deviceModule.viewDevice(deviceType, deviceId, owner);
if (device && device.status != "error") {
var anchor = { "device" : { "id" : device.content.deviceIdentifier, "type" : device.content.type}};
var viewObject = {};

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>device-types</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -21,7 +21,7 @@
<parent>
<artifactId>arduino-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -21,7 +21,7 @@
<parent>
<artifactId>arduino-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -23,7 +23,7 @@
<parent>
<artifactId>arduino-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>device-types</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

@ -21,7 +21,7 @@
<parent>
<artifactId>raspberrypi-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -21,7 +21,7 @@
<parent>
<artifactId>raspberrypi-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -23,7 +23,7 @@
<parent>
<artifactId>raspberrypi-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>device-types</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -23,7 +23,7 @@
<parent>
<artifactId>virtual-fire-alarm-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -21,7 +21,7 @@
<parent>
<artifactId>virtual-fire-alarm-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -21,7 +21,7 @@
<parent>
<artifactId>virtual-fire-alarm-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -23,7 +23,7 @@
<parent>
<artifactId>virtual-fire-alarm-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>device-types</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -18,7 +18,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>appm-connector</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -18,7 +18,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>appm-connector</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>extensions</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -20,7 +20,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>cdmf-transport-adapters</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -20,7 +20,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>cdmf-transport-adapters</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

@ -20,7 +20,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>cdmf-transport-adapters</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -21,7 +21,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>cdmf-transport-adapters</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

@ -20,7 +20,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>cdmf-transport-adapters</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -20,7 +20,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>cdmf-transport-adapters</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>cdmf-transport-adapters</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

@ -21,7 +21,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>cdmf-transport-adapters</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

@ -20,7 +20,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>cdmf-transport-adapters</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>extensions</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>mb-extensions</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>extensions</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>pull-notification-listeners</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>extensions</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -20,7 +20,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>siddhi-extensions</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -20,7 +20,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>siddhi-extensions</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>extensions</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -21,7 +21,7 @@
<parent>
<artifactId>android-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -316,15 +316,15 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
@Path("/{id}/status")
@Override
public Response isEnrolled(@PathParam("id") String id, @HeaderParam("If-Modified-Since") String ifModifiedSince) {
boolean result;
DeviceIdentifier deviceIdentifier = AndroidAPIUtils.convertToDeviceIdentifierObject(id);
try {
result = AndroidAPIUtils.getDeviceManagementService().isEnrolled(deviceIdentifier);
if (result) {
Device device = AndroidAPIUtils.getDeviceManagementService().getDevice(deviceIdentifier);
if (device != null) {
String status = String.valueOf(device.getEnrolmentInfo().getStatus());
Message responseMessage = new Message();
responseMessage.setResponseCode(Response.Status.OK.toString());
responseMessage.setResponseMessage("Android device that carries the id '" +
id + "' is enrolled");
responseMessage
.setResponseMessage("Status of android device that carries the id '" + id + "' is " + status);
return Response.status(Response.Status.OK).entity(responseMessage).build();
} else {
Message responseMessage = new Message();

@ -21,7 +21,7 @@
<parent>
<artifactId>android-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -23,13 +23,13 @@
<parent>
<artifactId>android-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.mobile.android.ui</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<name>WSO2 Carbon - Mobile Android UI</name>
<packaging>pom</packaging>

@ -20,12 +20,13 @@ function onRequest(context) {
// var log = new Log("device-view.js");
var deviceType = context["uriParams"]["deviceType"];
var deviceId = request.getParameter("id");
var owner = request.getParameter("owner");
var deviceViewData = {};
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
if (deviceType && deviceId) {
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var response = deviceModule.viewDevice(deviceType, deviceId);
var response = deviceModule.viewDevice(deviceType, deviceId, owner);
if (response["status"] == "success") {
deviceViewData["deviceFound"] = true;
deviceViewData["isAuthorized"] = true;

@ -742,9 +742,12 @@ var androidOperationModule = function () {
// only for app whitelisting and black listing
if (operationCode == "APP-RESTRICTION" && key == "restrictedApplications") {
//remove elements before adding
$('[data-add-form-container="#restricted-applications-grid"]').empty();
var i;
for (i = 0; i < uiPayload.restrictedApplications.length; ++i) {
$("#restrictedapplication-list").append('<tr>' +
$('[data-add-form-container="#restricted-applications-grid"]').append('<tr>' +
'<th>'+ (i+1) +'</th> <th>' + uiPayload.restrictedApplications[i].appName +
'</th> <th>' + uiPayload.restrictedApplications[i].packageName + '</th></tr>');
}

@ -22,7 +22,7 @@
<parent>
<artifactId>android-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>mobile-plugins</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

@ -21,7 +21,7 @@
<parent>
<artifactId>windows-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -23,13 +23,13 @@
<parent>
<artifactId>windows-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.mobile.windows.ui</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<name>WSO2 Carbon - Mobile Windows UI</name>
<packaging>pom</packaging>

@ -20,11 +20,12 @@ function onRequest(context) {
// var log = new Log("device-view.js");
var deviceType = context["uriParams"]["deviceType"];
var deviceId = request.getParameter("id");
var owner = request.getParameter("owner");
var deviceViewData = {};
if (deviceType && deviceId) {
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var response = deviceModule.viewDevice(deviceType, deviceId);
var response = deviceModule.viewDevice(deviceType, deviceId, owner);
if (response["status"] == "success") {
deviceViewData["deviceFound"] = true;
deviceViewData["isAuthorized"] = true;

@ -22,7 +22,7 @@
<parent>
<artifactId>windows-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -2,8 +2,6 @@ package org.wso2.carbon.device.mgt.mobile.windows.impl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.TransactionManagementException;
import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory;
import org.wso2.carbon.device.mgt.mobile.windows.impl.dao.MobileDeviceManagementDAOException;
import org.wso2.carbon.device.mgt.mobile.windows.impl.dao.WindowsDAOFactory;
import org.wso2.carbon.device.mgt.mobile.windows.impl.dao.WindowsEnrollmentTokenDAO;
@ -16,7 +14,6 @@ public class WindowsTokenServiceImpl implements WindowsTokenService {
private static WindowsEnrollmentTokenDAO windowsEnrollmentTokenDAO;
public WindowsTokenServiceImpl() {
WindowsDAOFactory windowsDAOFactory = new WindowsDAOFactory();
windowsEnrollmentTokenDAO = new WindowsEnrollmentTokenDAOImpl();
}
@ -46,9 +43,8 @@ public class WindowsTokenServiceImpl implements WindowsTokenService {
public MobileCacheEntry getCacheToken(String token) throws MobileDeviceManagementDAOException {
MobileCacheEntry cacheEntry = null;
try {
WindowsDAOFactory.beginTransaction();
WindowsDAOFactory.openConnection();
cacheEntry = windowsEnrollmentTokenDAO.getCacheToken(token);
WindowsDAOFactory.commitTransaction();
} finally {
WindowsDAOFactory.closeConnection();
}
@ -59,9 +55,8 @@ public class WindowsTokenServiceImpl implements WindowsTokenService {
throws MobileDeviceManagementDAOException {
MobileCacheEntry cacheEntry = null;
try {
WindowsDAOFactory.beginTransaction();
WindowsDAOFactory.openConnection();
cacheEntry = windowsEnrollmentTokenDAO.getCacheTokenFromDeviceId(deviceId);
WindowsDAOFactory.commitTransaction();
} finally {
WindowsDAOFactory.closeConnection();
}

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>mobile-plugins</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -23,7 +23,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>analytics-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -23,13 +23,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>analytics-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.iot.analytics.feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - IoT Server Analytics Feature</name>
<url>http://wso2.org</url>

@ -23,13 +23,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>analytics-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.iot.device.statistics.dashboard.feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - IoT Server Analytics Feature</name>
<url>http://wso2.org</url>

@ -23,7 +23,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>analytics-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

@ -23,13 +23,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>androidsense-plugin-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - IoT Server Android Sense Analytics Feature</name>
<url>http://wso2.org</url>

@ -23,13 +23,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>androidsense-plugin-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.iot.androidsense.backend.feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - IoT Server Android Sense Backend Feature</name>
<url>http://wso2.org</url>

@ -23,13 +23,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>androidsense-plugin-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.iot.androidsense.ui.feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - IoT Server Android Sense UI Feature</name>
<url>http://wso2.org</url>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>device-types-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -23,7 +23,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>arduino-plugin-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -23,7 +23,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>arduino-plugin-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -23,7 +23,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>arduino-plugin-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>device-types-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,13 +22,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>device-types-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - Device Management IoT Plugins Feature</name>
<url>http://wso2.org</url>

@ -23,7 +23,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>raspberrypi-plugin-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -23,7 +23,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>raspberrypi-plugin-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -48,6 +48,6 @@ class RefreshToken():
params = urllib.urlencode({"grant_type": "refresh_token", "refresh_token": refreshToken,
"scope": "Enroll device"})
data = self.post("/token", params, applicationKey)
response = json.loads(data)
response = json.loads(data.content)
self.updateFile(response)
return response

@ -23,7 +23,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>raspberrypi-plugin-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>device-types-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -23,7 +23,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>virtual-fire-alarm-plugin-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -23,7 +23,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>virtual-fire-alarm-plugin-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -23,7 +23,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>virtual-fire-alarm-plugin-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>device-types-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -23,7 +23,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>extensions-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -20,13 +20,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>extensions-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>org.wso2.carbon.appmgt.mdm.osgiconnector.feature</artifactId>
<packaging>pom</packaging>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<name>WSO2 Carbon - App management MDM OSGI Connector</name>
<url>http://wso2.org</url>
<description>This feature contains the core bundles required for APP management OSGI MDM connection
@ -36,7 +36,7 @@
<dependency>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>org.wso2.carbon.appmgt.mdm.osgiconnector</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.apache.ws.commons.axiom</groupId>

@ -20,13 +20,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>extensions-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>org.wso2.carbon.appmgt.mdm.restconnector.feature</artifactId>
<packaging>pom</packaging>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<name>WSO2 Carbon - App management MDM REST Connector</name>
<url>http://wso2.org</url>
<description>This feature contains the core bundles required for APP management MDM REST connection
@ -36,7 +36,7 @@
<dependency>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>org.wso2.carbon.appmgt.mdm.restconnector</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.apache.ws.commons.axiom</groupId>

@ -23,14 +23,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>extensions-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.adapter.feature</artifactId>
<packaging>pom</packaging>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<name>WSO2 Carbon - Device Management Adapters Feature</name>
<url>http://wso2.org</url>
<description>This feature contains the adapter bundles required for IoT Server</description>

@ -3,14 +3,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>extensions-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.notification.listener.feature</artifactId>
<packaging>pom</packaging>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<name>WSO2 Carbon - Notification Listener</name>
<url>http://wso2.org</url>
<description>This feature contains the core bundles required iot core listeners</description>

@ -20,13 +20,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>extensions-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>org.wso2.extension.siddhi.execution.json.feature</artifactId>
<packaging>pom</packaging>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<name>WSO2 Siddhi Execution Extension - Json Feature</name>
<url>http://wso2.org</url>
<description>This feature contains Siddhi extension feature for changing a json string to individual properties.</description>

@ -23,7 +23,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>extensions-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,13 +22,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>extensions-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - Device Management Extensions</name>
<url>http://wso2.org</url>

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>android-plugin-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.mobile.android.feature</artifactId>
<packaging>pom</packaging>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<name>WSO2 Carbon - Android Device Management Feature</name>
<url>http://wso2.org</url>
<description>This feature contains the core bundles required for Android Device Management

@ -22,13 +22,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>mobile-plugins-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>android-plugin-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - Device Management Android Plugin Feature</name>
<url>http://wso2.org</url>

@ -22,13 +22,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>mobile-plugins-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - Device Management EMM Plugins Feature</name>
<url>http://wso2.org</url>

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<artifactId>windows-plugin-feature</artifactId>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.mobile.windows.feature</artifactId>
<packaging>pom</packaging>
<version>4.0.73-SNAPSHOT</version>
<version>4.0.82-SNAPSHOT</version>
<name>WSO2 Carbon - Windows Device Management Feature</name>
<url>http://wso2.org</url>
<description>This feature contains the core bundles required for Windows Device Management

@ -3,7 +3,7 @@
-- -----------------------------------------------------
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[WIN_FEATURE]') AND TYPE IN (N'U'))
CREATE TABLE WIN_FEATURE (
ID INT NOT NULL IDENTITY,
ID INTEGER IDENTITY(1,1) NOT NULL,
CODE VARCHAR(45) NOT NULL,
NAME VARCHAR(100) NULL,
DESCRIPTION VARCHAR(200) NULL,
@ -36,8 +36,9 @@ CREATE TABLE WIN_DEVICE (
-- -----------------------------------------------------
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[WINDOWS_ENROLLMENT_TOKEN]') AND TYPE IN (N'U'))
CREATE TABLE WINDOWS_ENROLLMENT_TOKEN (
ID INT NOT NULL IDENTITY,
ID INTEGER IDENTITY(1,1) NOT NULL,
TENANT_DOMAIN VARCHAR(45) NOT NULL,
TENANT_ID INTEGER DEFAULT 0,
ENROLLMENT_TOKEN VARCHAR (100) NULL DEFAULT NULL,
DEVICE_ID VARCHAR (100) NOT NULL,
USERNAME VARCHAR (45) NOT NULL,

@ -36,6 +36,7 @@ ENGINE = InnoDB;
CREATE TABLE IF NOT EXISTS `WINDOWS_ENROLLMENT_TOKEN` (
`ID` INT NOT NULL AUTO_INCREMENT,
`TENANT_DOMAIN` VARCHAR(45) NOT NULL,
`TENANT_ID` INT DEFAULT 0,
`ENROLLMENT_TOKEN` VARCHAR(100) NULL,
`DEVICE_ID` VARCHAR(100) NULL,
`USERNAME` VARCHAR(45) NULL,

@ -23,7 +23,7 @@ CREATE TABLE WIN_DEVICE (
-- Table `WIN_FEATURE`
-- -----------------------------------------------------
CREATE TABLE WIN_FEATURE (
ID INT NOT NULL,
ID NUMBER(10) NOT NULL,
CODE VARCHAR(45) NOT NULL,
NAME VARCHAR(100) NOT NULL,
DESCRIPTION VARCHAR(200) NULL,
@ -35,8 +35,9 @@ CREATE TABLE WIN_FEATURE (
-- Table `WINDOWS_ENROLLMENT_TOKEN`
-- -----------------------------------------------------
CREATE TABLE WINDOWS_ENROLLMENT_TOKEN (
ID INT NOT NULL,
ID NUMBER(10) NOT NULL,
TENANT_DOMAIN VARCHAR(45) NOT NULL,
TENANT_ID NUMBER(10) DEFAULT 0,
ENROLLMENT_TOKEN VARCHAR(100) NULL,
DEVICE_ID VARCHAR(100) NULL,
USERNAME VARCHAR(45) NULL,
@ -62,4 +63,23 @@ FOR EACH ROW
BEGIN
SELECT WIN_FEATURE_ID_INC_SEQ.NEXTVAL INTO :NEW.ID FROM DUAL;
END;
/
-- -----------------------------------------------------
-- Sequence `WIN_ENR_TOKEN_ID_INC_SEQ`
-- -----------------------------------------------------
CREATE SEQUENCE WIN_ENR_TOKEN_ID_INC_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
/
-- -----------------------------------------------------
-- Trigger `WIN_ENR_TOKEN_ID_INC_TRIG`
-- -----------------------------------------------------
CREATE OR REPLACE TRIGGER WIN_ENR_TOKEN_ID_INC_TRIG
BEFORE INSERT
ON WINDOWS_ENROLLMENT_TOKEN
REFERENCING NEW AS NEW
FOR EACH ROW
BEGIN
SELECT WIN_ENR_TOKEN_ID_INC_SEQ.NEXTVAL INTO :NEW.ID FROM DUAL;
END;
/

@ -35,6 +35,7 @@ CREATE TABLE IF NOT EXISTS WIN_FEATURE (
CREATE TABLE IF NOT EXISTS WINDOWS_ENROLLMENT_TOKEN (
ID SERIAL NOT NULL,
TENANT_DOMAIN VARCHAR(45) NOT NULL,
TENANT_ID INTEGER DEFAULT 0,
ENROLLMENT_TOKEN VARCHAR(100) NULL,
DEVICE_ID VARCHAR(100) NULL,
USERNAME VARCHAR(45) NULL,

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save