|
|
@ -304,7 +304,7 @@ public class VirtualFireAlarmService {
|
|
|
|
public Response downloadSketch(@QueryParam("owner") String owner,
|
|
|
|
public Response downloadSketch(@QueryParam("owner") String owner,
|
|
|
|
@QueryParam("deviceName") String customDeviceName,
|
|
|
|
@QueryParam("deviceName") String customDeviceName,
|
|
|
|
@PathParam("sketch_type") String sketchType) {
|
|
|
|
@PathParam("sketch_type") String sketchType) {
|
|
|
|
|
|
|
|
//TODO:: null check customDeviceName at UI level
|
|
|
|
ZipArchive zipFile = null;
|
|
|
|
ZipArchive zipFile = null;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
zipFile = createDownloadFile(owner, customDeviceName, sketchType);
|
|
|
|
zipFile = createDownloadFile(owner, customDeviceName, sketchType);
|
|
|
@ -391,8 +391,7 @@ public class VirtualFireAlarmService {
|
|
|
|
//Register the device with CDMF
|
|
|
|
//Register the device with CDMF
|
|
|
|
String deviceName = customDeviceName + "_" + deviceId;
|
|
|
|
String deviceName = customDeviceName + "_" + deviceId;
|
|
|
|
status = register(deviceId, deviceName, owner);
|
|
|
|
status = register(deviceId, deviceName, owner);
|
|
|
|
// status = register(deviceId, owner + "s_" + sketchType + "_" + deviceId.substring(0, 3),
|
|
|
|
|
|
|
|
// owner);
|
|
|
|
|
|
|
|
if (!status) {
|
|
|
|
if (!status) {
|
|
|
|
String msg = "Error occurred while registering the device with " + "id: " + deviceId
|
|
|
|
String msg = "Error occurred while registering the device with " + "id: " + deviceId
|
|
|
|
+ " owner:" + owner;
|
|
|
|
+ " owner:" + owner;
|
|
|
|