From c37a97d7b426df4df0109565690ff520fd248f98 Mon Sep 17 00:00:00 2001 From: Shabirmean Date: Thu, 15 Oct 2015 12:25:53 +0530 Subject: [PATCH] removed hardcoded deviceName --- .../firealarm/service/impl/VirtualFireAlarmService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/samples/virtual_firealarm/src/org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/sample/virtual/firealarm/service/impl/VirtualFireAlarmService.java b/modules/samples/virtual_firealarm/src/org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/sample/virtual/firealarm/service/impl/VirtualFireAlarmService.java index 541972cf..9b891606 100644 --- a/modules/samples/virtual_firealarm/src/org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/sample/virtual/firealarm/service/impl/VirtualFireAlarmService.java +++ b/modules/samples/virtual_firealarm/src/org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/sample/virtual/firealarm/service/impl/VirtualFireAlarmService.java @@ -302,12 +302,12 @@ public class VirtualFireAlarmService { @GET @Produces("application/octet-stream") public Response downloadSketch(@QueryParam("owner") String owner, -// @QueryParam("deviceName") String customDeviceName, + @QueryParam("deviceName") String customDeviceName, @PathParam("sketch_type") String sketchType) { ZipArchive zipFile = null; try { - zipFile = createDownloadFile(owner, "SMEANS FireAlarm", sketchType); + zipFile = createDownloadFile(owner, customDeviceName, sketchType); Response.ResponseBuilder rb = Response.ok(zipFile.getZipFile()); rb.header("Content-Disposition", "attachment; filename=\"" + zipFile.getFileName() + "\"");