diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/FeatureManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/FeatureManager.java index 16d2f4063f6..884311e935d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/FeatureManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/FeatureManager.java @@ -24,10 +24,14 @@ public interface FeatureManager { boolean addFeature(Feature feature) throws DeviceManagementException; + boolean addFeatures(List features) throws DeviceManagementException; + Feature getFeature(String name) throws DeviceManagementException; List getFeatures() throws DeviceManagementException; boolean removeFeature(String name) throws DeviceManagementException; + boolean addSupportedFeaturesToDB() throws DeviceManagementException; + } diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql index 8bf49804b01..b0962b5085b 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql @@ -1,5 +1,5 @@ CREATE TABLE DM_DEVICE_TYPE ( - ID INT identity NOT NULL, + ID INT IDENTITY NOT NULL, NAME VARCHAR(300) DEFAULT NULL, PRIMARY KEY (ID) ); @@ -403,4 +403,5 @@ CREATE TABLE DM_NOTIFICATION ( -- TO:DO - Remove this INSERT sql statement. Insert into DM_DEVICE_TYPE (ID,NAME) VALUES (1, 'android'); -Insert into DM_DEVICE_TYPE (ID,NAME) VALUES (2, 'ios'); \ No newline at end of file +Insert into DM_DEVICE_TYPE (ID,NAME) VALUES (2, 'ios'); + diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql index d7ca858e094..02cfd0d31ee 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql @@ -398,4 +398,5 @@ CREATE TABLE IF NOT EXISTS DM_NOTIFICATION ( -- TO:DO - Remove this INSERT sql statement. Insert into DM_DEVICE_TYPE (ID,NAME) VALUES (1, 'android'); -Insert into DM_DEVICE_TYPE (ID,NAME) VALUES (2, 'ios'); \ No newline at end of file +Insert into DM_DEVICE_TYPE (ID,NAME) VALUES (2, 'ios'); + diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql index 2e8333d5371..c369bf01498 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql @@ -1,5 +1,5 @@ CREATE TABLE DM_DEVICE_TYPE ( - ID NUMBER(10) NOT NULL, + ID NUMBER(10) NOT NULL, NAME VARCHAR2(300) DEFAULT NULL, PRIMARY KEY (ID) ); @@ -629,4 +629,5 @@ END; -- TO:DO - Remove this INSERT sql statement. Insert into DM_DEVICE_TYPE (ID,NAME) VALUES (1, 'android'); -Insert into DM_DEVICE_TYPE (ID,NAME) VALUES (2, 'ios'); \ No newline at end of file +Insert into DM_DEVICE_TYPE (ID,NAME) VALUES (2, 'ios'); +