mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Fix conflicts
This commit is contained in:
commit
ca2e631076
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>androidsense-plugin</artifactId>
|
<artifactId>androidsense-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>androidsense-plugin</artifactId>
|
<artifactId>androidsense-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,37 +23,25 @@ import org.apache.commons.logging.LogFactory;
|
|||||||
import org.wso2.carbon.analytics.dataservice.commons.SORT;
|
import org.wso2.carbon.analytics.dataservice.commons.SORT;
|
||||||
import org.wso2.carbon.analytics.dataservice.commons.SortByField;
|
import org.wso2.carbon.analytics.dataservice.commons.SortByField;
|
||||||
import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException;
|
import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException;
|
||||||
import org.wso2.carbon.device.mgt.common.Device;
|
import org.wso2.carbon.device.mgt.common.*;
|
||||||
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
|
|
||||||
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
|
||||||
import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
|
|
||||||
import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationException;
|
import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationException;
|
||||||
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException;
|
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException;
|
||||||
import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroupConstants;
|
import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroupConstants;
|
||||||
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
|
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
|
||||||
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
|
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
|
||||||
import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation;
|
import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation;
|
||||||
|
import org.wso2.carbon.device.mgt.iot.androidsense.plugin.constants.AndroidSenseConstants;
|
||||||
import org.wso2.carbon.device.mgt.iot.androidsense.service.impl.util.APIUtil;
|
import org.wso2.carbon.device.mgt.iot.androidsense.service.impl.util.APIUtil;
|
||||||
import org.wso2.carbon.device.mgt.iot.androidsense.service.impl.util.AndroidConfiguration;
|
import org.wso2.carbon.device.mgt.iot.androidsense.service.impl.util.AndroidConfiguration;
|
||||||
import org.wso2.carbon.device.mgt.iot.androidsense.service.impl.util.Constants;
|
import org.wso2.carbon.device.mgt.iot.androidsense.service.impl.util.Constants;
|
||||||
import org.wso2.carbon.device.mgt.iot.androidsense.service.impl.util.SensorRecord;
|
import org.wso2.carbon.device.mgt.iot.androidsense.service.impl.util.SensorRecord;
|
||||||
import org.wso2.carbon.device.mgt.iot.androidsense.plugin.constants.AndroidSenseConstants;
|
|
||||||
import org.wso2.carbon.device.mgt.iot.util.Utils;
|
import org.wso2.carbon.device.mgt.iot.util.Utils;
|
||||||
|
|
||||||
import javax.ws.rs.Consumes;
|
import javax.ws.rs.*;
|
||||||
import javax.ws.rs.DELETE;
|
|
||||||
import javax.ws.rs.GET;
|
|
||||||
import javax.ws.rs.POST;
|
|
||||||
import javax.ws.rs.Path;
|
|
||||||
import javax.ws.rs.PathParam;
|
|
||||||
import javax.ws.rs.Produces;
|
|
||||||
import javax.ws.rs.QueryParam;
|
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -69,7 +57,7 @@ public class AndroidSenseServiceImpl implements AndroidSenseService {
|
|||||||
public Response sendKeyWords(@PathParam("deviceId") String deviceId, @QueryParam("keywords") String keywords) {
|
public Response sendKeyWords(@PathParam("deviceId") String deviceId, @QueryParam("keywords") String keywords) {
|
||||||
try {
|
try {
|
||||||
if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized(new DeviceIdentifier(deviceId,
|
if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized(new DeviceIdentifier(deviceId,
|
||||||
AndroidSenseConstants.DEVICE_TYPE))) {
|
AndroidSenseConstants.DEVICE_TYPE))) {
|
||||||
return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build();
|
return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build();
|
||||||
}
|
}
|
||||||
String publishTopic = APIUtil.getAuthenticatedUserTenantDomain()
|
String publishTopic = APIUtil.getAuthenticatedUserTenantDomain()
|
||||||
@ -88,8 +76,12 @@ public class AndroidSenseServiceImpl implements AndroidSenseService {
|
|||||||
List<DeviceIdentifier> deviceIdentifiers = new ArrayList<>();
|
List<DeviceIdentifier> deviceIdentifiers = new ArrayList<>();
|
||||||
deviceIdentifiers.add(new DeviceIdentifier(deviceId, AndroidSenseConstants.DEVICE_TYPE));
|
deviceIdentifiers.add(new DeviceIdentifier(deviceId, AndroidSenseConstants.DEVICE_TYPE));
|
||||||
APIUtil.getDeviceManagementService().addOperation(AndroidSenseConstants.DEVICE_TYPE, commandOp,
|
APIUtil.getDeviceManagementService().addOperation(AndroidSenseConstants.DEVICE_TYPE, commandOp,
|
||||||
deviceIdentifiers);
|
deviceIdentifiers);
|
||||||
return Response.ok().build();
|
return Response.ok().build();
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String msg = "Invalid Device Identifiers found.";
|
||||||
|
log.error(msg, e);
|
||||||
|
return Response.status(Response.Status.BAD_REQUEST).build();
|
||||||
} catch (DeviceAccessAuthorizationException e) {
|
} catch (DeviceAccessAuthorizationException e) {
|
||||||
log.error(e.getErrorMessage(), e);
|
log.error(e.getErrorMessage(), e);
|
||||||
return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build();
|
return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build();
|
||||||
@ -126,6 +118,10 @@ public class AndroidSenseServiceImpl implements AndroidSenseService {
|
|||||||
APIUtil.getDeviceManagementService().addOperation(AndroidSenseConstants.DEVICE_TYPE, commandOp,
|
APIUtil.getDeviceManagementService().addOperation(AndroidSenseConstants.DEVICE_TYPE, commandOp,
|
||||||
deviceIdentifiers);
|
deviceIdentifiers);
|
||||||
return Response.ok().build();
|
return Response.ok().build();
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String msg = "Invalid Device Identifiers found.";
|
||||||
|
log.error(msg, e);
|
||||||
|
return Response.status(Response.Status.BAD_REQUEST).build();
|
||||||
} catch (DeviceAccessAuthorizationException e) {
|
} catch (DeviceAccessAuthorizationException e) {
|
||||||
return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build();
|
return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build();
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
@ -161,6 +157,10 @@ public class AndroidSenseServiceImpl implements AndroidSenseService {
|
|||||||
APIUtil.getDeviceManagementService().addOperation(AndroidSenseConstants.DEVICE_TYPE, commandOp,
|
APIUtil.getDeviceManagementService().addOperation(AndroidSenseConstants.DEVICE_TYPE, commandOp,
|
||||||
deviceIdentifiers);
|
deviceIdentifiers);
|
||||||
return Response.ok().build();
|
return Response.ok().build();
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String msg = "Invalid Device Identifiers found.";
|
||||||
|
log.error(msg, e);
|
||||||
|
return Response.status(Response.Status.BAD_REQUEST).build();
|
||||||
} catch (DeviceAccessAuthorizationException e) {
|
} catch (DeviceAccessAuthorizationException e) {
|
||||||
log.error(e.getErrorMessage(), e);
|
log.error(e.getErrorMessage(), e);
|
||||||
return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build();
|
return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build();
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>androidsense-plugin</artifactId>
|
<artifactId>androidsense-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>androidsense-plugin</artifactId>
|
<artifactId>androidsense-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-plugins</artifactId>
|
<artifactId>iot-plugins</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>arduino-plugin</artifactId>
|
<artifactId>arduino-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>arduino-plugin</artifactId>
|
<artifactId>arduino-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -28,18 +28,15 @@ import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService
|
|||||||
import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey;
|
import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey;
|
||||||
import org.wso2.carbon.apimgt.application.extension.exception.APIManagerException;
|
import org.wso2.carbon.apimgt.application.extension.exception.APIManagerException;
|
||||||
import org.wso2.carbon.context.PrivilegedCarbonContext;
|
import org.wso2.carbon.context.PrivilegedCarbonContext;
|
||||||
import org.wso2.carbon.device.mgt.common.Device;
|
import org.wso2.carbon.device.mgt.common.*;
|
||||||
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
|
|
||||||
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
|
||||||
import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
|
|
||||||
import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationException;
|
import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationException;
|
||||||
import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroupConstants;
|
import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroupConstants;
|
||||||
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
|
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
|
||||||
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
|
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
|
||||||
import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation;
|
import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation;
|
||||||
|
import org.wso2.carbon.device.mgt.iot.arduino.plugin.constants.ArduinoConstants;
|
||||||
import org.wso2.carbon.device.mgt.iot.arduino.service.impl.dto.SensorRecord;
|
import org.wso2.carbon.device.mgt.iot.arduino.service.impl.dto.SensorRecord;
|
||||||
import org.wso2.carbon.device.mgt.iot.arduino.service.impl.util.APIUtil;
|
import org.wso2.carbon.device.mgt.iot.arduino.service.impl.util.APIUtil;
|
||||||
import org.wso2.carbon.device.mgt.iot.arduino.plugin.constants.ArduinoConstants;
|
|
||||||
import org.wso2.carbon.device.mgt.iot.arduino.service.impl.util.ZipUtil;
|
import org.wso2.carbon.device.mgt.iot.arduino.service.impl.util.ZipUtil;
|
||||||
import org.wso2.carbon.device.mgt.iot.util.ZipArchive;
|
import org.wso2.carbon.device.mgt.iot.util.ZipArchive;
|
||||||
import org.wso2.carbon.identity.jwt.client.extension.JWTClient;
|
import org.wso2.carbon.identity.jwt.client.extension.JWTClient;
|
||||||
@ -47,26 +44,12 @@ import org.wso2.carbon.identity.jwt.client.extension.dto.AccessTokenInfo;
|
|||||||
import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException;
|
import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException;
|
||||||
import org.wso2.carbon.user.api.UserStoreException;
|
import org.wso2.carbon.user.api.UserStoreException;
|
||||||
|
|
||||||
import javax.ws.rs.Consumes;
|
import javax.ws.rs.*;
|
||||||
import javax.ws.rs.GET;
|
|
||||||
import javax.ws.rs.POST;
|
|
||||||
import javax.ws.rs.Path;
|
|
||||||
import javax.ws.rs.PathParam;
|
|
||||||
import javax.ws.rs.Produces;
|
|
||||||
import javax.ws.rs.QueryParam;
|
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.NoSuchElementException;
|
|
||||||
import java.util.Properties;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
public class ArduinoServiceImpl implements ArduinoService {
|
public class ArduinoServiceImpl implements ArduinoService {
|
||||||
|
|
||||||
@ -81,7 +64,7 @@ public class ArduinoServiceImpl implements ArduinoService {
|
|||||||
public Response switchBulb(@PathParam("deviceId") String deviceId, @QueryParam("state") String state) {
|
public Response switchBulb(@PathParam("deviceId") String deviceId, @QueryParam("state") String state) {
|
||||||
try {
|
try {
|
||||||
if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized(new DeviceIdentifier(deviceId,
|
if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized(new DeviceIdentifier(deviceId,
|
||||||
ArduinoConstants.DEVICE_TYPE), DeviceGroupConstants.Permissions.DEFAULT_OPERATOR_PERMISSIONS)) {
|
ArduinoConstants.DEVICE_TYPE), DeviceGroupConstants.Permissions.DEFAULT_OPERATOR_PERMISSIONS)) {
|
||||||
return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build();
|
return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build();
|
||||||
}
|
}
|
||||||
String operation = "BULB:" + state.toUpperCase();
|
String operation = "BULB:" + state.toUpperCase();
|
||||||
@ -94,8 +77,12 @@ public class ArduinoServiceImpl implements ArduinoService {
|
|||||||
List<DeviceIdentifier> deviceIdentifiers = new ArrayList<>();
|
List<DeviceIdentifier> deviceIdentifiers = new ArrayList<>();
|
||||||
deviceIdentifiers.add(new DeviceIdentifier(deviceId, ArduinoConstants.DEVICE_TYPE));
|
deviceIdentifiers.add(new DeviceIdentifier(deviceId, ArduinoConstants.DEVICE_TYPE));
|
||||||
APIUtil.getDeviceManagementService().addOperation(ArduinoConstants.DEVICE_TYPE, commandOp,
|
APIUtil.getDeviceManagementService().addOperation(ArduinoConstants.DEVICE_TYPE, commandOp,
|
||||||
deviceIdentifiers);
|
deviceIdentifiers);
|
||||||
return Response.status(Response.Status.OK.getStatusCode()).build();
|
return Response.status(Response.Status.OK.getStatusCode()).build();
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String msg = "Invalid Device Identifiers found.";
|
||||||
|
log.error(msg, e);
|
||||||
|
return Response.status(Response.Status.BAD_REQUEST).build();
|
||||||
} catch (DeviceAccessAuthorizationException e) {
|
} catch (DeviceAccessAuthorizationException e) {
|
||||||
log.error(e.getErrorMessage(), e);
|
log.error(e.getErrorMessage(), e);
|
||||||
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
|
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>arduino-plugin</artifactId>
|
<artifactId>arduino-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>arduino-plugin</artifactId>
|
<artifactId>arduino-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-plugins</artifactId>
|
<artifactId>iot-plugins</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-analytics</artifactId>
|
<artifactId>iot-analytics</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-plugins</artifactId>
|
<artifactId>iot-plugins</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>iot-base-plugin</artifactId>
|
<artifactId>iot-base-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>iot-base-plugin</artifactId>
|
<artifactId>iot-base-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>iot-base-plugin</artifactId>
|
<artifactId>iot-base-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>iot-base-plugin</artifactId>
|
<artifactId>iot-base-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>iot-base-plugin</artifactId>
|
<artifactId>iot-base-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>iot-base-plugin</artifactId>
|
<artifactId>iot-base-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>iot-base-plugin</artifactId>
|
<artifactId>iot-base-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>iot-base-plugin</artifactId>
|
<artifactId>iot-base-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>iot-base-plugin</artifactId>
|
<artifactId>iot-base-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>iot-base-plugin</artifactId>
|
<artifactId>iot-base-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-plugins</artifactId>
|
<artifactId>iot-plugins</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>raspberrypi-plugin</artifactId>
|
<artifactId>raspberrypi-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>raspberrypi-plugin</artifactId>
|
<artifactId>raspberrypi-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -28,18 +28,15 @@ import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService
|
|||||||
import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey;
|
import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey;
|
||||||
import org.wso2.carbon.apimgt.application.extension.exception.APIManagerException;
|
import org.wso2.carbon.apimgt.application.extension.exception.APIManagerException;
|
||||||
import org.wso2.carbon.context.PrivilegedCarbonContext;
|
import org.wso2.carbon.context.PrivilegedCarbonContext;
|
||||||
import org.wso2.carbon.device.mgt.common.Device;
|
import org.wso2.carbon.device.mgt.common.*;
|
||||||
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
|
|
||||||
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
|
||||||
import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
|
|
||||||
import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationException;
|
import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationException;
|
||||||
import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroupConstants;
|
import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroupConstants;
|
||||||
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
|
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
|
||||||
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
|
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
|
||||||
import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation;
|
import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation;
|
||||||
|
import org.wso2.carbon.device.mgt.iot.raspberrypi.plugin.constants.RaspberrypiConstants;
|
||||||
import org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl.dto.SensorRecord;
|
import org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl.dto.SensorRecord;
|
||||||
import org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl.util.APIUtil;
|
import org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl.util.APIUtil;
|
||||||
import org.wso2.carbon.device.mgt.iot.raspberrypi.plugin.constants.RaspberrypiConstants;
|
|
||||||
import org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl.util.ZipUtil;
|
import org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl.util.ZipUtil;
|
||||||
import org.wso2.carbon.device.mgt.iot.util.ZipArchive;
|
import org.wso2.carbon.device.mgt.iot.util.ZipArchive;
|
||||||
import org.wso2.carbon.identity.jwt.client.extension.JWTClient;
|
import org.wso2.carbon.identity.jwt.client.extension.JWTClient;
|
||||||
@ -47,24 +44,12 @@ import org.wso2.carbon.identity.jwt.client.extension.dto.AccessTokenInfo;
|
|||||||
import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException;
|
import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException;
|
||||||
import org.wso2.carbon.user.api.UserStoreException;
|
import org.wso2.carbon.user.api.UserStoreException;
|
||||||
|
|
||||||
import javax.ws.rs.Consumes;
|
import javax.ws.rs.*;
|
||||||
import javax.ws.rs.GET;
|
|
||||||
import javax.ws.rs.POST;
|
|
||||||
import javax.ws.rs.Path;
|
|
||||||
import javax.ws.rs.PathParam;
|
|
||||||
import javax.ws.rs.Produces;
|
|
||||||
import javax.ws.rs.QueryParam;
|
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Properties;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
public class RaspberryPiServiceImpl implements RaspberryPiService {
|
public class RaspberryPiServiceImpl implements RaspberryPiService {
|
||||||
|
|
||||||
@ -77,7 +62,7 @@ public class RaspberryPiServiceImpl implements RaspberryPiService {
|
|||||||
public Response switchBulb(@PathParam("deviceId") String deviceId, @QueryParam("state") String state) {
|
public Response switchBulb(@PathParam("deviceId") String deviceId, @QueryParam("state") String state) {
|
||||||
try {
|
try {
|
||||||
if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized(new DeviceIdentifier(deviceId,
|
if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized(new DeviceIdentifier(deviceId,
|
||||||
RaspberrypiConstants.DEVICE_TYPE), DeviceGroupConstants.Permissions.DEFAULT_OPERATOR_PERMISSIONS)) {
|
RaspberrypiConstants.DEVICE_TYPE), DeviceGroupConstants.Permissions.DEFAULT_OPERATOR_PERMISSIONS)) {
|
||||||
return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build();
|
return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build();
|
||||||
}
|
}
|
||||||
String switchToState = state.toUpperCase();
|
String switchToState = state.toUpperCase();
|
||||||
@ -103,8 +88,12 @@ public class RaspberryPiServiceImpl implements RaspberryPiService {
|
|||||||
List<DeviceIdentifier> deviceIdentifiers = new ArrayList<>();
|
List<DeviceIdentifier> deviceIdentifiers = new ArrayList<>();
|
||||||
deviceIdentifiers.add(new DeviceIdentifier(deviceId, RaspberrypiConstants.DEVICE_TYPE));
|
deviceIdentifiers.add(new DeviceIdentifier(deviceId, RaspberrypiConstants.DEVICE_TYPE));
|
||||||
APIUtil.getDeviceManagementService().addOperation(RaspberrypiConstants.DEVICE_TYPE, commandOp,
|
APIUtil.getDeviceManagementService().addOperation(RaspberrypiConstants.DEVICE_TYPE, commandOp,
|
||||||
deviceIdentifiers);
|
deviceIdentifiers);
|
||||||
return Response.ok().build();
|
return Response.ok().build();
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String msg = "Invalid Device Identifiers found.";
|
||||||
|
log.error(msg, e);
|
||||||
|
return Response.status(Response.Status.BAD_REQUEST).build();
|
||||||
} catch (DeviceAccessAuthorizationException e) {
|
} catch (DeviceAccessAuthorizationException e) {
|
||||||
log.error(e.getErrorMessage(), e);
|
log.error(e.getErrorMessage(), e);
|
||||||
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
|
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>raspberrypi-plugin</artifactId>
|
<artifactId>raspberrypi-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>raspberrypi-plugin</artifactId>
|
<artifactId>raspberrypi-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-plugins</artifactId>
|
<artifactId>iot-plugins</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>virtual-fire-alarm-plugin</artifactId>
|
<artifactId>virtual-fire-alarm-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>virtual-fire-alarm-plugin</artifactId>
|
<artifactId>virtual-fire-alarm-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>virtual-fire-alarm-plugin</artifactId>
|
<artifactId>virtual-fire-alarm-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -29,10 +29,7 @@ import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService
|
|||||||
import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey;
|
import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey;
|
||||||
import org.wso2.carbon.apimgt.application.extension.exception.APIManagerException;
|
import org.wso2.carbon.apimgt.application.extension.exception.APIManagerException;
|
||||||
import org.wso2.carbon.context.PrivilegedCarbonContext;
|
import org.wso2.carbon.context.PrivilegedCarbonContext;
|
||||||
import org.wso2.carbon.device.mgt.common.Device;
|
import org.wso2.carbon.device.mgt.common.*;
|
||||||
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
|
|
||||||
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
|
||||||
import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
|
|
||||||
import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationException;
|
import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationException;
|
||||||
import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroupConstants;
|
import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroupConstants;
|
||||||
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
|
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
|
||||||
@ -109,7 +106,7 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService {
|
|||||||
PrivateKey serverPrivateKey = VirtualFirealarmSecurityManager.getServerPrivateKey();
|
PrivateKey serverPrivateKey = VirtualFirealarmSecurityManager.getServerPrivateKey();
|
||||||
String actualMessage = resource + ":" + switchToState;
|
String actualMessage = resource + ":" + switchToState;
|
||||||
String encryptedMsg = VirtualFireAlarmServiceUtils.prepareSecurePayLoad(actualMessage,
|
String encryptedMsg = VirtualFireAlarmServiceUtils.prepareSecurePayLoad(actualMessage,
|
||||||
serverPrivateKey);
|
serverPrivateKey);
|
||||||
String publishTopic = APIUtil.getTenantDomainOftheUser() + "/"
|
String publishTopic = APIUtil.getTenantDomainOftheUser() + "/"
|
||||||
+ VirtualFireAlarmConstants.DEVICE_TYPE + "/" + deviceId;
|
+ VirtualFireAlarmConstants.DEVICE_TYPE + "/" + deviceId;
|
||||||
|
|
||||||
@ -125,14 +122,18 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService {
|
|||||||
.getInstance().getServerName());
|
.getInstance().getServerName());
|
||||||
props.setProperty(VirtualFireAlarmConstants.SUBJECT_PROPERTY_KEY, "CONTROL-REQUEST");
|
props.setProperty(VirtualFireAlarmConstants.SUBJECT_PROPERTY_KEY, "CONTROL-REQUEST");
|
||||||
props.setProperty(VirtualFireAlarmConstants.MESSAGE_TYPE_PROPERTY_KEY,
|
props.setProperty(VirtualFireAlarmConstants.MESSAGE_TYPE_PROPERTY_KEY,
|
||||||
VirtualFireAlarmConstants.CHAT_PROPERTY_KEY);
|
VirtualFireAlarmConstants.CHAT_PROPERTY_KEY);
|
||||||
commandOp.setProperties(props);
|
commandOp.setProperties(props);
|
||||||
|
|
||||||
List<DeviceIdentifier> deviceIdentifiers = new ArrayList<>();
|
List<DeviceIdentifier> deviceIdentifiers = new ArrayList<>();
|
||||||
deviceIdentifiers.add(new DeviceIdentifier(deviceId, VirtualFireAlarmConstants.DEVICE_TYPE));
|
deviceIdentifiers.add(new DeviceIdentifier(deviceId, VirtualFireAlarmConstants.DEVICE_TYPE));
|
||||||
APIUtil.getDeviceManagementService().addOperation(VirtualFireAlarmConstants.DEVICE_TYPE, commandOp,
|
APIUtil.getDeviceManagementService().addOperation(VirtualFireAlarmConstants.DEVICE_TYPE, commandOp,
|
||||||
deviceIdentifiers);
|
deviceIdentifiers);
|
||||||
return Response.ok().build();
|
return Response.ok().build();
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String msg = "Error occurred while executing command operation to send keywords";
|
||||||
|
log.error(msg, e);
|
||||||
|
return Response.status(Response.Status.BAD_REQUEST).build();
|
||||||
} catch (DeviceAccessAuthorizationException e) {
|
} catch (DeviceAccessAuthorizationException e) {
|
||||||
log.error(e.getErrorMessage(), e);
|
log.error(e.getErrorMessage(), e);
|
||||||
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
|
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>virtual-fire-alarm-plugin</artifactId>
|
<artifactId>virtual-fire-alarm-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>virtual-fire-alarm-plugin</artifactId>
|
<artifactId>virtual-fire-alarm-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>virtual-fire-alarm-plugin</artifactId>
|
<artifactId>virtual-fire-alarm-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-plugins</artifactId>
|
<artifactId>iot-plugins</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>android-plugin</artifactId>
|
<artifactId>android-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@ package org.wso2.carbon.mdm.services.android.bean;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
|
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
|
||||||
|
import javax.validation.constraints.Pattern;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
import javax.xml.bind.annotation.XmlAccessType;
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
import javax.xml.bind.annotation.XmlAccessorType;
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
|||||||
@ -21,6 +21,7 @@ package org.wso2.carbon.mdm.services.android.services.impl;
|
|||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
||||||
|
import org.wso2.carbon.device.mgt.common.InvalidDeviceException;
|
||||||
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
|
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
|
||||||
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
|
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
|
||||||
import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation;
|
import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation;
|
||||||
@ -75,6 +76,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setEnabled(true);
|
operation.setEnabled(true);
|
||||||
operation.setPayLoad(lock.toJSON());
|
operation.setPayLoad(lock.toJSON());
|
||||||
return AndroidAPIUtils.getOperationResponse(deviceLockBeanWrapper.getDeviceIDs(), operation);
|
return AndroidAPIUtils.getOperationResponse(deviceLockBeanWrapper.getDeviceIDs(), operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -102,6 +108,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setType(Operation.Type.COMMAND);
|
operation.setType(Operation.Type.COMMAND);
|
||||||
operation.setEnabled(true);
|
operation.setEnabled(true);
|
||||||
return AndroidAPIUtils.getOperationResponse(deviceIDs, operation);
|
return AndroidAPIUtils.getOperationResponse(deviceIDs, operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -128,6 +139,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setCode(AndroidConstants.OperationCodes.DEVICE_LOCATION);
|
operation.setCode(AndroidConstants.OperationCodes.DEVICE_LOCATION);
|
||||||
operation.setType(Operation.Type.COMMAND);
|
operation.setType(Operation.Type.COMMAND);
|
||||||
return AndroidAPIUtils.getOperationResponse(deviceIDs, operation);
|
return AndroidAPIUtils.getOperationResponse(deviceIDs, operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -154,6 +170,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setCode(AndroidConstants.OperationCodes.CLEAR_PASSWORD);
|
operation.setCode(AndroidConstants.OperationCodes.CLEAR_PASSWORD);
|
||||||
operation.setType(Operation.Type.COMMAND);
|
operation.setType(Operation.Type.COMMAND);
|
||||||
return AndroidAPIUtils.getOperationResponse(deviceIDs, operation);
|
return AndroidAPIUtils.getOperationResponse(deviceIDs, operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance.";
|
String errorMessage = "Issue in retrieving operation management service instance.";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -188,6 +209,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setType(Operation.Type.COMMAND);
|
operation.setType(Operation.Type.COMMAND);
|
||||||
operation.setEnabled(camera.isEnabled());
|
operation.setEnabled(camera.isEnabled());
|
||||||
return AndroidAPIUtils.getOperationResponse(cameraBeanWrapper.getDeviceIDs(), operation);
|
return AndroidAPIUtils.getOperationResponse(cameraBeanWrapper.getDeviceIDs(), operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -214,6 +240,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setCode(AndroidConstants.OperationCodes.DEVICE_INFO);
|
operation.setCode(AndroidConstants.OperationCodes.DEVICE_INFO);
|
||||||
operation.setType(Operation.Type.COMMAND);
|
operation.setType(Operation.Type.COMMAND);
|
||||||
return AndroidAPIUtils.getOperationResponse(deviceIDs, operation);
|
return AndroidAPIUtils.getOperationResponse(deviceIDs, operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -239,6 +270,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setCode(AndroidConstants.OperationCodes.LOGCAT);
|
operation.setCode(AndroidConstants.OperationCodes.LOGCAT);
|
||||||
operation.setType(Operation.Type.COMMAND);
|
operation.setType(Operation.Type.COMMAND);
|
||||||
return AndroidAPIUtils.getOperationResponse(deviceIDs, operation);
|
return AndroidAPIUtils.getOperationResponse(deviceIDs, operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -264,6 +300,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setCode(AndroidConstants.OperationCodes.ENTERPRISE_WIPE);
|
operation.setCode(AndroidConstants.OperationCodes.ENTERPRISE_WIPE);
|
||||||
operation.setType(Operation.Type.COMMAND);
|
operation.setType(Operation.Type.COMMAND);
|
||||||
return AndroidAPIUtils.getOperationResponse(deviceIDs, operation);
|
return AndroidAPIUtils.getOperationResponse(deviceIDs, operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -298,6 +339,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setType(Operation.Type.PROFILE);
|
operation.setType(Operation.Type.PROFILE);
|
||||||
operation.setPayLoad(wipeData.toJSON());
|
operation.setPayLoad(wipeData.toJSON());
|
||||||
return AndroidAPIUtils.getOperationResponse(wipeDataBeanWrapper.getDeviceIDs(), operation);
|
return AndroidAPIUtils.getOperationResponse(wipeDataBeanWrapper.getDeviceIDs(), operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -324,6 +370,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setCode(AndroidConstants.OperationCodes.APPLICATION_LIST);
|
operation.setCode(AndroidConstants.OperationCodes.APPLICATION_LIST);
|
||||||
operation.setType(Operation.Type.COMMAND);
|
operation.setType(Operation.Type.COMMAND);
|
||||||
return AndroidAPIUtils.getOperationResponse(deviceIDs, operation);
|
return AndroidAPIUtils.getOperationResponse(deviceIDs, operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -350,6 +401,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setCode(AndroidConstants.OperationCodes.DEVICE_RING);
|
operation.setCode(AndroidConstants.OperationCodes.DEVICE_RING);
|
||||||
operation.setType(Operation.Type.COMMAND);
|
operation.setType(Operation.Type.COMMAND);
|
||||||
return AndroidAPIUtils.getOperationResponse(deviceIDs, operation);
|
return AndroidAPIUtils.getOperationResponse(deviceIDs, operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -376,6 +432,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setCode(AndroidConstants.OperationCodes.DEVICE_REBOOT);
|
operation.setCode(AndroidConstants.OperationCodes.DEVICE_REBOOT);
|
||||||
operation.setType(Operation.Type.COMMAND);
|
operation.setType(Operation.Type.COMMAND);
|
||||||
return AndroidAPIUtils.getOperationResponse(deviceIDs, operation);
|
return AndroidAPIUtils.getOperationResponse(deviceIDs, operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -403,6 +464,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setType(Operation.Type.COMMAND);
|
operation.setType(Operation.Type.COMMAND);
|
||||||
operation.setEnabled(true);
|
operation.setEnabled(true);
|
||||||
return AndroidAPIUtils.getOperationResponse(deviceIDs, operation);
|
return AndroidAPIUtils.getOperationResponse(deviceIDs, operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -439,6 +505,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setPayLoad(applicationInstallation.toJSON());
|
operation.setPayLoad(applicationInstallation.toJSON());
|
||||||
return AndroidAPIUtils.getOperationResponse(applicationInstallationBeanWrapper.getDeviceIDs(),
|
return AndroidAPIUtils.getOperationResponse(applicationInstallationBeanWrapper.getDeviceIDs(),
|
||||||
operation);
|
operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -475,6 +546,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
|
|
||||||
return AndroidAPIUtils.getOperationResponse(applicationUpdateBeanWrapper.getDeviceIDs(),
|
return AndroidAPIUtils.getOperationResponse(applicationUpdateBeanWrapper.getDeviceIDs(),
|
||||||
operation);
|
operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -512,6 +588,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
|
|
||||||
return AndroidAPIUtils.getOperationResponse(applicationUninstallationBeanWrapper.getDeviceIDs(),
|
return AndroidAPIUtils.getOperationResponse(applicationUninstallationBeanWrapper.getDeviceIDs(),
|
||||||
operation);
|
operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -547,7 +628,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setPayLoad(blacklistApplications.toJSON());
|
operation.setPayLoad(blacklistApplications.toJSON());
|
||||||
return AndroidAPIUtils.getOperationResponse(blacklistApplicationsBeanWrapper.getDeviceIDs(),
|
return AndroidAPIUtils.getOperationResponse(blacklistApplicationsBeanWrapper.getDeviceIDs(),
|
||||||
operation);
|
operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -590,6 +675,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setType(Operation.Type.PROFILE);
|
operation.setType(Operation.Type.PROFILE);
|
||||||
operation.setPayLoad(upgradeFirmware.toJSON());
|
operation.setPayLoad(upgradeFirmware.toJSON());
|
||||||
return AndroidAPIUtils.getOperationResponse(upgradeFirmwareBeanWrapper.getDeviceIDs(), operation);
|
return AndroidAPIUtils.getOperationResponse(upgradeFirmwareBeanWrapper.getDeviceIDs(), operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -630,6 +720,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setPayLoad(vpn.toJSON());
|
operation.setPayLoad(vpn.toJSON());
|
||||||
return AndroidAPIUtils.getOperationResponse(vpnConfiguration.getDeviceIDs(),
|
return AndroidAPIUtils.getOperationResponse(vpnConfiguration.getDeviceIDs(),
|
||||||
operation);
|
operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -665,7 +760,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setPayLoad(notification.toJSON());
|
operation.setPayLoad(notification.toJSON());
|
||||||
return AndroidAPIUtils.getOperationResponse(notificationBeanWrapper.getDeviceIDs(),
|
return AndroidAPIUtils.getOperationResponse(notificationBeanWrapper.getDeviceIDs(),
|
||||||
operation);
|
operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -702,7 +801,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
|
|
||||||
return AndroidAPIUtils.getOperationResponse(wifiBeanWrapper.getDeviceIDs(),
|
return AndroidAPIUtils.getOperationResponse(wifiBeanWrapper.getDeviceIDs(),
|
||||||
operation);
|
operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -738,7 +841,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setEnabled(deviceEncryption.isEncrypted());
|
operation.setEnabled(deviceEncryption.isEncrypted());
|
||||||
return AndroidAPIUtils.getOperationResponse(encryptionBeanWrapper.getDeviceIDs(),
|
return AndroidAPIUtils.getOperationResponse(encryptionBeanWrapper.getDeviceIDs(),
|
||||||
operation);
|
operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -774,7 +881,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setPayLoad(lockCode.toJSON());
|
operation.setPayLoad(lockCode.toJSON());
|
||||||
return AndroidAPIUtils.getOperationResponse(lockCodeBeanWrapper.getDeviceIDs(),
|
return AndroidAPIUtils.getOperationResponse(lockCodeBeanWrapper.getDeviceIDs(),
|
||||||
operation);
|
operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -811,7 +922,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
|
|
||||||
return AndroidAPIUtils.getOperationResponse(passwordPolicyBeanWrapper.getDeviceIDs(),
|
return AndroidAPIUtils.getOperationResponse(passwordPolicyBeanWrapper.getDeviceIDs(),
|
||||||
operation);
|
operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
@ -847,7 +962,11 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
operation.setType(Operation.Type.PROFILE);
|
operation.setType(Operation.Type.PROFILE);
|
||||||
operation.setPayLoad(webClip.toJSON());
|
operation.setPayLoad(webClip.toJSON());
|
||||||
return AndroidAPIUtils.getOperationResponse(webClipBeanWrapper.getDeviceIDs(), operation);
|
return AndroidAPIUtils.getOperationResponse(webClipBeanWrapper.getDeviceIDs(), operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String errorMessage = "Issue in retrieving operation management service instance";
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
log.error(errorMessage, e);
|
log.error(errorMessage, e);
|
||||||
|
|||||||
@ -210,10 +210,10 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
|
|||||||
policyManagerService.getEffectivePolicy(new DeviceIdentifier(androidDevice.getDeviceIdentifier(), device.getType()));
|
policyManagerService.getEffectivePolicy(new DeviceIdentifier(androidDevice.getDeviceIdentifier(), device.getType()));
|
||||||
if (status) {
|
if (status) {
|
||||||
Message responseMessage = new Message();
|
Message responseMessage = new Message();
|
||||||
responseMessage.setResponseCode(Response.Status.CREATED.toString());
|
responseMessage.setResponseCode(Response.Status.OK.toString());
|
||||||
responseMessage.setResponseMessage("Android device, which carries the id '" +
|
responseMessage.setResponseMessage("Android device, which carries the id '" +
|
||||||
androidDevice.getDeviceIdentifier() + "' has successfully been enrolled");
|
androidDevice.getDeviceIdentifier() + "' has successfully been enrolled");
|
||||||
return Response.status(Response.Status.CREATED).entity(responseMessage).build();
|
return Response.status(Response.Status.OK).entity(responseMessage).build();
|
||||||
} else {
|
} else {
|
||||||
Message responseMessage = new Message();
|
Message responseMessage = new Message();
|
||||||
responseMessage.setResponseCode(Response.Status.INTERNAL_SERVER_ERROR.toString());
|
responseMessage.setResponseCode(Response.Status.INTERNAL_SERVER_ERROR.toString());
|
||||||
|
|||||||
@ -30,10 +30,7 @@ import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
|
|||||||
import org.wso2.carbon.context.CarbonContext;
|
import org.wso2.carbon.context.CarbonContext;
|
||||||
import org.wso2.carbon.context.PrivilegedCarbonContext;
|
import org.wso2.carbon.context.PrivilegedCarbonContext;
|
||||||
import org.wso2.carbon.device.mgt.analytics.data.publisher.service.EventsPublisherService;
|
import org.wso2.carbon.device.mgt.analytics.data.publisher.service.EventsPublisherService;
|
||||||
import org.wso2.carbon.device.mgt.common.Device;
|
import org.wso2.carbon.device.mgt.common.*;
|
||||||
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
|
|
||||||
import org.wso2.carbon.device.mgt.common.DeviceManagementConstants;
|
|
||||||
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
|
||||||
import org.wso2.carbon.device.mgt.common.app.mgt.Application;
|
import org.wso2.carbon.device.mgt.common.app.mgt.Application;
|
||||||
import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException;
|
import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException;
|
||||||
import org.wso2.carbon.device.mgt.common.device.details.DeviceInfo;
|
import org.wso2.carbon.device.mgt.common.device.details.DeviceInfo;
|
||||||
@ -118,24 +115,23 @@ public class AndroidAPIUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Response getOperationResponse(List<String> deviceIDs, Operation operation)
|
public static Response getOperationResponse(List<String> deviceIDs, Operation operation)
|
||||||
throws DeviceManagementException, OperationManagementException {
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
||||||
if (deviceIDs == null || deviceIDs.size() == 0) {
|
if (deviceIDs == null || deviceIDs.size() == 0) {
|
||||||
String errorMessage = "Device identifier list is empty";
|
String errorMessage = "Device identifier list is empty";
|
||||||
log.error(errorMessage);
|
log.error(errorMessage);
|
||||||
throw new BadRequestException(
|
throw new BadRequestException(
|
||||||
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
}
|
}
|
||||||
AndroidDeviceUtils deviceUtils = new AndroidDeviceUtils();
|
DeviceIdentifier deviceIdentifier = new DeviceIdentifier();
|
||||||
DeviceIDHolder deviceIDHolder = deviceUtils.validateDeviceIdentifiers(deviceIDs);
|
List<DeviceIdentifier> deviceids = new ArrayList<>();
|
||||||
|
for (String deviceId : deviceIDs) {
|
||||||
List<DeviceIdentifier> validDeviceIds = deviceIDHolder.getValidDeviceIDList();
|
deviceIdentifier.setId(deviceId);
|
||||||
Activity activity = null;
|
deviceIdentifier.setType(AndroidConstants.DEVICE_TYPE_ANDROID);
|
||||||
if(validDeviceIds.size() > 0) {
|
deviceids.add(deviceIdentifier);
|
||||||
activity = getDeviceManagementService().addOperation(
|
|
||||||
DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_ANDROID, operation, validDeviceIds);
|
|
||||||
} else {
|
|
||||||
throw new IllegalArgumentException("Invalid device Identifiers found");
|
|
||||||
}
|
}
|
||||||
|
Activity activity = null;
|
||||||
|
activity = getDeviceManagementService().addOperation(
|
||||||
|
DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_ANDROID, operation, deviceids);
|
||||||
|
|
||||||
// if (activity != null) {
|
// if (activity != null) {
|
||||||
// GCMService gcmService = getGCMService();
|
// GCMService gcmService = getGCMService();
|
||||||
|
|||||||
@ -23,13 +23,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>android-plugin</artifactId>
|
<artifactId>android-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>org.wso2.carbon.device.mgt.mobile.android.ui</artifactId>
|
<artifactId>org.wso2.carbon.device.mgt.mobile.android.ui</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<name>WSO2 Carbon - Mobile Android UI</name>
|
<name>WSO2 Carbon - Mobile Android UI</name>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>android-plugin</artifactId>
|
<artifactId>android-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>mobile-plugins</artifactId>
|
<artifactId>mobile-plugins</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>mobile-base-plugin</artifactId>
|
<artifactId>mobile-base-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>mobile-base-plugin</artifactId>
|
<artifactId>mobile-base-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>mobile-base-plugin</artifactId>
|
<artifactId>mobile-base-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -73,9 +73,11 @@ public class MobileDeviceManagementUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static String getPropertyValue(Device device, String property) {
|
private static String getPropertyValue(Device device, String property) {
|
||||||
for (Device.Property prop : device.getProperties()) {
|
if (device != null && device.getProperties() != null) {
|
||||||
if (property.equals(prop.getName())) {
|
for (Device.Property prop : device.getProperties()) {
|
||||||
return prop.getValue();
|
if (property.equals(prop.getName())) {
|
||||||
|
return prop.getValue();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>mobile-plugins</artifactId>
|
<artifactId>mobile-plugins</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>windows-plugin</artifactId>
|
<artifactId>windows-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -93,7 +93,7 @@ public class WindowsAPIUtils {
|
|||||||
WindowsDeviceUtils deviceUtils = new WindowsDeviceUtils();
|
WindowsDeviceUtils deviceUtils = new WindowsDeviceUtils();
|
||||||
DeviceIDHolder deviceIDHolder = deviceUtils.validateDeviceIdentifiers(deviceIDs,
|
DeviceIDHolder deviceIDHolder = deviceUtils.validateDeviceIdentifiers(deviceIDs,
|
||||||
message, responseMediaType);
|
message, responseMediaType);
|
||||||
// getDeviceManagementService().addOperation(operation, deviceIDHolder.getValidDeviceIDList());
|
// getDeviceManagementService().addOperation(operation, deviceIDHolder.getValidDeviceIDList());
|
||||||
if (!deviceIDHolder.getInvalidDeviceIdList().isEmpty()) {
|
if (!deviceIDHolder.getInvalidDeviceIdList().isEmpty()) {
|
||||||
return Response.status(PluginConstants.StatusCodes.
|
return Response.status(PluginConstants.StatusCodes.
|
||||||
MULTI_STATUS_HTTP_CODE).type(
|
MULTI_STATUS_HTTP_CODE).type(
|
||||||
|
|||||||
@ -23,13 +23,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>windows-plugin</artifactId>
|
<artifactId>windows-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>org.wso2.carbon.device.mgt.mobile.windows.ui</artifactId>
|
<artifactId>org.wso2.carbon.device.mgt.mobile.windows.ui</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<name>WSO2 Carbon - Mobile Windows UI</name>
|
<name>WSO2 Carbon - Mobile Windows UI</name>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>windows-plugin</artifactId>
|
<artifactId>windows-plugin</artifactId>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>mobile-plugins</artifactId>
|
<artifactId>mobile-plugins</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,13 +23,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>androidsense-plugin-feature</artifactId>
|
<artifactId>androidsense-plugin-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>org.wso2.carbon.device.mgt.iot.androidsense.feature</artifactId>
|
<artifactId>org.wso2.carbon.device.mgt.iot.androidsense.feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>WSO2 Carbon - IoT Server Android Sense Feature</name>
|
<name>WSO2 Carbon - IoT Server Android Sense Feature</name>
|
||||||
<url>http://wso2.org</url>
|
<url>http://wso2.org</url>
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-plugins-feature</artifactId>
|
<artifactId>iot-plugins-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>arduino-plugin-feature</artifactId>
|
<artifactId>arduino-plugin-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-plugins-feature</artifactId>
|
<artifactId>iot-plugins-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,13 +23,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-analytics-feature</artifactId>
|
<artifactId>iot-analytics-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>org.wso2.carbon.device.mgt.iot.analytics.feature</artifactId>
|
<artifactId>org.wso2.carbon.device.mgt.iot.analytics.feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>WSO2 Carbon - IoT Server Analytics Feature</name>
|
<name>WSO2 Carbon - IoT Server Analytics Feature</name>
|
||||||
<url>http://wso2.org</url>
|
<url>http://wso2.org</url>
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-plugins-feature</artifactId>
|
<artifactId>iot-plugins-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,14 +23,14 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-base-plugin-feature</artifactId>
|
<artifactId>iot-base-plugin-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>org.wso2.carbon.device.mgt.iot.adapter.feature</artifactId>
|
<artifactId>org.wso2.carbon.device.mgt.iot.adapter.feature</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<name>WSO2 Carbon - IoT Device Management Feature</name>
|
<name>WSO2 Carbon - IoT Device Management Feature</name>
|
||||||
<url>http://wso2.org</url>
|
<url>http://wso2.org</url>
|
||||||
<description>This feature contains the adapter bundles required for IoT Server</description>
|
<description>This feature contains the adapter bundles required for IoT Server</description>
|
||||||
|
|||||||
@ -23,14 +23,14 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-base-plugin-feature</artifactId>
|
<artifactId>iot-base-plugin-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>org.wso2.carbon.device.mgt.iot.feature</artifactId>
|
<artifactId>org.wso2.carbon.device.mgt.iot.feature</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<name>WSO2 Carbon - IoT Device Management Feature</name>
|
<name>WSO2 Carbon - IoT Device Management Feature</name>
|
||||||
<url>http://wso2.org</url>
|
<url>http://wso2.org</url>
|
||||||
<description>This feature contains the core bundles required for IoT Server</description>
|
<description>This feature contains the core bundles required for IoT Server</description>
|
||||||
|
|||||||
@ -22,13 +22,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-plugins-feature</artifactId>
|
<artifactId>iot-plugins-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>iot-base-plugin-feature</artifactId>
|
<artifactId>iot-base-plugin-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>WSO2 Carbon - Device Management IoT Base Plugin Feature</name>
|
<name>WSO2 Carbon - Device Management IoT Base Plugin Feature</name>
|
||||||
<url>http://wso2.org</url>
|
<url>http://wso2.org</url>
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-devicetypes-feature</artifactId>
|
<artifactId>iot-devicetypes-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-plugins-feature</artifactId>
|
<artifactId>iot-plugins-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
|
|||||||
@ -22,13 +22,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>iot-plugins-feature</artifactId>
|
<artifactId>iot-plugins-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>WSO2 Carbon - Device Management IoT Plugins Feature</name>
|
<name>WSO2 Carbon - Device Management IoT Plugins Feature</name>
|
||||||
<url>http://wso2.org</url>
|
<url>http://wso2.org</url>
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>raspberrypi-plugin-feature</artifactId>
|
<artifactId>raspberrypi-plugin-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-plugins-feature</artifactId>
|
<artifactId>iot-plugins-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>virtual-fire-alarm-plugin-feature</artifactId>
|
<artifactId>virtual-fire-alarm-plugin-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>iot-plugins-feature</artifactId>
|
<artifactId>iot-plugins-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -22,14 +22,14 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>android-plugin-feature</artifactId>
|
<artifactId>android-plugin-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>org.wso2.carbon.device.mgt.mobile.android.feature</artifactId>
|
<artifactId>org.wso2.carbon.device.mgt.mobile.android.feature</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<name>WSO2 Carbon - Android Device Management Feature</name>
|
<name>WSO2 Carbon - Android Device Management Feature</name>
|
||||||
<url>http://wso2.org</url>
|
<url>http://wso2.org</url>
|
||||||
<description>This feature contains the core bundles required for Android Device Management
|
<description>This feature contains the core bundles required for Android Device Management
|
||||||
|
|||||||
@ -22,13 +22,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>mobile-plugins-feature</artifactId>
|
<artifactId>mobile-plugins-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>android-plugin-feature</artifactId>
|
<artifactId>android-plugin-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>WSO2 Carbon - Device Management Android Plugin Feature</name>
|
<name>WSO2 Carbon - Device Management Android Plugin Feature</name>
|
||||||
<url>http://wso2.org</url>
|
<url>http://wso2.org</url>
|
||||||
|
|||||||
@ -22,14 +22,14 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>mobile-base-plugin-feature</artifactId>
|
<artifactId>mobile-base-plugin-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>org.wso2.carbon.device.mgt.mobile.feature</artifactId>
|
<artifactId>org.wso2.carbon.device.mgt.mobile.feature</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<name>WSO2 Carbon - Mobile Device Management Feature</name>
|
<name>WSO2 Carbon - Mobile Device Management Feature</name>
|
||||||
<url>http://wso2.org</url>
|
<url>http://wso2.org</url>
|
||||||
<description>This feature contains the core bundles required for Mobile Device Management functionality
|
<description>This feature contains the core bundles required for Mobile Device Management functionality
|
||||||
|
|||||||
@ -22,13 +22,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>mobile-plugins-feature</artifactId>
|
<artifactId>mobile-plugins-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>mobile-base-plugin-feature</artifactId>
|
<artifactId>mobile-base-plugin-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>WSO2 Carbon - Device Management EMM Base Plugin Feature</name>
|
<name>WSO2 Carbon - Device Management EMM Base Plugin Feature</name>
|
||||||
<url>http://wso2.org</url>
|
<url>http://wso2.org</url>
|
||||||
|
|||||||
@ -22,13 +22,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>mobile-plugins-feature</artifactId>
|
<artifactId>mobile-plugins-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>WSO2 Carbon - Device Management EMM Plugins Feature</name>
|
<name>WSO2 Carbon - Device Management EMM Plugins Feature</name>
|
||||||
<url>http://wso2.org</url>
|
<url>http://wso2.org</url>
|
||||||
|
|||||||
@ -22,14 +22,14 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>windows-plugin-feature</artifactId>
|
<artifactId>windows-plugin-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>org.wso2.carbon.device.mgt.mobile.windows.feature</artifactId>
|
<artifactId>org.wso2.carbon.device.mgt.mobile.windows.feature</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<name>WSO2 Carbon - Windows Device Management Feature</name>
|
<name>WSO2 Carbon - Windows Device Management Feature</name>
|
||||||
<url>http://wso2.org</url>
|
<url>http://wso2.org</url>
|
||||||
<description>This feature contains the core bundles required for Windows Device Management
|
<description>This feature contains the core bundles required for Windows Device Management
|
||||||
|
|||||||
@ -22,13 +22,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>mobile-plugins-feature</artifactId>
|
<artifactId>mobile-plugins-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>windows-plugin-feature</artifactId>
|
<artifactId>windows-plugin-feature</artifactId>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>WSO2 Carbon - Device Management Windows Plugin Feature</name>
|
<name>WSO2 Carbon - Device Management Windows Plugin Feature</name>
|
||||||
<url>http://wso2.org</url>
|
<url>http://wso2.org</url>
|
||||||
|
|||||||
6
pom.xml
6
pom.xml
@ -23,7 +23,7 @@
|
|||||||
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
|
||||||
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
<artifactId>carbon-device-mgt-plugins-parent</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>2.1.2-SNAPSHOT</version>
|
<version>2.1.3-SNAPSHOT</version>
|
||||||
<name>WSO2 Carbon - Device Management Plugins Parent</name>
|
<name>WSO2 Carbon - Device Management Plugins Parent</name>
|
||||||
<url>http://wso2.org</url>
|
<url>http://wso2.org</url>
|
||||||
<description>WSO2 Carbon - Device Management Plugins Parent</description>
|
<description>WSO2 Carbon - Device Management Plugins Parent</description>
|
||||||
@ -1120,11 +1120,11 @@
|
|||||||
<javax.ws.rs.version>1.1.1</javax.ws.rs.version>
|
<javax.ws.rs.version>1.1.1</javax.ws.rs.version>
|
||||||
|
|
||||||
<!-- Carbon Device Management -->
|
<!-- Carbon Device Management -->
|
||||||
<carbon.devicemgt.version>1.1.2-SNAPSHOT</carbon.devicemgt.version>
|
<carbon.devicemgt.version>1.1.2</carbon.devicemgt.version>
|
||||||
<carbon.devicemgt.version.range>[1.1.1, 2.0.0)</carbon.devicemgt.version.range>
|
<carbon.devicemgt.version.range>[1.1.1, 2.0.0)</carbon.devicemgt.version.range>
|
||||||
|
|
||||||
<!-- Carbon Device Management Plugins -->
|
<!-- Carbon Device Management Plugins -->
|
||||||
<carbon.devicemgt.plugins.version>2.1.2-SNAPSHOT</carbon.devicemgt.plugins.version>
|
<carbon.devicemgt.plugins.version>2.1.3-SNAPSHOT</carbon.devicemgt.plugins.version>
|
||||||
|
|
||||||
<!-- Carbon Commons -->
|
<!-- Carbon Commons -->
|
||||||
<carbon.commons.version>4.4.8</carbon.commons.version>
|
<carbon.commons.version>4.4.8</carbon.commons.version>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user