forked from community/device-mgt-plugins
parent
c09e16021e
commit
83fbfc98be
@ -0,0 +1,98 @@
|
|||||||
|
-- -----------------------------------------------------
|
||||||
|
-- Table AD_DEVICE
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS AD_FEATURE(
|
||||||
|
ID INTEGER NOT NULL,
|
||||||
|
CODE VARCHAR(50) NOT NULL,
|
||||||
|
NAME VARCHAR(100) NOT NULL,
|
||||||
|
DESCRIPTION VARCHAR(200) NOT NULL,
|
||||||
|
)
|
||||||
|
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
-- Table AD_DEVICE
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS AD_DEVICE (
|
||||||
|
MOBILE_DEVICE_ID VARCHAR(45) NOT NULL ,
|
||||||
|
PUSH_TOKEN VARCHAR(45) NULL DEFAULT NULL ,
|
||||||
|
IMEI VARCHAR(45) NULL DEFAULT NULL ,
|
||||||
|
IMSI VARCHAR(45) NULL DEFAULT NULL ,
|
||||||
|
OS_VERSION VARCHAR(45) NULL DEFAULT NULL ,
|
||||||
|
DEVICE_MODEL VARCHAR(45) NULL DEFAULT NULL ,
|
||||||
|
VENDOR VARCHAR(45) NULL DEFAULT NULL ,
|
||||||
|
LATITUDE VARCHAR(45) NULL DEFAULT NULL,
|
||||||
|
LONGITUDE VARCHAR(45) NULL DEFAULT NULL,
|
||||||
|
CHALLENGE VARCHAR(45) NULL DEFAULT NULL,
|
||||||
|
TOKEN VARCHAR(500) NULL DEFAULT NULL,
|
||||||
|
UNLOCK_TOKEN VARCHAR(500) NULL DEFAULT NULL,
|
||||||
|
SERIAL VARCHAR(45) NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (MOBILE_DEVICE_ID) );
|
||||||
|
|
||||||
|
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
-- Table AD_FEATURE
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS AD_FEATURE (
|
||||||
|
FEATURE_ID INT NOT NULL AUTO_INCREMENT ,
|
||||||
|
CODE VARCHAR(45) NOT NULL,
|
||||||
|
NAME VARCHAR(100) NULL ,
|
||||||
|
DESCRIPTION VARCHAR(200) NULL ,
|
||||||
|
DEVICE_TYPE VARCHAR(50) NULL ,
|
||||||
|
PRIMARY KEY (FEATURE_ID) );
|
||||||
|
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
-- Table AD_OPERATION
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS AD_OPERATION (
|
||||||
|
OPERATION_ID INT NOT NULL AUTO_INCREMENT ,
|
||||||
|
FEATURE_CODE VARCHAR(45) NOT NULL ,
|
||||||
|
CREATED_DATE BIGINT NULL ,
|
||||||
|
PRIMARY KEY (OPERATION_ID));
|
||||||
|
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
-- Table AD_DEVICE_OPERATION_MAPPING
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS AD_DEVICE_OPERATION_MAPPING (
|
||||||
|
DEVICE_ID VARCHAR(45) NOT NULL ,
|
||||||
|
OPERATION_ID INT NOT NULL ,
|
||||||
|
SENT_DATE BIGINT NULL ,
|
||||||
|
RECEIVED_DATE BIGINT NULL ,
|
||||||
|
STATUS VARCHAR(10) NOT NULL ,
|
||||||
|
PRIMARY KEY (DEVICE_ID, OPERATION_ID) ,
|
||||||
|
CONSTRAINT fk_AD_DEVICE_OPERATION_AD_DEVICE
|
||||||
|
FOREIGN KEY (DEVICE_ID )
|
||||||
|
REFERENCES AD_DEVICE (MOBILE_DEVICE_ID )
|
||||||
|
ON DELETE NO ACTION
|
||||||
|
ON UPDATE NO ACTION,
|
||||||
|
CONSTRAINT fk_AD_DEVICE_OPERATION_AD_OPERATION1
|
||||||
|
FOREIGN KEY (OPERATION_ID )
|
||||||
|
REFERENCES AD_OPERATION (OPERATION_ID )
|
||||||
|
ON DELETE NO ACTION
|
||||||
|
ON UPDATE NO ACTION);
|
||||||
|
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
-- Table AD_OPERATION_PROPERTY
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS AD_OPERATION_PROPERTY (
|
||||||
|
OPERATION_ID INT NOT NULL ,
|
||||||
|
PROPERTY VARCHAR(45) NOT NULL ,
|
||||||
|
VALUE TEXT NULL ,
|
||||||
|
PRIMARY KEY (OPERATION_ID, PROPERTY) ,
|
||||||
|
CONSTRAINT fk_AD_OPERATION_PROPERTY_AD_OPERATION1
|
||||||
|
FOREIGN KEY (OPERATION_ID )
|
||||||
|
REFERENCES AD_OPERATION (OPERATION_ID )
|
||||||
|
ON DELETE NO ACTION
|
||||||
|
ON UPDATE NO ACTION);
|
||||||
|
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
-- Table AD_FEATURE_PROPERTY
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS AD_FEATURE_PROPERTY (
|
||||||
|
PROPERTY VARCHAR(45) NOT NULL ,
|
||||||
|
FEATURE_ID INT NOT NULL ,
|
||||||
|
PRIMARY KEY (PROPERTY) ,
|
||||||
|
CONSTRAINT fk_AD_FEATURE_PROPERTY_AD_FEATURE1
|
||||||
|
FOREIGN KEY (FEATURE_ID )
|
||||||
|
REFERENCES AD_FEATURE (FEATURE_ID )
|
||||||
|
ON DELETE NO ACTION
|
||||||
|
ON UPDATE NO ACTION);
|
@ -0,0 +1,88 @@
|
|||||||
|
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
-- Table `MBL_DEVICE`
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS `AD_DEVICE` (
|
||||||
|
`MOBILE_DEVICE_ID` VARCHAR(45) NOT NULL ,
|
||||||
|
`PUSH_TOKEN` VARCHAR(45) NULL DEFAULT NULL ,
|
||||||
|
`IMEI` VARCHAR(45) NULL DEFAULT NULL ,
|
||||||
|
`IMSI` VARCHAR(45) NULL DEFAULT NULL ,
|
||||||
|
`OS_VERSION` VARCHAR(45) NULL DEFAULT NULL ,
|
||||||
|
`DEVICE_MODEL` VARCHAR(45) NULL DEFAULT NULL ,
|
||||||
|
`VENDOR` VARCHAR(45) NULL DEFAULT NULL ,
|
||||||
|
`LATITUDE` VARCHAR(45) NULL DEFAULT NULL,
|
||||||
|
`LONGITUDE` VARCHAR(45) NULL DEFAULT NULL,
|
||||||
|
`CHALLENGE` VARCHAR(45) NULL DEFAULT NULL,
|
||||||
|
`TOKEN` VARCHAR(500) NULL DEFAULT NULL,
|
||||||
|
`UNLOCK_TOKEN` VARCHAR(500) NULL DEFAULT NULL,
|
||||||
|
`SERIAL` VARCHAR(45) NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`MOBILE_DEVICE_ID`) );
|
||||||
|
|
||||||
|
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
-- Table `AD_FEATURE`
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS `AD_FEATURE` (
|
||||||
|
`FEATURE_ID` INT NOT NULL AUTO_INCREMENT ,
|
||||||
|
`CODE` VARCHAR(45) NOT NULL,
|
||||||
|
`NAME` VARCHAR(100) NULL ,
|
||||||
|
`DESCRIPTION` VARCHAR(200) NULL ,
|
||||||
|
`DEVICE_TYPE` VARCHAR(50) NULL ,
|
||||||
|
PRIMARY KEY (`FEATURE_ID`) );
|
||||||
|
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
-- Table `AD_OPERATION`
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS `AD_OPERATION` (
|
||||||
|
`OPERATION_ID` INT NOT NULL AUTO_INCREMENT ,
|
||||||
|
`FEATURE_CODE` VARCHAR(45) NOT NULL ,
|
||||||
|
`CREATED_DATE` BIGINT NULL ,
|
||||||
|
PRIMARY KEY (`OPERATION_ID`));
|
||||||
|
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
-- Table `AD_DEVICE_OPERATION_MAPPING`
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS `AD_DEVICE_OPERATION_MAPPING` (
|
||||||
|
`DEVICE_ID` VARCHAR(45) NOT NULL ,
|
||||||
|
`OPERATION_ID` INT NOT NULL ,
|
||||||
|
`SENT_DATE` BIGINT NULL ,
|
||||||
|
`RECEIVED_DATE` BIGINT NULL ,
|
||||||
|
`STATUS` VARCHAR(10) NOT NULL ,
|
||||||
|
PRIMARY KEY (`DEVICE_ID`, `OPERATION_ID`) ,
|
||||||
|
CONSTRAINT `fk_AD_DEVICE_OPERATION_AD_DEVICE`
|
||||||
|
FOREIGN KEY (`DEVICE_ID` )
|
||||||
|
REFERENCES `AD_DEVICE` (`MOBILE_DEVICE_ID` )
|
||||||
|
ON DELETE NO ACTION
|
||||||
|
ON UPDATE NO ACTION,
|
||||||
|
CONSTRAINT `fk_AD_DEVICE_OPERATION_AD_OPERATION1`
|
||||||
|
FOREIGN KEY (`OPERATION_ID` )
|
||||||
|
REFERENCES `AD_OPERATION` (`OPERATION_ID` )
|
||||||
|
ON DELETE NO ACTION
|
||||||
|
ON UPDATE NO ACTION);
|
||||||
|
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
-- Table `AD_OPERATION_PROPERTY`
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS `AD_OPERATION_PROPERTY` (
|
||||||
|
`OPERATION_ID` INT NOT NULL ,
|
||||||
|
`PROPERTY` VARCHAR(45) NOT NULL ,
|
||||||
|
`VALUE` TEXT NULL ,
|
||||||
|
PRIMARY KEY (`OPERATION_ID`, `PROPERTY`) ,
|
||||||
|
CONSTRAINT `fk_AD_OPERATION_PROPERTY_AD_OPERATION1`
|
||||||
|
FOREIGN KEY (`OPERATION_ID` )
|
||||||
|
REFERENCES `AD_OPERATION` (`OPERATION_ID` )
|
||||||
|
ON DELETE NO ACTION
|
||||||
|
ON UPDATE NO ACTION);
|
||||||
|
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
-- Table `AD_FEATURE_PROPERTY`
|
||||||
|
-- -----------------------------------------------------
|
||||||
|
CREATE TABLE IF NOT EXISTS `AD_FEATURE_PROPERTY` (
|
||||||
|
`PROPERTY` VARCHAR(45) NOT NULL ,
|
||||||
|
`FEATURE_ID` INT NOT NULL ,
|
||||||
|
PRIMARY KEY (`PROPERTY`) ,
|
||||||
|
CONSTRAINT `fk_AD_FEATURE_PROPERTY_AD_FEATURE1`
|
||||||
|
FOREIGN KEY (`FEATURE_ID` )
|
||||||
|
REFERENCES `AD_FEATURE` (`FEATURE_ID` )
|
||||||
|
ON DELETE NO ACTION
|
||||||
|
ON UPDATE NO ACTION);
|
@ -0,0 +1,47 @@
|
|||||||
|
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/AbstractMobileOperationManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/AbstractMobileOperationManager.java
|
||||||
|
index 719a38b..5a63eef 100644
|
||||||
|
--- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/AbstractMobileOperationManager.java
|
||||||
|
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/AbstractMobileOperationManager.java
|
||||||
|
@@ -28,15 +28,13 @@ import java.util.List;
|
||||||
|
public abstract class AbstractMobileOperationManager implements OperationManager {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
- public List<Operation> getOperations(DeviceIdentifier deviceIdentifier)
|
||||||
|
- throws OperationManagementException {
|
||||||
|
+ public List<Operation> getOperations(DeviceIdentifier deviceIdentifier) throws OperationManagementException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean addOperation(Operation operation,
|
||||||
|
- List<DeviceIdentifier> devices)
|
||||||
|
- throws OperationManagementException {
|
||||||
|
+ List<DeviceIdentifier> devices) throws OperationManagementException {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/dao/FeatureDAO.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/dao/FeatureDAO.java
|
||||||
|
index 17b347b..1aa3289 100644
|
||||||
|
--- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/dao/FeatureDAO.java
|
||||||
|
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/dao/FeatureDAO.java
|
||||||
|
@@ -19,7 +19,6 @@
|
||||||
|
package org.wso2.carbon.device.mgt.mobile.impl.android.dao;
|
||||||
|
|
||||||
|
import org.wso2.carbon.device.mgt.common.Feature;
|
||||||
|
-import org.wso2.carbon.device.mgt.common.FeatureManagementException;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/ios/IOSMobileOperationManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/ios/IOSMobileOperationManager.java
|
||||||
|
index 38280e2..6607600 100644
|
||||||
|
--- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/ios/IOSMobileOperationManager.java
|
||||||
|
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/ios/IOSMobileOperationManager.java
|
||||||
|
@@ -20,8 +20,6 @@ package org.wso2.carbon.device.mgt.mobile.impl.ios;
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
|
||||||
|
-import org.wso2.carbon.device.mgt.common.Feature;
|
||||||
|
-import org.wso2.carbon.device.mgt.common.FeatureManagementException;
|
||||||
|
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.mobile.AbstractMobileOperationManager;
|
Loading…
Reference in new issue