application-manager-new
GPrathap 9 years ago
parent 3b819cab1d
commit c2d1879483

@ -159,7 +159,7 @@ public class DeviceTypeServiceImpl implements DeviceTypeService {
String toDate = String.valueOf(to); String toDate = String.valueOf(to);
String query = "deviceId:" + deviceId + " AND deviceType:" + String query = "deviceId:" + deviceId + " AND deviceType:" +
DeviceTypeConstants.DEVICE_TYPE + " AND time : [" + fromDate + " TO " + toDate + "]"; DeviceTypeConstants.DEVICE_TYPE + " AND time : [" + fromDate + " TO " + toDate + "]";
String sensorTableName = DeviceTypeConstants.TEMPERATURE_EVENT_TABLE; String sensorTableName = DeviceTypeConstants.SENSOR_EVENT_TABLE;
try { try {
if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized(new DeviceIdentifier(deviceId, if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized(new DeviceIdentifier(deviceId,
DeviceTypeConstants.DEVICE_TYPE))) { DeviceTypeConstants.DEVICE_TYPE))) {

@ -28,7 +28,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* This stores sensor event data for android sense. * This stores sensor event data for ${deviceType}.
*/ */
@XmlRootElement @XmlRootElement
@JsonIgnoreProperties(ignoreUnknown = true) @JsonIgnoreProperties(ignoreUnknown = true)

@ -29,7 +29,7 @@ public class DeviceTypeConstants {
public final static String STATE_OFF = "OFF"; public final static String STATE_OFF = "OFF";
//sensor events summerized table name //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 static final String DATA_SOURCE_NAME = "jdbc/${deviceType}DM_DB";
public final static String DEVICE_TYPE_PROVIDER_DOMAIN = "carbon.super"; public final static String DEVICE_TYPE_PROVIDER_DOMAIN = "carbon.super";

Loading…
Cancel
Save