From 2b68b48f4c069c918bbf3a4d83341fdc155585e6 Mon Sep 17 00:00:00 2001 From: GPrathap Date: Tue, 17 May 2016 22:49:26 +0530 Subject: [PATCH 1/3] removed copy link section from UI --- .../type-view.hbs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__deviceType__.type-view/type-view.hbs b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__deviceType__.type-view/type-view.hbs index 10b55cf5..14d03992 100644 --- a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__deviceType__.type-view/type-view.hbs +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.__deviceType__.type-view/type-view.hbs @@ -56,10 +56,6 @@
Download Now    - Copy Link - -   
From 3b819cab1d2ed3605cd08353eeeac4ad529ff43a Mon Sep 17 00:00:00 2001 From: GPrathap Date: Tue, 17 May 2016 22:50:17 +0530 Subject: [PATCH 2/3] add mssql and oracle db scripts --- .../feature/src/main/resources/dbscripts/mssql.sql | 9 +++++++++ .../feature/src/main/resources/dbscripts/oracle.sql | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/dbscripts/mssql.sql create mode 100644 modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/dbscripts/oracle.sql diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/dbscripts/mssql.sql b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/dbscripts/mssql.sql new file mode 100644 index 00000000..6b93c904 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/dbscripts/mssql.sql @@ -0,0 +1,9 @@ + +-- ----------------------------------------------------- +-- Table `${deviceType}_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS ${deviceType}_DEVICE ( + ${deviceType}_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (${deviceType}_DEVICE_ID) ); + diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/dbscripts/oracle.sql b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/dbscripts/oracle.sql new file mode 100644 index 00000000..6b93c904 --- /dev/null +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/feature/feature/src/main/resources/dbscripts/oracle.sql @@ -0,0 +1,9 @@ + +-- ----------------------------------------------------- +-- Table `${deviceType}_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS ${deviceType}_DEVICE ( + ${deviceType}_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (${deviceType}_DEVICE_ID) ); + From c2d1879483d2cc26cfc5223fbfc269d12f99db8a Mon Sep 17 00:00:00 2001 From: GPrathap Date: Tue, 17 May 2016 22:51:51 +0530 Subject: [PATCH 3/3] fix typo --- .../__rootArtifactId__/api/DeviceTypeServiceImpl.java | 2 +- .../__groupId__/__rootArtifactId__/api/dto/SensorRecord.java | 2 +- .../plugin/constants/DeviceTypeConstants.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/DeviceTypeServiceImpl.java b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/DeviceTypeServiceImpl.java index eebd47ee..9b730cdc 100644 --- a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/DeviceTypeServiceImpl.java +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/DeviceTypeServiceImpl.java @@ -159,7 +159,7 @@ public class DeviceTypeServiceImpl implements DeviceTypeService { String toDate = String.valueOf(to); String query = "deviceId:" + deviceId + " AND deviceType:" + DeviceTypeConstants.DEVICE_TYPE + " AND time : [" + fromDate + " TO " + toDate + "]"; - String sensorTableName = DeviceTypeConstants.TEMPERATURE_EVENT_TABLE; + String sensorTableName = DeviceTypeConstants.SENSOR_EVENT_TABLE; try { if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized(new DeviceIdentifier(deviceId, DeviceTypeConstants.DEVICE_TYPE))) { diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/dto/SensorRecord.java b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/dto/SensorRecord.java index 8a197967..d7656872 100644 --- a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/dto/SensorRecord.java +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/api/src/main/java/__groupId__/__rootArtifactId__/api/dto/SensorRecord.java @@ -28,7 +28,7 @@ import java.util.List; import java.util.Map; /** - * This stores sensor event data for android sense. + * This stores sensor event data for ${deviceType}. */ @XmlRootElement @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/plugin/src/main/java/__groupId__/__rootArtifactId__/plugin/constants/DeviceTypeConstants.java b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/plugin/src/main/java/__groupId__/__rootArtifactId__/plugin/constants/DeviceTypeConstants.java index 7107829a..01ba3799 100644 --- a/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/plugin/src/main/java/__groupId__/__rootArtifactId__/plugin/constants/DeviceTypeConstants.java +++ b/modules/tools/cdmf-devicetype-archetype/src/main/resources/archetype-resources/component/plugin/src/main/java/__groupId__/__rootArtifactId__/plugin/constants/DeviceTypeConstants.java @@ -29,7 +29,7 @@ public class DeviceTypeConstants { public final static String STATE_OFF = "OFF"; //sensor events summerized table name - public static final String TEMPERATURE_EVENT_TABLE = "ORG_WSO2_IOT_DEVICES_${nameOfTheSensor}"; + public static final String SENSOR_EVENT_TABLE = "ORG_WSO2_IOT_DEVICES_${nameOfTheSensor}"; public static final String DATA_SOURCE_NAME = "jdbc/${deviceType}DM_DB"; public final static String DEVICE_TYPE_PROVIDER_DOMAIN = "carbon.super";