Merge pull request #139 from GPrathap/master

add mssql and oracle db scripts
application-manager-new
sumedharubasinghe 9 years ago
commit 06cf7a7eee

@ -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";

@ -56,10 +56,6 @@
<div class="buttons" style="padding-bottom: 0px"> <div class="buttons" style="padding-bottom: 0px">
<a class="btn btn-operations" onclick="downloadAgent()">Download Now</a> <a class="btn btn-operations" onclick="downloadAgent()">Download Now</a>
&nbsp;&nbsp; &nbsp;&nbsp;
<a href="#" id="download-device-download-link"
class="btn btn-operations"> Copy Link
</a>
&nbsp;&nbsp;
</div> </div>
</form> </form>
</div> </div>

@ -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) );

@ -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) );
Loading…
Cancel
Save