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"; 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 - -   
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) ); +