From 4d0c0d2af994718024ba81fd05b3fd747724598e Mon Sep 17 00:00:00 2001 From: Ace Date: Fri, 4 Nov 2016 19:16:44 +0530 Subject: [PATCH 001/856] restructuring iot-plugins removing mobile/iot base plugins and other restructuring --- pom.xml | 263 ++++++++++++ .../service/impl/VirtualFireAlarmService.java | 73 ++++ .../impl/VirtualFireAlarmServiceImpl.java | 347 ++++++++++++++++ .../service/impl/dto/SensorRecord.java | 68 +++ .../exception/VirtualFireAlarmException.java | 35 ++ .../service/impl/util/APIUtil.java | 198 +++++++++ .../util/VirtualFireAlarmServiceUtils.java | 51 +++ .../util/VirtualFireAlarmUtilConstants.java | 26 ++ .../service/impl/util/ZipArchive.java | 43 ++ .../service/impl/util/ZipUtil.java | 387 ++++++++++++++++++ .../service/impl/util/util/Utils.java | 61 +++ src/main/webapp/META-INF/permissions.xml | 52 +++ .../webapp/META-INF/webapp-classloading.xml | 33 ++ src/main/webapp/WEB-INF/cxf-servlet.xml | 38 ++ src/main/webapp/WEB-INF/web.xml | 42 ++ 15 files changed, 1717 insertions(+) create mode 100644 pom.xml create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dto/SensorRecord.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/exception/VirtualFireAlarmException.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmServiceUtils.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmUtilConstants.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipArchive.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/util/Utils.java create mode 100644 src/main/webapp/META-INF/permissions.xml create mode 100644 src/main/webapp/META-INF/webapp-classloading.xml create mode 100644 src/main/webapp/WEB-INF/cxf-servlet.xml create mode 100644 src/main/webapp/WEB-INF/web.xml diff --git a/pom.xml b/pom.xml new file mode 100644 index 000000000..83eefe902 --- /dev/null +++ b/pom.xml @@ -0,0 +1,263 @@ + + + + + + virtual-fire-alarm-plugin + org.wso2.carbon.devicemgt-plugins + 2.2.5-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.wso2.carbon.device.mgt.iot.virtualfirealarm.api + war + WSO2 Carbon - IoT Server VirtualFireAlarm API + WSO2 Carbon - Virtual FireAlarm Service Management API Implementation + http://wso2.org + + + + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.common + provided + + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.core + provided + + + org.apache.axis2.wso2 + axis2-client + + + + + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.analytics.data.publisher + provided + + + org.apache.axis2.wso2 + axis2-client + + + + + + org.wso2.carbon.devicemgt + org.wso2.carbon.certificate.mgt.core + provided + + + commons-codec + commons-codec + + + + + + + + org.apache.cxf + cxf-rt-frontend-jaxws + provided + + + org.apache.cxf + cxf-rt-frontend-jaxrs + provided + + + org.apache.cxf + cxf-rt-transports-http + provided + + + + + org.eclipse.paho + org.eclipse.paho.client.mqttv3 + provided + + + + + org.apache.httpcomponents + httpasyncclient + 4.1 + provided + + + + + org.codehaus.jackson + jackson-core-asl + + + org.codehaus.jackson + jackson-jaxrs + + + javax + javaee-web-api + provided + + + javax.ws.rs + jsr311-api + provided + + + commons-httpclient.wso2 + commons-httpclient + provided + + + + org.wso2.carbon + org.wso2.carbon.utils + provided + + + org.bouncycastle.wso2 + bcprov-jdk15on + + + org.wso2.carbon + org.wso2.carbon.user.api + + + org.wso2.carbon + org.wso2.carbon.queuing + + + org.wso2.carbon + org.wso2.carbon.base + + + org.apache.axis2.wso2 + axis2 + + + org.igniterealtime.smack.wso2 + smack + + + org.igniterealtime.smack.wso2 + smackx + + + jaxen + jaxen + + + commons-fileupload.wso2 + commons-fileupload + + + org.apache.ant.wso2 + ant + + + org.apache.ant.wso2 + ant + + + commons-httpclient.wso2 + commons-httpclient + + + org.eclipse.equinox + javax.servlet + + + org.wso2.carbon + org.wso2.carbon.registry.api + + + + + commons-codec + commons-codec + + + org.wso2.carbon.devicemgt + org.wso2.carbon.apimgt.annotations + provided + + + org.igniterealtime.smack.wso2 + smack + provided + + + org.igniterealtime.smack.wso2 + smackx + provided + + + org.wso2.carbon.devicemgt + org.wso2.carbon.identity.jwt.client.extension + provided + + + org.wso2.carbon.devicemgt + org.wso2.carbon.apimgt.application.extension + provided + + + org.wso2.carbon.analytics + org.wso2.carbon.analytics.api + provided + + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.extensions + provided + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin + provided + + + + + + maven-compiler-plugin + + UTF-8 + ${wso2.maven.compiler.source} + ${wso2.maven.compiler.target} + + + + maven-war-plugin + + virtual_firealarm + + + + + + diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java new file mode 100644 index 000000000..9d89050fb --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl; + +import org.wso2.carbon.apimgt.annotations.api.API; +import org.wso2.carbon.apimgt.annotations.api.Scope; +import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.DeviceType; +import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.Feature; + +import javax.ws.rs.*; +import javax.ws.rs.core.Response; + +/** + * This class consists the functions/APIs specific to the "actions" of the VirtualFirealarm device-type. These APIs + * include the ones that are used by the [Device] to contact the server (i.e: Enrollment & Publishing Data) and the + * ones used by the [Server/Owner] to contact the [Device] (i.e: sending control signals). This class also initializes + * the transport 'Connectors' [XMPP & MQTT] specific to the VirtualFirealarm device-type in order to communicate with + * such devices and to receive messages form it. + */ +@API(name = "virtual_firealarm", version = "1.0.0", context = "/virtual_firealarm", tags = {"virtual_firealarm"}) +@DeviceType(value = "virtual_firealarm") +public interface VirtualFireAlarmService { + + /** + * This is an API called/used from within the Server(Front-End) or by a device Owner. It sends a control command to + * the VirtualFirealarm device to switch `ON` or `OFF` its buzzer. The method also takes in the protocol to be used + * to connect-to and send the command to the device. + * + * @param deviceId the ID of the VirtualFirealarm device on which the buzzer needs to switched `ON` or `OFF`. + * @param state the state to which the buzzer on the device needs to be changed. Either "ON" or "OFF". + * (Case-Insensitive String) + */ + @POST + @Path("device/{deviceId}/buzz") + @Scope(key = "device:firealarm:enroll", name = "", description = "") + @Feature(code = "buzz", name = "Buzzer On / Off", description = "Switch on/off Virtual Fire Alarm Buzzer. (On / Off)") + Response switchBuzzer(@PathParam("deviceId") String deviceId, + @FormParam("state") String state); + + /** + * Retrieve Sensor data for the device type + */ + @Path("device/stats/{deviceId}") + @GET + @Scope(key = "device:firealarm:enroll", name = "", description = "") + @Consumes("application/json") + @Produces("application/json") + Response getVirtualFirealarmStats(@PathParam("deviceId") String deviceId, @QueryParam("from") long from, + @QueryParam("to") long to); + + @Path("device/download") + @GET + @Produces("application/zip") + @Scope(key = "device:firealarm:enroll", name = "", description = "") + Response downloadSketch(@QueryParam("deviceName") String deviceName, @QueryParam("sketchType") String sketchType); + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java new file mode 100644 index 000000000..ce54d9537 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java @@ -0,0 +1,347 @@ +/* +* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. +* +* WSO2 Inc. licenses this file to you under the Apache License, +* Version 2.0 (the "License"); you may not use this file except +* in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl; + +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.io.FileUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.analytics.dataservice.commons.SortByField; +import org.wso2.carbon.analytics.dataservice.commons.SortType; +import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException; +import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService; +import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey; +import org.wso2.carbon.apimgt.application.extension.exception.APIManagerException; +import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.device.mgt.common.*; +import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationException; +import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroupConstants; +import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; +import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; +import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.constants.VirtualFireAlarmConstants; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.exception.VirtualFirealarmDeviceMgtPluginException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.impl.VirtualFirealarmSecurityManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.xmpp.XmppAccount; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.xmpp.XmppConfig; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.xmpp.XmppServerClient; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.dto.SensorRecord; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.exception.VirtualFireAlarmException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.APIUtil; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.VirtualFireAlarmServiceUtils; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.ZipArchive; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.ZipUtil; +import org.wso2.carbon.identity.jwt.client.extension.JWTClient; +import org.wso2.carbon.identity.jwt.client.extension.dto.AccessTokenInfo; +import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException; +import org.wso2.carbon.user.api.UserStoreException; + +import javax.ws.rs.Consumes; +import javax.ws.rs.FormParam; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.Response; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.security.PrivateKey; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.UUID; + +public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { + + private static final String XMPP_PROTOCOL = "XMPP"; + private static final String MQTT_PROTOCOL = "MQTT"; + private static final String KEY_TYPE = "PRODUCTION"; + private static ApiApplicationKey apiApplicationKey; + private static final String DEVICE_MGT_SCOPE_IDENTIFIER = "device-mgt"; + private static Log log = LogFactory.getLog(VirtualFireAlarmServiceImpl.class); + + @POST + @Path("device/{deviceId}/buzz") + public Response switchBuzzer(@PathParam("deviceId") String deviceId, @FormParam("state") String state) { + if (state == null || state.isEmpty()) { + log.error("State is not defined for the buzzer operation"); + return Response.status(Response.Status.BAD_REQUEST).build(); + } + String switchToState = state.toUpperCase(); + if (!switchToState.equals(VirtualFireAlarmConstants.STATE_ON) && !switchToState.equals( + VirtualFireAlarmConstants.STATE_OFF)) { + log.error("The requested state change shoud be either - 'ON' or 'OFF'"); + return Response.status(Response.Status.BAD_REQUEST).build(); + } + try { + if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized( + new DeviceIdentifier(deviceId, VirtualFireAlarmConstants.DEVICE_TYPE), + DeviceGroupConstants.Permissions.DEFAULT_OPERATOR_PERMISSIONS)) { + return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build(); + } + String resource = VirtualFireAlarmConstants.BULB_CONTEXT.replace("/", ""); + PrivateKey serverPrivateKey = VirtualFirealarmSecurityManager.getServerPrivateKey(); + String actualMessage = resource + ":" + switchToState; + String encryptedMsg = VirtualFireAlarmServiceUtils.prepareSecurePayLoad(actualMessage, + serverPrivateKey); + String publishTopic = APIUtil.getTenantDomainOftheUser() + "/" + + VirtualFireAlarmConstants.DEVICE_TYPE + "/" + deviceId; + + Operation commandOp = new CommandOperation(); + commandOp.setCode("buzz"); + commandOp.setType(Operation.Type.COMMAND); + commandOp.setEnabled(true); + commandOp.setPayLoad(encryptedMsg); + + Properties props = new Properties(); + props.setProperty(VirtualFireAlarmConstants.MQTT_ADAPTER_TOPIC_PROPERTY_NAME, publishTopic); + props.setProperty(VirtualFireAlarmConstants.CLIENT_JID_PROPERTY_KEY, deviceId + "@" + XmppConfig + .getInstance().getServerName()); + props.setProperty(VirtualFireAlarmConstants.SUBJECT_PROPERTY_KEY, "CONTROL-REQUEST"); + props.setProperty(VirtualFireAlarmConstants.MESSAGE_TYPE_PROPERTY_KEY, + VirtualFireAlarmConstants.CHAT_PROPERTY_KEY); + commandOp.setProperties(props); + + List deviceIdentifiers = new ArrayList<>(); + deviceIdentifiers.add(new DeviceIdentifier(deviceId, VirtualFireAlarmConstants.DEVICE_TYPE)); + APIUtil.getDeviceManagementService().addOperation(VirtualFireAlarmConstants.DEVICE_TYPE, commandOp, + deviceIdentifiers); + return Response.ok().build(); + } catch (InvalidDeviceException e) { + String msg = "Error occurred while executing command operation to send keywords"; + log.error(msg, e); + return Response.status(Response.Status.BAD_REQUEST).build(); + } catch (DeviceAccessAuthorizationException e) { + log.error(e.getErrorMessage(), e); + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); + } catch (VirtualFireAlarmException e) { + String errorMsg = "Preparing Secure payload failed for device - [" + deviceId + "]"; + log.error(errorMsg); + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); + } catch (OperationManagementException e) { + String msg = "Error occurred while executing command operation upon ringing the buzzer"; + log.error(msg, e); + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); + } + } + + @PUT + @Path("device/{deviceId}/policy") + public Response updatePolicy(@PathParam("deviceId") String deviceId, @QueryParam("protocol") String protocol, + @FormParam("policy") String policy) { + String protocolString = protocol.toUpperCase(); + if (log.isDebugEnabled()) { + log.debug("Sending request to update-policy of device [" + deviceId + "] via " + protocolString); + } + try { + if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized( + new DeviceIdentifier(deviceId, VirtualFireAlarmConstants.DEVICE_TYPE), + DeviceGroupConstants.Permissions.DEFAULT_MANAGE_POLICIES_PERMISSIONS)) { + return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build(); + } + PrivateKey serverPrivateKey = VirtualFirealarmSecurityManager.getServerPrivateKey(); + String actualMessage = VirtualFireAlarmConstants.POLICY_CONTEXT + ":" + policy; + String encryptedMsg = VirtualFireAlarmServiceUtils.prepareSecurePayLoad(actualMessage, + serverPrivateKey); + Map dynamicProperties = new HashMap<>(); + switch (protocolString) { + case XMPP_PROTOCOL: + dynamicProperties.put(VirtualFireAlarmConstants.JID_PROPERTY_KEY, + deviceId + "@" + XmppConfig.getInstance().getServerName()); + dynamicProperties.put(VirtualFireAlarmConstants.SUBJECT_PROPERTY_KEY, "POLICTY-REQUEST"); + dynamicProperties.put(VirtualFireAlarmConstants.MESSAGE_TYPE_PROPERTY_KEY, + VirtualFireAlarmConstants.CHAT_PROPERTY_KEY); + APIUtil.getOutputEventAdapterService().publish(VirtualFireAlarmConstants.XMPP_ADAPTER_NAME, + dynamicProperties, encryptedMsg); + break; + default: + + String publishTopic = APIUtil.getTenantDomainOftheUser() + "/" + + VirtualFireAlarmConstants.DEVICE_TYPE + "/" + deviceId; + dynamicProperties.put(VirtualFireAlarmConstants.ADAPTER_TOPIC_PROPERTY, publishTopic); + APIUtil.getOutputEventAdapterService().publish(VirtualFireAlarmConstants.MQTT_ADAPTER_NAME, + dynamicProperties, encryptedMsg); + break; + } + return Response.ok().build(); + } catch (DeviceAccessAuthorizationException e) { + log.error(e.getErrorMessage(), e); + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); + } catch (VirtualFireAlarmException e) { + log.error(e); + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); + } + } + + + @Path("device/stats/{deviceId}") + @GET + @Consumes("application/json") + @Produces("application/json") + public Response getVirtualFirealarmStats(@PathParam("deviceId") String deviceId, @QueryParam("from") long from, + @QueryParam("to") long to) { + String fromDate = String.valueOf(from); + String toDate = String.valueOf(to); + String query = "deviceId:" + deviceId + " AND deviceType:" + + VirtualFireAlarmConstants.DEVICE_TYPE + " AND time : [" + fromDate + " TO " + toDate + "]"; + String sensorTableName = VirtualFireAlarmConstants.TEMPERATURE_EVENT_TABLE; + try { + if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized( + new DeviceIdentifier(deviceId, VirtualFireAlarmConstants.DEVICE_TYPE), + DeviceGroupConstants.Permissions.DEFAULT_STATS_MONITOR_PERMISSIONS)) { + return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build(); + } + List sortByFields = new ArrayList<>(); + SortByField sortByField = new SortByField("time", SortType.ASC); + sortByFields.add(sortByField); + List sensorRecords = APIUtil.getAllEventsForDevice(sensorTableName, query, sortByFields); + return Response.status(Response.Status.OK.getStatusCode()).entity(sensorRecords).build(); + } catch (AnalyticsException e) { + String errorMsg = "Error on retrieving stats on table " + sensorTableName + " with query " + query; + log.error(errorMsg); + return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).entity(errorMsg).build(); + } catch (DeviceAccessAuthorizationException e) { + log.error(e.getErrorMessage(), e); + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); + } + } + + @Path("device/download") + @GET + @Produces("application/zip") + public Response downloadSketch(@QueryParam("deviceName") String deviceName, + @QueryParam("sketchType") String sketchType) { + try { + ZipArchive zipFile = createDownloadFile(APIUtil.getAuthenticatedUser(), deviceName, sketchType); + Response.ResponseBuilder response = Response.ok(FileUtils.readFileToByteArray(zipFile.getZipFile())); + response.status(Response.Status.OK); + response.type("application/zip"); + response.header("Content-Disposition", "attachment; filename=\"" + zipFile.getFileName() + "\""); + Response resp = response.build(); + zipFile.getZipFile().delete(); + return resp; + } catch (IllegalArgumentException ex) { + return Response.status(400).entity(ex.getMessage()).build();//bad request + } catch (DeviceManagementException ex) { + log.error(ex.getMessage(), ex); + return Response.status(500).entity(ex.getMessage()).build(); + } catch (JWTClientException ex) { + log.error(ex.getMessage(), ex); + return Response.status(500).entity(ex.getMessage()).build(); + } catch (APIManagerException ex) { + log.error(ex.getMessage(), ex); + return Response.status(500).entity(ex.getMessage()).build(); + } catch (IOException ex) { + log.error(ex.getMessage(), ex); + return Response.status(500).entity(ex.getMessage()).build(); + } catch (UserStoreException ex) { + log.error(ex.getMessage(), ex); + return Response.status(500).entity(ex.getMessage()).build(); + } catch (VirtualFirealarmDeviceMgtPluginException ex) { + log.error(ex.getMessage(), ex); + return Response.status(500).entity(ex.getMessage()).build(); + } + } + + private boolean register(String deviceId, String name) { + try { + DeviceIdentifier deviceIdentifier = new DeviceIdentifier(); + deviceIdentifier.setId(deviceId); + deviceIdentifier.setType(VirtualFireAlarmConstants.DEVICE_TYPE); + if (APIUtil.getDeviceManagementService().isEnrolled(deviceIdentifier)) { + return false; + } + Device device = new Device(); + device.setDeviceIdentifier(deviceId); + EnrolmentInfo enrolmentInfo = new EnrolmentInfo(); + enrolmentInfo.setDateOfEnrolment(new Date().getTime()); + enrolmentInfo.setDateOfLastUpdate(new Date().getTime()); + enrolmentInfo.setStatus(EnrolmentInfo.Status.ACTIVE); + enrolmentInfo.setOwnership(EnrolmentInfo.OwnerShip.BYOD); + device.setName(name); + device.setType(VirtualFireAlarmConstants.DEVICE_TYPE); + enrolmentInfo.setOwner(APIUtil.getAuthenticatedUser()); + device.setEnrolmentInfo(enrolmentInfo); + return APIUtil.getDeviceManagementService().enrollDevice(device); + } catch (DeviceManagementException e) { + log.error(e.getMessage(), e); + return false; + } + } + + private ZipArchive createDownloadFile(String owner, String deviceName, String sketchType) + throws DeviceManagementException, APIManagerException, JWTClientException, + UserStoreException, VirtualFirealarmDeviceMgtPluginException { + //create new device id + String deviceId = shortUUID(); + boolean status = register(deviceId, deviceName); + if (!status) { + String msg = "Error occurred while registering the device with " + "id: " + deviceId + " owner:" + owner; + throw new DeviceManagementException(msg); + } + if (apiApplicationKey == null) { + String applicationUsername = + PrivilegedCarbonContext.getThreadLocalCarbonContext().getUserRealm().getRealmConfiguration() + .getAdminUserName(); + APIManagementProviderService apiManagementProviderService = APIUtil.getAPIManagementProviderService(); + String[] tags = {VirtualFireAlarmConstants.DEVICE_TYPE}; + apiApplicationKey = apiManagementProviderService.generateAndRetrieveApplicationKeys( + VirtualFireAlarmConstants.DEVICE_TYPE, tags, KEY_TYPE, applicationUsername, true); + } + JWTClient jwtClient = APIUtil.getJWTClientManagerService().getJWTClient(); + String device = "{ \"scope\":\"mqtt-publisher mqtt-subscriber\", \"deviceIdentifiers\":[{\"id\":\""+deviceId+"\", " + + "\"type\":\""+VirtualFireAlarmConstants.DEVICE_TYPE+"\"}]}"; + Map params = new HashMap(); + params.put("device", Base64.encodeBase64String(device.getBytes())); + AccessTokenInfo accessTokenInfo = jwtClient.getAccessToken(apiApplicationKey.getConsumerKey(), + apiApplicationKey.getConsumerSecret(), owner, + null, params); + String accessToken = accessTokenInfo.getAccessToken(); + String refreshToken = accessTokenInfo.getRefreshToken(); + XmppAccount newXmppAccount = new XmppAccount(); + newXmppAccount.setAccountName(deviceId); + newXmppAccount.setUsername(deviceId); + newXmppAccount.setPassword(accessToken); + newXmppAccount.setEmail(deviceId + "@" + APIUtil.getTenantDomainOftheUser()); + + status = XmppServerClient.createAccount(newXmppAccount); + if (!status) { + String msg = "XMPP Account was not created for device - " + deviceId + " of owner - " + owner + + ".XMPP might have been disabled in org.wso2.carbon.device.mgt.iot" + + ".common.config.server.configs"; + throw new DeviceManagementException(msg); + } + ZipUtil ziputil = new ZipUtil(); + return ziputil.createZipFile(owner, sketchType, deviceId, deviceName, apiApplicationKey.toString(), + accessToken, refreshToken); + } + + private static String shortUUID() { + UUID uuid = UUID.randomUUID(); + long l = ByteBuffer.wrap(uuid.toString().getBytes(StandardCharsets.UTF_8)).getLong(); + return Long.toString(l, Character.MAX_RADIX); + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dto/SensorRecord.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dto/SensorRecord.java new file mode 100644 index 000000000..e1f46d2d7 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dto/SensorRecord.java @@ -0,0 +1,68 @@ +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.dto; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +@XmlRootElement +/** + * This stores sensor event data for android sense. + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class SensorRecord { + + @XmlElementWrapper(required = true, name = "values") + private Map values; + + /** The id. */ + @XmlElement(required = false, name = "id") + private String id; + + /** + * Gets the values. + * @return the values + */ + public Map getValues() { + return values; + } + + /** + * Sets the values. + * @param values the values + */ + public void setValues(Map values) { + this.values = values; + } + + /** + * Sets the id. + * @param id the new id + */ + public void setId(String id) { + this.id = id; + } + + /** + * Gets the id. + * @return the id + */ + public String getId() { + return id; + } + + @Override + public String toString(){ + List valueList = new ArrayList(); + for (Map.Entry entry : values.entrySet()) { + valueList.add(entry.getKey() + ":" + entry.getValue()); + } + return valueList.toString(); + + } + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/exception/VirtualFireAlarmException.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/exception/VirtualFireAlarmException.java new file mode 100644 index 000000000..4305ec7c0 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/exception/VirtualFireAlarmException.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.exception; + +public class VirtualFireAlarmException extends Exception { + private static final long serialVersionUID = 118512086957330189L; + + public VirtualFireAlarmException(String errorMessage) { + super(errorMessage); + } + + public VirtualFireAlarmException(String errorMessage, Throwable throwable) { + super(errorMessage, throwable); + } + + public VirtualFireAlarmException(Throwable cause) { + super(cause); + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java new file mode 100644 index 000000000..0509eb80b --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java @@ -0,0 +1,198 @@ +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.analytics.api.AnalyticsDataAPI; +import org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse; +import org.wso2.carbon.analytics.dataservice.commons.AnalyticsDrillDownRequest; +import org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry; +import org.wso2.carbon.analytics.dataservice.commons.SortByField; +import org.wso2.carbon.analytics.dataservice.core.AnalyticsDataServiceUtils; +import org.wso2.carbon.analytics.datasource.commons.Record; +import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException; +import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService; +import org.wso2.carbon.context.CarbonContext; +import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationService; +import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfigurationManagementService; +import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.dto.SensorRecord; +import org.wso2.carbon.event.output.adapter.core.OutputEventAdapterService; +import org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * This class provides utility functions used by REST-API. + */ +public class APIUtil { + + private static Log log = LogFactory.getLog(APIUtil.class); + + public static String getAuthenticatedUser() { + PrivilegedCarbonContext threadLocalCarbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + String username = threadLocalCarbonContext.getUsername(); + String tenantDomain = threadLocalCarbonContext.getTenantDomain(); + if (username.endsWith(tenantDomain)) { + return username.substring(0, username.lastIndexOf("@")); + } + return username; + } + + public static DeviceManagementProviderService getDeviceManagementService() { + PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + DeviceManagementProviderService deviceManagementProviderService = + (DeviceManagementProviderService) ctx.getOSGiService(DeviceManagementProviderService.class, null); + if (deviceManagementProviderService == null) { + String msg = "Device Management service has not initialized."; + log.error(msg); + throw new IllegalStateException(msg); + } + return deviceManagementProviderService; + } + + public static AnalyticsDataAPI getAnalyticsDataAPI() { + PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + AnalyticsDataAPI analyticsDataAPI = + (AnalyticsDataAPI) ctx.getOSGiService(AnalyticsDataAPI.class, null); + if (analyticsDataAPI == null) { + String msg = "Analytics api service has not initialized."; + log.error(msg); + throw new IllegalStateException(msg); + } + return analyticsDataAPI; + } + + public static List getAllEventsForDevice(String tableName, String query, + List sortByFields) throws AnalyticsException { + int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); + AnalyticsDataAPI analyticsDataAPI = getAnalyticsDataAPI(); + int eventCount = analyticsDataAPI.searchCount(tenantId, tableName, query); + if (eventCount == 0) { + return null; + } + List resultEntries = analyticsDataAPI.search(tenantId, tableName, query, 0, eventCount, + sortByFields); + List recordIds = getRecordIds(resultEntries); + AnalyticsDataResponse response = analyticsDataAPI.get(tenantId, tableName, 1, null, recordIds); + Map sensorDatas = createSensorData(AnalyticsDataServiceUtils.listRecords( + analyticsDataAPI, response)); + List sortedSensorData = getSortedSensorData(sensorDatas, resultEntries); + return sortedSensorData; + } + + private static List getRecordIds(List searchResults) { + List ids = new ArrayList<>(); + for (SearchResultEntry searchResult : searchResults) { + ids.add(searchResult.getId()); + } + return ids; + } + + public static List getSortedSensorData(Map sensorDatas, + List searchResults) { + List sortedRecords = new ArrayList<>(); + for (SearchResultEntry searchResultEntry : searchResults) { + sortedRecords.add(sensorDatas.get(searchResultEntry.getId())); + } + return sortedRecords; + } + + /** + * Creates the SensorDatas from records. + * + * @param records the records + * @return the Map of SensorRecord + */ + public static Map createSensorData(List records) { + Map sensorDatas = new HashMap<>(); + for (Record record : records) { + SensorRecord sensorData = createSensorData(record); + sensorDatas.put(sensorData.getId(), sensorData); + } + return sensorDatas; + } + + /** + * Create a SensorRecord object out of a Record object + * + * @param record the record object + * @return SensorRecord object + */ + public static SensorRecord createSensorData(Record record) { + SensorRecord recordBean = new SensorRecord(); + recordBean.setId(record.getId()); + recordBean.setValues(record.getValues()); + return recordBean; + } + + public static APIManagementProviderService getAPIManagementProviderService() { + PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + APIManagementProviderService apiManagementProviderService = + (APIManagementProviderService) ctx.getOSGiService(APIManagementProviderService.class, null); + if (apiManagementProviderService == null) { + String msg = "API management provider service has not initialized."; + log.error(msg); + throw new IllegalStateException(msg); + } + return apiManagementProviderService; + } + + public static JWTClientManagerService getJWTClientManagerService() { + PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + JWTClientManagerService jwtClientManagerService = + (JWTClientManagerService) ctx.getOSGiService(JWTClientManagerService.class, null); + if (jwtClientManagerService == null) { + String msg = "JWT Client manager service has not initialized."; + log.error(msg); + throw new IllegalStateException(msg); + } + return jwtClientManagerService; + } + + public static String getTenantDomainOftheUser() { + PrivilegedCarbonContext threadLocalCarbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + return threadLocalCarbonContext.getTenantDomain(); + } + + public static DeviceAccessAuthorizationService getDeviceAccessAuthorizationService() { + PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + DeviceAccessAuthorizationService deviceAccessAuthorizationService = + (DeviceAccessAuthorizationService) ctx.getOSGiService(DeviceAccessAuthorizationService.class, null); + if (deviceAccessAuthorizationService == null) { + String msg = "Device Authorization service has not initialized."; + log.error(msg); + throw new IllegalStateException(msg); + } + return deviceAccessAuthorizationService; + } + + public static OutputEventAdapterService getOutputEventAdapterService() { + PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + OutputEventAdapterService outputEventAdapterService = + (OutputEventAdapterService) ctx.getOSGiService(OutputEventAdapterService.class, null); + if (outputEventAdapterService == null) { + String msg = "Device Authorization service has not initialized."; + log.error(msg); + throw new IllegalStateException(msg); + } + return outputEventAdapterService; + } + + public static PlatformConfigurationManagementService getTenantConfigurationManagementService() { + PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + PlatformConfigurationManagementService tenantConfigurationManagementService = + (PlatformConfigurationManagementService) ctx.getOSGiService(PlatformConfigurationManagementService.class, null); + if (tenantConfigurationManagementService == null) { + String msg = "Tenant configuration Management service not initialized."; + log.error(msg); + throw new IllegalStateException(msg); + } + return tenantConfigurationManagementService; + } + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmServiceUtils.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmServiceUtils.java new file mode 100644 index 000000000..277000e0f --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmServiceUtils.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util; + +import org.apache.commons.codec.binary.Base64; +import org.json.JSONObject; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.exception.VirtualFirealarmDeviceMgtPluginException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.impl.VirtualFirealarmSecurityManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.exception.VirtualFireAlarmException; + +import java.lang.*; +import java.security.PrivateKey; + +/** + * + */ +public class VirtualFireAlarmServiceUtils { + + private static final String JSON_MESSAGE_KEY = "Msg"; + private static final String JSON_SIGNATURE_KEY = "Sig"; + + public static String prepareSecurePayLoad(String message, PrivateKey signatureKey) throws VirtualFireAlarmException { + try { + message = Base64.encodeBase64String(message.getBytes()); + String signedPayload = VirtualFirealarmSecurityManager.signMessage(message, signatureKey); + JSONObject jsonPayload = new JSONObject(); + jsonPayload.put(JSON_MESSAGE_KEY, message); + jsonPayload.put(JSON_SIGNATURE_KEY, signedPayload); + return jsonPayload.toString(); + } catch (VirtualFirealarmDeviceMgtPluginException e) { + throw new VirtualFireAlarmException(e); + } + + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmUtilConstants.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmUtilConstants.java new file mode 100644 index 000000000..fae96848d --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmUtilConstants.java @@ -0,0 +1,26 @@ +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util; + +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.xmpp.XmppConfig; + +public class VirtualFireAlarmUtilConstants { + + public static final String TENANT_DOMAIN = "TENANT_DOMAIN"; + public static final String DEVICE_OWNER = "DEVICE_OWNER"; + public static final String DEVICE_ID = "DEVICE_ID"; + public static final String DEVICE_NAME = "DEVICE_NAME"; + public static final String HTTPS_EP = "HTTPS_EP"; + public static final String HTTP_EP = "HTTP_EP"; + public static final String APIM_EP = "APIM_EP"; + public static final String MQTT_EP = "MQTT_EP"; + public static final String XMPP_EP = "XMPP_EP"; + public static final String VIRTUAL_FIREALARM_HTTPS_EP = "VIRTUAL_FIREALARM_HTTPS_EP"; + public static final String VIRTUAL_FIREALARM_HTTP_EP = "VIRTUAL_FIREALARM_HTTP_EP"; + public static final String VIRTUAL_FIREALARM_APIM_EP = "VIRTUAL_FIREALARM_APIM_EP"; + public static final String VIRTUAL_FIREALARM_MQTT_EP = "VIRTUAL_FIREALARM_MQTT_EP"; + public static final String VIRTUAL_FIREALARM_XMPP_EP = "VIRTUAL_FIREALARM_XMPP_EP"; + public static final String API_APPLICATION_KEY = "API_APPLICATION_KEY"; + public static final String DEVICE_TOKEN = "DEVICE_TOKEN"; + public static final String DEVICE_REFRESH_TOKEN = "DEVICE_REFRESH_TOKEN"; + public static final String SERVER_NAME = "SERVER_NAME"; + public static final String SERVER_JID = "SERVER_JID"; +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipArchive.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipArchive.java new file mode 100644 index 000000000..22fda92b3 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipArchive.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util; + +import java.io.File; + +/** + * This is an utility class to hold zip files. + */ +public class ZipArchive { + + private File zipFile = null; + private String fileName = null; + + public ZipArchive(String fileName, File zipFile) { + this.fileName = fileName; + this.zipFile = zipFile; + } + + public File getZipFile() { + return zipFile; + } + + public String getFileName() { + return fileName; + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java new file mode 100644 index 000000000..feb8135db --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java @@ -0,0 +1,387 @@ +/* + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util; + +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.IOUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.json.JSONObject; +import org.wso2.carbon.apimgt.application.extension.constants.ApiApplicationConstants; +import org.wso2.carbon.base.ServerConfiguration; +import org.wso2.carbon.device.mgt.common.DeviceManagementException; +import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry; +import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException; +import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.xmpp.XmppConfig; +import org.wso2.carbon.utils.CarbonUtils; +import org.wso2.carbon.utils.NetworkUtils; + +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.SocketException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; + +/** + * This is used to create a zip file that includes the necessary configuration required for the agent. + */ +public class ZipUtil { + + private static final Log log = LogFactory.getLog(ZipUtil.class); + private static final String HTTPS_PORT_PROPERTY = "httpsPort"; + private static final String HTTP_PORT_PROPERTY = "httpPort"; + + private static final String LOCALHOST = "localhost"; + private static final String HTTPS_PROTOCOL_APPENDER = "https://"; + private static final String HTTP_PROTOCOL_APPENDER = "http://"; + private static final String CONFIG_TYPE = "general"; + private static final String DEFAULT_MQTT_ENDPOINT = "tcp://localhost:1883"; + public static final String HOST_NAME = "HostName"; + + public ZipArchive createZipFile(String owner, String deviceType, String deviceId, String deviceName, + String apiApplicationKey, String token, String refreshToken) + throws DeviceManagementException { + + String sketchFolder = "repository" + File.separator + "resources" + File.separator + "sketches"; + String archivesPath = + CarbonUtils.getCarbonHome() + File.separator + sketchFolder + File.separator + "archives" + + File.separator + deviceId; + String templateSketchPath = sketchFolder + File.separator + deviceType; + String iotServerIP; + + try { + iotServerIP = getServerUrl(); + String httpsServerPort = System.getProperty(HTTPS_PORT_PROPERTY); + String httpServerPort = System.getProperty(HTTP_PORT_PROPERTY); + String httpsServerEP = HTTPS_PROTOCOL_APPENDER + iotServerIP + ":" + httpsServerPort; + String httpServerEP = HTTP_PROTOCOL_APPENDER + iotServerIP + ":" + httpServerPort; + String mqttEndpoint = DEFAULT_MQTT_ENDPOINT; + if (mqttEndpoint.contains(LOCALHOST)) { + mqttEndpoint = mqttEndpoint.replace(LOCALHOST, iotServerIP); + } + + String xmppEndpoint = ""; + if (XmppConfig.getInstance().isEnabled()) { + xmppEndpoint = XmppConfig.getInstance().getHost() + ":" + XmppConfig.getInstance().getPort(); + if (xmppEndpoint.contains(LOCALHOST)) { + xmppEndpoint = xmppEndpoint.replace(LOCALHOST, iotServerIP); + } + } + PlatformConfiguration configuration = APIUtil.getTenantConfigurationManagementService().getConfiguration( + CONFIG_TYPE); + if (configuration != null && configuration.getConfiguration() != null && configuration + .getConfiguration().size() > 0) { + List configurations = configuration.getConfiguration(); + for (ConfigurationEntry configurationEntry : configurations) { + switch (configurationEntry.getName()) { + case VirtualFireAlarmUtilConstants.VIRTUAL_FIREALARM_HTTPS_EP: + httpsServerEP = (String)configurationEntry.getValue(); + break; + case VirtualFireAlarmUtilConstants.VIRTUAL_FIREALARM_HTTP_EP: + httpServerEP = (String)configurationEntry.getValue(); + break; + case VirtualFireAlarmUtilConstants.VIRTUAL_FIREALARM_MQTT_EP: + mqttEndpoint = (String)configurationEntry.getValue(); + break; + case VirtualFireAlarmUtilConstants.VIRTUAL_FIREALARM_XMPP_EP: + xmppEndpoint = (String)configurationEntry.getValue(); + break; + } + } + } + String base64EncodedApplicationKey = getBase64EncodedAPIAppKey(apiApplicationKey).trim(); + + Map contextParams = new HashMap<>(); + contextParams.put(VirtualFireAlarmUtilConstants.TENANT_DOMAIN, APIUtil.getTenantDomainOftheUser()); + contextParams.put(VirtualFireAlarmUtilConstants.DEVICE_OWNER, owner); + contextParams.put(VirtualFireAlarmUtilConstants.DEVICE_ID, deviceId); + contextParams.put(VirtualFireAlarmUtilConstants.DEVICE_NAME, deviceName); + contextParams.put(VirtualFireAlarmUtilConstants.HTTPS_EP, httpsServerEP); + contextParams.put(VirtualFireAlarmUtilConstants.HTTP_EP, httpServerEP); + contextParams.put(VirtualFireAlarmUtilConstants.APIM_EP, httpServerEP); + contextParams.put(VirtualFireAlarmUtilConstants.MQTT_EP, mqttEndpoint); + contextParams.put(VirtualFireAlarmUtilConstants.XMPP_EP, "XMPP:" + xmppEndpoint); + contextParams.put(VirtualFireAlarmUtilConstants.API_APPLICATION_KEY, base64EncodedApplicationKey); + contextParams.put(VirtualFireAlarmUtilConstants.DEVICE_TOKEN, token); + contextParams.put(VirtualFireAlarmUtilConstants.DEVICE_REFRESH_TOKEN, refreshToken); + contextParams.put(VirtualFireAlarmUtilConstants.SERVER_NAME, XmppConfig.getInstance().getServerName() == null + ? "" : XmppConfig.getInstance().getServerName()); + contextParams.put(VirtualFireAlarmUtilConstants.SERVER_JID, XmppConfig.getInstance().getJid() == null + ? "" : XmppConfig.getInstance().getJid()); + + ZipArchive zipFile; + zipFile = getSketchArchive(archivesPath, templateSketchPath, contextParams, deviceName); + return zipFile; + } catch (IOException e) { + throw new DeviceManagementException("Zip File Creation Failed", e); + } catch (ConfigurationManagementException e) { + throw new DeviceManagementException("Failed to retrieve configuration", e); + } + } + + private String getBase64EncodedAPIAppKey(String apiAppCredentialsAsJSONString) { + + JSONObject jsonObject = new JSONObject(apiAppCredentialsAsJSONString); + String consumerKey = jsonObject.get(ApiApplicationConstants.OAUTH_CLIENT_ID).toString(); + String consumerSecret = jsonObject.get(ApiApplicationConstants.OAUTH_CLIENT_SECRET).toString(); + String stringToEncode = consumerKey + ":" + consumerSecret; + return Base64.encodeBase64String(stringToEncode.getBytes()); + } + + public static String getServerUrl() { + String hostName = ServerConfiguration.getInstance().getFirstProperty(HOST_NAME); + try { + if (hostName == null) { + hostName = NetworkUtils.getLocalHostname(); + } + } catch (SocketException e) { + hostName = "localhost"; + log.warn("Failed retrieving the hostname, therefore set to localhost", e); + } + return hostName; + } + + public static ZipArchive getSketchArchive(String archivesPath, String templateSketchPath, Map contextParams + , String zipFileName) + throws DeviceManagementException, IOException { + String sketchPath = CarbonUtils.getCarbonHome() + File.separator + templateSketchPath; + FileUtils.deleteDirectory(new File(archivesPath));//clear directory + FileUtils.deleteDirectory(new File(archivesPath + ".zip"));//clear zip + if (!new File(archivesPath).mkdirs()) { //new dir + String message = "Could not create directory at path: " + archivesPath; + log.error(message); + throw new DeviceManagementException(message); + } + zipFileName = zipFileName + ".zip"; + try { + Map> properties = getProperties(sketchPath + File.separator + "sketch" + ".properties"); + List templateFiles = properties.get("templates"); + + for (String templateFile : templateFiles) { + parseTemplate(templateSketchPath + File.separator + templateFile, archivesPath + File.separator + templateFile, + contextParams); + } + + templateFiles.add("sketch.properties"); // ommit copying the props file + copyFolder(new File(sketchPath), new File(archivesPath), templateFiles); + createZipArchive(archivesPath); + FileUtils.deleteDirectory(new File(archivesPath)); + File zip = new File(archivesPath + ".zip"); + return new org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.ZipArchive(zipFileName, zip); + } catch (IOException ex) { + throw new DeviceManagementException( + "Error occurred when trying to read property " + "file sketch.properties", ex); + } + } + + private static Map> getProperties(String propertyFilePath) throws IOException { + Properties prop = new Properties(); + InputStream input = null; + + try { + + input = new FileInputStream(propertyFilePath); + + // load a properties file + prop.load(input); + Map> properties = new HashMap>(); + + String templates = prop.getProperty("templates"); + List list = new ArrayList(Arrays.asList(templates.split(","))); + properties.put("templates", list); + + final String filename = prop.getProperty("zipfilename"); + list = new ArrayList() {{ + add(filename); + }}; + properties.put("zipfilename", list); + return properties; + + } finally { + if (input != null) { + try { + input.close(); + } catch (IOException e) { + log.error("Failed closing connection", e); + } + } + } + } + + private static void parseTemplate(String srcFile, String dstFile, Map contextParams) throws IOException { + //read from file + FileInputStream inputStream = null; + FileOutputStream outputStream = null; + try { + inputStream = new FileInputStream(srcFile); + outputStream = new FileOutputStream(dstFile); + String content = IOUtils.toString(inputStream, StandardCharsets.UTF_8.toString()); + Iterator iterator = contextParams.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry mapEntry = (Map.Entry) iterator.next(); + content = content.replaceAll("\\$\\{" + mapEntry.getKey() + "\\}", mapEntry.getValue().toString()); + } + IOUtils.write(content, outputStream, StandardCharsets.UTF_8.toString()); + } finally { + if (inputStream != null) { + inputStream.close(); + } + if (outputStream != null) { + outputStream.close(); + } + } + } + + private static void copyFolder(File src, File dest, List excludeFileNames) throws IOException { + + if (src.isDirectory()) { + //if directory not exists, create it + if (!dest.exists() && !dest.mkdirs()) { + String message = "Could not create directory at path: " + dest; + log.error(message); + throw new IOException(message); + } + //list all the directory contents + String files[] = src.list(); + + if (files == null) { + log.warn("There are no files insides the directory " + src.getAbsolutePath()); + return; + } + + for (String file : files) { + //construct the src and dest file structure + File srcFile = new File(src, file); + File destFile = new File(dest, file); + //recursive copy + copyFolder(srcFile, destFile, excludeFileNames); + } + + } else { + for (String fileName : excludeFileNames) { + if (src.getName().equals(fileName)) { + return; + } + } + //if file, then copy it + //Use bytes stream to support all file types + InputStream in = null; + OutputStream out = null; + + try { + in = new FileInputStream(src); + out = new FileOutputStream(dest); + + byte[] buffer = new byte[1024]; + + int length; + //copy the file content in bytes + while ((length = in.read(buffer)) > 0) { + out.write(buffer, 0, length); + } + } finally { + if (in != null) { + in.close(); + } + if (out != null) { + out.close(); + } + } + } + } + + private static boolean createZipArchive(String srcFolder) throws IOException { + BufferedInputStream origin = null; + ZipOutputStream out = null; + + try { + final int BUFFER = 2048; + FileOutputStream dest = new FileOutputStream(new File(srcFolder + ".zip")); + out = new ZipOutputStream(new BufferedOutputStream(dest)); + byte data[] = new byte[BUFFER]; + File subDir = new File(srcFolder); + String subdirList[] = subDir.list(); + if (subdirList == null) { + log.warn("The sub directory " + subDir.getAbsolutePath() + " is empty"); + return false; + } + for (String sd : subdirList) { + // get a list of files from current directory + File f = new File(srcFolder + "/" + sd); + if (f.isDirectory()) { + String files[] = f.list(); + + if (files == null) { + log.warn("The current directory " + f.getAbsolutePath() + " is empty. Has no files"); + return false; + } + + for (int i = 0; i < files.length; i++) { + FileInputStream fi = new FileInputStream(srcFolder + "/" + sd + "/" + files[i]); + origin = new BufferedInputStream(fi, BUFFER); + ZipEntry entry = new ZipEntry(sd + "/" + files[i]); + out.putNextEntry(entry); + int count; + while ((count = origin.read(data, 0, BUFFER)) != -1) { + out.write(data, 0, count); + out.flush(); + } + + } + } else //it is just a file + { + FileInputStream fi = new FileInputStream(f); + origin = new BufferedInputStream(fi, BUFFER); + ZipEntry entry = new ZipEntry(sd); + out.putNextEntry(entry); + int count; + while ((count = origin.read(data, 0, BUFFER)) != -1) { + out.write(data, 0, count); + out.flush(); + } + } + } + out.flush(); + } finally { + if (origin != null) { + origin.close(); + } + if (out != null) { + out.close(); + } + } + return true; + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/util/Utils.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/util/Utils.java new file mode 100644 index 000000000..586de223c --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/util/Utils.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.util; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.IOUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.base.ServerConfiguration; +import org.wso2.carbon.device.mgt.common.DeviceManagementException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.ZipArchive; +import org.wso2.carbon.utils.CarbonUtils; +import org.wso2.carbon.utils.NetworkUtils; + +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.SocketException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; + +/** + * Provides utility methods required by the device type plugins. + */ +public class Utils { + + public static final String HOST_NAME = "HostName"; + private static final Log log = LogFactory.getLog(Utils.class); + + + +} diff --git a/src/main/webapp/META-INF/permissions.xml b/src/main/webapp/META-INF/permissions.xml new file mode 100644 index 000000000..fbad43f95 --- /dev/null +++ b/src/main/webapp/META-INF/permissions.xml @@ -0,0 +1,52 @@ + + + + + + + + + + Download device + /device-mgt/user/devices + /device/download + GET + virtual_firealarm_user + + + Control Buzz + /device-mgt/user/operation + /device/*/buzz + POST + virtual_firealarm_user + + + Get Stats + /device-mgt/user/stats + /device/stats/* + GET + virtual_firealarm_user + + \ No newline at end of file diff --git a/src/main/webapp/META-INF/webapp-classloading.xml b/src/main/webapp/META-INF/webapp-classloading.xml new file mode 100644 index 000000000..fa4461919 --- /dev/null +++ b/src/main/webapp/META-INF/webapp-classloading.xml @@ -0,0 +1,33 @@ + + + + + + + + + false + + + CXF,Carbon + diff --git a/src/main/webapp/WEB-INF/cxf-servlet.xml b/src/main/webapp/WEB-INF/cxf-servlet.xml new file mode 100644 index 000000000..37a69c268 --- /dev/null +++ b/src/main/webapp/WEB-INF/cxf-servlet.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 000000000..2d1c6e26b --- /dev/null +++ b/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,42 @@ + + + WSO2 IoT Server + WSO2 IoT Server + + + CXFServlet + org.apache.cxf.transport.servlet.CXFServlet + 1 + + + CXFServlet + /* + + + isAdminService + false + + + doAuthentication + true + + + providerTenantDomain + carbon.super + + + + + managed-api-enabled + true + + + managed-api-owner + admin + + + \ No newline at end of file From 29a7e10b4f2ea1e06344198d73106848e65497e0 Mon Sep 17 00:00:00 2001 From: Ace Date: Fri, 4 Nov 2016 19:16:44 +0530 Subject: [PATCH 002/856] restructuring iot-plugins removing mobile/iot base plugins and other restructuring --- pom.xml | 237 +++ .../iot/virtualfirealarm/agent/Bootstrap.java | 36 + .../http/FireAlarmHTTPCommunicator.java | 484 ++++++ .../mqtt/FireAlarmMQTTCommunicator.java | 290 ++++ .../xmpp/FireAlarmXMPPCommunicator.java | 263 +++ .../agent/core/AgentConfiguration.java | 191 +++ .../agent/core/AgentConstants.java | 128 ++ .../agent/core/AgentManager.java | 353 ++++ .../agent/core/AgentUtilOperations.java | 440 +++++ .../agent/enrollment/EnrollmentManager.java | 572 +++++++ .../AgentCoreOperationException.java | 57 + .../agent/transport/CommunicationUtils.java | 225 +++ .../agent/transport/TransportHandler.java | 47 + .../transport/TransportHandlerException.java | 56 + .../agent/transport/TransportUtils.java | 302 ++++ .../transport/http/HTTPTransportHandler.java | 91 ++ .../transport/mqtt/MQTTTransportHandler.java | 361 +++++ .../transport/xmpp/XMPPTransportHandler.java | 366 +++++ .../agent/virtual/VirtualHardwareManager.java | 213 +++ .../agent/virtual/ui/AgentUI.java | 954 +++++++++++ src/main/resources/alarm-off.gif | Bin 0 -> 4265 bytes src/main/resources/alarm-on.gif | Bin 0 -> 12067 bytes src/main/resources/deviceConfig.properties | 35 + src/main/resources/fireAlarmSound.mid | Bin 0 -> 6719 bytes src/main/ui/build.xml | 73 + src/main/ui/manifest.mf | 3 + src/main/ui/nbproject/build-impl.xml | 1413 +++++++++++++++++ src/main/ui/nbproject/genfiles.properties | 8 + .../ui/nbproject/private/private.properties | 2 + src/main/ui/nbproject/private/private.xml | 9 + src/main/ui/nbproject/project.properties | 73 + src/main/ui/nbproject/project.xml | 15 + src/main/ui/src/bulb-on.jpg | Bin 0 -> 6942 bytes .../mgt/iot/agent/virtual/VirtualAgentUI.java | 37 + .../mgt/iot/agent/virtual/ui/AgentUI.form | 803 ++++++++++ .../mgt/iot/agent/virtual/ui/AgentUI.java | 744 +++++++++ 36 files changed, 8881 insertions(+) create mode 100644 pom.xml create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/Bootstrap.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/http/FireAlarmHTTPCommunicator.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/xmpp/FireAlarmXMPPCommunicator.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/exception/AgentCoreOperationException.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandler.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandlerException.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/http/HTTPTransportHandler.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/mqtt/MQTTTransportHandler.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/xmpp/XMPPTransportHandler.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java create mode 100644 src/main/resources/alarm-off.gif create mode 100644 src/main/resources/alarm-on.gif create mode 100644 src/main/resources/deviceConfig.properties create mode 100644 src/main/resources/fireAlarmSound.mid create mode 100644 src/main/ui/build.xml create mode 100644 src/main/ui/manifest.mf create mode 100644 src/main/ui/nbproject/build-impl.xml create mode 100644 src/main/ui/nbproject/genfiles.properties create mode 100644 src/main/ui/nbproject/private/private.properties create mode 100644 src/main/ui/nbproject/private/private.xml create mode 100644 src/main/ui/nbproject/project.properties create mode 100644 src/main/ui/nbproject/project.xml create mode 100644 src/main/ui/src/bulb-on.jpg create mode 100644 src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/VirtualAgentUI.java create mode 100644 src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.form create mode 100644 src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java diff --git a/pom.xml b/pom.xml new file mode 100644 index 000000000..53cd03c0d --- /dev/null +++ b/pom.xml @@ -0,0 +1,237 @@ + + + + + 4.0.0 + + + virtual-fire-alarm-plugin + org.wso2.carbon.devicemgt-plugins + 2.2.5-SNAPSHOT + ../pom.xml + + + org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl + WSO2 Carbon - IoT Server VirtualFireAlarm Agent + WSO2 Carbon - VirtualFireAlarm Device Agent Implementation + http://wso2.org + + + + + org.apache.maven.plugins + maven-compiler-plugin + + UTF-8 + ${wso2.maven.compiler.source} + ${wso2.maven.compiler.target} + + 2.3.2 + + + + org.apache.maven.plugins + maven-assembly-plugin + + + + + org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.Bootstrap + + + + + jar-with-dependencies + + wso2-firealarm-virtual-agent + false + + + + make-assembly + + package + + + single + + + + + + + + + + + + + log4j + log4j + ${log4j.version} + + + + + + org.eclipse.jetty + jetty-server + ${jetty.version} + + + + + org.eclipse.paho + org.eclipse.paho.client.mqttv3 + ${paho.mqtt.version} + + + + + org.igniterealtime.smack.wso2 + smack + ${smack.wso2.version} + + + org.igniterealtime.smack.wso2 + smackx + ${smackx.wso2.version} + + + + + org.bouncycastle.wso2 + bcprov-jdk15on + ${bcprov.wso2.version} + + + org.bouncycastle.wso2 + bcpkix-jdk15on + ${bcpkix.wso2.version} + + + + + com.google.code.jscep.wso2 + jscep + ${jscep.version} + + + + commons-codec + commons-codec + + + + commons-lang + commons-lang + ${commons-lang.version} + + + + commons-logging + commons-logging + ${common-logging.version} + + + + commons-io + commons-io + ${commons.io} + + + + + org.slf4j + slf4j-api + ${slf4j.version} + + + org.slf4j + slf4j-simple + ${slf4j.version} + + + + org.json.wso2 + json + + + + commons-configuration + commons-configuration + 1.10 + + + + + + + + + wso2-nexus + WSO2 internal Repository + http://maven.wso2.org/nexus/content/groups/wso2-public/ + + true + daily + ignore + + + + wso2-maven2-repository + http://dist.wso2.org/maven2 + + + + + + + 1.7 + 1.7 + + + 8.1.3.v20120416 + + + 1.0.2 + + + 3.0.4.wso2v1 + 3.0.4.wso2v1 + + + 1.49.wso2v1 + 1.49.wso2v1 + + + 2.0.2.wso2v2 + + + 1.2.17 + 1.2 + 2.4 + 1.7 + 2.6 + + + 1.7.13 + + + diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/Bootstrap.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/Bootstrap.java new file mode 100644 index 000000000..63d4b2595 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/Bootstrap.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent; + +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentManager; + +public class Bootstrap { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog"); + System.setProperty("org.apache.commons.logging.simplelog.defaultlog", "info"); + System.setProperty("org.apache.commons.logging.simplelog.showdatetime", "true"); + System.setProperty("org.apache.commons.logging.simplelog.dateTimeFormat", "HH:mm:ss"); + AgentManager.getInstance().init(); + } + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/http/FireAlarmHTTPCommunicator.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/http/FireAlarmHTTPCommunicator.java new file mode 100644 index 000000000..98dbc6dc7 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/http/FireAlarmHTTPCommunicator.java @@ -0,0 +1,484 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.communication.http; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.eclipse.jetty.http.HttpStatus; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentConstants; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.exception.AgentCoreOperationException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandlerException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportUtils; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.http.HTTPTransportHandler; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.DataOutputStream; +import java.io.File; +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.Inet4Address; +import java.net.InetAddress; +import java.net.NetworkInterface; +import java.net.ProtocolException; +import java.net.SocketException; +import java.net.UnknownHostException; +import java.util.Enumeration; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; + +public class FireAlarmHTTPCommunicator extends HTTPTransportHandler { + private static final Log log = LogFactory.getLog(FireAlarmHTTPCommunicator.class); + + private ScheduledExecutorService service = Executors.newScheduledThreadPool(2); + private ScheduledFuture dataPushServiceHandler; + private ScheduledFuture connectorServiceHandler; + + public FireAlarmHTTPCommunicator() { + super(); + } + + public FireAlarmHTTPCommunicator(int port) { + super(port); + } + + public FireAlarmHTTPCommunicator(int port, int reconnectionInterval) { + super(port, reconnectionInterval); + } + + public ScheduledFuture getDataPushServiceHandler() { + return dataPushServiceHandler; + } + + public void connect() { + Runnable connect = new Runnable() { + public void run() { + if (!isConnected()) { + try { + processIncomingMessage(); + server.start(); + registerThisDevice(); + publishDeviceData(); + log.info("HTTP Server started at port: " + port); + + } catch (Exception e) { + if (log.isDebugEnabled()) { + log.warn("Unable to 'START' HTTP server. Will retry after " + + timeoutInterval / 1000 + " seconds."); + } + } + } + } + }; + + connectorServiceHandler = service.scheduleAtFixedRate(connect, 0, timeoutInterval, + TimeUnit.MILLISECONDS); + } + + + @Override + public void processIncomingMessage() { + server.setHandler(new AbstractHandler() { + public void handle(String s, Request request, HttpServletRequest + httpServletRequest, + HttpServletResponse httpServletResponse) + throws IOException, ServletException { + httpServletResponse.setContentType("text/html;charset=utf-8"); + httpServletResponse.setStatus(HttpServletResponse.SC_OK); + request.setHandled(true); + + AgentManager agentManager = AgentManager.getInstance(); + String pathContext = request.getPathInfo(); + String separator = File.separator; + + if (pathContext.toUpperCase().contains( + separator + AgentConstants.TEMPERATURE_CONTROL)) { + httpServletResponse.getWriter().println( + agentManager.getTemperature()); + + } else if (pathContext.toUpperCase().contains( + separator + AgentConstants.HUMIDITY_CONTROL)) { + httpServletResponse.getWriter().println( + agentManager.getHumidity()); + + } else if (pathContext.toUpperCase().contains( + separator + AgentConstants.BULB_CONTROL)) { + String[] pathVariables = pathContext.split(separator); + + if (pathVariables.length != 3) { + httpServletResponse.getWriter().println( + "Invalid BULB-control received by the device. Need to be in " + + "'{host}:{port}/BULB/{ON|OFF}' format."); + return; + } + + String switchState = pathVariables[2]; + + if (switchState == null) { + httpServletResponse.getWriter().println( + "Please specify switch-status of the BULB."); + } else { + boolean status = switchState.toUpperCase().equals( + AgentConstants.CONTROL_ON); + agentManager.changeAlarmStatus(status); + httpServletResponse.getWriter().println("Bulb is " + (status ? + AgentConstants.CONTROL_ON : AgentConstants.CONTROL_OFF)); + } + } else { + httpServletResponse.getWriter().println( + "Invalid control command received by the device."); + } + } + }); + } + + @Override + public void publishDeviceData() { + final AgentManager agentManager = AgentManager.getInstance(); + int publishInterval = agentManager.getPushInterval(); + final String deviceOwner = agentManager.getAgentConfigs().getDeviceOwner(); + final String deviceID = agentManager.getAgentConfigs().getDeviceId(); + boolean simulationMode = false; + int duration = 2 * 60; + int frequency = 5; + + Runnable pushDataRunnable = new Runnable() { + @Override + public void run() { + + String pushDataPayload = String.format(AgentConstants.PUSH_DATA_PAYLOAD, deviceOwner, + deviceID, (agentManager.getDeviceIP() + ":" + port), + agentManager.getTemperature()); + executeDataPush(pushDataPayload); + } + }; + + if (!simulationMode) { + dataPushServiceHandler = service.scheduleAtFixedRate(pushDataRunnable, publishInterval, + publishInterval, + TimeUnit.SECONDS); + } else { + String pushDataPayload = String.format(AgentConstants.PUSH_SIMULATION_DATA_PAYLOAD, deviceOwner, + deviceID, (agentManager.getDeviceIP() + ":" + port), + agentManager.getTemperature(), true, duration, frequency); + executeDataPush(pushDataPayload); + + } + } + + + private void executeDataPush(String pushDataPayload) { + AgentManager agentManager = AgentManager.getInstance(); + String pushDataEndPointURL = agentManager.getPushDataAPIEP(); + HttpURLConnection httpConnection; + int responseCode = -1; + + try { + httpConnection = TransportUtils.getHttpConnection(agentManager.getPushDataAPIEP()); + httpConnection.setRequestMethod(AgentConstants.HTTP_POST); + httpConnection.setRequestProperty("Authorization", + "Bearer " + agentManager.getAgentConfigs().getAuthToken()); + httpConnection.setRequestProperty("Content-Type", AgentConstants.APPLICATION_JSON); + + httpConnection.setDoOutput(true); + DataOutputStream dataOutPutWriter = new DataOutputStream(httpConnection.getOutputStream()); + dataOutPutWriter.writeBytes(pushDataPayload); + dataOutPutWriter.flush(); + dataOutPutWriter.close(); + + responseCode = httpConnection.getResponseCode(); + httpConnection.disconnect(); + + log.info(AgentConstants.LOG_APPENDER + "Message - '" + pushDataPayload + + "' was published to server at: " + httpConnection.getURL()); + + } catch (ProtocolException exception) { + String errorMsg = + "Protocol specific error occurred when trying to set method to " + + AgentConstants.HTTP_POST + " for:" + pushDataEndPointURL; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + + } catch (IOException exception) { + String errorMsg = + "An IO error occurred whilst trying to get the response code from: " + + pushDataEndPointURL + " for a " + AgentConstants.HTTP_POST + " method."; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + + } catch (TransportHandlerException exception) { + log.error(AgentConstants.LOG_APPENDER + + "Error encountered whilst trying to create HTTP-Connection to IoT-Server EP at: " + + pushDataEndPointURL); + } + + if (responseCode == HttpStatus.CONFLICT_409 || + responseCode == HttpStatus.PRECONDITION_FAILED_412) { + log.warn(AgentConstants.LOG_APPENDER + + "DeviceIP is being Re-Registered due to Push-Data failure with response code: " + + responseCode); + registerThisDevice(); + + } else if (responseCode != HttpStatus.NO_CONTENT_204) { + if (log.isDebugEnabled()) { + log.error(AgentConstants.LOG_APPENDER + "Status Code: " + responseCode + + " encountered whilst trying to Push-Device-Data to IoT Server at: " + + agentManager.getPushDataAPIEP()); + } + agentManager.updateAgentStatus(AgentConstants.SERVER_NOT_RESPONDING); + } + + if (log.isDebugEnabled()) { + log.debug(AgentConstants.LOG_APPENDER + "Push-Data call with payload - " + pushDataPayload + + ", to IoT Server returned status " + responseCode); + } + } + + @Override + public void disconnect() { + Runnable stopConnection = new Runnable() { + public void run() { + while (isConnected()) { + try { + dataPushServiceHandler.cancel(true); + connectorServiceHandler.cancel(true); + closeConnection(); + } catch (Exception e) { + if (log.isDebugEnabled()) { + log.warn(AgentConstants.LOG_APPENDER + "Unable to 'STOP' HTTP server at port: " + port); + } + + try { + Thread.sleep(timeoutInterval); + } catch (InterruptedException e1) { + log.error( + AgentConstants.LOG_APPENDER + "HTTP-Termination: Thread Sleep Interrupt Exception"); + } + } + } + } + }; + + Thread terminatorThread = new Thread(stopConnection); + terminatorThread.setDaemon(true); + terminatorThread.start(); + } + + @Override + public void processIncomingMessage(Object message, String... messageParams) { + + } + + @Override + public void publishDeviceData(String... publishData) { + + } + + public void registerThisDevice() { + final AgentManager agentManager = AgentManager.getInstance(); + agentManager.updateAgentStatus("Registering..."); + + final Runnable ipRegistration = new Runnable() { + @Override + public void run() { + while (isConnected()) { + try { + int responseCode = registerDeviceIP( + agentManager.getAgentConfigs().getDeviceOwner(), + agentManager.getAgentConfigs().getDeviceId()); + + if (responseCode == HttpStatus.OK_200) { + agentManager.updateAgentStatus(AgentConstants.REGISTERED); + break; + } else { + log.error(AgentConstants.LOG_APPENDER + + "Device Registration with IoT Server at:" + " " + + agentManager.getIpRegistrationEP() + + " failed with response - '" + responseCode + ":" + + HttpStatus.getMessage(responseCode) + "'"); + agentManager.updateAgentStatus(AgentConstants.RETRYING_TO_REGISTER); + } + } catch (AgentCoreOperationException exception) { + log.error(AgentConstants.LOG_APPENDER + + "Error encountered whilst trying to register the " + + "Device's IP at: " + + agentManager.getIpRegistrationEP() + + ".\nCheck whether the network-interface provided is " + + "accurate"); + agentManager.updateAgentStatus(AgentConstants.REGISTRATION_FAILED); + } + + try { + Thread.sleep(timeoutInterval); + } catch (InterruptedException e1) { + log.error(AgentConstants.LOG_APPENDER + + "Device Registration: Thread Sleep Interrupt Exception"); + } + } + } + }; + + Thread ipRegisterThread = new Thread(ipRegistration); + ipRegisterThread.setDaemon(true); + ipRegisterThread.start(); + } + + + /** + * This method calls the "Register-API" of the IoT Server in order to register the device's IP + * against its ID. + * + * @param deviceOwner the owner of the device by whose name the agent was downloaded. + * (Read from configuration file) + * @param deviceID the deviceId that is auto-generated whilst downloading the agent. + * (Read from configuration file) + * @return the status code of the HTTP-Post call to the Register-API of the IoT-Server + * @throws AgentCoreOperationException if any errors occur when an HTTPConnection session is + * created + */ + private int registerDeviceIP(String deviceOwner, String deviceID) + throws AgentCoreOperationException { + int responseCode = -1; + final AgentManager agentManager = AgentManager.getInstance(); + + String networkInterface = agentManager.getNetworkInterface(); + String deviceIPAddress = getDeviceIP(networkInterface); + + if (deviceIPAddress == null) { + throw new AgentCoreOperationException( + "An IP address could not be retrieved for the selected network interface - '" + + networkInterface + "."); + } + + agentManager.setDeviceIP(deviceIPAddress); + log.info(AgentConstants.LOG_APPENDER + "Device IP Address: " + deviceIPAddress); + + String deviceIPRegistrationEP = agentManager.getIpRegistrationEP(); + String registerEndpointURLString = + deviceIPRegistrationEP + File.separator + deviceOwner + File.separator + deviceID + + File.separator + deviceIPAddress + File.separator + port; + + if (log.isDebugEnabled()) { + log.debug(AgentConstants.LOG_APPENDER + "DeviceIP Registration EndPoint: " + + registerEndpointURLString); + } + + HttpURLConnection httpConnection; + try { + httpConnection = TransportUtils.getHttpConnection(registerEndpointURLString); + } catch (TransportHandlerException e) { + String errorMsg = + "Protocol specific error occurred when trying to fetch an HTTPConnection to:" + + " " + registerEndpointURLString; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + throw new AgentCoreOperationException(); + } + + try { + httpConnection.setRequestMethod(AgentConstants.HTTP_POST); + httpConnection.setRequestProperty("Authorization", "Bearer " + + agentManager.getAgentConfigs().getAuthToken()); + httpConnection.setDoOutput(true); + responseCode = httpConnection.getResponseCode(); + + } catch (ProtocolException exception) { + String errorMsg = "Protocol specific error occurred when trying to set method to " + + AgentConstants.HTTP_POST + " for:" + registerEndpointURLString; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + throw new AgentCoreOperationException(errorMsg, exception); + + } catch (IOException exception) { + String errorMsg = "An IO error occurred whilst trying to get the response code from:" + + " " + registerEndpointURLString + " for a " + AgentConstants.HTTP_POST + " method."; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + throw new AgentCoreOperationException(errorMsg, exception); + } + + log.info(AgentConstants.LOG_APPENDER + "DeviceIP - " + deviceIPAddress + + ", registration with IoT Server at : " + + agentManager.getAgentConfigs().getHTTPS_ServerEndpoint() + + " returned status " + + responseCode); + + return responseCode; + } + + /*------------------------------------------------------------------------------------------*/ + /* Utility methods relevant to creating and sending HTTP requests to the Iot-Server */ + /*------------------------------------------------------------------------------------------*/ + + /** + * This method is used to get the IP of the device in which the agent is run on. + * + * @return the IP Address of the device + * @throws AgentCoreOperationException if any errors occur whilst trying to get the IP address + */ + private String getDeviceIP() throws AgentCoreOperationException { + try { + return Inet4Address.getLocalHost().getHostAddress(); + } catch (UnknownHostException e) { + String errorMsg = "Error encountered whilst trying to get the device IP address."; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } + } + + /** + * This is an overloaded method that fetches the public IPv4 address of the given network + * interface + * + * @param networkInterfaceName the network-interface of whose IPv4 address is to be retrieved + * @return the IP Address iof the device + * @throws AgentCoreOperationException if any errors occur whilst trying to get details of the + * given network interface + */ + private String getDeviceIP(String networkInterfaceName) throws + AgentCoreOperationException { + String ipAddress = null; + try { + Enumeration interfaceIPAddresses = NetworkInterface.getByName( + networkInterfaceName).getInetAddresses(); + for (; interfaceIPAddresses.hasMoreElements(); ) { + InetAddress ip = interfaceIPAddresses.nextElement(); + ipAddress = ip.getHostAddress(); + if (log.isDebugEnabled()) { + log.debug(AgentConstants.LOG_APPENDER + "IP Address: " + ipAddress); + } + + if (TransportUtils.validateIPv4(ipAddress)) { + return ipAddress; + } + } + } catch (SocketException | NullPointerException exception) { + String errorMsg = + "Error encountered whilst trying to get IP Addresses of the network interface: " + + networkInterfaceName + + ".\nPlease check whether the name of the network interface used is correct"; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + throw new AgentCoreOperationException(errorMsg, exception); + } + + return ipAddress; + } + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java new file mode 100644 index 000000000..5b24783e7 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java @@ -0,0 +1,290 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.communication.mqtt; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.eclipse.paho.client.mqttv3.MqttException; +import org.eclipse.paho.client.mqttv3.MqttMessage; +import org.eclipse.paho.client.mqttv3.MqttSecurityException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentConstants; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentUtilOperations; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.exception.AgentCoreOperationException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandlerException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.mqtt.MQTTTransportHandler; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; + +//TODO:: Lincence header, comments and SPECIFIC class name since its not generic +public class FireAlarmMQTTCommunicator extends MQTTTransportHandler { + + private static final Log log = LogFactory.getLog(FireAlarmMQTTCommunicator.class); + + private ScheduledExecutorService service = Executors.newScheduledThreadPool(2); + private ScheduledFuture dataPushServiceHandler; + private static final String DEFAULT_PASSWORD = ""; + + public FireAlarmMQTTCommunicator(String deviceOwner, String deviceType, + String mqttBrokerEndPoint, String subscribeTopic) { + super(deviceOwner, deviceType, mqttBrokerEndPoint, subscribeTopic); + } + + @SuppressWarnings("unused") + public FireAlarmMQTTCommunicator(String deviceOwner, String deviceType, + String mqttBrokerEndPoint, String subscribeTopic, + int intervalInMillis) { + super(deviceOwner, deviceType, mqttBrokerEndPoint, subscribeTopic, intervalInMillis); + } + + public ScheduledFuture getDataPushServiceHandler() { + return dataPushServiceHandler; + } + + //TODO:: Terminate logs with a period + //TODO: Need to print exceptions + @Override + public void connect() { + final AgentManager agentManager = AgentManager.getInstance(); + Runnable connector = new Runnable() { + public void run() { + while (!isConnected()) { + try { + connectToQueue(agentManager.getAgentConfigs().getAuthToken(), DEFAULT_PASSWORD); + agentManager.updateAgentStatus("Connected to MQTT Queue"); + } catch (TransportHandlerException e) { + log.warn(AgentConstants.LOG_APPENDER + "Connection to MQTT Broker at: " + mqttBrokerEndPoint + + " failed.\n Will retry in " + timeoutInterval + " milli-seconds."); + + if (e.getCause() != null && e.getCause() instanceof MqttSecurityException) { + refreshOAuthToken((MqttSecurityException) e.getCause()); + } + } + + try { + if (isConnected()) { + subscribeToQueue(); + agentManager.updateAgentStatus("Subscribed to MQTT Queue"); + publishDeviceData(); + } + } catch (TransportHandlerException e) { + log.warn(AgentConstants.LOG_APPENDER + "Subscription to MQTT Broker at: " + + mqttBrokerEndPoint + " failed"); + agentManager.updateAgentStatus("Subscription to broker failed."); + } + + try { + Thread.sleep(timeoutInterval); + } catch (InterruptedException ex) { + log.error(AgentConstants.LOG_APPENDER + "MQTT: Connect-Thread Sleep Interrupt Exception."); + } + } + } + }; + + Thread connectorThread = new Thread(connector); + connectorThread.setDaemon(true); + connectorThread.start(); + } + + private void refreshOAuthToken(final MqttSecurityException exception) { + Runnable tokenRefresher = new Runnable() { + public void run() { + String authenticationMethod = AgentUtilOperations.getAuthenticationMethod(); + + try { + if (exception.getReasonCode() == MqttSecurityException.REASON_CODE_FAILED_AUTHENTICATION && + authenticationMethod.equals(AgentConstants.TOKEN_AUTHENTICATION_METHOD)) { + AgentUtilOperations.refreshOAuthToken(); + } + } catch (AgentCoreOperationException e1) { + log.error(AgentConstants.LOG_APPENDER + "Token Refresh Attempt Failed. " + e1); + } + } + }; + + Thread connectorThread = new Thread(tokenRefresher); + connectorThread.setDaemon(true); + connectorThread.start(); + } + + @Override + public void processIncomingMessage(MqttMessage message, String... messageParams) { + final AgentManager agentManager = AgentManager.getInstance(); + String tenantDomain = agentManager.getAgentConfigs().getTenantDomain(); + String deviceOwner = agentManager.getAgentConfigs().getDeviceOwner(); + String deviceID = agentManager.getAgentConfigs().getDeviceId(); + String receivedMessage; + String replyMessage; + String securePayLoad; + + try { + receivedMessage = AgentUtilOperations.extractMessageFromPayload(message.toString()); + log.info(AgentConstants.LOG_APPENDER + "Message [" + receivedMessage + "] was received"); + } catch (AgentCoreOperationException e) { + log.warn(AgentConstants.LOG_APPENDER + "Could not extract message from payload.", e); + return; + } + + + String[] controlSignal = receivedMessage.split(":"); + // message- ":" format.(ex: "BULB:ON", "TEMPERATURE", "HUMIDITY") + + try { + switch (controlSignal[0].toUpperCase()) { + case AgentConstants.BULB_CONTROL: + boolean stateToSwitch = controlSignal[1].equals(AgentConstants.CONTROL_ON); + agentManager.changeAlarmStatus(stateToSwitch); + log.info(AgentConstants.LOG_APPENDER + "Bulb was switched to state: '" + controlSignal[1] + "'"); + break; + + case AgentConstants.TEMPERATURE_CONTROL: + int currentTemperature = agentManager.getTemperature(); + + String replyTemperature = "Current temperature was read as: '" + currentTemperature + "C'"; + log.info(AgentConstants.LOG_APPENDER + replyTemperature); + + String tempPublishTopic = String.format(AgentConstants.MQTT_PUBLISH_TOPIC, tenantDomain, deviceID); + + replyMessage = AgentConstants.TEMPERATURE_CONTROL + ":" + currentTemperature; + securePayLoad = AgentUtilOperations.prepareSecurePayLoad(replyMessage); + publishToQueue(tempPublishTopic, securePayLoad); + break; + + case AgentConstants.HUMIDITY_CONTROL: + int currentHumidity = agentManager.getHumidity(); + + String replyHumidity = "Current humidity was read as: '" + currentHumidity + "%'"; + log.info(AgentConstants.LOG_APPENDER + replyHumidity); + + String humidPublishTopic = String.format( + AgentConstants.MQTT_PUBLISH_TOPIC, tenantDomain, deviceID); + + replyMessage = AgentConstants.HUMIDITY_CONTROL + ":" + currentHumidity; + securePayLoad = AgentUtilOperations.prepareSecurePayLoad(replyMessage); + publishToQueue(humidPublishTopic, securePayLoad); + break; + + default: + log.warn(AgentConstants.LOG_APPENDER + "'" + controlSignal[0] + + "' is invalid and not-supported for this device-type"); + break; + } + } catch (AgentCoreOperationException e) { + log.warn(AgentConstants.LOG_APPENDER + "Preparing Secure payload failed", e); + } catch (TransportHandlerException e) { + log.error(AgentConstants.LOG_APPENDER + + "MQTT - Publishing, reply message to the MQTT Queue at: " + + agentManager.getAgentConfigs().getMqttBrokerEndpoint() + " failed"); + } + + } + + @Override + public void publishDeviceData() { + final AgentManager agentManager = AgentManager.getInstance(); + int publishInterval = agentManager.getPushInterval(); + Runnable pushDataRunnable = new Runnable() { + @Override + public void run() { + int currentTemperature = agentManager.getTemperature(); + String message = "PUBLISHER:" + AgentConstants.TEMPERATURE_CONTROL + ":" + currentTemperature; + + try { + String payLoad = AgentUtilOperations.prepareSecurePayLoad(message); + + MqttMessage pushMessage = new MqttMessage(); + pushMessage.setPayload(payLoad.getBytes(StandardCharsets.UTF_8)); + pushMessage.setQos(DEFAULT_MQTT_QUALITY_OF_SERVICE); + pushMessage.setRetained(false); + + String topic = String.format(AgentConstants.MQTT_PUBLISH_TOPIC, + agentManager.getAgentConfigs().getTenantDomain(), + agentManager.getAgentConfigs().getDeviceId()); + + publishToQueue(topic, pushMessage); + log.info(AgentConstants.LOG_APPENDER + "Message: '" + message + "' published to MQTT Queue at [" + + agentManager.getAgentConfigs().getMqttBrokerEndpoint() + "] under topic [" + + topic + "]"); + + } catch (TransportHandlerException e) { + log.warn(AgentConstants.LOG_APPENDER + "Data Publish attempt to topic - [" + + AgentConstants.MQTT_PUBLISH_TOPIC + "] failed for payload [" + message + "]"); + } catch (AgentCoreOperationException e) { + log.warn(AgentConstants.LOG_APPENDER + "Preparing Secure payload failed", e); + } + } + }; + + dataPushServiceHandler = service.scheduleAtFixedRate(pushDataRunnable, publishInterval, publishInterval, + TimeUnit.SECONDS); + } + + + @Override + public void disconnect() { + Runnable stopConnection = new Runnable() { + public void run() { + while (isConnected()) { + + if (dataPushServiceHandler != null) { + dataPushServiceHandler.cancel(true); + } + + try { + closeConnection(); + + } catch (MqttException e) { + if (log.isDebugEnabled()) { + log.warn(AgentConstants.LOG_APPENDER + + "Unable to 'STOP' MQTT connection at broker at: " + + mqttBrokerEndPoint); + } + + try { + Thread.sleep(timeoutInterval); + } catch (InterruptedException e1) { + log.error(AgentConstants.LOG_APPENDER + + "MQTT-Terminator: Thread Sleep Interrupt Exception"); + } + } + } + } + }; + + Thread terminatorThread = new Thread(stopConnection); + terminatorThread.setDaemon(true); + terminatorThread.start(); + } + + @Override + public void processIncomingMessage() { + + } + + @Override + public void publishDeviceData(String... publishData) { + + } + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/xmpp/FireAlarmXMPPCommunicator.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/xmpp/FireAlarmXMPPCommunicator.java new file mode 100644 index 000000000..abb8d7965 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/xmpp/FireAlarmXMPPCommunicator.java @@ -0,0 +1,263 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.communication.xmpp; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.jivesoftware.smack.packet.Message; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentConfiguration; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentConstants; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentUtilOperations; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.exception.AgentCoreOperationException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandlerException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.xmpp.XMPPTransportHandler; + +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; + +public class FireAlarmXMPPCommunicator extends XMPPTransportHandler { + + private static final Log log = LogFactory.getLog(FireAlarmXMPPCommunicator.class); + + private ScheduledExecutorService service = Executors.newScheduledThreadPool(2); + private ScheduledFuture dataPushServiceHandler; + private ScheduledFuture connectorServiceHandler; + + private String username; + private String password; + private String resource; + private String xmppAdminJID; + private String xmppDeviceJID; + + public FireAlarmXMPPCommunicator(String server) { + super(server); + } + + public FireAlarmXMPPCommunicator(String server, int port) { + super(server, port); + } + + public FireAlarmXMPPCommunicator(String server, int port, int timeout) { + super(server, port, timeout); + } + + public ScheduledFuture getDataPushServiceHandler() { + return dataPushServiceHandler; + } + + @Override + public void connect() { + final AgentManager agentManager = AgentManager.getInstance(); + username = agentManager.getAgentConfigs().getDeviceId(); + password = agentManager.getAgentConfigs().getAuthToken(); + xmppDeviceJID = username + "@" + agentManager.getAgentConfigs().getXmppServerName(); + xmppAdminJID = agentManager.getAgentConfigs().getServerJID(); + + Runnable connect = new Runnable() { + public void run() { + if (!isConnected()) { + try { + connectToServer(); + } catch (TransportHandlerException e) { + log.warn(AgentConstants.LOG_APPENDER + "Connection to XMPP server at: " + server + " failed"); + } + + try { + loginToServer(username, password, resource); + agentManager.updateAgentStatus("Connected to XMPP Server"); + setMessageFilterAndListener(xmppAdminJID, xmppDeviceJID, true); + publishDeviceData(); + } catch (TransportHandlerException e) { + log.warn(AgentConstants.LOG_APPENDER + "Login to XMPP server at: " + server + " failed"); + agentManager.updateAgentStatus("No XMPP Account for Device"); + } + } + } + }; + + connectorServiceHandler = service.scheduleAtFixedRate(connect, 0, timeoutInterval, TimeUnit.MILLISECONDS); + } + + /** + * This is an abstract method used for post processing the received XMPP-message. This + * method will be implemented as per requirement at the time of creating an object of this + * class. + * + * @param xmppMessage the xmpp message received by the listener. + */ + @Override + public void processIncomingMessage(Message xmppMessage, String... messageParams) { + final AgentManager agentManager = AgentManager.getInstance(); + String from = xmppMessage.getFrom(); + String message = xmppMessage.getBody(); + String receivedMessage; + String replyMessage; + String securePayLoad; + + try { + receivedMessage = AgentUtilOperations.extractMessageFromPayload(message); + log.info(AgentConstants.LOG_APPENDER + "Message [" + receivedMessage + "] was received"); + } catch (AgentCoreOperationException e) { + log.warn(AgentConstants.LOG_APPENDER + "Could not extract message from payload.", e); + return; + } + + String[] controlSignal = receivedMessage.split(":"); + //message- ":" format. (ex: "BULB:ON", "TEMPERATURE", "HUMIDITY") + + try { + switch (controlSignal[0].toUpperCase()) { + case AgentConstants.BULB_CONTROL: + if (controlSignal.length != 2) { + replyMessage = "BULB controls need to be in the form - 'BULB:{ON|OFF}'"; + log.warn(replyMessage); + securePayLoad = AgentUtilOperations.prepareSecurePayLoad(replyMessage); + sendXMPPMessage(xmppAdminJID, securePayLoad, "CONTROL-REPLY"); + break; + } + + agentManager.changeAlarmStatus(controlSignal[1].equals(AgentConstants.CONTROL_ON)); + log.info(AgentConstants.LOG_APPENDER + "Bulb was switched to state: '" + controlSignal[1] + "'"); + break; + + case AgentConstants.TEMPERATURE_CONTROL: + int currentTemperature = agentManager.getTemperature(); + + String replyTemperature = + "The current temperature was read to be: '" + currentTemperature + + "C'"; + log.info(AgentConstants.LOG_APPENDER + replyTemperature); + + replyMessage = AgentConstants.TEMPERATURE_CONTROL + ":" + currentTemperature; + securePayLoad = AgentUtilOperations.prepareSecurePayLoad(replyMessage); + sendXMPPMessage(xmppAdminJID, securePayLoad, "CONTROL-REPLY"); + break; + + case AgentConstants.HUMIDITY_CONTROL: + int currentHumidity = agentManager.getHumidity(); + + String replyHumidity = "The current humidity was read to be: '" + currentHumidity + "%'"; + log.info(AgentConstants.LOG_APPENDER + replyHumidity); + + replyMessage = AgentConstants.HUMIDITY_CONTROL + ":" + currentHumidity; + securePayLoad = AgentUtilOperations.prepareSecurePayLoad(replyMessage); + sendXMPPMessage(xmppAdminJID, securePayLoad, "CONTROL-REPLY"); + break; + + default: + replyMessage = "'" + controlSignal[0] + "' is invalid and not-supported for this device-type"; + log.warn(replyMessage); + securePayLoad = AgentUtilOperations.prepareSecurePayLoad(replyMessage); + sendXMPPMessage(xmppAdminJID, securePayLoad, "CONTROL-ERROR"); + break; + } + } catch (AgentCoreOperationException e) { + log.warn(AgentConstants.LOG_APPENDER + "Preparing Secure payload failed", e); + } + + } + + + @Override + public void publishDeviceData() { + final AgentManager agentManager = AgentManager.getInstance(); + int publishInterval = agentManager.getPushInterval(); + + Runnable pushDataRunnable = new Runnable() { + @Override + public void run() { + Message xmppMessage = new Message(); + + try { + int currentTemperature = agentManager.getTemperature(); + + String message = AgentConstants.TEMPERATURE_CONTROL + ":" + currentTemperature; + String payLoad = AgentUtilOperations.prepareSecurePayLoad(message); + + xmppMessage.setTo(xmppAdminJID); + xmppMessage.setSubject(agentManager.getAgentConfigs().getTenantDomain()); + xmppMessage.setBody(payLoad); + xmppMessage.setType(Message.Type.chat); + + sendXMPPMessage(xmppAdminJID, xmppMessage); + log.info(AgentConstants.LOG_APPENDER + "Message: '" + message + "' sent to XMPP JID - " + + "[" + xmppAdminJID + "] under subject [" + xmppMessage.getSubject() + "]."); + } catch (AgentCoreOperationException e) { + log.warn(AgentConstants.LOG_APPENDER + "Preparing Secure payload failed for XMPP JID - " + + "[" + xmppAdminJID + "] with subject - [" + xmppMessage.getSubject() + "]."); + } + } + }; + + dataPushServiceHandler = service.scheduleAtFixedRate(pushDataRunnable, publishInterval, + publishInterval, TimeUnit.SECONDS); + } + + + @Override + public void disconnect() { + Runnable stopConnection = new Runnable() { + public void run() { + + if (dataPushServiceHandler != null) { + dataPushServiceHandler.cancel(true); + } + + if (connectorServiceHandler != null) { + connectorServiceHandler.cancel(true); + } + + while (isConnected()) { + closeConnection(); + + if (log.isDebugEnabled()) { + log.warn(AgentConstants.LOG_APPENDER + + "Unable to 'STOP' connection to XMPP server at: " + server); + } + + try { + Thread.sleep(timeoutInterval); + } catch (InterruptedException e1) { + log.error(AgentConstants.LOG_APPENDER + "XMPP-Terminator: Thread Sleep Interrupt Exception"); + } + + } + } + }; + + Thread terminatorThread = new Thread(stopConnection); + terminatorThread.setDaemon(true); + terminatorThread.start(); + } + + + @Override + public void processIncomingMessage() { + + } + + @Override + public void publishDeviceData(String... publishData) { + + } + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java new file mode 100644 index 000000000..d5db8993c --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java @@ -0,0 +1,191 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core; + +/** + * A Configuration class that holds all the Agent specific details that are read from the + * 'deviceConfig.properties' file. This file is generated by the IoT-Server at the time of + * downloading the device agent from the IoT-Server. + */ +public class AgentConfiguration { + private String tenantDomain; + private String deviceOwner; + private String deviceId; + private String deviceName; + private String controllerContext; + private String scepContext; + private String HTTPS_ServerEndpoint; + private String HTTP_ServerEndpoint; + private String apimGatewayEndpoint; + private String mqttBrokerEndpoint; + private String xmppServerEndpoint; + private String apiApplicationKey; + private String authMethod; + private String authToken; + private String refreshToken; + private int dataPushInterval; + private String xmppServerName; + private String serverJID; + + public String getTenantDomain() { + return tenantDomain; + } + + public void setTenantDomain(String tenantDomain) { + this.tenantDomain = tenantDomain; + } + + public String getDeviceOwner() { + return deviceOwner; + } + + public void setDeviceOwner(String deviceOwner) { + this.deviceOwner = deviceOwner; + } + + public String getDeviceId() { + return deviceId; + } + + public String getServerJID() { + return serverJID; + } + + public void setServerJID(String serverJID) { + this.serverJID = serverJID; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceName() { + return deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getControllerContext() { + return controllerContext; + } + + public void setControllerContext(String controllerContext) { + this.controllerContext = controllerContext; + } + + public String getHTTPS_ServerEndpoint() { + return HTTPS_ServerEndpoint; + } + + public void setHTTPS_ServerEndpoint(String HTTPS_ServerEndpoint) { + this.HTTPS_ServerEndpoint = HTTPS_ServerEndpoint; + } + + public String getHTTP_ServerEndpoint() { + return HTTP_ServerEndpoint; + } + + public void setHTTP_ServerEndpoint(String HTTP_ServerEndpoint) { + this.HTTP_ServerEndpoint = HTTP_ServerEndpoint; + } + + public String getApimGatewayEndpoint() { + return apimGatewayEndpoint; + } + + public void setApimGatewayEndpoint(String apimGatewayEndpoint) { + this.apimGatewayEndpoint = apimGatewayEndpoint; + } + + public String getMqttBrokerEndpoint() { + return mqttBrokerEndpoint; + } + + public void setMqttBrokerEndpoint(String mqttBrokerEndpoint) { + this.mqttBrokerEndpoint = mqttBrokerEndpoint; + } + + public String getXmppServerEndpoint() { + return xmppServerEndpoint; + } + + public void setXmppServerEndpoint(String xmppServerEndpoint) { + this.xmppServerEndpoint = xmppServerEndpoint; + } + + public String getApiApplicationKey() { + return apiApplicationKey; + } + + public void setApiApplicationKey(String apiApplicationKey) { + this.apiApplicationKey = apiApplicationKey; + } + + public String getAuthMethod() { + return authMethod; + } + + public void setAuthMethod(String authMethod) { + this.authMethod = authMethod; + } + + public String getAuthToken() { + return authToken; + } + + public void setAuthToken(String authToken) { + this.authToken = authToken; + } + + public String getRefreshToken() { + return refreshToken; + } + + public void setRefreshToken(String refreshToken) { + this.refreshToken = refreshToken; + } + + public int getDataPushInterval() { + return dataPushInterval; + } + + public void setDataPushInterval(int dataPushInterval) { + this.dataPushInterval = dataPushInterval; + } + + public String getScepContext() { + return scepContext; + } + + public void setScepContext(String scepContext) { + this.scepContext = scepContext; + } + + public String getXmppServerName() { + return xmppServerName; + } + + public void setXmppServerName(String xmppServerName) { + this.xmppServerName = xmppServerName; + } +} + + diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java new file mode 100644 index 000000000..566e5cfc0 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core; + +public class AgentConstants { + public static final String DEVICE_TYPE = "virtual_firealarm"; + public static final String LOG_APPENDER = "AGENT_LOG:: "; + public static final String PROPERTIES_FILE_PATH = ""; + public static final int DEFAULT_RETRY_THREAD_INTERVAL = 5000; // time in millis + public static final String TOKEN_AUTHENTICATION_METHOD = "token"; + /* --------------------------------------------------------------------------------------- + IoT-Server specific information + --------------------------------------------------------------------------------------- */ + public static final String DEVICE_ENROLLMENT_API_EP = "/scep"; + public static final String DEVICE_REGISTER_API_EP = "/register"; + public static final String DEVICE_PUSH_TEMPERATURE_API_EP = "/temperature"; + public static final String PUSH_DATA_PAYLOAD = + "{\"owner\":\"%s\",\"deviceId\":\"%s\",\"reply\":\"%s\",\"value\":\"%s\"}"; + + public static final String PUSH_SIMULATION_DATA_PAYLOAD = + "{\"owner\":\"%s\",\"deviceId\":\"%s\",\"reply\":\"%s\",\"value\":\"%s\",\"isSimulated\":\"%s\"," + + "\"duration\":\"%s\",\"frequency\":\"%s\"}"; + + public static final String DEVICE_DETAILS_PAGE_EP = "/devicemgt/device/%s?id=%s"; + public static final String DEVICE_ANALYTICS_PAGE_URL = + "/devicemgt/device/virtual_firealarm/analytics?deviceId=%s&deviceName=%s"; + + /* --------------------------------------------------------------------------------------- + HTTP Connection specific information for communicating with IoT-Server + --------------------------------------------------------------------------------------- */ + public static final String HTTP_POST = "POST"; + public static final String HTTP_GET = "GET"; + public static final String AUTHORIZATION_HEADER = "Authorization"; + public static final String CONTENT_TYPE_HEADER = "Content-Type"; + public static final String APPLICATION_JSON = "application/json"; + public static final String X_WWW_FORM_URLENCODED = "application/x-www-form-urlencoded"; + public static final String REGISTERED = "Registered"; + public static final String NOT_REGISTERED = "Not-Registered"; + public static final String REGISTRATION_FAILED = "Registration Failed"; + public static final String RETRYING_TO_REGISTER = "Registration Failed. Re-trying.."; + public static final String SERVER_NOT_RESPONDING = "Server not responding.."; + + /* --------------------------------------------------------------------------------------- + MQTT Connection specific information + --------------------------------------------------------------------------------------- */ + public static final int DEFAULT_MQTT_RECONNECTION_INTERVAL = 2; // time in seconds + public static final int DEFAULT_MQTT_QUALITY_OF_SERVICE = 0; + public static final String MQTT_SUBSCRIBE_TOPIC = "%s/" + DEVICE_TYPE + "/%s"; + public static final String MQTT_PUBLISH_TOPIC = "%s/" + DEVICE_TYPE + "/%s/publisher"; + + /* --------------------------------------------------------------------------------------- + Device/Agent specific properties to be read from the 'deviceConfig.properties' file + --------------------------------------------------------------------------------------- */ + public static final String AGENT_PROPERTIES_FILE_NAME = "deviceConfig.properties"; + public static final String TENANT_DOMAIN = "tenantDomain"; + public static final String DEVICE_OWNER_PROPERTY = "owner"; + public static final String DEVICE_ID_PROPERTY = "deviceId"; + public static final String SERVER_JID_PROPERTY = "server-jid"; + public static final String DEVICE_NAME_PROPERTY = "device-name"; + public static final String DEVICE_CONTROLLER_CONTEXT_PROPERTY = "controller-context"; + public static final String DEVICE_SCEP_CONTEXT_PROPERTY = "scep-context"; + public static final String SERVER_HTTPS_EP_PROPERTY = "https-ep"; + public static final String SERVER_HTTP_EP_PROPERTY = "http-ep"; + public static final String APIM_GATEWAY_EP_PROPERTY = "apim-ep"; + public static final String MQTT_BROKER_EP_PROPERTY = "mqtt-ep"; + public static final String XMPP_SERVER_EP_PROPERTY = "xmpp-ep"; + public static final String XMPP_SERVER_NAME_PROPERTY = "xmpp-server-name"; + public static final String API_APPLICATION_KEY = "application-key"; + public static final String AUTH_METHOD_PROPERTY = "auth-method"; + public static final String AUTH_TOKEN_PROPERTY = "auth-token"; + public static final String REFRESH_TOKEN_PROPERTY = "refresh-token"; + public static final String NETWORK_INTERFACE_PROPERTY = "network-interface"; + public static final String PUSH_INTERVAL_PROPERTY = "push-interval"; + /* --------------------------------------------------------------------------------------- + Default values for the Device/Agent specific configurations listed above + --------------------------------------------------------------------------------------- */ + public static final String DEFAULT_NETWORK_INTERFACE = "en0"; + public static final int DEFAULT_DATA_PUBLISH_INTERVAL = 15; // seconds + public static final String DEFAULT_PROTOCOL = "MQTT"; + /* --------------------------------------------------------------------------------------- + Control Signal specific constants to match the request context + --------------------------------------------------------------------------------------- */ + public static final String BULB_CONTROL = "BULB"; + public static final String TEMPERATURE_CONTROL = "TEMPERATURE"; + public static final String POLICY_SIGNAL = "POLICY"; + public static final String HUMIDITY_CONTROL = "HUMIDITY"; + public static final String CONTROL_ON = "ON"; + public static final String CONTROL_OFF = "OFF"; + public static final String AUDIO_FILE_NAME = "fireAlarmSound.mid"; + /* --------------------------------------------------------------------------------------- + Communication protocol specific Strings + --------------------------------------------------------------------------------------- */ + public static final String TCP_PREFIX = "tcp://"; + public static final String HTTP_PREFIX = "http://"; + public static final String HTTPS_PREFIX = "https://"; + public static final String HTTP_PROTOCOL = "HTTP"; + public static final String MQTT_PROTOCOL = "MQTT"; + public static final String XMPP_PROTOCOL = "XMPP"; + public static final String PROTOCOL_PROPERTY = "Protocol"; + public static final String HOST_PROPERTY = "Host"; + public static final String PORT_PROPERTY = "Port"; + + /* --------------------------------------------------------------------------------------- + Keystore specific strings for the device trustStore + --------------------------------------------------------------------------------------- */ + public static final String DEVICE_KEYSTORE_TYPE = "JKS"; + public static final String DEVICE_KEYSTORE = "virtual_firealarm.jks"; + public static final String DEVICE_KEYSTORE_PASSWORD = "wso2@virtual_firealarm"; + public static final String DEVICE_PRIVATE_KEY_ALIAS = "virtual_firealarm_key"; + public static final String DEVICE_CERT_ALIAS = "virtual_firealarm_cert"; + public static final String SERVER_CA_CERT_ALIAS = "ca_iotServer"; +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java new file mode 100644 index 000000000..2e7634054 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java @@ -0,0 +1,353 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.communication.http.FireAlarmHTTPCommunicator; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.communication.mqtt.FireAlarmMQTTCommunicator; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.communication.xmpp.FireAlarmXMPPCommunicator; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.enrollment.EnrollmentManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.exception.AgentCoreOperationException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandler; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandlerException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportUtils; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.virtual.VirtualHardwareManager; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class AgentManager { + + private static final Log log = LogFactory.getLog(AgentManager.class); + private static AgentManager agentManager; + private String rootPath = ""; + + private boolean deviceReady = false; + private boolean isAlarmOn = false; + + private String deviceMgtControlUrl, deviceMgtAnalyticUrl; + private String deviceName, agentStatus; + + private int pushInterval; // seconds + private String prevProtocol, protocol; + + private String networkInterface; + private List interfaceList, protocolList; + private Map agentCommunicator; + + private AgentConfiguration agentConfigs; + + private String deviceIP; + private String enrollmentEP; + private String ipRegistrationEP; + private String pushDataAPIEP; + + private AgentManager() { + } + + public static AgentManager getInstance() { + if (agentManager == null) { + agentManager = new AgentManager(); + } + return agentManager; + } + + public void init() { + + agentCommunicator = new HashMap<>(); + // Read IoT-Server specific configurations from the 'deviceConfig.properties' file + try { + this.agentConfigs = AgentUtilOperations.readIoTServerConfigs(); + } catch (AgentCoreOperationException e) { + log.error("Reading device configuration from configuration file failed:\n"); + log.error(e); + System.exit(0); + } + + // Initialise IoT-Server URL endpoints from the configuration read from file + AgentUtilOperations.initializeServerEndPoints(); + // Set the hostNameVerifier to the APIM-Server IPAddress to enable HTTPS handshake + AgentUtilOperations.setHTTPSConfigurations(); + + String analyticsPageContext = String.format(AgentConstants.DEVICE_ANALYTICS_PAGE_URL, + agentConfigs.getDeviceId(), + agentConfigs.getDeviceName()); + + String controlPageContext = String.format(AgentConstants.DEVICE_DETAILS_PAGE_EP, + AgentConstants.DEVICE_TYPE, + agentConfigs.getDeviceId()); + + this.deviceMgtAnalyticUrl = agentConfigs.getHTTPS_ServerEndpoint() + analyticsPageContext; + this.deviceMgtControlUrl = agentConfigs.getHTTPS_ServerEndpoint() + controlPageContext; + + this.agentStatus = AgentConstants.NOT_REGISTERED; + this.deviceName = this.agentConfigs.getDeviceName(); + + this.pushInterval = this.agentConfigs.getDataPushInterval(); + this.networkInterface = AgentConstants.DEFAULT_NETWORK_INTERFACE; + + this.protocol = AgentConstants.DEFAULT_PROTOCOL; + this.prevProtocol = protocol; + + Map xmppIPPortMap; + try { + xmppIPPortMap = TransportUtils.getHostAndPort(agentConfigs.getXmppServerEndpoint()); + String xmppServer = xmppIPPortMap.get("Host"); + int xmppPort = Integer.parseInt(xmppIPPortMap.get("Port")); + + TransportHandler xmppCommunicator = new FireAlarmXMPPCommunicator(xmppServer, xmppPort); + agentCommunicator.put(AgentConstants.XMPP_PROTOCOL, xmppCommunicator); + + } catch (TransportHandlerException e) { + log.error("XMPP Endpoint String - " + agentConfigs.getXmppServerEndpoint() + + ", provided in the configuration file is invalid."); + } + String mqttTopic = String.format(AgentConstants.MQTT_SUBSCRIBE_TOPIC, agentConfigs.getTenantDomain(), + agentConfigs.getDeviceId()); + +// TransportHandler httpCommunicator = new FireAlarmHTTPCommunicator(); + TransportHandler mqttCommunicator = new FireAlarmMQTTCommunicator(agentConfigs.getDeviceOwner(), + agentConfigs.getDeviceId(), + agentConfigs.getMqttBrokerEndpoint(), + mqttTopic); + +// agentCommunicator.put(AgentConstants.HTTP_PROTOCOL, httpCommunicator); + agentCommunicator.put(AgentConstants.MQTT_PROTOCOL, mqttCommunicator); + + try { + interfaceList = new ArrayList<>(TransportUtils.getInterfaceIPMap().keySet()); + protocolList = new ArrayList<>(agentCommunicator.keySet()); + } catch (TransportHandlerException e) { + log.error("An error occurred whilst retrieving all NetworkInterface-IP mappings"); + } + + //Initializing hardware at that point + //AgentManger.setDeviceReady() method should invoked from hardware after initialization + VirtualHardwareManager.getInstance().init(); + + //Wait till hardware get ready + while (!deviceReady) { + try { + Thread.sleep(500); + } catch (InterruptedException e) { + log.info(AgentConstants.LOG_APPENDER + "Sleep error in 'device ready-flag' checking thread"); + } + } + + try { + if (!EnrollmentManager.getInstance().isEnrolled()) { + EnrollmentManager.getInstance().beginEnrollmentFlow(); + } + } catch (AgentCoreOperationException e) { + log.error("Device Enrollment Failed:\n"); + log.error(e); + System.exit(0); + } + + //Start agent communication + agentCommunicator.get(protocol).connect(); + } + + private void switchCommunicator(String stopProtocol, String startProtocol) { + agentCommunicator.get(stopProtocol).disconnect(); + + while (agentCommunicator.get(stopProtocol).isConnected()) { + try { + Thread.sleep(250); + } catch (InterruptedException e) { + log.info(AgentConstants.LOG_APPENDER + + "Sleep error in 'Switch-Communicator' Thread's shutdown wait."); + } + } + + agentCommunicator.get(startProtocol).connect(); + } + + public void setInterface(int interfaceId) { + if (interfaceId != -1) { + String newInterface = interfaceList.get(interfaceId); + + if (!newInterface.equals(networkInterface)) { + networkInterface = newInterface; + + if (protocol.equals(AgentConstants.HTTP_PROTOCOL) && !protocol.equals( + prevProtocol)) { + switchCommunicator(prevProtocol, protocol); + } + } + } + } + + public void setProtocol(int protocolId) { + if (protocolId != -1) { + String newProtocol = protocolList.get(protocolId); + + if (!protocol.equals(newProtocol)) { + prevProtocol = protocol; + protocol = newProtocol; + switchCommunicator(prevProtocol, protocol); + } + } + } + + public void changeAlarmStatus(boolean isOn) { + VirtualHardwareManager.getInstance().changeAlarmStatus(isOn); + isAlarmOn = isOn; + } + + public void updateAgentStatus(String status) { + this.agentStatus = status; + } + + /*------------------------------------------------------------------------------------------*/ + /* Getter and Setter Methods for the private variables */ + /*------------------------------------------------------------------------------------------*/ + + public void setRootPath(String rootPath) { + this.rootPath = rootPath; + } + + public String getRootPath() { + return rootPath; + } + + public void setDeviceReady(boolean deviceReady) { + this.deviceReady = deviceReady; + } + + public String getDeviceMgtControlUrl() { + return deviceMgtControlUrl; + } + + public String getDeviceMgtAnalyticUrl() { + return deviceMgtAnalyticUrl; + } + + public AgentConfiguration getAgentConfigs() { + return agentConfigs; + } + + public String getDeviceIP() { + return deviceIP; + } + + public void setDeviceIP(String deviceIP) { + this.deviceIP = deviceIP; + } + + public String getEnrollmentEP() { + return enrollmentEP; + } + + public void setEnrollmentEP(String enrollmentEP) { + this.enrollmentEP = enrollmentEP; + } + + public String getIpRegistrationEP() { + return ipRegistrationEP; + } + + public void setIpRegistrationEP(String ipRegistrationEP) { + this.ipRegistrationEP = ipRegistrationEP; + } + + public String getPushDataAPIEP() { + return pushDataAPIEP; + } + + public void setPushDataAPIEP(String pushDataAPIEP) { + this.pushDataAPIEP = pushDataAPIEP; + } + + public String getDeviceName() { + return deviceName; + } + + public String getNetworkInterface() { + return networkInterface; + } + + public String getAgentStatus() { + return agentStatus; + } + + public int getPushInterval() { + return pushInterval; + } + + public void setPushInterval(int pushInterval) { + this.pushInterval = pushInterval; + TransportHandler transportHandler = agentCommunicator.get(protocol); + + switch (protocol) { + case AgentConstants.HTTP_PROTOCOL: + ((FireAlarmHTTPCommunicator) transportHandler).getDataPushServiceHandler() + .cancel(true); + break; + case AgentConstants.MQTT_PROTOCOL: + ((FireAlarmMQTTCommunicator) transportHandler).getDataPushServiceHandler() + .cancel(true); + break; + case AgentConstants.XMPP_PROTOCOL: + ((FireAlarmXMPPCommunicator) transportHandler).getDataPushServiceHandler() + .cancel(true); + break; + default: + log.warn("Unknown protocol " + protocol); + } + transportHandler.publishDeviceData(); + + if (log.isDebugEnabled()) { + log.debug("The Data Publish Interval was changed to: " + pushInterval); + } + } + + public List getInterfaceList() { + return interfaceList; + } + + public List getProtocolList() { + return protocolList; + } + + /** + * Get temperature reading from device + * + * @return Temperature + */ + public int getTemperature() { + return VirtualHardwareManager.getInstance().getTemperature(); + } + + /** + * Get humidity reading from device + * + * @return Humidity + */ + public int getHumidity() { + return VirtualHardwareManager.getInstance().getHumidity(); + } + + public boolean isAlarmOn() { + return isAlarmOn; + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java new file mode 100644 index 000000000..60c3941b8 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java @@ -0,0 +1,440 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core; + +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.configuration.ConfigurationException; +import org.apache.commons.configuration.PropertiesConfiguration; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.eclipse.jetty.http.HttpStatus; +import org.json.JSONObject; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.enrollment.EnrollmentManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.exception.AgentCoreOperationException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.CommunicationUtils; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandlerException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportUtils; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.SSLSession; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.ProtocolException; +import java.net.URL; +import java.net.URLDecoder; +import java.nio.charset.StandardCharsets; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.util.Properties; + +/** + * This class contains all the core operations of the FireAlarm agent that are common to both + * Virtual and Real Scenarios. These operations include, connecting to and subscribing to an MQTT + * queue and to a XMPP Server. Pushing temperature data to the IoT-Server at timely intervals. + * Reading device specific configuration from a configs file etc.... + */ +public class AgentUtilOperations { + + private static final Log log = LogFactory.getLog(AgentUtilOperations.class); + private static final String JSON_MESSAGE_KEY = "Msg"; + private static final String JSON_SIGNATURE_KEY = "Sig"; + private static final String JSON_SERIAL_KEY = "SerialNumber"; + + /** + * This method reads the agent specific configurations for the device from the + * "deviceConfigs.properties" file found at /repository/conf folder. + * If the properties file is not found in the specified path, then the configuration values + * are set to the default ones in the 'AgentConstants' class. + * + * @return an object of type 'AgentConfiguration' which contains all the necessary + * configuration attributes + */ + public static AgentConfiguration readIoTServerConfigs() throws AgentCoreOperationException { + AgentManager agentManager = AgentManager.getInstance(); + AgentConfiguration iotServerConfigs = new AgentConfiguration(); + Properties properties = new Properties(); + InputStream propertiesInputStream = null; + String propertiesFileName = AgentConstants.AGENT_PROPERTIES_FILE_NAME; + String rootPath = ""; + + try { + ClassLoader loader = AgentUtilOperations.class.getClassLoader(); + URL path = loader.getResource(propertiesFileName); + + if (path != null) { + log.info(AgentConstants.LOG_APPENDER + path); + rootPath = path.getPath().replace("wso2-firealarm-virtual-agent.jar!/deviceConfig.properties", "") + .replace("jar:", "").replace("file:", ""); + + rootPath = URLDecoder.decode(rootPath, StandardCharsets.UTF_8.toString()); + agentManager.setRootPath(rootPath); + + String deviceConfigFilePath = rootPath + AgentConstants.AGENT_PROPERTIES_FILE_NAME; + propertiesInputStream = new FileInputStream(deviceConfigFilePath); + + //load a properties file from class path, inside static method + properties.load(propertiesInputStream); + + iotServerConfigs.setTenantDomain(properties.getProperty( + AgentConstants.TENANT_DOMAIN)); + iotServerConfigs.setDeviceOwner(properties.getProperty( + AgentConstants.DEVICE_OWNER_PROPERTY)); + iotServerConfigs.setDeviceId(properties.getProperty( + AgentConstants.DEVICE_ID_PROPERTY)); + iotServerConfigs.setServerJID(properties.getProperty( + AgentConstants.SERVER_JID_PROPERTY)); + iotServerConfigs.setDeviceName(properties.getProperty( + AgentConstants.DEVICE_NAME_PROPERTY)); + iotServerConfigs.setControllerContext(properties.getProperty( + AgentConstants.DEVICE_CONTROLLER_CONTEXT_PROPERTY)); + iotServerConfigs.setScepContext(properties.getProperty( + AgentConstants.DEVICE_SCEP_CONTEXT_PROPERTY)); + iotServerConfigs.setHTTPS_ServerEndpoint(properties.getProperty( + AgentConstants.SERVER_HTTPS_EP_PROPERTY)); + iotServerConfigs.setHTTP_ServerEndpoint(properties.getProperty( + AgentConstants.SERVER_HTTP_EP_PROPERTY)); + iotServerConfigs.setApimGatewayEndpoint(properties.getProperty( + AgentConstants.APIM_GATEWAY_EP_PROPERTY)); + iotServerConfigs.setMqttBrokerEndpoint(properties.getProperty( + AgentConstants.MQTT_BROKER_EP_PROPERTY)); + iotServerConfigs.setXmppServerEndpoint(properties.getProperty( + AgentConstants.XMPP_SERVER_EP_PROPERTY)); + iotServerConfigs.setXmppServerName(properties.getProperty( + AgentConstants.XMPP_SERVER_NAME_PROPERTY)); + iotServerConfigs.setApiApplicationKey(properties.getProperty( + AgentConstants.API_APPLICATION_KEY)); + iotServerConfigs.setAuthMethod(properties.getProperty( + AgentConstants.AUTH_METHOD_PROPERTY)); + iotServerConfigs.setAuthToken(properties.getProperty( + AgentConstants.AUTH_TOKEN_PROPERTY)); + iotServerConfigs.setRefreshToken(properties.getProperty( + AgentConstants.REFRESH_TOKEN_PROPERTY)); + iotServerConfigs.setDataPushInterval(Integer.parseInt(properties.getProperty( + AgentConstants.PUSH_INTERVAL_PROPERTY))); + + log.info(AgentConstants.LOG_APPENDER + "Tenant Domain: " + + iotServerConfigs.getTenantDomain()); + log.info(AgentConstants.LOG_APPENDER + "Device Owner: " + + iotServerConfigs.getDeviceOwner()); + log.info(AgentConstants.LOG_APPENDER + "Device ID: " + iotServerConfigs.getDeviceId()); + log.info(AgentConstants.LOG_APPENDER + "Device Name: " + + iotServerConfigs.getDeviceName()); + log.info(AgentConstants.LOG_APPENDER + "Device Controller Context: " + + iotServerConfigs.getControllerContext()); + log.info(AgentConstants.LOG_APPENDER + "IoT Server HTTPS EndPoint: " + + iotServerConfigs.getHTTPS_ServerEndpoint()); + log.info(AgentConstants.LOG_APPENDER + "IoT Server HTTP EndPoint: " + + iotServerConfigs.getHTTP_ServerEndpoint()); + log.info(AgentConstants.LOG_APPENDER + "API-Manager Gateway EndPoint: " + + iotServerConfigs.getApimGatewayEndpoint()); + log.info(AgentConstants.LOG_APPENDER + "MQTT Broker EndPoint: " + + iotServerConfigs.getMqttBrokerEndpoint()); + log.info(AgentConstants.LOG_APPENDER + "XMPP Server EndPoint: " + + iotServerConfigs.getXmppServerEndpoint()); + log.info(AgentConstants.LOG_APPENDER + "Authentication Method: " + + iotServerConfigs.getAuthMethod()); + log.info(AgentConstants.LOG_APPENDER + "Base64Encoded API Application Key: " + + iotServerConfigs.getApiApplicationKey()); + log.info(AgentConstants.LOG_APPENDER + "Authentication Token: " + + iotServerConfigs.getAuthToken()); + log.info(AgentConstants.LOG_APPENDER + "Refresh Token: " + + iotServerConfigs.getRefreshToken()); + log.info(AgentConstants.LOG_APPENDER + "Data Push Interval: " + + iotServerConfigs.getDataPushInterval()); + log.info(AgentConstants.LOG_APPENDER + "XMPP Server Name: " + + iotServerConfigs.getXmppServerName()); + } else { + throw new AgentCoreOperationException( + "Failed to load path of resource [" + propertiesFileName + "] from this classpath."); + } + } catch (FileNotFoundException ex) { + String errorMsg = "[" + propertiesFileName + "] file not found at: " + rootPath; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + throw new AgentCoreOperationException(errorMsg); + + } catch (IOException ex) { + String errorMsg = "Error occurred whilst trying to fetch [" + propertiesFileName + "] from: " + + AgentConstants.PROPERTIES_FILE_PATH; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + throw new AgentCoreOperationException(errorMsg); + } finally { + if (propertiesInputStream != null) { + try { + propertiesInputStream.close(); + } catch (IOException e) { + log.error(AgentConstants.LOG_APPENDER + + "Error occurred whilst trying to close InputStream resource used to read the '" + + propertiesFileName + "' file"); + } + } + } + return iotServerConfigs; + } + + /** + * This method constructs the URLs for each of the API Endpoints called by the device agent + * Ex: Register API, Push-Data API + */ + public static void initializeServerEndPoints() { + AgentManager agentManager = AgentManager.getInstance(); + String serverSecureEndpoint = agentManager.getAgentConfigs().getHTTPS_ServerEndpoint(); + String serverUnSecureEndpoint = agentManager.getAgentConfigs().getHTTP_ServerEndpoint(); + String backEndContext = agentManager.getAgentConfigs().getControllerContext(); + String scepBackEndContext = agentManager.getAgentConfigs().getScepContext(); + + String deviceControllerAPIEndpoint = serverSecureEndpoint + backEndContext; + + String deviceEnrollmentEndpoint = + serverUnSecureEndpoint + scepBackEndContext + AgentConstants.DEVICE_ENROLLMENT_API_EP; + agentManager.setEnrollmentEP(deviceEnrollmentEndpoint); + + String registerEndpointURL = + deviceControllerAPIEndpoint + AgentConstants.DEVICE_REGISTER_API_EP; + agentManager.setIpRegistrationEP(registerEndpointURL); + + String pushDataEndPointURL = + deviceControllerAPIEndpoint + AgentConstants.DEVICE_PUSH_TEMPERATURE_API_EP; + agentManager.setPushDataAPIEP(pushDataEndPointURL); + + log.info(AgentConstants.LOG_APPENDER + "IoT Server's Device Controller API Endpoint: " + + deviceControllerAPIEndpoint); + log.info(AgentConstants.LOG_APPENDER + "Device Enrollment EndPoint: " + + registerEndpointURL); + log.info(AgentConstants.LOG_APPENDER + "DeviceIP Registration EndPoint: " + + registerEndpointURL); + log.info(AgentConstants.LOG_APPENDER + "Push-Data API EndPoint: " + pushDataEndPointURL); + } + + public static void setHTTPSConfigurations() { + String apimEndpoint = AgentManager.getInstance().getAgentConfigs().getApimGatewayEndpoint(); + System.setProperty("javax.net.ssl.trustStore", AgentConstants.DEVICE_KEYSTORE); + System.setProperty("javax.net.ssl.trustStorePassword", AgentConstants.DEVICE_KEYSTORE_PASSWORD); + + try { + final String apimHost = TransportUtils.getHostAndPort(apimEndpoint).get(AgentConstants.HOST_PROPERTY); + + HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() { + public boolean verify(String hostname, SSLSession session) { + return hostname.equals(apimHost); + } + }); + } catch (TransportHandlerException e) { + log.error(AgentConstants.LOG_APPENDER + + "Failed to set HTTPS HostNameVerifier to the APIMServer-Host using the APIM-Endpoint " + + "string [" + apimEndpoint + "]."); + log.error(AgentConstants.LOG_APPENDER + e); + } + } + + public static String prepareSecurePayLoad(String message) throws AgentCoreOperationException { + PrivateKey devicePrivateKey = EnrollmentManager.getInstance().getPrivateKey(); + String encodedMessage = Base64.encodeBase64String(message.getBytes()); + String signedPayload; + try { + signedPayload = CommunicationUtils.signMessage(encodedMessage, devicePrivateKey); + } catch (TransportHandlerException e) { + String errorMsg = "Error occurred whilst trying to sign encrypted message of: [" + message + "]"; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } + + JSONObject jsonPayload = new JSONObject(); + jsonPayload.put(JSON_MESSAGE_KEY, encodedMessage); + jsonPayload.put(JSON_SIGNATURE_KEY, signedPayload); + //below statements are temporary fix. + jsonPayload.put(JSON_SERIAL_KEY, EnrollmentManager.getInstance().getSCEPCertificate().getSerialNumber()); + return jsonPayload.toString(); + } + + public static String extractMessageFromPayload(String message) throws AgentCoreOperationException { + String actualMessage; + + PublicKey serverPublicKey = EnrollmentManager.getInstance().getServerPublicKey(); + JSONObject jsonPayload = new JSONObject(message); + Object encodedMessage = jsonPayload.get(JSON_MESSAGE_KEY); + Object signedPayload = jsonPayload.get(JSON_SIGNATURE_KEY); + boolean verification; + + if (encodedMessage != null && signedPayload != null) { + try { + verification = CommunicationUtils.verifySignature( + encodedMessage.toString(), signedPayload.toString(), serverPublicKey); + } catch (TransportHandlerException e) { + String errorMsg = + "Error occurred whilst trying to verify signature on received message: [" + message + "]"; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } + } else { + String errorMsg = "The received message is in an INVALID format. " + + "Need to be JSON - {\"Msg\":\"\", \"Sig\":\"\"}."; + throw new AgentCoreOperationException(errorMsg); + } + if (verification) { + actualMessage = new String(Base64.decodeBase64(encodedMessage.toString()), StandardCharsets.UTF_8); + } else { + String errorMsg = "Could not verify payload signature. The message was not signed by a valid client"; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg); + } + return actualMessage; + } + + public static String getAuthenticationMethod() { + String authMethod = AgentManager.getInstance().getAgentConfigs().getAuthMethod(); + switch (authMethod) { + case AgentConstants.TOKEN_AUTHENTICATION_METHOD: + return AgentConstants.TOKEN_AUTHENTICATION_METHOD; + default: + return ""; + } + } + + public static void refreshOAuthToken() throws AgentCoreOperationException { + + AgentManager agentManager = AgentManager.getInstance(); + String tokenEndpoint = agentManager.getAgentConfigs().getApimGatewayEndpoint(); + tokenEndpoint = tokenEndpoint + APIManagerTokenUtils.TOKEN_ENDPOINT; + + HttpURLConnection httpConnection = null; + BufferedReader connectionBuffer = null; + String requestPayload; + String dataFromBuffer; + StringBuilder responseMessage = new StringBuilder(); + + try { + String refreshToken = agentManager.getAgentConfigs().getRefreshToken(); + String applicationScope = "device_type_" + AgentConstants.DEVICE_TYPE + + " device_" + agentManager.getAgentConfigs().getDeviceId(); + + requestPayload = APIManagerTokenUtils.GRANT_TYPE + "=" + APIManagerTokenUtils.REFRESH_TOKEN + "&" + + APIManagerTokenUtils.REFRESH_TOKEN + "=" + refreshToken + "&" + + APIManagerTokenUtils.SCOPE + "=" + applicationScope; + + httpConnection = TransportUtils.getHttpConnection(tokenEndpoint); + httpConnection.setRequestMethod(AgentConstants.HTTP_POST); + httpConnection.setRequestProperty(AgentConstants.AUTHORIZATION_HEADER, + "Basic " + agentManager.getAgentConfigs().getApiApplicationKey()); + httpConnection.setRequestProperty(AgentConstants.CONTENT_TYPE_HEADER, AgentConstants.X_WWW_FORM_URLENCODED); + httpConnection.setDoOutput(true); + + DataOutputStream dataOutPutWriter = new DataOutputStream(httpConnection.getOutputStream()); + dataOutPutWriter.writeBytes(requestPayload); + dataOutPutWriter.flush(); + dataOutPutWriter.close(); + + log.info(AgentConstants.LOG_APPENDER + "Request to refresh OAuth token was sent to [" + + httpConnection.getURL() + "] with payload [" + requestPayload + "]."); + log.info(AgentConstants.LOG_APPENDER + "Response [" + httpConnection.getResponseCode() + ":" + + httpConnection.getResponseMessage() + "] was received for token refresh attempt."); + + if (httpConnection.getResponseCode() == HttpStatus.OK_200) { + connectionBuffer = new BufferedReader(new InputStreamReader(httpConnection.getInputStream())); + while ((dataFromBuffer = connectionBuffer.readLine()) != null) { + responseMessage.append(dataFromBuffer); + } + + log.info(AgentConstants.LOG_APPENDER + + "Response " + responseMessage + " was received for the token refresh call."); + updateExistingTokens(responseMessage.toString()); + } else if (httpConnection.getResponseCode() == HttpStatus.BAD_REQUEST_400) { + log.error(AgentConstants.LOG_APPENDER + + "Token refresh call returned with a [400 Bad Request].\nThe refresh-token has " + + "probably expired.\nPlease contact System-Admin to get a valid refresh-token."); + } else { + log.warn(AgentConstants.LOG_APPENDER + "There was an issue with refreshing the Access Token."); + } + + } catch (TransportHandlerException e) { + throw new AgentCoreOperationException(e); + } catch (ProtocolException e) { + String errorMsg = "Protocol specific error occurred when trying to set method to " + + AgentConstants.HTTP_POST + " for endpoint at: " + tokenEndpoint; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + + } catch (IOException e) { + String errorMsg = "An IO error occurred whilst trying to get the response code from: " + tokenEndpoint + + " for a HTTP " + AgentConstants.HTTP_POST + " call."; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } finally { + if (connectionBuffer != null) { + try { + connectionBuffer.close(); + } catch (IOException e) { + log.error(AgentConstants.LOG_APPENDER + + "Error encounter whilst attempting to close buffer to connection at: " + + tokenEndpoint); + } + } + + if (httpConnection != null) { + httpConnection.disconnect(); + } + } + } + + private static void updateExistingTokens(String responseFromTokenEP) throws AgentCoreOperationException { + JSONObject jsonTokenObject = new JSONObject(responseFromTokenEP); + String newAccessToken = jsonTokenObject.get(APIManagerTokenUtils.ACCESS_TOKEN).toString(); + String newRefreshToken = jsonTokenObject.get(APIManagerTokenUtils.REFRESH_TOKEN).toString(); + + if (newAccessToken == null || newRefreshToken == null) { + String msg = + "Neither Access-Token nor Refresh-Token was found in the response [" + responseFromTokenEP + "]."; + log.error(AgentConstants.LOG_APPENDER + msg); + throw new AgentCoreOperationException(msg); + } + + AgentManager.getInstance().getAgentConfigs().setAuthToken(newAccessToken); + AgentManager.getInstance().getAgentConfigs().setRefreshToken(newRefreshToken); + String deviceConfigFilePath = + AgentManager.getInstance().getRootPath() + AgentConstants.AGENT_PROPERTIES_FILE_NAME; + + try { + PropertiesConfiguration propertyFileConfiguration = new PropertiesConfiguration(deviceConfigFilePath); + propertyFileConfiguration.setProperty(AgentConstants.AUTH_TOKEN_PROPERTY, newAccessToken); + propertyFileConfiguration.setProperty(AgentConstants.REFRESH_TOKEN_PROPERTY, newRefreshToken); + propertyFileConfiguration.save(); + } catch (ConfigurationException e) { + String msg = "Error occurred whilst trying to update the [" + AgentConstants.AGENT_PROPERTIES_FILE_NAME + + "] at: " + deviceConfigFilePath + " will the new tokens."; + log.error(AgentConstants.LOG_APPENDER + msg); + throw new AgentCoreOperationException(msg); + } + } + + private class APIManagerTokenUtils { + public static final String TOKEN_ENDPOINT = "/oauth2/token"; + public static final String GRANT_TYPE = "grant_type"; + public static final String ACCESS_TOKEN = "access_token"; + public static final String REFRESH_TOKEN = "refresh_token"; + public static final String SCOPE = "scope"; + } + +} + diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java new file mode 100644 index 000000000..6059483bc --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java @@ -0,0 +1,572 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.enrollment; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.bouncycastle.asn1.x500.X500Name; +import org.bouncycastle.asn1.x500.X500NameBuilder; +import org.bouncycastle.asn1.x500.style.BCStyle; +import org.bouncycastle.cert.X509v3CertificateBuilder; +import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter; +import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.bouncycastle.operator.ContentSigner; +import org.bouncycastle.operator.OperatorCreationException; +import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder; +import org.bouncycastle.pkcs.PKCS10CertificationRequest; +import org.bouncycastle.pkcs.PKCS10CertificationRequestBuilder; +import org.bouncycastle.pkcs.jcajce.JcaPKCS10CertificationRequestBuilder; +import org.jscep.client.Client; +import org.jscep.client.ClientException; +import org.jscep.client.EnrollmentResponse; +import org.jscep.client.verification.CertificateVerifier; +import org.jscep.client.verification.OptimisticCertificateVerifier; +import org.jscep.transaction.TransactionException; +import org.jscep.transport.response.Capabilities; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentConstants; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.exception.AgentCoreOperationException; +import sun.security.x509.X509CertImpl; + +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.math.BigInteger; +import java.net.MalformedURLException; +import java.net.URL; +import java.security.Key; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.NoSuchProviderException; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.security.SecureRandom; +import java.security.Security; +import java.security.UnrecoverableKeyException; +import java.security.cert.CertStore; +import java.security.cert.CertStoreException; +import java.security.cert.Certificate; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import java.util.Date; + +/** + * This class controls the entire SCEP enrolment process of the client. It is a singleton for any single client which + * has the agent code running in it. The main functionality of this class includes generating a Private-Public Key + * Pair for the enrollment flow, creating the Certificate-Sign-Request using the generated Public-Key to send to the + * SEP server, Contacting the SCEP server to receive the Signed Certificate and requesting for the server's public + * key for encrypting the payloads. + * The provider for all Cryptographic functions used in this class are "BouncyCastle" and the Asymmetric-Key pair + * algorithm used is "RSA" with a key size of 2048. The signature algorithm used is "SHA1withRSA". + * This class also holds the "SCEPUrl" (Server Url read from the configs file), the Private-Public Keys of the + * client, Signed SCEP certificate and the server's public certificate. + */ + +//TODO: Need to save cert and keys to file after initial enrollment... +public class EnrollmentManager { + private static final Log log = LogFactory.getLog(EnrollmentManager.class); + private static EnrollmentManager enrollmentManager; + + private static final String KEY_PAIR_ALGORITHM = "RSA"; + private static final String PROVIDER = "BC"; + private static final String SIGNATURE_ALG = "SHA1withRSA"; + private static final String CERT_IS_CA_EXTENSION = "is_ca"; + private static final int KEY_SIZE = 2048; + + // Seed to our PRNG. Make sure this is initialised randomly, NOT LIKE THIS + private static final byte[] SEED = ")(*&^%$#@!".getBytes(); + private static final int CERT_VALIDITY = 730; + + // URL of our SCEP server + private String SCEPUrl; + private PrivateKey privateKey; + private PublicKey publicKey; + private PublicKey serverPublicKey; + private X509Certificate SCEPCertificate; + private boolean isEnrolled = false; + + + /** + * Constructor of the EnrollmentManager. Initializes the SCEPUrl as read from the configuration file by the + * AgentManager. + */ + private EnrollmentManager() { + this.SCEPUrl = AgentManager.getInstance().getEnrollmentEP(); + setEnrollmentStatus(); + } + + /** + * Method to return the current singleton instance of the EnrollmentManager. + * + * @return the current singleton instance if available and if not initializes a new instance and returns it. + */ + public static EnrollmentManager getInstance() { + if (enrollmentManager == null) { + enrollmentManager = new EnrollmentManager(); + } + return enrollmentManager; + } + + + public void setEnrollmentStatus() { + KeyStore keyStore; + + try { + keyStore = KeyStore.getInstance(AgentConstants.DEVICE_KEYSTORE_TYPE); + keyStore.load(new FileInputStream(AgentConstants.DEVICE_KEYSTORE), + AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray()); + + this.isEnrolled = (keyStore.containsAlias(AgentConstants.DEVICE_CERT_ALIAS) && + keyStore.containsAlias(AgentConstants.DEVICE_PRIVATE_KEY_ALIAS) && + keyStore.containsAlias(AgentConstants.SERVER_CA_CERT_ALIAS)); + + } catch (KeyStoreException e) { + log.error(AgentConstants.LOG_APPENDER + "An error occurred whilst accessing the device KeyStore '" + + AgentConstants.DEVICE_KEYSTORE + "' with keystore type [" + + AgentConstants.DEVICE_KEYSTORE_TYPE + "] to ensure enrollment status."); + log.error(AgentConstants.LOG_APPENDER + e); + log.warn(AgentConstants.LOG_APPENDER + "Device will be re-enrolled."); + return; + } catch (CertificateException | NoSuchAlgorithmException e) { + log.error(AgentConstants.LOG_APPENDER + "An error occurred whilst trying to [load] the device KeyStore '" + + AgentConstants.DEVICE_KEYSTORE + "'."); + log.error(AgentConstants.LOG_APPENDER + e); + log.warn(AgentConstants.LOG_APPENDER + "Device will be re-enrolled."); + return; + } catch (IOException e) { + log.error(AgentConstants.LOG_APPENDER + + "An error occurred whilst trying to load input stream with the keystore file: " + + AgentConstants.DEVICE_KEYSTORE); + log.error(AgentConstants.LOG_APPENDER + e); + log.warn(AgentConstants.LOG_APPENDER + "Device will be re-enrolled."); + return; + } + + try { + if (this.isEnrolled) { + this.SCEPCertificate = (X509Certificate) keyStore.getCertificate(AgentConstants.DEVICE_CERT_ALIAS); + this.privateKey = (PrivateKey) keyStore.getKey(AgentConstants.DEVICE_PRIVATE_KEY_ALIAS, + AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray()); + this.publicKey = SCEPCertificate.getPublicKey(); + + X509Certificate serverCACert = (X509Certificate) keyStore.getCertificate( + AgentConstants.SERVER_CA_CERT_ALIAS); + this.serverPublicKey = serverCACert.getPublicKey(); + log.info(AgentConstants.LOG_APPENDER + + "Device has already been enrolled. Hence, loaded certificate information from device" + + " trust-store."); + } + } catch (UnrecoverableKeyException | NoSuchAlgorithmException | KeyStoreException e) { + log.error(AgentConstants.LOG_APPENDER + "An error occurred whilst accessing the device KeyStore '" + + AgentConstants.DEVICE_KEYSTORE + "' to ensure enrollment status."); + log.error(AgentConstants.LOG_APPENDER + e); + log.warn(AgentConstants.LOG_APPENDER + "Device will be re-enrolled."); + this.isEnrolled = false; + } + } + + /** + * Method to control the entire enrollment flow. This method calls the method to create the Private-Public Key + * Pair, calls the specific method to generate the Certificate-Sign-Request, creates a one time self signed + * certificate to present to the SCEP server with the initial CSR, calls the specific method to connect to the + * SCEP Server and to get the SCEP Certificate and also calls the method that requests the SCEP Server for its + * PublicKey for future payload encryption. + * + * @throws AgentCoreOperationException if the private method generateCertSignRequest() fails with an error or if + * there is an error creating a self-sign certificate to present to the + * server (whilst trying to get the CSR signed) + */ + public void beginEnrollmentFlow() throws AgentCoreOperationException { + Security.addProvider(new BouncyCastleProvider()); + + KeyPair keyPair = generateKeyPair(); + this.privateKey = keyPair.getPrivate(); + this.publicKey = keyPair.getPublic(); + + if (log.isDebugEnabled()) { + log.info(AgentConstants.LOG_APPENDER + "DevicePrivateKey:\n[\n" + privateKey + "\n]\n"); + log.info(AgentConstants.LOG_APPENDER + "DevicePublicKey:\n[\n" + publicKey + "\n]\n"); + } + + PKCS10CertificationRequest certSignRequest = generateCertSignRequest(); + + /** + * ----------------------------------------------------------------------------------------------- + * Generate an ephemeral self-signed certificate. This is needed to present to the CA in the SCEP request. + * In the future, add proper EKU and attributes in the request. The CA does NOT have to honour any of this. + * ----------------------------------------------------------------------------------------------- + */ + X500Name issuer = new X500Name("CN=Temporary Issuer"); + BigInteger serial = new BigInteger(32, new SecureRandom()); + Date fromDate = new Date(); + Date toDate = new Date(System.currentTimeMillis() + (CERT_VALIDITY * 86400000L)); + + // Build the self-signed cert using BC, sign it with our private key (self-signed) + X509v3CertificateBuilder certBuilder = new X509v3CertificateBuilder(issuer, serial, fromDate, toDate, + certSignRequest.getSubject(), + certSignRequest.getSubjectPublicKeyInfo()); + ContentSigner sigGen; + X509Certificate tmpCert; + + try { + sigGen = new JcaContentSignerBuilder(SIGNATURE_ALG).setProvider(PROVIDER).build(keyPair.getPrivate()); + tmpCert = new JcaX509CertificateConverter().setProvider(PROVIDER).getCertificate(certBuilder.build(sigGen)); + } catch (OperatorCreationException e) { + String errorMsg = "Error occurred whilst creating a ContentSigner for the Temp-Self-Signed Certificate."; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } catch (CertificateException e) { + String errorMsg = "Error occurred whilst trying to create Temp-Self-Signed Certificate."; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } + /** + * ----------------------------------------------------------------------------------------------- + */ + + this.SCEPCertificate = getSignedCertificateFromServer(tmpCert, certSignRequest); + this.serverPublicKey = initPublicKeyOfServer(); + + storeCertificateToStore(AgentConstants.DEVICE_CERT_ALIAS, SCEPCertificate); + storeKeyToKeyStore(AgentConstants.DEVICE_PRIVATE_KEY_ALIAS, this.privateKey, SCEPCertificate); + + if (log.isDebugEnabled()) { + log.info(AgentConstants.LOG_APPENDER + + "SCEPCertificate, DevicePrivateKey, ServerPublicKey was saved to device keystore [" + + AgentConstants.DEVICE_KEYSTORE + "]"); + log.info(AgentConstants.LOG_APPENDER + "TemporaryCertPublicKey:\n[\n" + tmpCert.getPublicKey() + "\n]\n"); + log.info(AgentConstants.LOG_APPENDER + "ServerPublicKey:\n[\n" + serverPublicKey + "\n]\n"); + } + } + + private void storeCertificateToStore(String alias, Certificate certificate) { + KeyStore keyStore; + try { + keyStore = KeyStore.getInstance(AgentConstants.DEVICE_KEYSTORE_TYPE); + keyStore.load(new FileInputStream(AgentConstants.DEVICE_KEYSTORE), + AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray()); + + keyStore.setCertificateEntry(alias, certificate); + keyStore.store(new FileOutputStream(AgentConstants.DEVICE_KEYSTORE), + AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray()); + + } catch (KeyStoreException | CertificateException | NoSuchAlgorithmException | IOException e) { + log.error(AgentConstants.LOG_APPENDER + + "An error occurred whilst trying to store the Certificate received from the SCEP " + + "Enrollment."); + log.error(AgentConstants.LOG_APPENDER + e); + log.warn(AgentConstants.LOG_APPENDER + + "SCEP Certificate was not stored in the keystore; " + + "Hence the device will be re-enrolled during next restart."); + } + } + + + private void storeKeyToKeyStore(String alias, Key cryptoKey, Certificate certInCertChain) { + KeyStore keyStore; + try { + keyStore = KeyStore.getInstance(AgentConstants.DEVICE_KEYSTORE_TYPE); + keyStore.load(new FileInputStream(AgentConstants.DEVICE_KEYSTORE), + AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray()); + + Certificate[] certChain = new Certificate[1]; + certChain[0] = certInCertChain; + + keyStore.setKeyEntry(alias, cryptoKey, AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray(), certChain); + keyStore.store(new FileOutputStream(AgentConstants.DEVICE_KEYSTORE), + AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray()); + + } catch (KeyStoreException | CertificateException | NoSuchAlgorithmException | IOException e) { + log.error(AgentConstants.LOG_APPENDER + + "An error occurred whilst trying to store the key with alias " + + "[" + alias + "] in the device keystore."); + log.error(AgentConstants.LOG_APPENDER + e); + log.warn(AgentConstants.LOG_APPENDER + + "Key [" + alias + "] was not stored in the keystore; " + + "Hence the device will be re-enrolled during next restart."); + } + } + + /** + * This method creates the Public-Private Key pair for the current client. + * + * @return the generated KeyPair object + * @throws AgentCoreOperationException when the given Security Provider does not exist or the Algorithmn used to + * generate the key pair is invalid. + */ + private KeyPair generateKeyPair() throws AgentCoreOperationException { + + // Generate key pair + KeyPairGenerator keyPairGenerator; + try { + keyPairGenerator = KeyPairGenerator.getInstance(KEY_PAIR_ALGORITHM, PROVIDER); + keyPairGenerator.initialize(KEY_SIZE, new SecureRandom(SEED)); + } catch (NoSuchAlgorithmException e) { + String errorMsg = "Algorithm [" + KEY_PAIR_ALGORITHM + "] provided for KeyPairGenerator is invalid."; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } catch (NoSuchProviderException e) { + String errorMsg = "Provider [" + PROVIDER + "] provided for KeyPairGenerator does not exist."; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } + + return keyPairGenerator.genKeyPair(); + } + + + /** + * This method creates the PKCS10 Certificate Sign Request which is to be sent to the SCEP Server using the + * generated PublicKey of the client. The certificate parameters used here are the ones from the AgentManager + * which are the values read from the configurations file. + * + * @return the PKCS10CertificationRequest object created using the client specific configs and the generated + * PublicKey + * @throws AgentCoreOperationException if an error occurs when creating a content signer to sign the CSR. + */ + private PKCS10CertificationRequest generateCertSignRequest() throws AgentCoreOperationException { + // Build the CN for the cert that's being requested. + X500NameBuilder nameBld = new X500NameBuilder(BCStyle.INSTANCE); + nameBld.addRDN(BCStyle.CN, AgentManager.getInstance().getAgentConfigs().getTenantDomain()); + nameBld.addRDN(BCStyle.O, AgentManager.getInstance().getAgentConfigs().getDeviceOwner()); + nameBld.addRDN(BCStyle.OU, AgentManager.getInstance().getAgentConfigs().getDeviceOwner()); + nameBld.addRDN(BCStyle.UNIQUE_IDENTIFIER, AgentManager.getInstance().getAgentConfigs().getDeviceId()); + nameBld.addRDN(BCStyle.SERIALNUMBER, AgentManager.getInstance().getAgentConfigs().getDeviceId()); + X500Name principal = nameBld.build(); + + JcaContentSignerBuilder contentSignerBuilder = new JcaContentSignerBuilder(SIGNATURE_ALG).setProvider(PROVIDER); + ContentSigner contentSigner; + + try { + contentSigner = contentSignerBuilder.build(this.privateKey); + } catch (OperatorCreationException e) { + String errorMsg = "Could not create content signer with private key."; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } + + // Generate the certificate signing request (csr = PKCS10) + PKCS10CertificationRequestBuilder reqBuilder = new JcaPKCS10CertificationRequestBuilder(principal, + this.publicKey); + return reqBuilder.build(contentSigner); + } + + + /** + * This method connects to the SCEP Server to fetch the signed SCEP Certificate. + * + * @param tempCert the temporary self-signed certificate of the client required for the initial CSR + * request against the SCEP Server. + * @param certSignRequest the PKCS10 Certificate-Sign-Request that is to be sent to the SCEP Server. + * @return the SCEP-Certificate for the client signed by the SCEP-Server. + * @throws AgentCoreOperationException if the SCEPUrl is invalid or if the flow of sending the CSR and getting + * the signed certificate fails or if the signed certificate cannot be + * retrieved from the reply from the server. + */ + private X509Certificate getSignedCertificateFromServer(X509Certificate tempCert, + PKCS10CertificationRequest certSignRequest) + throws AgentCoreOperationException { + + X509Certificate signedSCEPCertificate = null; + URL url; + EnrollmentResponse enrolResponse; + CertStore certStore; + + try { + // The URL where we are going to request our cert from + url = new URL(this.SCEPUrl); + + /* // This is called when we get the certificate for our CSR signed by CA + // Implement this handler to check the CA cert in prod. We can do cert pinning here + CallbackHandler cb = new CallbackHandler() { + @Override + public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { + //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated + methods, choose Tools | Templates. + } + };*/ + + // Implement verification of the CA cert. VERIFY the CA + CertificateVerifier ocv = new OptimisticCertificateVerifier(); + + // Instantiate our SCEP client + Client scepClient = new Client(url, ocv); + + // Submit our cert for signing. SCEP server should allow the client to specify + // the SCEP CA to issue the request against, if there are multiple CAs + enrolResponse = scepClient.enrol(tempCert, this.privateKey, certSignRequest); + + // Verify we got what we want, and just print out the cert. + certStore = enrolResponse.getCertStore(); + + for (Certificate x509Certificate : certStore.getCertificates(null)) { + if (log.isDebugEnabled()) { + log.debug(x509Certificate.toString()); + } + signedSCEPCertificate = (X509Certificate) x509Certificate; + } + + } catch (MalformedURLException ex) { + String errorMsg = "Could not create valid URL from given SCEP URI: " + SCEPUrl; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, ex); + } catch (TransactionException | ClientException e) { + String errorMsg = "Enrollment process to SCEP Server at: " + SCEPUrl + " failed."; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } catch (CertStoreException e) { + String errorMsg = "Could not retrieve [Signed-Certificate] from the response message from SCEP-Server."; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } + + return signedSCEPCertificate; + } + + + /** + * Gets the Public Key of the SCEP-Server and initializes it for later use. This method contacts the SCEP Server + * and fetches its CA Cert and extracts the Public Key of the server from the received reply. + * + * @return the public key of the SCEP Server which is to be used to encrypt pyloads. + * @throws AgentCoreOperationException if the SCEPUrl is invalid or if the flow of sending the CSR and getting + * the signed certificate fails or if the signed certificate cannot be + * retrieved from the reply from the server. + */ + private PublicKey initPublicKeyOfServer() throws AgentCoreOperationException { + URL url; + CertStore certStore; + PublicKey serverCertPublicKey = null; + + try { + // The URL where we are going to request our cert from + url = new URL(this.SCEPUrl); + + /* // This is called when we get the certificate for our CSR signed by CA + // Implement this handler to check the CA cert in prod. We can do cert pinning here + CallbackHandler cb = new CallbackHandler() { + @Override + public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { + //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated + methods, choose Tools | Templates. + } + };*/ + + // Implement verification of the CA cert. VERIFY the CA + CertificateVerifier ocv = new OptimisticCertificateVerifier(); + + // Instantiate our SCEP client + Client scepClient = new Client(url, ocv); + + // Get the CA capabilities. Should return SHA1withRSA for strongest hash and sig. Returns MD5. + if (log.isDebugEnabled()) { + Capabilities cap = scepClient.getCaCapabilities(); + log.debug(String.format( + "\nStrongestCipher: %s,\nStrongestMessageDigest: %s,\nStrongestSignatureAlgorithm: %s," + + "\nIsRenewalSupported: %s,\nIsRolloverSupported: %s", + cap.getStrongestCipher(), cap.getStrongestMessageDigest(), cap.getStrongestSignatureAlgorithm(), + cap.isRenewalSupported(), cap.isRolloverSupported())); + } + + certStore = scepClient.getCaCertificate(); + + for (Certificate cert : certStore.getCertificates(null)) { + if (cert instanceof X509Certificate) { + if (log.isDebugEnabled()) { + log.debug(((X509Certificate) cert).getIssuerDN().getName()); + } + + // I have chosen the CA cert based on its BasicConstraintExtension "is_ca" being set to "true" + // This is because the returned keystore may contain many certificates including RAs. + if (((Boolean) ((X509CertImpl) cert).getBasicConstraintsExtension().get(CERT_IS_CA_EXTENSION))) { + serverCertPublicKey = cert.getPublicKey(); + storeCertificateToStore(AgentConstants.SERVER_CA_CERT_ALIAS, cert); + } + } + } + + } catch (MalformedURLException ex) { + String errorMsg = "Could not create valid URL from given SCEP URI: " + SCEPUrl; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, ex); + } catch (ClientException e) { + String errorMsg = "Could not retrieve [Server-Certificate] from the SCEP-Server."; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } catch (CertStoreException e) { + String errorMsg = "Could not retrieve [Server-Certificates] from the response message from SCEP-Server."; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } catch (IOException e) { + String errorMsg = "Error occurred whilst trying to get property ['is_ca'] from the retreived Certificates"; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } + + return serverCertPublicKey; + } + + /** + * Gets the Public-Key of the client. + * + * @return the public key of the client. + */ + public PublicKey getPublicKey() { + return publicKey; + } + + /** + * Gets the Private-Key of the client. + * + * @return the private key of the client. + */ + public PrivateKey getPrivateKey() { + return privateKey; + } + + /** + * Gets the SCEP-Certificate of the client. + * + * @return the SCEP Certificate of the client. + */ + public X509Certificate getSCEPCertificate() { + return SCEPCertificate; + } + + /** + * Gets the Public-Key of the Server. + * + * @return the pubic key of the server. + */ + public PublicKey getServerPublicKey() { + return serverPublicKey; + } + + /** + * Checks whether the device has already been enrolled with the SCEP Server. + * + * @return the enrollment status; 'TRUE' if already enrolled else 'FALSE'. + */ + public boolean isEnrolled() { + return isEnrolled; + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/exception/AgentCoreOperationException.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/exception/AgentCoreOperationException.java new file mode 100644 index 000000000..fac321ef9 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/exception/AgentCoreOperationException.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.exception; + + +public class AgentCoreOperationException extends Exception{ + private static final long serialVersionUID = 2736466230451105710L; + + private String errorMessage; + + public String getErrorMessage() { + return errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + public AgentCoreOperationException(String msg, Exception nestedEx) { + super(msg, nestedEx); + setErrorMessage(msg); + } + + public AgentCoreOperationException(String message, Throwable cause) { + super(message, cause); + setErrorMessage(message); + } + + public AgentCoreOperationException(String msg) { + super(msg); + setErrorMessage(msg); + } + + public AgentCoreOperationException() { + super(); + } + + public AgentCoreOperationException(Throwable cause) { + super(cause); + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java new file mode 100644 index 000000000..bb445a3d9 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java @@ -0,0 +1,225 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport; + +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import javax.crypto.BadPaddingException; +import javax.crypto.Cipher; +import javax.crypto.IllegalBlockSizeException; +import javax.crypto.NoSuchPaddingException; +import java.nio.charset.StandardCharsets; +import java.security.InvalidKeyException; +import java.security.Key; +import java.security.NoSuchAlgorithmException; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.security.Signature; +import java.security.SignatureException; + +/** + * This is a utility class which contains methods common to the communication process of a client and the server. The + * methods include encryption/decryption of payloads and signing/verification of payloads received and to be sent. + */ +public class CommunicationUtils { + private static final Log log = LogFactory.getLog(TransportUtils.class); + + // The Signature Algorithm used. + private static final String SIGNATURE_ALG = "SHA1withRSA"; + // The Encryption Algorithm and the Padding used. + private static final String CIPHER_PADDING = "RSA/ECB/PKCS1Padding"; + + + /** + * Encrypts the message with the key that's passed in. + * + * @param message the message to be encrypted. + * @param encryptionKey the key to use for the encryption of the message. + * @return the encrypted message in String format. + * @throws TransportHandlerException if an error occurs with the encryption flow which can be due to Padding + * issues, encryption key being invalid or the algorithm used is unrecognizable. + */ + public static String encryptMessage(String message, Key encryptionKey) throws TransportHandlerException { + Cipher encrypter; + byte[] cipherData; + + try { + encrypter = Cipher.getInstance(CIPHER_PADDING); + encrypter.init(Cipher.ENCRYPT_MODE, encryptionKey); + cipherData = encrypter.doFinal(message.getBytes(StandardCharsets.UTF_8)); + + } catch (NoSuchAlgorithmException e) { + String errorMsg = "Algorithm not found exception occurred for Cipher instance of [" + CIPHER_PADDING + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (NoSuchPaddingException e) { + String errorMsg = "No Padding error occurred for Cipher instance of [" + CIPHER_PADDING + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (InvalidKeyException e) { + String errorMsg = "InvalidKey exception occurred for encryptionKey \n[\n" + encryptionKey + "\n]\n"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (BadPaddingException e) { + String errorMsg = "Bad Padding error occurred for Cipher instance of [" + CIPHER_PADDING + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (IllegalBlockSizeException e) { + String errorMsg = "Illegal blockSize error occurred for Cipher instance of [" + CIPHER_PADDING + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } + + return Base64.encodeBase64String(cipherData); + } + +///TODO:: Exception needs to change according to the common package + /** + * Signed a given message using the PrivateKey that's passes in. + * + * @param message the message to be signed. Ideally some encrypted payload. + * @param signatureKey the PrivateKey with which the message is to be signed. + * @return the Base64Encoded String of the signed payload. + * @throws TransportHandlerException if some error occurs with the signing process which may be related to the + * signature algorithm used or the key used for signing. + */ + public static String signMessage(String message, PrivateKey signatureKey) throws TransportHandlerException { + + Signature signature; + String signedEncodedString; + + try { + signature = Signature.getInstance(SIGNATURE_ALG); + signature.initSign(signatureKey); + signature.update(Base64.decodeBase64(message)); + + byte[] signatureBytes = signature.sign(); + signedEncodedString = Base64.encodeBase64String(signatureBytes); + + } catch (NoSuchAlgorithmException e) { + String errorMsg = + "Algorithm not found exception occurred for Signature instance of [" + SIGNATURE_ALG + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (SignatureException e) { + String errorMsg = "Signature exception occurred for Signature instance of [" + SIGNATURE_ALG + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (InvalidKeyException e) { + String errorMsg = "InvalidKey exception occurred for signatureKey \n[\n" + signatureKey + "\n]\n"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } + + return signedEncodedString; + } + + + /** + * Verifies some signed-data against the a Public-Key to ensure that it was produced by the holder of the + * corresponding Private Key. + * + * @param data the actual payoad which was signed by some Private Key. + * @param signedData the signed data produced by signing the payload using a Private Key. + * @param verificationKey the corresponding Public Key which is an exact pair of the Private-Key with we expect + * the data to be signed by. + * @return true if the signed data verifies to be signed by the corresponding Private Key. + * @throws TransportHandlerException if some error occurs with the verification process which may be related to + * the signature algorithm used or the key used for signing. + */ + public static boolean verifySignature(String data, String signedData, PublicKey verificationKey) + throws TransportHandlerException { + + Signature signature; + boolean verified; + + try { + signature = Signature.getInstance(SIGNATURE_ALG); + signature.initVerify(verificationKey); + signature.update(Base64.decodeBase64(data)); + + verified = signature.verify(Base64.decodeBase64(signedData)); + + } catch (NoSuchAlgorithmException e) { + String errorMsg = + "Algorithm not found exception occurred for Signature instance of [" + SIGNATURE_ALG + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (SignatureException e) { + String errorMsg = "Signature exception occurred for Signature instance of [" + SIGNATURE_ALG + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (InvalidKeyException e) { + String errorMsg = "InvalidKey exception occurred for signatureKey \n[\n" + verificationKey + "\n]\n"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } + + return verified; + } + + + /** + * Encrypts the message with the key that's passed in. + * + * @param encryptedMessage the encrypted message that is supposed to be decrypted. + * @param decryptKey the key to use in the decryption process. + * @return the decrypted message in String format. + * @throws TransportHandlerException if an error occurs with the encryption flow which can be due to Padding + * issues, encryption key being invalid or the algorithm used is unrecognizable. + */ + public static String decryptMessage(String encryptedMessage, Key decryptKey) throws TransportHandlerException { + + Cipher decrypter; + String decryptedMessage; + + try { + + decrypter = Cipher.getInstance(CIPHER_PADDING); + decrypter.init(Cipher.DECRYPT_MODE, decryptKey); + decryptedMessage = new String(decrypter.doFinal(Base64.decodeBase64(encryptedMessage)), + StandardCharsets.UTF_8); + + } catch (NoSuchAlgorithmException e) { + String errorMsg = "Algorithm not found exception occurred for Cipher instance of [" + CIPHER_PADDING + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (NoSuchPaddingException e) { + String errorMsg = "No Padding error occurred for Cipher instance of [" + CIPHER_PADDING + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (InvalidKeyException e) { + String errorMsg = "InvalidKey exception occurred for encryptionKey \n[\n" + decryptKey + "\n]\n"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (BadPaddingException e) { + String errorMsg = "Bad Padding error occurred for Cipher instance of [" + CIPHER_PADDING + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (IllegalBlockSizeException e) { + String errorMsg = "Illegal blockSize error occurred for Cipher instance of [" + CIPHER_PADDING + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } + + return decryptedMessage; + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandler.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandler.java new file mode 100644 index 000000000..fa45cdbb0 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandler.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport; + +/** + * This interface consists of the core functionality related to the transport between any device and the server. The + * interface is an abstraction, regardless of the underlying protocol used for the transport. Implementation of this + * interface by any class that caters a specific protocol (ex: HTTP, XMPP, MQTT, CoAP) would ideally have methods + * specific to the protocol used for communication and thees methods that implement the logic related to the devices + * using the protocol. + * + * @param a message type specific to the protocol implemented + */ +public interface TransportHandler { + int DEFAULT_TIMEOUT_INTERVAL = 5000; // millis ~ 10 sec + + void connect(); + + boolean isConnected(); + + //TODO:: Any errors needs to be thrown ahead + void processIncomingMessage(T message, String... messageParams); + + void processIncomingMessage(); + + void publishDeviceData(String... publishData); + + void publishDeviceData(); + + void disconnect(); +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandlerException.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandlerException.java new file mode 100644 index 000000000..9ae69a998 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandlerException.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport; + +public class TransportHandlerException extends Exception { + private static final long serialVersionUID = 2736466230451105440L; + + private String errorMessage; + + public String getErrorMessage() { + return errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + public TransportHandlerException(String msg, Exception nestedEx) { + super(msg, nestedEx); + setErrorMessage(msg); + } + + public TransportHandlerException(String message, Throwable cause) { + super(message, cause); + setErrorMessage(message); + } + + public TransportHandlerException(String msg) { + super(msg); + setErrorMessage(msg); + } + + public TransportHandlerException() { + super(); + } + + public TransportHandlerException(Throwable cause) { + super(cause); + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java new file mode 100644 index 000000000..11ebc04bf --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java @@ -0,0 +1,302 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentConstants; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandlerException; + +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.DatagramSocket; +import java.net.HttpURLConnection; +import java.net.InetAddress; +import java.net.MalformedURLException; +import java.net.NetworkInterface; +import java.net.ServerSocket; +import java.net.SocketException; +import java.net.URL; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Map; +import java.util.Random; + +public class TransportUtils { + private static final Log log = LogFactory.getLog(TransportUtils.class); + + public static final int MIN_PORT_NUMBER = 9000; + public static final int MAX_PORT_NUMBER = 11000; + + /** + * Given a server endpoint as a String, this method splits it into Protocol, Host and Port + * + * @param ipString a network endpoint in the format - '://:' + * @return a map with keys "Protocol", "Host" & "Port" for the related values from the ipString + * @throws TransportHandlerException + */ + public static Map getHostAndPort(String ipString) + throws TransportHandlerException { + Map ipPortMap = new HashMap(); + String[] ipPortArray = ipString.split(":"); + + if (ipPortArray.length != 3) { + String errorMsg = + "The IP String - '" + ipString + + "' is invalid. It needs to be in format '://:'."; + log.info(errorMsg); + throw new TransportHandlerException(errorMsg); + } + + ipPortMap.put(AgentConstants.PROTOCOL_PROPERTY, ipPortArray[0]); + ipPortMap.put(AgentConstants.HOST_PROPERTY, ipPortArray[1].replace("/", "")); + ipPortMap.put(AgentConstants.PORT_PROPERTY, ipPortArray[2]); + return ipPortMap; + } + + /** + * This method validates whether a specific IP Address is of IPv4 type + * + * @param ipAddress the IP Address which needs to be validated + * @return true if it is of IPv4 type and false otherwise + */ + public static boolean validateIPv4(String ipAddress) { + try { + if (ipAddress == null || ipAddress.isEmpty()) { + return false; + } + + String[] parts = ipAddress.split("\\."); + if (parts.length != 4) { + return false; + } + + for (String s : parts) { + int i = Integer.parseInt(s); + if ((i < 0) || (i > 255)) { + return false; + } + } + return !ipAddress.endsWith("."); + + } catch (NumberFormatException nfe) { + log.warn("The IP Address: " + ipAddress + " could not be validated against IPv4-style"); + return false; + } + } + + + public static Map getInterfaceIPMap() throws TransportHandlerException { + + Map interfaceToIPMap = new HashMap(); + Enumeration networkInterfaces; + String networkInterfaceName = ""; + String ipAddress; + + try { + networkInterfaces = NetworkInterface.getNetworkInterfaces(); + } catch (SocketException exception) { + String errorMsg = + "Error encountered whilst trying to get the list of network-interfaces"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, exception); + } + + try { + for (; networkInterfaces.hasMoreElements(); ) { + networkInterfaceName = networkInterfaces.nextElement().getName(); + + if (log.isDebugEnabled()) { + log.debug("Network Interface: " + networkInterfaceName); + log.debug("------------------------------------------"); + } + + Enumeration interfaceIPAddresses = NetworkInterface.getByName( + networkInterfaceName).getInetAddresses(); + + for (; interfaceIPAddresses.hasMoreElements(); ) { + ipAddress = interfaceIPAddresses.nextElement().getHostAddress(); + + if (log.isDebugEnabled()) { + log.debug("IP Address: " + ipAddress); + } + + if (TransportUtils.validateIPv4(ipAddress)) { + interfaceToIPMap.put(networkInterfaceName, ipAddress); + } + } + + if (log.isDebugEnabled()) { + log.debug("------------------------------------------"); + } + } + } catch (SocketException exception) { + String errorMsg = + "Error encountered whilst trying to get the IP Addresses of the network " + + "interface: " + networkInterfaceName; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, exception); + } + + return interfaceToIPMap; + } + + + /** + * Attempts to find a free port between the MIN_PORT_NUMBER(9000) and MAX_PORT_NUMBER(11000). + * Tries 'RANDOMLY picked' port numbers between this range up-until "randomAttempts" number of + * times. If still fails, then tries each port in descending order from the MAX_PORT_NUMBER + * whilst skipping already attempted ones via random selection. + * + * @param randomAttempts no of times to TEST port numbers picked randomly over the given range + * @return an available/free port + */ + public static synchronized int getAvailablePort(int randomAttempts) { + ArrayList failedPorts = new ArrayList(randomAttempts); + + Random randomNum = new Random(); + int randomPort = MAX_PORT_NUMBER; + + while (randomAttempts > 0) { + randomPort = randomNum.nextInt(MAX_PORT_NUMBER - MIN_PORT_NUMBER) + MIN_PORT_NUMBER; + + if (checkIfPortAvailable(randomPort)) { + return randomPort; + } + failedPorts.add(randomPort); + randomAttempts--; + } + + randomPort = MAX_PORT_NUMBER; + + while (true) { + if (!failedPorts.contains(randomPort) && checkIfPortAvailable(randomPort)) { + return randomPort; + } + randomPort--; + } + } + + + private static boolean checkIfPortAvailable(int port) { + ServerSocket tcpSocket = null; + DatagramSocket udpSocket = null; + + try { + tcpSocket = new ServerSocket(port); + tcpSocket.setReuseAddress(true); + + udpSocket = new DatagramSocket(port); + udpSocket.setReuseAddress(true); + return true; + } catch (IOException ex) { + // denotes the port is in use + } finally { + if (tcpSocket != null) { + try { + tcpSocket.close(); + } catch (IOException e) { + /* not to be thrown */ + } + } + + if (udpSocket != null) { + udpSocket.close(); + } + } + + return false; + } + + + /** + * This is a utility method that creates and returns a HTTP connection object. + * + * @param urlString the URL pattern to which the connection needs to be created + * @return an HTTPConnection object which cn be used to send HTTP requests + * @throws TransportHandlerException if errors occur when creating the HTTP connection with + * the given URL string + */ + public static HttpURLConnection getHttpConnection(String urlString) throws + TransportHandlerException { + URL connectionUrl; + HttpURLConnection httpConnection; + + try { + connectionUrl = new URL(urlString); + httpConnection = (HttpURLConnection) connectionUrl.openConnection(); + } catch (MalformedURLException e) { + String errorMsg = "Error occured whilst trying to form HTTP-URL from string: " + urlString; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (IOException exception) { + String errorMsg = "Error occured whilst trying to open a connection to: " + urlString; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, exception); + } + return httpConnection; + } + + /** + * This is a utility method that reads and returns the response from a HTTP connection + * + * @param httpConnection the connection from which a response is expected + * @return the response (as a string) from the given HTTP connection + * @throws TransportHandlerException if any errors occur whilst reading the response from + * the connection stream + */ + public static String readResponseFromHttpRequest(HttpURLConnection httpConnection) + throws TransportHandlerException { + BufferedReader bufferedReader; + try { + bufferedReader = new BufferedReader(new InputStreamReader( + httpConnection.getInputStream(), StandardCharsets.UTF_8)); + } catch (IOException exception) { + String errorMsg = "There is an issue with connecting the reader to the input stream at: " + + httpConnection.getURL(); + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, exception); + } + + String responseLine; + StringBuilder completeResponse = new StringBuilder(); + + try { + while ((responseLine = bufferedReader.readLine()) != null) { + completeResponse.append(responseLine); + } + } catch (IOException exception) { + String errorMsg = "Error occured whilst trying read from the connection stream at: " + + httpConnection.getURL(); + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, exception); + } + try { + bufferedReader.close(); + } catch (IOException exception) { + log.error("Could not succesfully close the bufferedReader to the connection at: " + httpConnection.getURL()); + } + return completeResponse.toString(); + } + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/http/HTTPTransportHandler.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/http/HTTPTransportHandler.java new file mode 100644 index 000000000..c771eb8ed --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/http/HTTPTransportHandler.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.http; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.eclipse.jetty.server.Server; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandler; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportUtils; + +/** + * This is an abstract class that implements the "TransportHandler" interface. The interface is an abstraction for + * the core functionality with regards to device-server communication regardless of the Transport protocol. This + * specific class contains the HTTP-Transport specific implementations. The class implements utility methods for the + * case of a HTTP communication. However, this "abstract class", even-though it implements the "TransportHandler" + * interface, does not contain the logic relevant to the interface methods. The specific functionality of the + * interface methods are intended to be implemented by the concrete class that extends this abstract class and + * utilizes the HTTP specific functionality (ideally a device API writer who would like to communicate to the device + * via HTTP Protocol). + */ +public abstract class HTTPTransportHandler implements TransportHandler { + private static final Log log = LogFactory.getLog(HTTPTransportHandler.class); + + protected Server server; + protected int port; + protected int timeoutInterval; + + protected HTTPTransportHandler() { + this.port = TransportUtils.getAvailablePort(10); + this.server = new Server(port); + timeoutInterval = DEFAULT_TIMEOUT_INTERVAL; + } + + protected HTTPTransportHandler(int port) { + this.port = port; + this.server = new Server(this.port); + timeoutInterval = DEFAULT_TIMEOUT_INTERVAL; + } + + protected HTTPTransportHandler(int port, int timeoutInterval) { + this.port = port; + this.server = new Server(this.port); + this.timeoutInterval = timeoutInterval; + } + + public void setTimeoutInterval(int timeoutInterval) { + this.timeoutInterval = timeoutInterval; + } + + /** + * Checks whether the HTTP server is up and listening for incoming requests. + * + * @return true if the server is up & listening for requests, else false. + */ + public boolean isConnected() { + return server.isStarted(); + } + + + protected void incrementPort() { + this.port = this.port + 1; + server = new Server(port); + } + + /** + * Shuts-down the HTTP Server. + */ + public void closeConnection() throws Exception { + if (server != null && isConnected()) { + server.stop(); + } + } + + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/mqtt/MQTTTransportHandler.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/mqtt/MQTTTransportHandler.java new file mode 100644 index 000000000..f7c6864c1 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/mqtt/MQTTTransportHandler.java @@ -0,0 +1,361 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.mqtt; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken; +import org.eclipse.paho.client.mqttv3.MqttCallback; +import org.eclipse.paho.client.mqttv3.MqttClient; +import org.eclipse.paho.client.mqttv3.MqttConnectOptions; +import org.eclipse.paho.client.mqttv3.MqttException; +import org.eclipse.paho.client.mqttv3.MqttMessage; +import org.eclipse.paho.client.mqttv3.MqttSecurityException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandler; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandlerException; + +import java.io.File; +import java.nio.charset.StandardCharsets; + +/** + * This is an abstract class that implements the "TransportHandler" interface. The interface is an abstraction for + * the core functionality with regards to device-server communication regardless of the Transport protocol. This + * specific class contains the HTTP-Transport specific implementations. The class implements utility methods for the + * case of a HTTP communication. However, this "abstract class", even-though it implements the "TransportHandler" + * interface, does not contain the logic relevant to the interface methods. The specific functionality of the + * interface methods are intended to be implemented by the concrete class that extends this abstract class and + * utilizes the HTTP specific functionality (ideally a device API writer who would like to communicate to the device + * via HTTP Protocol). + *

+ * This class contains the Device-Management specific implementation for all the MQTT functionality. This includes + * connecting to a MQTT Broker & subscribing to the appropriate MQTT-topic, action plan upon losing connection or + * successfully delivering a message to the broker and processing incoming messages. Makes use of the 'Paho-MQTT' + * library provided by Eclipse Org. + */ +public abstract class MQTTTransportHandler + implements MqttCallback, TransportHandler { + private static final Log log = LogFactory.getLog(MQTTTransportHandler.class); + public static final int DEFAULT_MQTT_QUALITY_OF_SERVICE = 0; + + private MqttClient client; + private String clientId; + private MqttConnectOptions options; + private String clientWillTopic; + + protected String mqttBrokerEndPoint; + protected int timeoutInterval; + protected String subscribeTopic; + + /** + * Constructor for the MQTTTransportHandler which takes in the owner, type of the device + * and the MQTT Broker URL and the topic to subscribe. + * + * @param deviceOwner the owner of the device. + * @param deviceType the CDMF Device-Type of the device. + * @param mqttBrokerEndPoint the IP/URL of the MQTT broker endpoint. + * @param subscribeTopic the MQTT topic to which the client is to be subscribed + */ + protected MQTTTransportHandler(String deviceOwner, String deviceType, + String mqttBrokerEndPoint, + String subscribeTopic) { + this.clientId = deviceOwner + ":" + deviceType; + this.subscribeTopic = subscribeTopic; + this.clientWillTopic = deviceType + File.separator + "disconnection"; + this.mqttBrokerEndPoint = mqttBrokerEndPoint; + this.timeoutInterval = DEFAULT_TIMEOUT_INTERVAL; + this.initSubscriber(); + } + + /** + * Constructor for the MQTTTransportHandler which takes in the owner, type of the device + * and the MQTT Broker URL and the topic to subscribe. Additionally this constructor takes in + * the reconnection-time interval between successive attempts to connect to the broker. + * + * @param deviceOwner the owner of the device. + * @param deviceType the CDMF Device-Type of the device. + * @param mqttBrokerEndPoint the IP/URL of the MQTT broker endpoint. + * @param subscribeTopic the MQTT topic to which the client is to be subscribed + * @param intervalInMillis the time interval in MILLI-SECONDS between successive + * attempts to connect to the broker. + */ + protected MQTTTransportHandler(String deviceOwner, String deviceType, + String mqttBrokerEndPoint, String subscribeTopic, + int intervalInMillis) { + this.clientId = deviceOwner + ":" + deviceType; + this.subscribeTopic = subscribeTopic; + //TODO:: Use constant strings + this.clientWillTopic = deviceType + File.separator + "disconnection"; + this.mqttBrokerEndPoint = mqttBrokerEndPoint; + this.timeoutInterval = intervalInMillis; + this.initSubscriber(); + } + + public void setTimeoutInterval(int timeoutInterval) { + this.timeoutInterval = timeoutInterval; + } + + /** + * Initializes the MQTT-Client. Creates a client using the given MQTT-broker endpoint and the + * clientId (which is constructed by a concatenation of [deviceOwner]:[deviceType]). Also sets + * the client's options parameter with the clientWillTopic (in-case of connection failure) and + * other info. Also sets the call-back this current class. + */ + private void initSubscriber() { + try { + client = new MqttClient(this.mqttBrokerEndPoint, clientId, null); + //TODO:: Need to check for debug + log.info("MQTT subscriber was created with ClientID : " + clientId); + } catch (MqttException ex) { + //TODO:: Remove unnecessary formatting and print exception + String errorMsg = "MQTT Client Error\n" + "\tReason: " + ex.getReasonCode() + + "\n\tMessage: " + ex.getMessage() + "\n\tLocalMsg: " + + ex.getLocalizedMessage() + "\n\tCause: " + ex.getCause() + + "\n\tException: " + ex; + log.error(errorMsg); + //TODO:: Throw the error out + } + + options = new MqttConnectOptions(); + options.setCleanSession(false); + //TODO:: Use constant strings + options.setWill(clientWillTopic, "Connection-Lost".getBytes(StandardCharsets.UTF_8), 2, + true); + client.setCallback(this); + } + + /** + * Checks whether the connection to the MQTT-Broker persists. + * + * @return true if the client is connected to the MQTT-Broker, else false. + */ + @Override + public boolean isConnected() { + return client.isConnected(); + } + + + protected void connectToQueue(String username, String password) throws TransportHandlerException { + options.setUserName(username); + options.setPassword(password.toCharArray()); + connectToQueue(); + } + + /** + * Connects to the MQTT-Broker and if successfully established connection. + * + * @throws TransportHandlerException in the event of 'Connecting to' the MQTT broker fails. + */ + protected void connectToQueue() throws TransportHandlerException { + try { + client.connect(options); + + if (log.isDebugEnabled()) { + log.debug("Subscriber connected to queue at: " + this.mqttBrokerEndPoint); + } + } catch (MqttSecurityException ex) { + String errorMsg = "MQTT Security Exception when connecting to queue\n" + "\tReason: " + + " " + + ex.getReasonCode() + "\n\tMessage: " + ex.getMessage() + + "\n\tLocalMsg: " + ex.getLocalizedMessage() + "\n\tCause: " + + ex.getCause() + "\n\tException: " + ex; + //TODO:: Compulsory log of errors and remove formatted error + if (log.isDebugEnabled()) { + log.debug(errorMsg); + } + throw new TransportHandlerException(errorMsg, ex); + + } catch (MqttException ex) { + //TODO:: Compulsory log of errors and remove formatted error + String errorMsg = "MQTT Exception when connecting to queue\n" + "\tReason: " + + ex.getReasonCode() + "\n\tMessage: " + ex.getMessage() + + "\n\tLocalMsg: " + ex.getLocalizedMessage() + "\n\tCause: " + + ex.getCause() + "\n\tException: " + ex; + if (log.isDebugEnabled()) { + log.debug(errorMsg); + } + throw new TransportHandlerException(errorMsg, ex); + } + } + + /** + * Subscribes to the MQTT-Topic specific to this MQTT Client. (The MQTT-Topic specific to the + * device is taken in as a constructor parameter of this class) . + * + * @throws TransportHandlerException in the event of 'Subscribing to' the MQTT broker + * fails. + */ + protected void subscribeToQueue() throws TransportHandlerException { + try { + //TODO:: QoS Level take it from a variable + client.subscribe(subscribeTopic, 0); + log.info("Subscriber '" + clientId + "' subscribed to topic: " + subscribeTopic); + } catch (MqttException ex) { + //TODO:: Compulsory log of errors and remove formatted error + String errorMsg = "MQTT Exception when trying to subscribe to topic: " + + subscribeTopic + "\n\tReason: " + ex.getReasonCode() + + "\n\tMessage: " + ex.getMessage() + "\n\tLocalMsg: " + + ex.getLocalizedMessage() + "\n\tCause: " + ex.getCause() + + "\n\tException: " + ex; + if (log.isDebugEnabled()) { + log.debug(errorMsg); + } + + throw new TransportHandlerException(errorMsg, ex); + } + } + + + /** + * This method is used to publish reply-messages for the control signals received. + * Invocation of this method calls its overloaded-method with a QoS equal to that of the + * default value. + * + * @param topic the topic to which the reply message is to be published. + * @param payLoad the reply-message (payload) of the MQTT publish action. + */ + protected void publishToQueue(String topic, String payLoad) + throws TransportHandlerException { + publishToQueue(topic, payLoad, DEFAULT_MQTT_QUALITY_OF_SERVICE, false); + } + + /** + * This is an overloaded method that publishes MQTT reply-messages for control signals + * received form the IoT-Server. + * + * @param topic the topic to which the reply message is to be published + * @param payLoad the reply-message (payload) of the MQTT publish action. + * @param qos the Quality-of-Service of the current publish action. + * Could be 0(At-most once), 1(At-least once) or 2(Exactly once) + */ + protected void publishToQueue(String topic, String payLoad, int qos, boolean retained) + throws TransportHandlerException { + try { + client.publish(topic, payLoad.getBytes(StandardCharsets.UTF_8), qos, retained); + if (log.isDebugEnabled()) { + log.debug("Message: " + payLoad + " to MQTT topic [" + topic + "] published successfully"); + } + } catch (MqttException ex) { + String errorMsg = + "MQTT Client Error" + "\n\tReason: " + ex.getReasonCode() + "\n\tMessage: " + + ex.getMessage() + "\n\tLocalMsg: " + ex.getLocalizedMessage() + + "\n\tCause: " + ex.getCause() + "\n\tException: " + ex; + log.info(errorMsg); + throw new TransportHandlerException(errorMsg, ex); + } + } + + + protected void publishToQueue(String topic, MqttMessage message) + throws TransportHandlerException { + try { + client.publish(topic, message); + if (log.isDebugEnabled()) { + log.debug("Message: " + message.toString() + " to MQTT topic [" + topic + "] published successfully"); + } + } catch (MqttException ex) { + //TODO:: Compulsory log of errors and remove formatted error + String errorMsg = + "MQTT Client Error" + "\n\tReason: " + ex.getReasonCode() + "\n\tMessage: " + + ex.getMessage() + "\n\tLocalMsg: " + ex.getLocalizedMessage() + + "\n\tCause: " + ex.getCause() + "\n\tException: " + ex; + log.info(errorMsg); + throw new TransportHandlerException(errorMsg, ex); + } + } + + + /** + * Callback method which is triggered once the MQTT client losers its connection to the broker. + * Spawns a new thread that executes necessary actions to try and reconnect to the endpoint. + * + * @param throwable a Throwable Object containing the details as to why the failure occurred. + */ + @Override + public void connectionLost(Throwable throwable) { + log.warn("Lost Connection for client: " + this.clientId + + " to " + this.mqttBrokerEndPoint + ".\nThis was due to - " + throwable.getMessage()); + + Thread reconnectThread = new Thread() { + public void run() { + connect(); + } + }; + reconnectThread.start(); + } + + /** + * Callback method which is triggered upon receiving a MQTT Message from the broker. Spawns a + * new thread that executes any actions to be taken with the received message. + * + * @param topic the MQTT-Topic to which the received message was published to and the + * client was subscribed to. + * @param mqttMessage the actual MQTT-Message that was received from the broker. + */ + @Override + public void messageArrived(final String topic, final MqttMessage mqttMessage) { + if (log.isDebugEnabled()) { + log.info("Got an MQTT message '" + mqttMessage.toString() + "' for topic '" + topic + "'."); + } + + Thread messageProcessorThread = new Thread() { + public void run() { + processIncomingMessage(mqttMessage, topic); + } + }; + messageProcessorThread.setDaemon(true); + messageProcessorThread.start(); + } + + /** + * Callback method which gets triggered upon successful completion of a message delivery to + * the broker. + * + * @param iMqttDeliveryToken the MQTT-DeliveryToken which includes the details about the + * specific message delivery. + */ + @Override + public void deliveryComplete(IMqttDeliveryToken iMqttDeliveryToken) { + String message = ""; + try { + message = iMqttDeliveryToken.getMessage().toString(); + } catch (MqttException e) { + //TODO:: Throw errors + log.error( + "Error occurred whilst trying to read the message from the MQTT delivery token."); + } + String topic = iMqttDeliveryToken.getTopics()[0]; + String client = iMqttDeliveryToken.getClient().getClientId(); + + if (log.isDebugEnabled()) { + log.debug("Message - '" + message + "' of client [" + client + "] for the topic (" + + topic + ") was delivered successfully."); + } + } + + /** + * Closes the connection to the MQTT Broker. + */ + public void closeConnection() throws MqttException { + if (client != null && isConnected()) { + client.disconnect(); + } + } +} + diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/xmpp/XMPPTransportHandler.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/xmpp/XMPPTransportHandler.java new file mode 100644 index 000000000..4ac76f45b --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/xmpp/XMPPTransportHandler.java @@ -0,0 +1,366 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.xmpp; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.jivesoftware.smack.ConnectionConfiguration; +import org.jivesoftware.smack.PacketListener; +import org.jivesoftware.smack.SmackConfiguration; +import org.jivesoftware.smack.XMPPConnection; +import org.jivesoftware.smack.XMPPException; +import org.jivesoftware.smack.filter.AndFilter; +import org.jivesoftware.smack.filter.FromContainsFilter; +import org.jivesoftware.smack.filter.OrFilter; +import org.jivesoftware.smack.filter.PacketFilter; +import org.jivesoftware.smack.filter.PacketTypeFilter; +import org.jivesoftware.smack.filter.ToContainsFilter; +import org.jivesoftware.smack.packet.Message; +import org.jivesoftware.smack.packet.Packet; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandler; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandlerException; + +/** + * This is an abstract class that implements the "TransportHandler" interface. The interface is an abstraction for + * the core functionality with regards to device-server communication regardless of the Transport protocol. This + * specific class contains the HTTP-Transport specific implementations. The class implements utility methods for the + * case of a HTTP communication. However, this "abstract class", even-though it implements the "TransportHandler" + * interface, does not contain the logic relevant to the interface methods. The specific functionality of the + * interface methods are intended to be implemented by the concrete class that extends this abstract class and + * utilizes the HTTP specific functionality (ideally a device API writer who would like to communicate to the device + * via HTTP Protocol). + *

+ * This class contains the IoT-Server specific implementation for all the XMPP functionality. This includes + * connecting to a XMPP Server & Login-In using the device's/server's XMPP-Account, Setting listeners and filters on + * incoming XMPP messages and Sending XMPP replies for messages received. Makes use of the 'Smack-XMPP' library + * provided by jivesoftware/igniterealtime. + */ +public abstract class XMPPTransportHandler implements TransportHandler { + private static final Log log = LogFactory.getLog(XMPPTransportHandler.class); + + protected String server; + protected int timeoutInterval; // millis + + //TODO:: Shouldnt be hard-coded. Need to be read from configs + private static final int DEFAULT_XMPP_PORT = 5222; + private XMPPConnection connection; + private int port; + private ConnectionConfiguration config; + private PacketFilter filter; + private PacketListener listener; + + + /** + * Constructor for XMPPTransportHandler passing only the server-IP. + * + * @param server the IP of the XMPP server. + */ + protected XMPPTransportHandler(String server) { + this.server = server; + this.port = DEFAULT_XMPP_PORT; + this.timeoutInterval = DEFAULT_TIMEOUT_INTERVAL; + initXMPPClient(); + } + + /** + * Constructor for XMPPTransportHandler passing server-IP and the XMPP-port. + * + * @param server the IP of the XMPP server. + * @param port the XMPP server's port to connect to. (default - 5222) + */ + protected XMPPTransportHandler(String server, int port) { + this.server = server; + this.port = port; + this.timeoutInterval = DEFAULT_TIMEOUT_INTERVAL; + initXMPPClient(); + } + + /** + * Constructor for XMPPTransportHandler passing server-IP, the XMPP-port and the + * timeoutInterval used by listeners to the server and for reconnection schedules. + * + * @param server the IP of the XMPP server. + * @param port the XMPP server's port to connect to. (default - 5222) + * @param timeoutInterval the timeout interval to use for the connection and reconnection + */ + protected XMPPTransportHandler(String server, int port, int timeoutInterval) { + this.server = server; + this.port = port; + this.timeoutInterval = timeoutInterval; + initXMPPClient(); + } + + /** + * Sets the client's time-out-limit whilst waiting for XMPP-replies from server. + * + * @param millis the time in millis to be set as the time-out-limit whilst waiting for a + * XMPP-reply. + */ + public void setTimeoutInterval(int millis) { + this.timeoutInterval = millis; + } + + /** + * Checks whether the connection to the XMPP-Server persists. + * + * @return true if the client is connected to the XMPP-Server, else false. + */ + @Override + public boolean isConnected() { + return connection.isConnected(); + } + + /** + * Initializes the XMPP Client. Sets the time-out-limit whilst waiting for XMPP-replies from + * server. Sets the XMPP configurations to connect to the server and creates the + * XMPPConnection object used for connecting and Logging-In. + */ + private void initXMPPClient() { + log.info(String.format("Initializing connection to XMPP Server at %1$s via port " + + "%2$d.", server, port)); + SmackConfiguration.setPacketReplyTimeout(timeoutInterval); + config = new ConnectionConfiguration(server, port); +// TODO:: Need to enable SASL-Authentication appropriately + config.setSASLAuthenticationEnabled(false); + config.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled); + connection = new XMPPConnection(config); + } + +//TODO:: Re-check all exception handling + + /** + * Connects to the XMPP-Server and if attempt unsuccessful, then throws exception. + * + * @throws TransportHandlerException in the event of 'Connecting to' the XMPP server fails. + */ + protected void connectToServer() throws TransportHandlerException { + try { + connection.connect(); + log.info(String.format("Connection to XMPP Server at %1$s established successfully......", server)); + + } catch (XMPPException xmppExcepion) { + String errorMsg = "Connection attempt to the XMPP Server at " + server + " via port " + port + " failed."; + log.info(errorMsg); + throw new TransportHandlerException(errorMsg, xmppExcepion); + } + } + + /** + * If successfully established connection, then tries to Log in using the device's XMPP + * Account credentials. + * + * @param username the username of the device's XMPP-Account. + * @param password the password of the device's XMPP-Account. + * @param resource the resource the resource, specific to the XMPP-Account to which the login + * is made to + * @throws TransportHandlerException in the event of 'Logging into' the XMPP server fails. + */ + protected void loginToServer(String username, String password, String resource) + throws TransportHandlerException { + if (isConnected()) { + try { + if (resource == null) { + connection.login(username, password); + log.info(String.format("Logged into XMPP Server at %1$s as user %2$s......", server, username)); + } else { + connection.login(username, password, resource); + log.info(String.format("Logged into XMPP Server at %1$s as user %2$s on resource %3$s......", + server, username, resource)); + } + } catch (XMPPException xmppException) { + String errorMsg = + "Login attempt to the XMPP Server at " + server + " with username - " + username + " failed."; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, xmppException); + } + } else { + String errorMsg = "Not connected to XMPP-Server to attempt Login. Please 'connectToServer' before Login"; + throw new TransportHandlerException(errorMsg); + } + } + + + /** + * Sets a filter for all the incoming XMPP-Messages on the Sender's JID (XMPP-Account ID). + * Also creates a listener for the incoming messages and connects the listener to the + * XMPPConnection alongside the set filter. + * + * @param senderJID the JID (XMPP-Account ID of the sender) to which the filter is to be set. + */ + protected void setFilterOnSender(String senderJID) { + filter = new AndFilter(new PacketTypeFilter(Message.class), new FromContainsFilter( + senderJID)); + listener = new PacketListener() { + @Override + public void processPacket(Packet packet) { + if (packet instanceof Message) { + final Message xmppMessage = (Message) packet; + Thread msgProcessThread = new Thread() { + public void run() { + processIncomingMessage(xmppMessage); + } + }; + msgProcessThread.setDaemon(true); + msgProcessThread.start(); + } + } + }; + + connection.addPacketListener(listener, filter); + } + + + /** + * Sets a filter for all the incoming XMPP-Messages on the Receiver's JID (XMPP-Account ID). + * Also creates a listener for the incoming messages and connects the listener to the + * XMPPConnection alongside the set filter. + * + * @param receiverJID the JID (XMPP-Account ID of the receiver) to which the filter is to be + * set. + */ + protected void setFilterOnReceiver(String receiverJID) { + filter = new AndFilter(new PacketTypeFilter(Message.class), new ToContainsFilter( + receiverJID)); + listener = new PacketListener() { + @Override + public void processPacket(Packet packet) { + if (packet instanceof Message) { + final Message xmppMessage = (Message) packet; + Thread msgProcessThread = new Thread() { + public void run() { + processIncomingMessage(xmppMessage); + } + }; + msgProcessThread.setDaemon(true); + msgProcessThread.start(); + } + } + }; + + connection.addPacketListener(listener, filter); + } + + + /** + * Sets a filter for all the incoming XMPP-Messages on the From-JID & To-JID (XMPP-Account IDs) + * passed in. Also creates a listener for the incoming messages and connects the listener to + * the XMPPConnection alongside the set filter. + * + * @param senderJID the From-JID (XMPP-Account ID) to which the filter is to be set. + * @param receiverJID the To-JID (XMPP-Account ID) to which the filter is to be set. + * @param andCondition if true: then filter is set with 'AND' operator (senderJID && + * receiverJID), + * if false: then the filter is set with 'OR' operator (senderJID | + * receiverJID) + */ + protected void setMessageFilterAndListener(String senderJID, String receiverJID, boolean + andCondition) { + PacketFilter jidFilter; + + if (andCondition) { + jidFilter = new AndFilter(new FromContainsFilter(senderJID), new ToContainsFilter( + receiverJID)); + } else { + jidFilter = new OrFilter(new FromContainsFilter(senderJID), new ToContainsFilter( + receiverJID)); + } + + filter = new AndFilter(new PacketTypeFilter(Message.class), jidFilter); + listener = new PacketListener() { + @Override + public void processPacket(Packet packet) { + if (packet instanceof Message) { + final Message xmppMessage = (Message) packet; + Thread msgProcessThread = new Thread() { + public void run() { + processIncomingMessage(xmppMessage); + } + }; + msgProcessThread.setDaemon(true); + msgProcessThread.start(); + } + } + }; + + connection.addPacketListener(listener, filter); + } + + + /** + * Sends an XMPP message. Calls the overloaded method with Subject set to "Reply-From-Device" + * + * @param JID the JID (XMPP Account ID) to which the message is to be sent to. + * @param message the XMPP-Message that is to be sent. + */ + protected void sendXMPPMessage(String JID, String message) { + sendXMPPMessage(JID, message, "XMPP-Message"); + } + + + /** + * Overloaded method to send an XMPP message. Includes the subject to be mentioned in the + * message that is sent. + * + * @param JID the JID (XMPP Account ID) to which the message is to be sent to. + * @param message the XMPP-Message that is to be sent. + * @param subject the subject that the XMPP-Message would carry. + */ + protected void sendXMPPMessage(String JID, String message, String subject) { + Message xmppMessage = new Message(); + xmppMessage.setTo(JID); + xmppMessage.setSubject(subject); + xmppMessage.setBody(message); + xmppMessage.setType(Message.Type.chat); + sendXMPPMessage(JID, xmppMessage); + } + + + /** + * Sends an XMPP message. + * + * @param JID the JID (XMPP Account ID) to which the message is to be sent to. + * @param xmppMessage the XMPP-Message that is to be sent. + */ + protected void sendXMPPMessage(String JID, Message xmppMessage) { + connection.sendPacket(xmppMessage); + if (log.isDebugEnabled()) { + log.debug("Message: '" + xmppMessage.getBody() + "' sent to XMPP JID [" + JID + + "] sent successfully."); + } + } + + + /** + * Disables default debugger provided by the XMPPConnection. + */ + protected void disableDebugger() { + connection.DEBUG_ENABLED = false; + } + + + /** + * Closes the connection to the XMPP Server. + */ + public void closeConnection() { + if (connection != null && isConnected()) { + connection.disconnect(); + } + } + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java new file mode 100644 index 000000000..3b777cf75 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java @@ -0,0 +1,213 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.virtual; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentConstants; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentUtilOperations; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.virtual.ui.AgentUI; + +import javax.sound.midi.InvalidMidiDataException; +import javax.sound.midi.MidiSystem; +import javax.sound.midi.MidiUnavailableException; +import javax.sound.midi.Sequence; +import javax.sound.midi.Sequencer; +import javax.sound.sampled.Clip; +import javax.swing.*; +import java.io.IOException; +import java.io.InputStream; + +/** + * This class use to emulate virtual hardware functionality + */ +public class VirtualHardwareManager { + + private static final Log log = LogFactory.getLog(VirtualHardwareManager.class); + + private static VirtualHardwareManager virtualHardwareManager; + + private AgentUI agentUI; + private Sequencer sequencer = null; + + private int temperature = 30, humidity = 30; + private int temperatureMin = 20, temperatureMax = 50, humidityMin = 20, humidityMax = 50; + private int temperatureSVF = 50, humiditySVF = 50; + private boolean isTemperatureRandomized, isHumidityRandomized; + private boolean isTemperatureSmoothed, isHumiditySmoothed; + + private VirtualHardwareManager(){ + } + + public static VirtualHardwareManager getInstance(){ + if (virtualHardwareManager == null){ + virtualHardwareManager = new VirtualHardwareManager(); + } + return virtualHardwareManager; + } + + public void init(){ + try { + // Set System L&F for Device UI + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (UnsupportedLookAndFeelException e) { + log.error( + "'UnsupportedLookAndFeelException' error occurred whilst initializing the" + + " Agent UI."); + } catch (ClassNotFoundException e) { + log.error( + "'ClassNotFoundException' error occurred whilst initializing the Agent UI."); + } catch (InstantiationException e) { + log.error( + "'InstantiationException' error occurred whilst initializing the Agent UI."); + } catch (IllegalAccessException e) { + log.error( + "'IllegalAccessException' error occurred whilst initializing the Agent UI."); + } + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + agentUI = new AgentUI(); + agentUI.setVisible(true); + } + }); + setAudioSequencer(); + } + + /** + * Get temperature from emulated device + * @return Temperature + */ + public int getTemperature() { + if (isTemperatureRandomized) { + temperature = getRandom(temperatureMax, temperatureMin, temperature, + isTemperatureSmoothed, temperatureSVF); + agentUI.updateTemperature(temperature); + } + return temperature; + } + + public void setTemperature(int temperature) { + this.temperature = temperature; + } + + /** + * Get humidity from emulated device + * @return Humidity + */ + public int getHumidity() { + if (isHumidityRandomized) { + humidity = getRandom(humidityMax, humidityMin, humidity, isHumiditySmoothed, + humiditySVF); + agentUI.updateHumidity(humidity); + } + return humidity; + } + + public void setHumidity(int humidity) { + this.humidity = humidity; + } + + public void setTemperatureMin(int temperatureMin) { + this.temperatureMin = temperatureMin; + } + + public void setTemperatureMax(int temperatureMax) { + this.temperatureMax = temperatureMax; + } + + public void setHumidityMin(int humidityMin) { + this.humidityMin = humidityMin; + } + + public void setHumidityMax(int humidityMax) { + this.humidityMax = humidityMax; + } + + public void setIsHumidityRandomized(boolean isHumidityRandomized) { + this.isHumidityRandomized = isHumidityRandomized; + } + + public void setIsTemperatureRandomized(boolean isTemperatureRandomized) { + this.isTemperatureRandomized = isTemperatureRandomized; + } + + public void setTemperatureSVF(int temperatureSVF) { + this.temperatureSVF = temperatureSVF; + } + + public void setHumiditySVF(int humiditySVF) { + this.humiditySVF = humiditySVF; + } + + public void setIsTemperatureSmoothed(boolean isTemperatureSmoothed) { + this.isTemperatureSmoothed = isTemperatureSmoothed; + } + + public void setIsHumiditySmoothed(boolean isHumiditySmoothed) { + this.isHumiditySmoothed = isHumiditySmoothed; + } + + public void changeAlarmStatus(boolean isOn) { + agentUI.setAlarmStatus(isOn); + + if (isOn) { + sequencer.start(); + } else { + sequencer.stop(); + } + } + + private int getRandom(int max, int min, int current, boolean isSmoothed, int svf) { + + if (isSmoothed) { + int offset = (max - min) * svf / 100; + double mx = current + offset; + max = (mx > max) ? max : (int) Math.round(mx); + + double mn = current - offset; + min = (mn < min) ? min : (int) Math.round(mn); + } + + double rnd = Math.random() * (max - min) + min; + return (int) Math.round(rnd); + + } + + private void setAudioSequencer() { + InputStream audioSrc = AgentUtilOperations.class.getResourceAsStream( + "/" + AgentConstants.AUDIO_FILE_NAME); + Sequence sequence; + + try { + sequence = MidiSystem.getSequence(audioSrc); + sequencer = MidiSystem.getSequencer(); + sequencer.open(); + sequencer.setSequence(sequence); + } catch (InvalidMidiDataException e) { + log.error("AudioReader: Error whilst setting MIDI Audio reader sequence"); + } catch (IOException e) { + log.error("AudioReader: Error whilst getting audio sequence from stream"); + } catch (MidiUnavailableException e) { + log.error("AudioReader: Error whilst openning MIDI Audio reader sequencer"); + } + + sequencer.setLoopCount(Clip.LOOP_CONTINUOUSLY); + } + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java new file mode 100644 index 000000000..4a9b76c86 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java @@ -0,0 +1,954 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.virtual.ui; + +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentConstants; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.virtual.VirtualHardwareManager; + +import javax.swing.*; +import java.awt.*; +import java.net.URI; +import java.net.URL; + +public class AgentUI extends JFrame { + + private boolean isTemperatureRandomized, isHumidityRandomized; + private boolean isTemperatureSmoothed, isHumiditySmoothed; + + private volatile boolean isAlarmOn = false; + + private JLabel picLabelBulbOn, picLabelBulbOff; + + // Variables declaration - do not modify + private JButton btnControl; + private JButton btnView; + private JCheckBox chkbxEmulate; + private JCheckBox chkbxHumidityRandom; + private JCheckBox chkbxHumiditySmooth; + private JCheckBox chkbxTemperatureRandom; + private JCheckBox chkbxTemperatureSmooth; + private JComboBox cmbInterface; + private JComboBox cmbPeriod; + private JComboBox cmbProtocol; + private JLabel jLabel1; + private JLabel jLabel10; + private JLabel jLabel11; + private JLabel jLabel12; + private JLabel jLabel2; + private JLabel jLabel20; + private JLabel jLabel23; + private JLabel jLabel24; + private JLabel jLabel25; + private JLabel jLabel3; + private JLabel jLabel4; + private JLabel jLabel5; + private JLabel jLabel6; + private JLabel jLabel7; + private JLabel jLabel8; + private JLabel jLabel9; + private JPanel jPanel1; + private JPanel jPanel2; + private JPanel jPanel3; + private JPanel jPanel4; + private JPanel jPanel6; + private JPanel jPanel7; + private JPanel jPanel8; + private JPanel jPanel9; + private JSeparator jSeparator1; + private JSeparator jSeparator5; + private JLabel lblAgentName; + private JLabel lblStatus; + private JPanel pnlBulbStatus; + private JSpinner spinnerHumidity; + private JSpinner spinnerInterval; + private JSpinner spinnerTemperature; + private JTextField txtHumidityMax; + private JTextField txtHumidityMin; + private JTextField txtHumiditySVF; + private JTextField txtTemperatureMax; + private JTextField txtTemperatureMin; + private JTextField txtTemperatureSVF; + // End of variables declaration + + private Runnable uiUpdater = new Runnable() { + @Override + public void run() { + while (true) { + EventQueue.invokeLater(new Runnable() { + @Override + public void run() { + pnlBulbStatus.removeAll(); + pnlBulbStatus.add(isAlarmOn ? picLabelBulbOn : picLabelBulbOff); + pnlBulbStatus.updateUI(); + lblStatus.setText(AgentManager.getInstance().getAgentStatus()); + if (isTemperatureRandomized) { + txtTemperatureMinActionPerformed(null); + txtTemperatureMaxActionPerformed(null); + if (isTemperatureSmoothed) { + txtTemperatureSVFActionPerformed(null); + } + } + if (isHumidityRandomized) { + txtHumidityMinActionPerformed(null); + txtHumidityMaxActionPerformed(null); + if (isHumiditySmoothed) { + txtHumiditySVFActionPerformed(null); + } + } + } + }); + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + break; + } + } + } + }; + + /** + * Creates new form AgentUI + */ + public AgentUI() { + initComponents(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + private void initComponents() { + + lblAgentName = new JLabel(); + jLabel2 = new JLabel(); + jPanel1 = new JPanel(); + jLabel3 = new JLabel(); + pnlBulbStatus = new JPanel(); + jPanel2 = new JPanel(); + jLabel4 = new JLabel(); + chkbxTemperatureRandom = new JCheckBox(); + jSeparator1 = new JSeparator(); + jPanel7 = new JPanel(); + jLabel5 = new JLabel(); + txtTemperatureMin = new JTextField(); + jLabel6 = new JLabel(); + txtTemperatureMax = new JTextField(); + jLabel10 = new JLabel(); + txtTemperatureSVF = new JTextField(); + spinnerTemperature = new JSpinner(); + chkbxTemperatureSmooth = new JCheckBox(); + jPanel6 = new JPanel(); + jLabel20 = new JLabel(); + btnView = new JButton(); + btnControl = new JButton(); + lblStatus = new JLabel(); + jPanel8 = new JPanel(); + jLabel23 = new JLabel(); + chkbxHumidityRandom = new JCheckBox(); + jSeparator5 = new JSeparator(); + jPanel9 = new JPanel(); + jLabel24 = new JLabel(); + txtHumidityMin = new JTextField(); + jLabel25 = new JLabel(); + txtHumidityMax = new JTextField(); + txtHumiditySVF = new JTextField(); + jLabel11 = new JLabel(); + spinnerHumidity = new JSpinner(); + chkbxHumiditySmooth = new JCheckBox(); + jPanel3 = new JPanel(); + jLabel7 = new JLabel(); + spinnerInterval = new JSpinner(); + jLabel8 = new JLabel(); + jLabel9 = new JLabel(); + cmbProtocol = new JComboBox(); + jLabel12 = new JLabel(); + cmbInterface = new JComboBox(); + jPanel4 = new JPanel(); + chkbxEmulate = new JCheckBox(); + cmbPeriod = new JComboBox(); + jLabel1 = new JLabel(); + + setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); + setTitle("Fire Alarm Emulator"); + setResizable(false); + Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); + setLocation(dim.width / 2 - 650 / 2, dim.height / 2 - 440 / 2); + + lblAgentName.setFont(new Font("Cantarell", 1, 24)); // NOI18N + lblAgentName.setHorizontalAlignment(SwingConstants.LEFT); + lblAgentName.setText("Device Name: " + AgentManager.getInstance().getDeviceName()); + + jLabel2.setHorizontalAlignment(SwingConstants.CENTER); + jLabel2.setText("Copyright (c) 2015, WSO2 Inc."); + + jPanel1.setBackground(new Color(220, 220, 220)); + + jLabel3.setFont(new Font("Cantarell", 0, 18)); // NOI18N + jLabel3.setHorizontalAlignment(SwingConstants.CENTER); + jLabel3.setText("Alarm Status"); + + pnlBulbStatus.setBackground(new Color(220, 220, 220)); + + GroupLayout pnlBulbStatusLayout = new GroupLayout(pnlBulbStatus); + pnlBulbStatus.setLayout(pnlBulbStatusLayout); + pnlBulbStatusLayout.setHorizontalGroup( + pnlBulbStatusLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGap(0, 0, Short.MAX_VALUE) + ); + pnlBulbStatusLayout.setVerticalGroup( + pnlBulbStatusLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGap(0, 167, Short.MAX_VALUE) + ); + + GroupLayout jPanel1Layout = new GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.TRAILING) + .addComponent(pnlBulbStatus, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel3, GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE)) + .addContainerGap()) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel3) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(pnlBulbStatus, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap()) + ); + + jPanel2.setBackground(new Color(220, 220, 220)); + + jLabel4.setFont(new Font("Cantarell", 0, 18)); // NOI18N + jLabel4.setHorizontalAlignment(SwingConstants.CENTER); + jLabel4.setText("Temperature"); + + chkbxTemperatureRandom.setText("Randomize Data"); + chkbxTemperatureRandom.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkbxTemperatureRandomActionPerformed(evt); + } + }); + + jSeparator1.setOrientation(SwingConstants.VERTICAL); + + jPanel7.setBackground(new Color(220, 220, 220)); + + jLabel5.setHorizontalAlignment(SwingConstants.LEFT); + jLabel5.setText("Min"); + + txtTemperatureMin.setHorizontalAlignment(JTextField.CENTER); + txtTemperatureMin.setText("20"); + txtTemperatureMin.setEnabled(false); + txtTemperatureMin.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtTemperatureMinActionPerformed(evt); + } + }); + + jLabel6.setHorizontalAlignment(SwingConstants.RIGHT); + jLabel6.setText("Max"); + + txtTemperatureMax.setHorizontalAlignment(JTextField.CENTER); + txtTemperatureMax.setText("50"); + txtTemperatureMax.setEnabled(false); + txtTemperatureMax.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtTemperatureMaxActionPerformed(evt); + } + }); + + jLabel10.setHorizontalAlignment(SwingConstants.RIGHT); + jLabel10.setText("SV %"); + + txtTemperatureSVF.setHorizontalAlignment(JTextField.CENTER); + txtTemperatureSVF.setText("50"); + txtTemperatureSVF.setEnabled(false); + txtTemperatureSVF.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtTemperatureSVFActionPerformed(evt); + } + }); + + GroupLayout jPanel7Layout = new GroupLayout(jPanel7); + jPanel7.setLayout(jPanel7Layout); + jPanel7Layout.setHorizontalGroup( + jPanel7Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel7Layout.createSequentialGroup() + .addComponent(jLabel5) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtTemperatureMin, GroupLayout.PREFERRED_SIZE, 45, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel6) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtTemperatureMax, GroupLayout.PREFERRED_SIZE, 45, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel10) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtTemperatureSVF, GroupLayout.PREFERRED_SIZE, 45, GroupLayout.PREFERRED_SIZE) + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + jPanel7Layout.setVerticalGroup( + jPanel7Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup() + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel7Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(txtTemperatureMin, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addComponent(txtTemperatureMax, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel6) + .addComponent(jLabel5) + .addComponent(jLabel10) + .addComponent(txtTemperatureSVF, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) + .addGap(35, 35, 35)) + ); + + spinnerTemperature.setFont(new Font("Cantarell", 1, 24)); // NOI18N + spinnerTemperature.setModel(new SpinnerNumberModel(30, 0, 100, 1)); + spinnerTemperature.addChangeListener(new javax.swing.event.ChangeListener() { + public void stateChanged(javax.swing.event.ChangeEvent evt) { + spinnerTemperatureStateChanged(evt); + } + }); + + chkbxTemperatureSmooth.setText("Smooth Variation"); + chkbxTemperatureSmooth.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkbxTemperatureSmoothActionPerformed(evt); + } + }); + + GroupLayout jPanel2Layout = new GroupLayout(jPanel2); + jPanel2.setLayout(jPanel2Layout); + jPanel2Layout.setHorizontalGroup( + jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false) + .addComponent(jLabel4, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(spinnerTemperature)) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jSeparator1, GroupLayout.PREFERRED_SIZE, 6, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(jPanel7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(chkbxTemperatureRandom) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(chkbxTemperatureSmooth))) + .addContainerGap()) + ); + jPanel2Layout.setVerticalGroup( + jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(jSeparator1) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGroup(jPanel2Layout.createParallelGroup( + + GroupLayout.Alignment.BASELINE) + .addComponent(chkbxTemperatureRandom) + .addComponent(chkbxTemperatureSmooth)) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel7, GroupLayout.PREFERRED_SIZE, 51, GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE)) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jLabel4, GroupLayout.PREFERRED_SIZE, 23, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(spinnerTemperature))) + .addContainerGap()) + ); + + jPanel6.setBackground(new Color(253, 254, 209)); + + jLabel20.setText("Connection Status:"); + jLabel20.setVerticalTextPosition(SwingConstants.TOP); + + btnView.setText("View Device Data"); + btnView.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + btnViewMouseClicked(evt); + } + }); + + btnControl.setText("Control Device"); + btnControl.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + btnControlMouseClicked(evt); + } + }); + + lblStatus.setFont(new Font("Cantarell", 1, 15)); // NOI18N + lblStatus.setText("Not Connected"); + + GroupLayout jPanel6Layout = new GroupLayout(jPanel6); + jPanel6.setLayout(jPanel6Layout); + jPanel6Layout.setHorizontalGroup( + jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel6Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel20) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(lblStatus, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(btnControl) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(btnView) + .addContainerGap()) + ); + jPanel6Layout.setVerticalGroup( + jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup() + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false) + .addComponent(jLabel20, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(btnView, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(btnControl) + .addComponent(lblStatus))) + .addContainerGap()) + ); + + jPanel8.setBackground(new Color(220, 220, 220)); + + jLabel23.setFont(new Font("Cantarell", 0, 18)); // NOI18N + jLabel23.setHorizontalAlignment(SwingConstants.CENTER); + jLabel23.setText("Humidity"); + + chkbxHumidityRandom.setText("Randomize Data"); + chkbxHumidityRandom.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkbxHumidityRandomActionPerformed(evt); + } + }); + + jSeparator5.setOrientation(SwingConstants.VERTICAL); + + jPanel9.setBackground(new Color(220, 220, 220)); + + jLabel24.setHorizontalAlignment(SwingConstants.LEFT); + jLabel24.setText("Min"); + + txtHumidityMin.setHorizontalAlignment(JTextField.CENTER); + txtHumidityMin.setText("20"); + txtHumidityMin.setEnabled(false); + txtHumidityMin.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtHumidityMinActionPerformed(evt); + } + }); + + jLabel25.setHorizontalAlignment(SwingConstants.RIGHT); + jLabel25.setText("Max"); + + txtHumidityMax.setHorizontalAlignment(JTextField.CENTER); + txtHumidityMax.setText("50"); + txtHumidityMax.setEnabled(false); + txtHumidityMax.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtHumidityMaxActionPerformed(evt); + } + }); + + txtHumiditySVF.setHorizontalAlignment(JTextField.CENTER); + txtHumiditySVF.setText("50"); + txtHumiditySVF.setEnabled(false); + txtHumiditySVF.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtHumiditySVFActionPerformed(evt); + } + }); + + jLabel11.setHorizontalAlignment(SwingConstants.RIGHT); + jLabel11.setText("SV %"); + + GroupLayout jPanel9Layout = new GroupLayout(jPanel9); + jPanel9.setLayout(jPanel9Layout); + jPanel9Layout.setHorizontalGroup( + jPanel9Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel9Layout.createSequentialGroup() + .addComponent(jLabel24) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtHumidityMin, GroupLayout.PREFERRED_SIZE, 45, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel25) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtHumidityMax, GroupLayout.PREFERRED_SIZE, 45, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel11) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtHumiditySVF, GroupLayout.PREFERRED_SIZE, 45, GroupLayout.PREFERRED_SIZE) + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + jPanel9Layout.setVerticalGroup( + jPanel9Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup() + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel9Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel9Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(jLabel11) + .addComponent(txtHumiditySVF, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel9Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(txtHumidityMin, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addComponent(txtHumidityMax, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel25) + .addComponent(jLabel24))) + .addGap(35, 35, 35)) + ); + + spinnerHumidity.setFont(new Font("Cantarell", 1, 24)); // NOI18N + spinnerHumidity.setModel(new SpinnerNumberModel(30, 0, 100, 1)); + spinnerHumidity.addChangeListener(new javax.swing.event.ChangeListener() { + public void stateChanged(javax.swing.event.ChangeEvent evt) { + spinnerHumidityStateChanged(evt); + } + }); + + chkbxHumiditySmooth.setText("Smooth Variation"); + chkbxHumiditySmooth.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkbxHumiditySmoothActionPerformed(evt); + } + }); + + GroupLayout jPanel8Layout = new GroupLayout(jPanel8); + jPanel8.setLayout(jPanel8Layout); + jPanel8Layout.setHorizontalGroup( + jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel8Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(jLabel23, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE) + .addComponent(spinnerHumidity)) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jSeparator5, GroupLayout.PREFERRED_SIZE, 6, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false) + .addComponent(jPanel9, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel8Layout.createSequentialGroup() + .addComponent(chkbxHumidityRandom) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(chkbxHumiditySmooth))) + .addContainerGap()) + ); + jPanel8Layout.setVerticalGroup( + jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel8Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(jSeparator5) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGroup(jPanel8Layout.createParallelGroup( + GroupLayout.Alignment.BASELINE) + .addComponent(chkbxHumidityRandom) + .addComponent(chkbxHumiditySmooth)) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel9, GroupLayout.PREFERRED_SIZE, 51, GroupLayout.PREFERRED_SIZE) + .addGap(0, 1, Short.MAX_VALUE)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addComponent(jLabel23, GroupLayout.PREFERRED_SIZE, 23, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(spinnerHumidity))) + .addContainerGap()) + ); + + jPanel3.setBackground(new Color(207, 233, 234)); + + jLabel7.setText("Data Push Interval:"); + + spinnerInterval.setModel(new SpinnerNumberModel(Integer.valueOf(AgentManager.getInstance().getPushInterval()), Integer.valueOf(1), null, Integer.valueOf(1))); + spinnerInterval.addChangeListener(new javax.swing.event.ChangeListener() { + public void stateChanged(javax.swing.event.ChangeEvent evt) { + spinnerIntervalStateChanged(evt); + } + }); + + jLabel8.setText("Seconds"); + + jLabel9.setText("Protocol:"); + + cmbProtocol.setModel(new DefaultComboBoxModel(new String[] { "MQTT", "XMPP", "HTTP" })); + cmbProtocol.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cmbProtocolActionPerformed(evt); + } + }); + + jLabel12.setText("Interface:"); + + cmbInterface.setModel(new DefaultComboBoxModel(new String[] { "eth0" })); + cmbInterface.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cmbInterfaceActionPerformed(evt); + } + }); + + GroupLayout jPanel3Layout = new GroupLayout(jPanel3); + jPanel3.setLayout(jPanel3Layout); + jPanel3Layout.setHorizontalGroup( + jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel7) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(spinnerInterval, GroupLayout.PREFERRED_SIZE, 55, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel8) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel12) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(cmbInterface, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel9) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(cmbProtocol, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); + jPanel3Layout.setVerticalGroup( + jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(jLabel12) + .addComponent(cmbInterface, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(jLabel7) + .addComponent(spinnerInterval, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel8) + .addComponent(jLabel9) + .addComponent(cmbProtocol, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))) + .addContainerGap()) + ); + + jPanel4.setBackground(new Color(169, 253, 173)); + + chkbxEmulate.setText("Emulate data"); + chkbxEmulate.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkbxEmulateActionPerformed(evt); + } + }); + + cmbPeriod.setModel(new DefaultComboBoxModel(new String[] { "1 hour", "1 day", "1 week", "1 month " })); + cmbPeriod.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cmbPeriodActionPerformed(evt); + } + }); + + jLabel1.setText("Emulation Period"); + + GroupLayout jPanel4Layout = new GroupLayout(jPanel4); + jPanel4.setLayout(jPanel4Layout); + jPanel4Layout.setHorizontalGroup( + jPanel4Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel4Layout.createSequentialGroup() + .addContainerGap() + .addComponent(chkbxEmulate) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel1) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(cmbPeriod, GroupLayout.PREFERRED_SIZE, 162, GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); + jPanel4Layout.setVerticalGroup( + jPanel4Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel4Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(chkbxEmulate) + .addComponent(cmbPeriod, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel1)) + .addContainerGap()) + ); + + GroupLayout layout = new GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(lblAgentName, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel6, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup( + GroupLayout.Alignment.LEADING) + .addComponent(jPanel8, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel2, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addComponent(jLabel2, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel4, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel3, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(lblAgentName, GroupLayout.PREFERRED_SIZE, 53, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel8, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) + .addComponent(jPanel1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel2, GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); + + pack(); + + chkbxTemperatureSmooth.setEnabled(false); + chkbxTemperatureSmooth.setEnabled(false); + + cmbInterface.removeAllItems(); + for (String item : AgentManager.getInstance().getInterfaceList()){ + cmbInterface.addItem(item); + } + cmbInterface.setEnabled(false); + + cmbProtocol.removeAllItems(); + for (String item : AgentManager.getInstance().getProtocolList()){ + cmbProtocol.addItem(item); + } + cmbProtocol.setSelectedItem(AgentConstants.DEFAULT_PROTOCOL); + + URL urlAlarmOn = this.getClass().getResource("/alarm-on.gif"); + ImageIcon imageIconAlarmOn = new ImageIcon(urlAlarmOn); + + URL urlAlarmOff = this.getClass().getResource("/alarm-off.gif"); + ImageIcon imageIconAlarmOff = new ImageIcon(urlAlarmOff); + + picLabelBulbOn = new JLabel(imageIconAlarmOn); + picLabelBulbOn.setSize(pnlBulbStatus.getSize()); + + picLabelBulbOff = new JLabel(imageIconAlarmOff); + picLabelBulbOff.setSize(pnlBulbStatus.getSize()); + + new Thread(uiUpdater).start(); + + AgentManager.getInstance().setDeviceReady(true); + } + + private void btnControlMouseClicked(java.awt.event.MouseEvent evt) { + Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null; + if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) { + try { + URI uri = new URI(AgentManager.getInstance().getDeviceMgtControlUrl()); + desktop.browse(uri); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + private void btnViewMouseClicked(java.awt.event.MouseEvent evt) { + Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null; + if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) { + try { + URI uri = new URI(AgentManager.getInstance().getDeviceMgtAnalyticUrl()); + desktop.browse(uri); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + private void chkbxTemperatureRandomActionPerformed(java.awt.event.ActionEvent evt) { + isTemperatureRandomized = chkbxTemperatureRandom.isSelected(); + VirtualHardwareManager.getInstance().setIsTemperatureRandomized(isTemperatureRandomized); + spinnerTemperature.setEnabled(!isTemperatureRandomized); + txtTemperatureMax.setEnabled(isTemperatureRandomized); + txtTemperatureMin.setEnabled(isTemperatureRandomized); + chkbxTemperatureSmooth.setEnabled(isTemperatureRandomized); + txtTemperatureSVF.setEnabled(isTemperatureRandomized && isTemperatureSmoothed); + } + + private void chkbxHumidityRandomActionPerformed(java.awt.event.ActionEvent evt) { + isHumidityRandomized = chkbxHumidityRandom.isSelected(); + VirtualHardwareManager.getInstance().setIsHumidityRandomized(isHumidityRandomized); + spinnerHumidity.setEnabled(!isHumidityRandomized); + txtHumidityMax.setEnabled(isHumidityRandomized); + txtHumidityMin.setEnabled(isHumidityRandomized); + chkbxHumiditySmooth.setEnabled(isHumidityRandomized); + txtTemperatureSVF.setEnabled(isHumidityRandomized && isHumiditySmoothed); + } + + private void spinnerTemperatureStateChanged(javax.swing.event.ChangeEvent evt) { + if (!isTemperatureRandomized) { + try { + int temperature = Integer.parseInt(spinnerTemperature.getValue().toString()); + VirtualHardwareManager.getInstance().setTemperature(temperature); + } catch (NumberFormatException e) { + JOptionPane.showMessageDialog(this, "Invalid temperature value", "Error", JOptionPane.ERROR_MESSAGE); + spinnerTemperature.setValue(VirtualHardwareManager.getInstance().getTemperature()); + } + } + } + + private void spinnerHumidityStateChanged(javax.swing.event.ChangeEvent evt) { + if (!isHumidityRandomized) { + try { + int humidity = Integer.parseInt(spinnerHumidity.getValue().toString()); + VirtualHardwareManager.getInstance().setHumidity(humidity); + } catch (NumberFormatException e) { + JOptionPane.showMessageDialog(this, "Invalid humidity value", "Error", JOptionPane.ERROR_MESSAGE); + spinnerHumidity.setValue(VirtualHardwareManager.getInstance().getHumidity()); + } + } + } + + private void txtTemperatureMinActionPerformed(java.awt.event.ActionEvent evt) { + try { + int temperature = Integer.parseInt(txtTemperatureMin.getText()); + VirtualHardwareManager.getInstance().setTemperatureMin(temperature); + } catch (NumberFormatException e) { + JOptionPane.showMessageDialog(this, "Invalid temperature value", "Error", JOptionPane.ERROR_MESSAGE); + txtTemperatureMin.setText("20"); + } + } + + private void txtTemperatureMaxActionPerformed(java.awt.event.ActionEvent evt) { + try { + int temperature = Integer.parseInt(txtTemperatureMax.getText()); + VirtualHardwareManager.getInstance().setTemperatureMax(temperature); + } catch (NumberFormatException e) { + JOptionPane.showMessageDialog(this, "Invalid temperature value", "Error", JOptionPane.ERROR_MESSAGE); + txtTemperatureMax.setText("50"); + } + } + + private void txtHumidityMinActionPerformed(java.awt.event.ActionEvent evt) { + try { + int humidity = Integer.parseInt(txtHumidityMin.getText()); + VirtualHardwareManager.getInstance().setHumidityMin(humidity); + } catch (NumberFormatException e) { + JOptionPane.showMessageDialog(this, "Invalid humidity value", "Error", JOptionPane.ERROR_MESSAGE); + txtHumidityMin.setText("20"); + } + } + + private void txtHumidityMaxActionPerformed(java.awt.event.ActionEvent evt) { + try { + int humidity = Integer.parseInt(txtHumidityMax.getText()); + VirtualHardwareManager.getInstance().setHumidityMax(humidity); + } catch (NumberFormatException e) { + JOptionPane.showMessageDialog(this, "Invalid humidity value", "Error", JOptionPane.ERROR_MESSAGE); + txtHumidityMax.setText("50"); + } + } + + private void spinnerIntervalStateChanged(javax.swing.event.ChangeEvent evt) { + try { + int interval = Integer.parseInt(spinnerInterval.getValue().toString()); + AgentManager.getInstance().setPushInterval(interval); + } catch (NumberFormatException e) { + JOptionPane.showMessageDialog(this, "Invalid time interval value", "Error", JOptionPane.ERROR_MESSAGE); + spinnerInterval.setValue(5); + } + } + + private void cmbInterfaceActionPerformed(java.awt.event.ActionEvent evt) { + AgentManager.getInstance().setInterface(cmbInterface.getSelectedIndex()); + } + + private void cmbProtocolActionPerformed(java.awt.event.ActionEvent evt) { + if (cmbProtocol.getSelectedIndex() != -1 && cmbProtocol.getItemAt( + cmbProtocol.getSelectedIndex()).equals(AgentConstants.HTTP_PROTOCOL)) { + cmbInterface.setEnabled(true); + } else { + cmbInterface.setEnabled(false); + } + + AgentManager.getInstance().setProtocol(cmbProtocol.getSelectedIndex()); + + } + + private void txtTemperatureSVFActionPerformed(java.awt.event.ActionEvent evt) { + try { + int temperatureSVF = Integer.parseInt(txtTemperatureSVF.getText()); + VirtualHardwareManager.getInstance().setTemperatureSVF(temperatureSVF); + } catch (NumberFormatException e) { + JOptionPane.showMessageDialog(this, "Invalid value", "Error", JOptionPane.ERROR_MESSAGE); + txtTemperatureSVF.setText("50"); + } + } + + private void txtHumiditySVFActionPerformed(java.awt.event.ActionEvent evt) { + try { + int humiditySVF = Integer.parseInt(txtHumiditySVF.getText()); + VirtualHardwareManager.getInstance().setHumiditySVF(humiditySVF); + } catch (NumberFormatException e) { + JOptionPane.showMessageDialog(this, "Invalid value", "Error", JOptionPane.ERROR_MESSAGE); + txtHumiditySVF.setText("50"); + } + } + + private void chkbxTemperatureSmoothActionPerformed(java.awt.event.ActionEvent evt) { + isTemperatureSmoothed = chkbxTemperatureSmooth.isSelected(); + txtTemperatureSVF.setEnabled(isTemperatureSmoothed); + VirtualHardwareManager.getInstance().setIsTemperatureSmoothed(isTemperatureSmoothed); + } + + private void chkbxHumiditySmoothActionPerformed(java.awt.event.ActionEvent evt) { + isHumiditySmoothed = chkbxHumiditySmooth.isSelected(); + txtHumiditySVF.setEnabled(isHumiditySmoothed); + VirtualHardwareManager.getInstance().setIsHumiditySmoothed(isHumiditySmoothed); + } + + private void cmbPeriodActionPerformed(java.awt.event.ActionEvent evt) { + // TODO add your handling code here: + } + + private void chkbxEmulateActionPerformed(java.awt.event.ActionEvent evt) { + // TODO add your handling code here: + } + + public void setAlarmStatus(boolean isAlarmOn) { + this.isAlarmOn = isAlarmOn; + } + + public void updateTemperature(int temperature) { + spinnerTemperature.setValue(temperature); + spinnerTemperature.updateUI(); + } + + public void updateHumidity(int humidity) { + spinnerHumidity.setValue(humidity); + spinnerHumidity.updateUI(); + } + +} diff --git a/src/main/resources/alarm-off.gif b/src/main/resources/alarm-off.gif new file mode 100644 index 0000000000000000000000000000000000000000..c346605ad00627e4bda392cd37ab24bde7643395 GIT binary patch literal 4265 zcmcgu`Bzhi62A9lyJWoy1j2p^TTsM=O`@ntSQ-H_EFyx?fC`9O0|=s6y&-^TPy>Rc ziZ(&qu?>repf+J~DQa<{;>HW8h>9ANTCFWS-aqlaU*^pD&dhx0n{(#OH%r2UglSiR zlfYE~n4X><7#Nt2jh$|6oSsRqUWH-U%L}cpuAXjd<8U|vfq=t7>gwuxdwUxj8!unJ z{OQxDqN1YdEnAM_aPQu|yLIbUYisN1=x9SjLqtS`N~Iba8cI)3&(6*ki^XcSIyN>| zC=}-9EJMnudIT>!8hhNp*yra7GRGm_HN zy}Z1pKYc=Ac%~*PHg>9^LEz<8S6wX>2$GUw)oN8yUfy#6KoB@0LM#>v^M%46)avx4 zq`bUrwMvzpJ)%p`f?-a^C-h2^(kR*3}6FUa_$e1GjFeR7I_=jh_JEa%=01 zC;vCNe8GbZU?<=W%;0}J5s{`apjcH>TDGfv_a1e{-hKNul~o6-YYzTU`{SX*bw`f= zq}A0QYdC)5q+*Y*iYCm3noDy`t_jX5|A7m zZ^27@UVST|DVT+f~Q_Dd|=7UV?p{0$_BkJV+)A`YQpPs)8Jzm)v>3;! z@EX&WSZ9yv%014E)mH?*9y_K9pY^JtIwAYj@!E_tuTIo?*cr?0pS%K-F7qUj1c#u0 z5y@Gj%>ZtT%_1PJ;7kM_tR;b5Yd*98mjuj=1#Zc4ZD3RWeT~QW$xRL<&jJNg0|&{^ zdR|fJL1}4_Ids9o>wc0-O7)38+$j6B0iM9?fEsS0+2GSM$6%nacn=JcWz}t3g3afX zXY>yex+)1y{xT`iqgG=X2lh^i*h{BYp*k9T^OF+aGZb*Z>bO$g1p{imp^?Ee7`kBx z?EQYLy=JkRz@}Od?~1faTtD8Vf?USpkBjYin$!yGa((>zb17)oDy}RaqxS1{6vr?`75*6ZqI3Zr^dL?mvM1D*78xd@pr z4CvbQ>)OAZAEhs5iMQ?eUY^oK^L96aS;t{C$r-za;tVH>7T#eiwmFiRgwG= zXyKh3(G2NNebT6VeRibH(}wZr{AvDwZ(75@Y~*8 zC7k*!p|4uKq6`zkI|h{0AUCHcCS>R5IPJb0$3PXeoakh3RG}EY>^TDaPkok9MIY2$ zP^mh@zj({`6+U5b=&82`v^;C71Qz&v>dL~D zi|i8(6bS&OE5DmHdFTddd)3_XLQ|^Sy(p^ErqeL#GW^3C?pN@6*Hx2^;{LkcU% zYqYqv<5G622w#oI&slj2ibwT8ai9qo+4&f^*%q>Fy@qf34WrS~NLuSLky_}bcJhm1 zyz2+ur1Cj@5!63E0?`h$A+se$8^pxtJCmEjO;f?v=G8b}ZSo?yCqzWRlY4X)%l{R2 z3152ywM`f;^=|lWeJI|e{I_KedH`86;6pD|$Nk%daj!qe%~tQC4=RDLTQ}l+*8$GT zmyOQNu%APDGMkzU-aQg}qDTyo$!qF6oqE89zZop350y4I$@oxRBW=~L_Wu+bX4zjS zS~%9XP)^MO9AyTO8v7G2ad_1em~7F}qGXJft(%=cL~OOJ|1vJY9XU2m;qY6CXf$*= zWIWx5$L_!QdS&9~T0cKSXDvDaI4J;C6u1aJ)qOt8?`$mA_JdQ_Jd>owLJ3jLCYrx|kto~Hwn2_r^2G;jP>?K>afmUe z$o5%xc7&s0wu0zVcDrKRSi@ezm$mqgu%_Iq3rVw%WQGtwoDg4m##Hy z@-8LYJBi|!Egy`3b0!nKZRs24lMNL(U_VCQ=*4XVa2y#*eAn__FseWB@TnRF9Z-wW z21om(>N7+9Oc>GEF3OvO>ufpKQW5qmX*)iDgd$gmBgN2%-5j{qmoZzvYGFW&{pPAa zN`JinsOMGmmN^i3Y%v0ToH!kA-^b%r8mkf0>FBoy1Y_7{FdFx0i7N_%Z|~1S6!L)+ z7*W4#>3I5-{nx?k(QVB?+#1hV@bzK;zP8qrOW$TEe|9jM9xEOr@T=?=q%jb$U3+z}0FYDm_fMwOK zG$~p%G{wbHV5z0=r-#Me`6;os;sqmIr5Bdv6beh3(RUr*DFKh7kGJkd@^s9oYVUDT zb4bSuyz7r5{HXS)+*8GDM(B_i!*L-}HK5t0P(>C!W84VIqU3J(irRJ2iyM~FK)=r7 zmhF>Zi>o@e<~QM@w~DK12O8D?P+B*2|A!dAv1^FJ(x^-rF;PZ9$GgCsIDjSp3!|G& zgxFTajiSDzhphLQm#NhQ5JJp0G85nfv2C3{Z^7 zk@ZP7Sqb*laKf*-m$_N`rvV3bln0Yg{;)q)0rcbr6Rx|V`X!$Ci@+&G(9;q0<_jR$ zg&+VypC+4@w1Cnc7KO_gT>}J~=KgsesCFliOweTgPO5B<#KVttitpaTeB=v_Vc^YY zkT(bh53AlN@sCYlUhg77{e1BRCln#XG&wB_vPw#uIcESDAao$mTr;%&qpO4&zrSgV zb7*w&nmH;N7^wg}$$BVa30<40g~mo1!Jtd)wo|;rHhz_g7eH;)uvO0UZxeJjmqI1`^WvSgE(I&%XO*)$^s4^zHgpr7 zCtrs51nu-dpo~BfAs?&4sG3yhc;(h-cF{2@U&WShT|r01;lPg$kM)*om(_UIg7Z5C4`ck;y;btojbgoB4_LbG8Jh$183`fys8cj5R zx!w-p?^`4;EV>6;2z}#>i)LBQbxxf7S7qviKAy<;UBQYjmfpt4w@B}v>nXn5HaVdz)80{2VZ?%V4V=d7W1bEOyVE!{B;rjFtx zjkLjhXK~2lWDzcoKl}GIC`bX}CkkxzOQQ~E`Q&aLM441LgspMz3EA^BC)i57$Nf$T zO}^rT9*5TwBqA^ZThL~+m}jzDu9^QVZqdsSs54XImzGkxyKV>QH;+Vcdl$tPKHOy$d&-N;IunuVTIH8()DUEt3J*xVF}H*k}Z>@y;Kq! zU$4>s;eN(NEBFlb=sXZ~{;p@4pSsz4*amI z-oR{XdF9s2^qe+2uYlYe{#bPJ#QOY$8=lWRDO%4VljD}jJmHA_xj)zaUFm-8pr@Y% zBK}4DJtMd8d{f@l%m;R%`MI7}p`y%Y&zJTZpvb<4T@}A zyYHc6RqWyF2sU{q4uZ%veLy^AT_hI0OJX zoxZTJK)17_x3tjzRmaAVNTjqhuB4=de(xSHFRzl45-%^Nrlw|ebhM?VrN6)b@bEA( zF_9h{dkqHL-QAs@p6=@ET3=tUtE)3NH&01PSzTTA^70A{4Aj%p%gM>Hv$NCG)QpOX za&vPliHgGgOaDg1VCd`Xe>FAfIXTie9DR4!&fNT8!w>)@A(8aeRXQ(k_diKqUeeOi z^ut3868W!>o1NX?x;iCk>6(%fO(i8aH@lpil*Fj0H2}b1kmlxkdYYOSH8sm~a=hH! zqM`zGQc?l~|7mgi*YdB_)KnTB?T`A8FwK^Ka%*aol%(zK%onDoQ&JMUx?27%NPkxs z@c%Fg)0wS}9PADBY>bo@6k*`MsfB;Q5o~}vAom{`|Jf#hkxm3iDXD4c8JStxIk|cH z1?0k_;*!#`@`}o;>YA(9u2XK*-mI%{xYgLye7mLfPFwrkj?S*`dp*7PA3W^qe>6bt zRhO3@9hH|?ADnC%Rz{#^VbAAbvk1h*RK~Eh^0TF-H{=TfAP&36n59KV5Y( zuj{@KKJ-(5)MbjFXgmYQrjp9h+zZ?BCw6B`!Z zX&t`MCJdkRdsVs_@B#JY?=^v+=MIM@6&b@GOh6A=k*SB|o~*I9#@~O_RB^|E{Z31s`FL7uvyFkTtcKIFygU+*zZU=094J}%<~&@G zTh*K|{DMJsu%Y|Zc(8>+|M>P*4#N*#K?%MuC*tMT15Kflrv%wkn@JW;mHU})Alt=9gE z@L5l}x51+`wi&qXrrh348fz()Q%dkUWMH3cu?n{Vi??O!aj^F0PMq$YdnbWkocqg8 zbcRbafKp@de&7>w9a*O^RK82mNxJo- zbaOfxfx(9l?z9>ZKt`{P{s$k4QFg;uKXeN$!&MlgDrOZ=AKMpo_ogPm*yHddhU1yI zKa9uyF(gKI9PZZ}Pevda#v9xL(f1mmD}5&zxlRwi$~6rggt3$NK@>ZYoD3_CqV^zo ze1IXOaK#%WzoItF$Gj`7zNvF04@*G&h6> zjmQv9xQy#1zByn_W`qN&#W**ZXm7dW)oD`UBn@du0ojK3N%6(*s2h?X*Y@5eHX8!V z6O&=XaRMV(7n}h{OGd;2&}nx=O#h)Os}2s%%nQPQaub@vU!hOdx z3Xn$+5!m2!ziSyV#M3W67qY`NJ&uVgjj|rtWM$60{2=B>y?YT|;8`sIox~Y4f5+w& zQQzW@4<@s?v(fXi8mXMv866(rMi_nu&$xXAtmw@V+xv)&T4az}1Ax%IctQ27Y$Tje zghYBEH5JpOzSDql!v^?IiDVyt(8*TYZkKQnM4qMqsyx$yhI za$#X^OCnW!Bg;|}4_yDrOhoBXwN$hKN)r;$kPk<)ni6Y;XI2fIC+3t%IQT&c5pmcs zkgEn%|1Or2(lcjbwd|mz5dq6Wv&jj)`HOu108~-~4RW5Xeg^LX$ z1jr!VhfsdL-w=+&LvX4hgp3<>*KJSh+a@ATXe2|H?L_oJ2zRzr1q!i1vd?X*EtNz;GA*?r`F{}y52wL410v($1i+9<=_!E? z1?DlijF}VL%|C4i*DnzJ3d2ww-grno315DO1E2Y}Ly18gVb;Fp+5kPQXE z#u0`~f~XMhK56H$72HUIK#L?0?cM{j_$rAr$T?6RxWMEZA&krhzy{|*$s~C&#_dD0 zp%n1e=m!QZ0tBm|4VFFxIC#TJQZ!Y-94~=Ypm_9>2p~^|BGReF*JM5qhRakE7HJ2c zB;W=#{%wRv4VCO_zmBWlhSd^T)?{x0Hhf zP|w+^PJ*DvDI+;Ak^;1)zQ!ZV==)k5W|Xqkmqa8BhNR?1g;^d3^BGZzuvcO8tQrTf z-;Wp0s*{2MDlxK@7t}gV%LU_zJ{!D5`Aj@W%Dab*3@5U6sQ?i=K(p1^F$^y-i`}Jy zE);#Dx-;y}vF>;i!Weq|#j9-IaKMb2`n1*Zdw7`PKIHb!ap3VZ zfMOw}NGH;0-hD()RvPK|ZY7vhq6#<0Si^}FkkpmUi#RH*rU%r&qO`N92B7v=0EyvhCP@MwS;POZ^d%ddeI|77lkq*C0w9%_ z06zQ7luR$Yl?0Q(lf-oiDQH{|Ok{jNU_b#BF?^etdFKA0d?+ZU!NXL-Jji^WoV;{j z0WL<~R6Y{Y?>KjCD|MWRvfK}AK8{agYt-jJ>O#l%JHg{*s=aeypfrX&*!qZwofjzg9nAVfo7679eeTErp91$jj@f7W`1OfQFdiaS7e_^s+++&b2Q=RB- zhr<{?@P&ldfYURPtD*?C8Lf+@msiqL*?ht2;>&8`7N>0BaYj(AlO{3-nkq|6?*ikF z&b6qk^~8~jeULDC>l@wCh>U@{tHrT|P0 zAPdFYOETse5;}%+@{m&FQVfcoR|RP>Cfd1wcV;*jz)t~ExZ=5Skf28X2XSai5*oh< zXwh`#7{h*VBz~2$H9pJ{EHCg-2|BS>;79>ZQ!SY&VBBcro9A(u@C?=;HmvOcD=}_- z6j*kN!@W>94TmHso?nrWpfrdky0|qIh-8^?6JX!di)8qK;Dw@mlVT;5V@NL;iv(G0 z;HzK3nMHLioGV^BMqd*ea4GpArS`kAbWAG{!KJm;?|pa`*tpW&U!l;HIgrb2@4>C7`)dCtaF8u@6Wj5Aa%xT~g$33T~8 z#6pB`nbmv|1r=i=R-D03Sbz{-yS)S){1&Ehm;w?m6iEfPy(hDgt?DK17yutu#SlH3 z_4H`OR(z!}xti}MJ$tS0G#>?2L0I%R0PDN}ay{g8nPb_!mdp`|-b!9K!fP96@Kf~p zh|toqx)m*kO@?^zTqnKB*LWf8h!YURRC_yIW*YTwu{Rc@#nGZuKQodZHw4Ft$J8}| z3^+*hF=cTP*b1mw@-90!;dR?UQ>fj4Ar+`bgi+EEsTuAa27Zszfva4U8mW+^5kmQe zz`8LP`c^m##tMyTmKeD7SPR8)jW{{9$$RAeX9T}4lz)FKl z&CoCIiGuv?fSL`0*~abIp%DuW{2mo`Ccf5e$vsh~dG4M$`wW=e>>KWDAqGG#+eTeH zfqd--GST40^*fJT{9M09nwo1eYrr4*S*T}(e~dGFv|wrYq(xHfIyZN#f`oSX0mw6< zj&%yWG<<`J2#<2}i`vl5%Y@|iL7{dq${4Ojs~&O={~(>iKmZO@Lsy4e%*7$qsy5E- zn<*D9{w&zZEQU|l0YClD#|FCHn+HTGpc)mDqr!x7@mL0E@J9zX4bDJ>9OA$*t}w%g z23KSPaLhnY>gfsNbC(Q^)F@XL#~?e4I8jBP-p|Ci z3)ybXt_TSMi4i#<`l5x_J-cJ=11klHg)<>TT9upV9*-_}9{-f9Fuk_tb#2#VqB zOHDP85g`p5#IbPCS}n-Q=d3z^4{1if!{E*pV@;W!Zbu-@VFYSScS>CVKlwvpqqn`c z-33cL%*TLBFV!;x{rF-$Ex1ga)SzEteJOyG^#>ri+T&+8_-+)&X`<-16%8Xz>n<_!V5rQB1BGc1KbBCD?FI+lkNmS9k!(P;jk~Wg9TEvL>pAF&`Vbc@3pSei zM3(67BwBcv+&)T&G^uBeyW6KrhfsZbB_}PynTJXH7HDyYFx6fMF;_+!9Q{~p>`DKs zqx)Gr%$}y-8VG5GL-qApJo|xG?nD#|^bFRgW;t3MQ+qV*k~BL?c=;{L|;^*S`R zL?Le1B20i&UMqT!nN41e0a=odQAzrO`1^wG;I9NCS9tW1DDjd`V5=z6_HoqTQ9D+g ztQ!u_Nr6XcWvHh?(~gL@w};AdpNQd8Hf8OS+=`jQgY_4+nEfI5DQmR4Cff{55rA=G zVC)mOVvm{lP5RW=5Am#n{CKEj2NceDoJpVuCYfgxn~&V}HfH<**>0o=ESRBfASD9a zme4s67ucbb0P~+-teKvE4xZbX&WZ+?qfXB`88#e|*y};`VG^67W}8YVj!+PF*y(3M z?rs@sZhqG3K&Wo<-Nfj`z)qWN0EHG7A8OLfO1ne4t6sxEY3^D0GU$STB9mk#+-~04 zW%4VVl_VyvZ39!GX=GD~!;QMi<#w+AGhVTCJOq4?XiQdvyNB%a7cBTi??>tLHDsC^ zJz2{n3Rd-QHcllbb<@FhGQzdD(9Fu;q{@GELBCjb;fy8J=yz6-V9LOadT0Pp3=CwV zj!`1D@?UteC!AL2f{vDE{Lj%{6xYE{hsFFnU31^*!V9`W`1_Goj>qJYKlQap1dOtX zR$&C2vLO(hg51i`_2mhT{1fc28@d$`tyW##VO64XNncg>zSzFbYfIEml3EH;R+Y9G zm@F_5#YQp!-2Ysfa9YMGPCR`Mnv~D8nb#Ojw(uOD1|6P9%P$T-_Ai=w+4x0UTb|h| z0wX%S41~WT2x?+xKrx%;6;aQ{I`d_fn)!3DjT!L^UsqqspH{0`P9rZqdcEB8S-C2e z$q7VrzLyZ|JRbYyWC0~~`4yOE9{X4HG{^bnj{fQL{x_voi)S}m(6raZWT;w&c2KDF zOOMUoo0;4Dc>Q}piYOhn8A-#^a?Vz~zWcbAR;jqM z`ANHQRy%;C+zAMO(33!)*QydxDWh4O=zi0qJDeJ0f!4iwr~y4duSwOdRZ&hnuN4|p zmXi}Ut{1TO@>{%AD3+ z9gk9PAP5$F(WR9BN?9s%KYO|F43i{IgUwHQLq8AMG65g&A3iC{#Lcf2C znzcq!Mfgs?6WP$$<7nqwq%u2W*%;aP-B{J{2y;Z`@73AvhCby_6co|M?3aAm?j^jN zi&S%(J8ldEicSGP9-)5y{Z#Q(;7sc0+pEkG2C|&b1vbtL*bm9J6M2pxVB)X#S6i&E zJP=(AJzQ0T$dWQRfMbTwsf`c8jnEcFM#T|tKC1%mn2l9$vuRm9@5|jL!EarXsL*{2`r@s=~IIQOY7uQ>{ z$;-&h2>RhI8-9ZmUs4D7VQ=`}wxbE`XhxEtn1|qVTV^SC$w0bb&KqVn*zq(-n$rt? zZ-4(`Ava3+sH;$6edfpTtaR|rW0?g^4+_6d3&Tp!2wdM|4lNddy?Ix0{l`7UFI*iw ztBSxAWpK)aZ|M}X_CD`plH8fMLf@3OdMU?VU=&}^Z~(JtA(HqBp>OwzKLd(hofqd7 zyvw{;Amn)6MJ9zefc^Uo%AXDTZ{k~)FV`i$Ut!w5!Y*gcdU}?A_A`eYo#oecsXqm@ z_j{a*$-np`&~sF*(%!FMXE2+4%qG06Wvs0;#fyZ|#$ z2;>6*1D#3?HejX-=Tzp>D$!j<5V&I{aXUF?I+QWgEYz$0 zWot|p>FZX*st-)o%llt28bVyk&N0#^WTan^MakRb>Pu^rtJ7u6$|-L0DK#0YvROIu zu)6wcRp}cYE{HqzvdWi~Tkln)I;jq_{XKVs5Pc&VvV+qm6ZNY1T~SYJiY{I}PndhU z3U<#dHaVgCZ=tN^jcnxQm3Q7uC&$Gj5)jcIBdTlm5AR59{t#=U6~@`yafbV}+6>5W z)Y>YW7S2A*te3F7e=)ZiB<3C8a+h-SGPsm6zHnRQ_rV2(1cpbJ;-`G?ElZ&grRU`j zlD2%T;5wgskm$`i#N;JT&2nz17Or=0q|{(FL#SZc7Y=Yb`3on9T9%bbPIq(DnPa^x zcz_tsCR|#Y)cH)$Y$7G_6D((vZpmO1k} z&uKhIW$6RG<~UUs*O8l03(VdTsb*t!a4I-n*IrMr17i3Mb$Fl z0#=%MY_}gaK4y37`#UFM=ZwPgj<__2C+x=8goQ96tM7=Qfg=grIjUE{gK<_PK{>+* z;C$lVz|m{6zPMRZ&fdr?FAIEphfidEF=}A2ZKRj=v&qOgaTZUs2+0mL^eQH)ExJBI z2XI1Nv9NvcTfs>M*W1JyWwb?l=`$Th%vqinjz}C9(Dlx9>AlG?ZFki$=~CAcW1;+s z75JT^6E9!3%3o*-+_5+kuy$@HuLeH@HSX+soue*9OWyhZE?0f``+Ks9!jH8Q=g=P? zD*W#JSg(oQ{jovGQ24o7S04IvtMS&IpW7`xyFYi@A1nO&*tHl+|MjVNXXynz0(V8c1T9OLO`QLjnB*vpe@B9R5;J59r6FUpDD6^;1Q~VbRu>?o%sY zX?8OEBzFM&Z18Di&SNTkGRr;z+8I=)kdG+}cRp}jH{iwRYoV$gPi6kSXc{I@!9)4t4qKF zKUvdk`*TaO$i32ME;VzGpo1ViRVK%~60pZzf#FV`#b#=6o39{0uy}o+hL5>5c{bA2 zAw`%y)uhPRA-T0xM2@`#V{i`}>2rE2NNi1gI%50|f^4+T1uUSD`Jpc807u^(yxRj7 z_(h^=tDTs3s$Ate)&$-==S;~^Hm{e|~cnGB&)-cZd|{e%&$ z$b>BizqU&V7e45ffrGWg3zEYk*N{)ykBP}7I4UVU!$uaml0x+3fJtW>Da+>ORlqrlYtp4< zDl1et(u&J&G^!+CZEau~_+Vu$7#gRrC*gJc~^Az}6gh{*k zL#aO<^)g)bX@H+LD|bz%luM9FB|{$)l%;emn^7c;IAZ0 z3vdA%QQL4@$1O5lu+jl1TJ)^YQcAmc`(Vqs$xcR`QAq%bnqiW*?)>7DZM0)ArA}09 z_FVJC=Nt50_^{&m>1p}}Mm>&NyO~_6(8Z4aO7#FvOIaHybk~-t$F0O4Lgy0P>P z|JPxO?_<~N#H`#;M)^C^&4GQdes7>7446Ll`_TZk&o73O_r!52(WMAp;6(BPqdRWB z-gpFks2E4bxg}oQ^h{*k=ElXtk$RrELDO;J6x6&kF~M@AXAzCa-#iau81RCQDad56 zbj|u`TJHCV^7BlV_b?{;d!LaM4?~t8?qqD>=18(|gvlscK6CTDDX46c&OYK<@!^90 zD*^#BO9((DGekP9dz;s_8=SK5XfjFBoyam`wi)9gRC$wC4Vhpz8uRfQ56Xc|5^EqW z#)0*%3%U(m2q*?|YmSh#&B2CZ`8u~Ptg_*xxHuN#Te|_Ub>R`R?$T0y~jFj1I%vs z=Ja#A_?nj4Jr6>nZrOBvJrx25VbruN?S@rc}D{p76Ch&-<+H;0X59>)nU1N7Mz@ecc*#$x?HQA6C&bSFTB!3M<%}RUv4138Co&mU zp0%R#54_~S$&|^d-EAWvGM!ZC+esgdJ_&s$moaF5ZP{vQc zmmGPgh*RetG0%_UO?mXXtT2v!rI}-8*Z6-t6Bj5d++X5BDJ#(5vR`;;hns7xFTNoc z&SGHG)5S?lLeh|HZ$+yiSCfG>*-HUi-lukJtMF7g{N*J6H$$BDdgdManVj$iNUQ;z z@=rbwJx}2GxqXH~#LPcwVGQnI4xg6N4)dA(vK~b-!v>Vaa>6sc`1DY2;fBU*OrnWd z*N-FYt&EZRa>-^EY#&%OF9+L{*JK^jOHI|0so+sZ_+WqHq$(e{`yTm_N%$>Bqwh-g z*$rk^qOWMz8t27N-DtQDn5MJj-JLk0Vyv;JaYHIYX9&mXXsOTeR8~m9kS9kGZ9b>s z8Fv$%@Yjr}vn_{{(3*N>!!b*T&nrxJOqn_crp~xH+<5tRxxv)gt*V%vgNbJjSs!R_ z|ArzdlW%$~j$dguS*yzrlcx_U+rb)N<8CE~3ppXP9deocfg8e9m1Z)wRU$0X=C$|n z2QvIq*vuA|R+5ga80JZcUPdJb&`Pdj3qpeBW}C-~#UxNCTPX~#=n$FGlO^{mH%J8k=$uhRo_=I)Vf zvcrx2Hn^Sc?GiiEH%*{*Y(aO^+uOHazr$=%Rhz4Q70YIfL_Ul$Td_QcCcX)!6; z#+m7liE5m!EvLzVUQ*-bo&{xiLq* zO*4ILsII)b_v`tNlk%@sE`OzG1~rNv`ZjzV!5n?zr($aqftnq zEeC0YVe%{DYnS^u$4sOrJA8v06!o$TLs%t}%JE|p^m2cvP#@P&57QdARKo|h#9L=5 zlp@s+_wSy!yIq+Lz@^y(rIIACEA^Gm&l->&`vX_vcO^#UT`K*JoN@AnLCW`+9W6e{ z>2y@mxKY}aAZ(;|;5>%f8<7VlrJX!?*J~)1OS|rq@2}vSyn_ZhRXcul)YP#?+cTMR zqN>~c9Qi`nKe=6Yy_B@zOJ$V69Kky&%)C1niQx+u3oN;I?tfemp1is&)FYztk?U#9 zN9xm~E@1RA;-kjgyP9CjBisx^of6>e&bc`)N;|*3aHQlSf^qRY2i63hw zC`RGW6+T}`ip_0Rd}AiTQ~^)$!}(Z;8PQyZqg7*s4Khqb{H+V%UPkZ`L)KY0@4tG5 zP>~tCuxMFSJ@3~oW#NSl>;omb1=swMO9~gU;&zeVy6(@`x zQ@Us1h8k*;0$uN@4Aw?$ZyJ(v7YMu|@t5D0Q;hHx0Z{0W>+n^OWoA=Rxe?f^mSJ%- zWD;CS-x451n8Q;|xhXQBifO_bgNg9YDW->CwzpgJDy7`cB+`ayRjUi(BR3;X9rIGw zPL;WZr7B$z!RyZQIONOBK&^nE0ls}j;bnx89ME={n zgLBBY1sA{8Z!g?qKYd#yWXK;b`ILtoF8kkVJzNRy`E>X){IUGe|JmYwi<44+8zi=FPCsxbw zzU?dR6a0(jDf)c)d%&LClA7_8p;Pv&ew?~u2uGnSQ_fCS(^>C*#`Zte@64W@q0}<_ zc5PX4ATccoJXJh-SxH1!{dC-y*0HW2lkN8lvGdB;P@F*wy~VkRvt7bCgqab04drht zSwhl5(gBY7_dQOL;_@ko&Go#NQ}-4B>l=m?{6ip>m+|U1!!h6Sn^yrJ$Dx^f9-dz7KUPzcHkWgx-qEK z4%&8)M>otCC+jfH&AE6<@#qUz*)YVN&iQ$er3Tvwh^0WPuaHm6iU#;8#+1c|~bebxFmwnzU=RIh6W_o3%BKjSa2Mw<}BAZ{F!H?rbXR z?Yh^W_wYKIdjHXA%JAKR&atV&y2lSETBhf3wdX!xSgF6AzWkEbHd6L}weKx$W9`X} z#m(y1b5B0(OzvGhT>maL6?Fu zH$_G-^Q!!mIm+@hEff_j^ND5mov>iy!FD0p8!RH8X(W7fQSm!d#kj?FP-#{_T_L|0 zA~0buIeGJRnoM2>Cw@NN`L>#Fw91=jE#E5K^0W>c6mxBEoZ`%xZ;`vHNx!5;I{QMN z+NyoO>5uOt4m^G5sI=cgZZ?<}@^PhPWnc<4!agZ>TBE$F2K%KffO@mi2hrcmM0g z%uS2y*8LB@?JRW$y?NUI@Mw=VoD+7d|4YF1%2c)S8(D?Kxm~3cua-yAzn|r74IH6r`5U|NO=%?8)uu|28$!*0(H!xHa-3(@U@n zn<>2OuxP(-CSIgvnOyI6_6zN(HcO?b;%0u=^cpTj?cN3UH1>CmD;fsem7FeD6eXJ0 z?06aK7E0XYmrI=mRC$ZEDG_Ebu1E~|^OeY4mRNT_vf)FE|Kgzkb=ZLaNm_%zKlqvvMs!aGwEqX< C_s;DA literal 0 HcmV?d00001 diff --git a/src/main/resources/deviceConfig.properties b/src/main/resources/deviceConfig.properties new file mode 100644 index 000000000..ba7e9922b --- /dev/null +++ b/src/main/resources/deviceConfig.properties @@ -0,0 +1,35 @@ +ad# +# Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +#[Device-Configurations] +server-name=WSO2IoTServer +owner=shabirmean +deviceId=t4ctwq8qfl11 +device-name=SMEAN_t4ctwq8qfl11 +controller-context=/virtual_firealarm/device +scep-context=/virtual_firealarm_scep +https-ep=https://localhost:9443 +http-ep=http://localhost:9763 +apim-ep=http://192.168.67.21:8281 +mqtt-ep=tcp://192.168.67.21:1883 +xmpp-ep=http://204.232.188.215:5222 +auth-method=token +auth-token=79d68b50ae5f5a06e812889979b3453 +refresh-token=8bdda6359dddad218cff3354d5a8cb3b +network-interface=en0 +push-interval=14 +xmpp-server-name=localhost \ No newline at end of file diff --git a/src/main/resources/fireAlarmSound.mid b/src/main/resources/fireAlarmSound.mid new file mode 100644 index 0000000000000000000000000000000000000000..d1a2241b2d87d668b9cfa999f05be6a8c477d895 GIT binary patch literal 6719 zcmeI%&rc&|7zglY+L=<>4Yh|&?8cA@YYBz~Q>>7XY15%lD8d3Q;20ul)6PO!VUezl zB_jA>{7SQ2H^mm&olGP zJ2TJw%nQsdZ6t}vMjSb~-{+QgFS9L)3btqF;=7mCUGc&NDl7>iQ=)>x^OooARCwK@ zZyniZ(aJrzM}?QDl;au|toEq-*4yfKLZt$Kc4|(XP&287Dtca_g2?sIL#L*l;W)d+ zZng7vo84jmhaR3M@uFtoI5r@T74j&7tuA3Ml+h^A(|nnUn9RJ^%MC?8rCSRNy9|p zqwdy-9l}CxB6d_wl!bhVvXHM)v{UEGKYv0mOzOaOv1ji`S+G)I72q!yM?-gK$&)2t zmcm)RCfpglEIb+g@%u8YJ}8`lr{QUM8lHylz<1y~@E!OTd<(t>--2(#H{qM`P53%| z9lj1TiJ4 zj(9>kV%4&Dy!ooa<(m1j>>~!u@{XW|v0Y0q%^(uMW@~Y*AfaKy!a%p(<8= zd21G`#eBKg#|dqJWIv&dl|INX{!Gp~EJrK5)l2?--C-@~s?XkXs_T1CZdgz0B~~6h zO_`L?%X$e}Tn9!8eYYqauoC){0(8)@jx2vXvW|*LbFoiS8eP@)-n*(Sq?CSROI}FH z=YAol0rla^&c}=8Z6-5oD$g7KkjA<1 zdEr*qLgV&p)f;(FRr3|a+V)$_NrxooVxJ~7+R*lL357P4jIkxthOGWdP6O)0m7R|l z%deOuZPPi;#`?rgd5PW7XN%Xie~vw-2nC}w5uwQ_g(5T+rRj^ggnnb$GYng3rkAFB zX|k8bZ6tsFPUmmRiG2{Ir>z&bMB@?#C7O_EQlgMVQxZ)}6qablORshppNDWr(+-++ z(72W4$DEh=OCayMU7nZ14+8%e`MKN8mPL>8IxFVP#Xe(mGNtY1*_=!%8DmSPl&n4= zrvdfh%Ff4&RvUB~RX0hU}ZIZNn zolU}Kd0UOO>6BH|#_TtVQT=shbKNnf&5vo}PO~Y)-GAh(te7ts`+QN`dw)^M6o1O< zZ{)0@Qpnh)c00dPb3h9@YIC-b;>O5-AI4L1DODvg(tL&EVKI?&xbBup!Y2Imu5g!? ygz*a{MNtMz>YM7$#+7aMZ + + + + + + + + + + Builds, tests, and runs the project VirtualAgentUI. + + + diff --git a/src/main/ui/manifest.mf b/src/main/ui/manifest.mf new file mode 100644 index 000000000..328e8e5bc --- /dev/null +++ b/src/main/ui/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/src/main/ui/nbproject/build-impl.xml b/src/main/ui/nbproject/build-impl.xml new file mode 100644 index 000000000..112454207 --- /dev/null +++ b/src/main/ui/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/ui/nbproject/genfiles.properties b/src/main/ui/nbproject/genfiles.properties new file mode 100644 index 000000000..a6df38fd8 --- /dev/null +++ b/src/main/ui/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=e60df945 +build.xml.script.CRC32=7c331eea +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=e60df945 +nbproject/build-impl.xml.script.CRC32=4fa004f7 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/src/main/ui/nbproject/private/private.properties b/src/main/ui/nbproject/private/private.properties new file mode 100644 index 000000000..e59ac1df6 --- /dev/null +++ b/src/main/ui/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=/home/charitha/.netbeans/8.0.2/build.properties diff --git a/src/main/ui/nbproject/private/private.xml b/src/main/ui/nbproject/private/private.xml new file mode 100644 index 000000000..2f9a6910b --- /dev/null +++ b/src/main/ui/nbproject/private/private.xml @@ -0,0 +1,9 @@ + + + + + + file:/home/charitha/git/IoT/iot-server-agents/FireAlarmVirtualAgent/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java + + + diff --git a/src/main/ui/nbproject/project.properties b/src/main/ui/nbproject/project.properties new file mode 100644 index 000000000..fb798f614 --- /dev/null +++ b/src/main/ui/nbproject/project.properties @@ -0,0 +1,73 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/VirtualAgentUI.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=org.wso2.carbon.device.mgt.iot.agent.virtual.VirtualAgentUI +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/src/main/ui/nbproject/project.xml b/src/main/ui/nbproject/project.xml new file mode 100644 index 000000000..438f1e6a3 --- /dev/null +++ b/src/main/ui/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + VirtualAgentUI + + + + + + + + + diff --git a/src/main/ui/src/bulb-on.jpg b/src/main/ui/src/bulb-on.jpg new file mode 100644 index 0000000000000000000000000000000000000000..51d40cd834db53f1bf305997832ad4c5f7a00356 GIT binary patch literal 6942 zcmb7oby!qg_x23K&{9J;14s=ul$3M`gM`wdq#z|-0s=}62n^jJ(lvlc3DOK8-Aadm zNQa=nZ+zb8{eIu~=eN!|*R{@G`<#8Qv+sM|Ywz2++Z6!0rrHBF01#_1APfMw{R&V9 zfN*gBo>;@ho?rqn7#9~zgpZF$Kte=9LQF(Ve20{h{0=DvDKRlQ4LJpbikh05gp8Js zhKi1oikj;0OMoEkGq_+vFqn|)4)GnT|8KkP0#FbDN&xL3AO!%20tli2-u3{P001B^ z2nhJU3_B7S2M?bB8)X0j0XY9}6a)t1;Nsmb07$UyIOHI5>-!aCTuJ3mRK#sC0#-~Ntlle0_H&yVF!WCoLCKmDsLVVM0l zKHajYnVIuPy^Gy)%xN^Ind8QfKW|r9KU6!RNC4mkV4(Lge`Z>#T{_;$R?4}y7ap{? zTigQf2VGUB_oq3WdQ6R7>`H&Vd@^t1m}cM|yWjkX6X}+EkuKTU@I+v|^pgLEciXv1zHBC$8?hNLzH-hjViwbG7tm5)iy!5|JBM-emmS_afh+SC{fM85tZzr$xB= zo&f-)PO$XWy-R`fmcS6*OQP!=X=IJI8UKXRCpyGRyug&3$)=2VW!1{Fce_}2LKG`om#KFwZi%)Q~O_(@1M#iPE4X0KS_D?@i*r2^E7#H zMnYTP=C#z3sd_oyd$AzvnGXQ)G<}uTI1TbxJ;)hdoN=i1Y59=Nu+wa? zB$vl?wl4{Jr?6l8?h7pbi;WlETe0|MwOsDCtDE&UQ;oj*QKR*V+crQT$A2$Y~%r2YRcie8#^mMK|^^R{z^rwQ}!e@G~2e6$0R3a%ZPDQEi zU%ZRbZJr0MhqpaGR?3)WC|39z{X3#t%Y$$0OT|)Rgkl>fpC<_u{u2P;WWCMu-rlT~ z8u6OE8&~^pD*!GbCpy!xWGJ!qb*BLH?&*Kq!MTj~t!g|cF+u34|F!{0iNpQb{@$@- znJhq#^SAq@9XkOz>QkWch zIu&fu3hmbM3=$jD=Fu8kNBy}8QV7<<$#_#?w2}qd>qaM*b>~AKTRo2VEIeBK!1pwY z!+t>Axk>N2C)GHA@>dV06dS4}aaoQZgfZl$Xx*w+^x1-h!)d~MH-3(YAiKwkskKXP z>N5~3ex}85`yK|jfW-NmbE-49th2cr@0twACo2&p^!{8lBeXmyy#9KR@6n*E>nuFd zw(8|4nHk7qRs9e-Ik&#mGEA#-GfvFfqAN1_VDtD|Ik3;N_UGjI+3RU~1KYVBlBP0O z?h81fU*@bJR}ZqedGJST;=lh>uv*bTvA6o%C$93T)M z7pqABq8N)<3QAmZ2phYIB2-vGj~Yw`x8e}h{Rg5TAW$B-`MCfkBW>$*5A95T(|hF- z;{3(8uLH@Pf+?7*bv`$yY!V}WLrQaO zS2XX+z2;Ps;t#d3{mx*6`uQHS6ZB*(eNX8Fkz@4PApghv8A+9Obpw=^UC@{{0|;N~ zuKl>vYwz|0w7GeZ{=Q}>CNsU#p?ZRHdaT&=nsVQSav(|Be7lMoT4Z^qZRo=6Jj4x) z%Md3_Of>J6wVu+pvu)%`q`OQs$?C3Ecq8GW?Qgtp%shivW za0{>>ClPtaSo>6?oMVTHNcJ92YF(ek%YktI#K*`VYs&mB+$=D-W@Gx=)6WTs_3Gwl zeyS8}qeibypz|~$=o2WcTGf+3!{w#abBhcYl^rGqu{v?vY*r1yJp&smg|2F8J=-Bp z?f5wruCV5mIXmsAx;tUs1!KXB1EK$wMoc2x5)MCWCjAUi2^tA|1b0AUC>J;2OgCNL*Ct=AT^m7e_ciY`KMl|KDVX z&2<#)l)@qqDk!;vA{!j6q^zrF<&ORbNLbLx1Fy}P;&sn5_D%NZu}6B1^O(*s1C+bGm+RwP02c_5d+6;w{jFEJ2!Ti>J-cWz6B6!IqxK_a_Fo2 zJ|yWI-d#=kS_g;xgd?&Wp18*P1rD{lt+eI!zzq>oeAlJbafy8_BCvL{lsnOdd7J0uRk=(YI1LzlXYzAT47mmPCG46 z-gu+e){{k9?6{HC4RMswL5}bEK8YNOQUx5Y%GkMRGUyr9RI}zycN61q8U%+pkp=a9IqxzzjC{i?^E#R0&t=2Dp}v|g z;~@-mcW&&h$4BN>2-tm!qI+8EMOk$m^xdsnyEzhM!+g_6zn~7I%53Lnp)p=YI6M}` z(a;z3-b5O$%zfG{S%)4kBWdO*u7$LN5zem3MwU@MT1{i)JkCS?mwR50@r;Q!9)ZD{ zM>iUA0V{fx2V!Ej$^l$DoTb#z5>$D+{pP z1FnR{O#wL-o4!YABD!;2^pUma1RiHtIO<>B#FNLFaxn`bq6-TCTrTgN~I2a&gCErty%f5TK*A)fh#GCxc- zHsT~LtIwaV2(Sff&J6JUg zQy$m%JjG?44%+<%-q+vJZ3;zWem@(Sbw{8czVN)dzv-j#u3GV@3&AgrZy7(YB_yXN z6$(LfWV?QDUnCzgb;#v;F@5jXym1QNUW0#o1P(CcctRqOvRr1+#%v#gmR?)zjLq*? zGk>(~u=2aoCrZ{+Ct?ufBCE_F&qseoaMT8K{NdkEf6PVP2HPRMQK^17#(cy5tMW&k zp)ba=xUNIDe2L_P8RJ)S7ReYuhz?zRqtmhW`!EfBN7m2IAJb=+zXhZUMz(cL1oQ1Q z5Pwp-8XT5c8bv+hxJmgr20YNxmFt+IW$AAC|tlsI7TM4^|q7T^=5(~yV zSN~g;$+KVakz0a>mpJ^kH$r~tqz z+2k2{lkC@jedz%n{aQ1`*;_b^Yc!fH=YFM-VRwv)5^?S$J8<-8s5ne6rvJFeN+Huj z->Uq9HNRQ(o78=Oxg#O3p5QvBQy03-5b6fTx+dDhfltfMhU|>p3XXsozye2fqoz-G zsnfU6eG-{AfYlHy8MqNr2)USIVC95lt~NM^!#!k5PG9iPnA}=h^M5l ztvseO5K16vxdn7Au#<;P1;fYLV*DNwQ}+5PZQeDPCTZFe94U6WLc-9KeidtG#3U(w z!hxX6kBe}rvdniip|YsVDOX4p*Ukh?xhkGAL)P=^`1>CuZ%4uG4{3W3Ls3~Yx8{x9 zs?%VaItN3-{PoCw3fUmR?zfmVhx618VJ#9*bMLFcN4y1hz*qR+9ZoIHGKKX&SWm2u zT@yAsk%e4o_|e}25VdJS0YuW*DnX1YU4krDuUr1ycNFCHP#XSD;H=22j!Rw62!F$n z`-cKm6YAxx72BHs3p7@2wI!{zX<0&Xv65%pU$iVApR-D!66PYAiCjCAWtG>(y^^xI zhJJ+K#2iMI8%T}gv(b~@m{N>RQ46RlE9l|bLZ?4*{d~RzP5$7zFXt(czOg@a71rO` z1g}md>~f2-!&w?{pT&PxA=Z_`mh}Ga3){@*an1Tj{$QPgH%ICfaxOWmbwjYjs<#mz zaqrv$_)=K)(lYkb1{+0!<@z~z7Dh}pFRbo3RAtAmx;JS5R*Q)TzS8~p{I}L`zSg@+ zV|Wq%g*;|jjNAKK?SfpNOw206)G;~5RPdW2Wm@65YRb!D9`i2t)3~n0NY9X0g2j1 zB9E2kuFIs825I$Apv#e1od2`60Qg%2lB3jY@M);Xoj6gfaa>F$96vcx5A+H2&CpM5 zQBNMLt%0C_-9_nf)B6`myi___1ED{(ir}a6WWRRkAphd_}4-F?SLgWFSZu>TZ!QQ?=}jM zf}CB1O%baixdKvi_74T7EBMpeP(*DNDnCPU6w4@j%84!`KOR__c8ye#?tq^HjUH1H$;tgc4ZtOSRtPEs7sGRcPWhixrycnUcm?b zr#y>%egU-zb zJCvrJ1jUyj&b31b$AIs3(2{$}xk69EPPAVmdD<;3hJ7reXzg@_w@kC&5|lQZ7eWRe zQz5+P_WQN*F+0AnG~Qvmviw(#D$qMSL*vm|Bwr|GtaiA05+3#~M&B1VOI;_EPO6$*)K5K1se;RXGJIvM8e>}^So;BrVPC7Q2G5o(nh z8o_wB88^_GO-NX#Y};YqEyZ2-;<~Iwq#=rIfg49*PSWkq-x`&d0=q+qg$8y_j`yF% z4mRok#f2~y7z&}f?ggFWhl%K;|5KlmpYCnxn{XX!yktE%kPpAQ1!P^a&OmmrG#(gF z$^5M0N@kcjbgn@L8)cfz9g1&A$VGIg*t&+slZ~#(w_O{y;o-oygxcE@0imA$rkm*5PX}h!>+8Ryd|ck>BwI({YVJ^JfAPMJ?>8*&= zs>Gf)vPt>%TY$B(#dZ&i%cu6e^ivO(V%elgb=XS)D?8nR)(G^4>tN?RfDtajQY?{* zw_r06 z2v|Ayc&JVpde|VLy5Efk1ROE?fx^FHB(w%~2GwJork-O|MnH>00>$li{(ceOY-z9R zPw9_9lw!94V(e0Bf==JHf9Jsk=vP>9%2W{*ZU3SC-`V{u>HqNlzncE9q+7YOg(i|0 zV2O|JJUseeO((y~2u4bG{m4p{=VOh&zMmHrd04U*9P|gub-mmb>?cpTeo(SzYQQ{s zBz_Cv1!aNC#jK4gwcb~0ML^$?kK1i)x4(LEfHRA;W-9Ku$2XQ7-?R}*Et_Tohd*nr6rB`HhgGVW7|A})gk+5d6}=?480$J6P1s2Uu`@P4>YLSGo{xB z#T+1LyoehJ)3x>u0?T`-B_W1?9`nv^@5&{Eg}5ZmefkQWPHeJf_x9F$*ry#z4O<3h zDI1C2UaMhV8mGqtWelxezWN0IbV&0-_G6Co84HmZKyRW>_lK^2?pReYhlEoPMLB$M zX9^m%o}V_u(s5A<=5b?GaGsAP(}a>Xr>3V=4)+HaL^}ysiRGv$ZGbG0#fO^DE5C8l zEP*ax8xQxF>6)+@$OtoO5I;Q+*KU>7vo&#;HZx@As@Oj-(m_3{$k6OYEbiXp3Wt2t zP1}twKACH7HT=G$>+D0oRwBI0y|lh8qZ=OE-G_nj!rtElUW0{N?jMJmcQ-_2v`%+9 zE2Uaf1)`q>nC`tQn}kqWF~3yjq)|-9Z$p^LvT+#M%<289jfb&v&P!g^mgOK8r%c}f zH*89Re8KXiTs1FHiTw}1PlAew6`oE$5WyW{MHa|_LOw2nPx^DW>m{#p-`jih94o;H z256}A=QlfJbYUJ^zCc3gKr=z%7hlS?DEENZq*hxy0^JCSPYnXURh|-1#uhf!vW65^ zwe>%DJ%b^NYVG;<%U;D)Q12^`@YC!e+;j-7x@6;x&FhE`5b!(E5&G&~^p-AvhWu#& z5#63@Pp+9XKZxkr;rT6T7I|=Oxop&>3fe!YpW05Yd!0s{2C1*a9r|wUA5bDc9c`kx z)A(p3>zE;EF!&*R%xDC)6X}r@%PrvKfCPPiw>G3zk<&<04zJbUEje0Yek6MR(wvrh z)@SGo{Ks3FGt&Dg)N1-r(lA55Qnu##&ldMbYQDHag(rsM3kBgS+B9zax?%aC7&}>p z6EK}Lthn6)%3qk}HXHD^AR{9yZOBjni->T&_@Y{ogt=-# zzKOEu1x5;?d}(&19dp0lNI^_A7M3Ie*Wpq0zOZe?-Nuw9v#`j!v#mheGHQa<9s0fO z04V`#r`XE2ttb9zq8rFlyj3MbwM`zil{;2)#Ccg9?|7#teAT2=(8;*Pd4x7ax^^@~ z*;F+PPrDtK)3e6#8mks^v}na)UwSQuIGAsuIh@xjzWZ#MF%FQ9;6HWAksND!c z`$H&iK2Eq@?ji)_Hx$roPm(nF3t*YP@NrmSY02*#rDdo0@@Ia$Cw%VE-N_icK&|=={Sb$ literal 0 HcmV?d00001 diff --git a/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/VirtualAgentUI.java b/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/VirtualAgentUI.java new file mode 100644 index 000000000..a2aa2116a --- /dev/null +++ b/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/VirtualAgentUI.java @@ -0,0 +1,37 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.wso2.carbon.device.mgt.iot.agent.virtual; + +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import org.wso2.carbon.device.mgt.iot.agent.virtual.ui.AgentUI; + +/** + * + * @author charitha + */ +public class VirtualAgentUI { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + try { + // Set System L&F + UIManager.setLookAndFeel( + UIManager.getSystemLookAndFeelClassName()); + } catch (UnsupportedLookAndFeelException | ClassNotFoundException | InstantiationException | IllegalAccessException e) { + // handle exception + } + + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new AgentUI().setVisible(true); + } + }); + } + +} diff --git a/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.form b/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.form new file mode 100644 index 000000000..23b70e036 --- /dev/null +++ b/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.form @@ -0,0 +1,803 @@ + + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java b/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java new file mode 100644 index 000000000..470a7d8fe --- /dev/null +++ b/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java @@ -0,0 +1,744 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.wso2.carbon.device.mgt.iot.agent.virtual.ui; + +/** + * + * @author charitha + */ +public class AgentUI extends javax.swing.JFrame { + + /** + * Creates new form AgentUI + */ + public AgentUI() { + initComponents(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + lblAgentName = new javax.swing.JLabel(); + jLabel2 = new javax.swing.JLabel(); + jPanel1 = new javax.swing.JPanel(); + jLabel3 = new javax.swing.JLabel(); + pnlBulbStatus = new javax.swing.JPanel(); + jPanel2 = new javax.swing.JPanel(); + jLabel4 = new javax.swing.JLabel(); + chkbxTemperatureRandom = new javax.swing.JCheckBox(); + jSeparator1 = new javax.swing.JSeparator(); + jPanel7 = new javax.swing.JPanel(); + jLabel5 = new javax.swing.JLabel(); + txtTemperatureMin = new javax.swing.JTextField(); + jLabel6 = new javax.swing.JLabel(); + txtTemperatureMax = new javax.swing.JTextField(); + jLabel10 = new javax.swing.JLabel(); + txtTemperatureSVF = new javax.swing.JTextField(); + spinnerTemperature = new javax.swing.JSpinner(); + chkbxTemperatureSmooth = new javax.swing.JCheckBox(); + jPanel6 = new javax.swing.JPanel(); + jLabel20 = new javax.swing.JLabel(); + btnView = new javax.swing.JButton(); + btnControl = new javax.swing.JButton(); + lblStatus = new javax.swing.JLabel(); + jPanel8 = new javax.swing.JPanel(); + jLabel23 = new javax.swing.JLabel(); + chkbxHumidityRandom = new javax.swing.JCheckBox(); + jSeparator5 = new javax.swing.JSeparator(); + jPanel9 = new javax.swing.JPanel(); + jLabel24 = new javax.swing.JLabel(); + txtHumidityMin = new javax.swing.JTextField(); + jLabel25 = new javax.swing.JLabel(); + txtHumidityMax = new javax.swing.JTextField(); + txtHumiditySVF = new javax.swing.JTextField(); + jLabel11 = new javax.swing.JLabel(); + spinnerHumidity = new javax.swing.JSpinner(); + chkbxHumiditySmooth = new javax.swing.JCheckBox(); + jPanel3 = new javax.swing.JPanel(); + jLabel7 = new javax.swing.JLabel(); + spinnerInterval = new javax.swing.JSpinner(); + jLabel8 = new javax.swing.JLabel(); + jLabel9 = new javax.swing.JLabel(); + cmbProtocol = new javax.swing.JComboBox(); + jLabel12 = new javax.swing.JLabel(); + cmbInterface = new javax.swing.JComboBox(); + jPanel4 = new javax.swing.JPanel(); + chkbxEmulate = new javax.swing.JCheckBox(); + cmbPeriod = new javax.swing.JComboBox(); + jLabel1 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("Fire Alarm Emulator"); + setResizable(false); + + lblAgentName.setFont(new java.awt.Font("Cantarell", 1, 24)); // NOI18N + lblAgentName.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + lblAgentName.setText("Device Name: WSO2 IoT Virtual Agent"); + + jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel2.setText("Copyright (c) 2015, WSO2 Inc."); + + jPanel1.setBackground(new java.awt.Color(220, 220, 220)); + + jLabel3.setFont(new java.awt.Font("Cantarell", 0, 18)); // NOI18N + jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel3.setText("Bulb Status"); + + pnlBulbStatus.setBackground(new java.awt.Color(220, 220, 220)); + + javax.swing.GroupLayout pnlBulbStatusLayout = new javax.swing.GroupLayout(pnlBulbStatus); + pnlBulbStatus.setLayout(pnlBulbStatusLayout); + pnlBulbStatusLayout.setHorizontalGroup( + pnlBulbStatusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 0, Short.MAX_VALUE) + ); + pnlBulbStatusLayout.setVerticalGroup( + pnlBulbStatusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 167, Short.MAX_VALUE) + ); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(pnlBulbStatus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE)) + .addContainerGap()) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel3) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(pnlBulbStatus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap()) + ); + + jPanel2.setBackground(new java.awt.Color(220, 220, 220)); + + jLabel4.setFont(new java.awt.Font("Cantarell", 0, 18)); // NOI18N + jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel4.setText("Temperature"); + + chkbxTemperatureRandom.setText("Randomize Data"); + chkbxTemperatureRandom.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkbxTemperatureRandomActionPerformed(evt); + } + }); + + jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL); + + jPanel7.setBackground(new java.awt.Color(220, 220, 220)); + + jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + jLabel5.setText("Min"); + + txtTemperatureMin.setHorizontalAlignment(javax.swing.JTextField.CENTER); + txtTemperatureMin.setText("20"); + txtTemperatureMin.setEnabled(false); + txtTemperatureMin.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtTemperatureMinActionPerformed(evt); + } + }); + + jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + jLabel6.setText("Max"); + + txtTemperatureMax.setHorizontalAlignment(javax.swing.JTextField.CENTER); + txtTemperatureMax.setText("50"); + txtTemperatureMax.setEnabled(false); + txtTemperatureMax.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtTemperatureMaxActionPerformed(evt); + } + }); + + jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + jLabel10.setText("SV %"); + + txtTemperatureSVF.setHorizontalAlignment(javax.swing.JTextField.CENTER); + txtTemperatureSVF.setText("50"); + txtTemperatureSVF.setEnabled(false); + txtTemperatureSVF.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtTemperatureSVFActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7); + jPanel7.setLayout(jPanel7Layout); + jPanel7Layout.setHorizontalGroup( + jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel7Layout.createSequentialGroup() + .addComponent(jLabel5) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtTemperatureMin, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel6) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtTemperatureMax, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel10) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtTemperatureSVF, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + jPanel7Layout.setVerticalGroup( + jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txtTemperatureMin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(txtTemperatureMax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel6) + .addComponent(jLabel5) + .addComponent(jLabel10) + .addComponent(txtTemperatureSVF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(35, 35, 35)) + ); + + spinnerTemperature.setFont(new java.awt.Font("Cantarell", 1, 24)); // NOI18N + spinnerTemperature.setModel(new javax.swing.SpinnerNumberModel(30, 0, 100, 1)); + spinnerTemperature.addChangeListener(new javax.swing.event.ChangeListener() { + public void stateChanged(javax.swing.event.ChangeEvent evt) { + spinnerTemperatureStateChanged(evt); + } + }); + + chkbxTemperatureSmooth.setText("Smooth Variation"); + chkbxTemperatureSmooth.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkbxTemperatureSmoothActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); + jPanel2.setLayout(jPanel2Layout); + jPanel2Layout.setHorizontalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(spinnerTemperature)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 6, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(chkbxTemperatureRandom) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(chkbxTemperatureSmooth))) + .addContainerGap()) + ); + jPanel2Layout.setVerticalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jSeparator1) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(chkbxTemperatureRandom) + .addComponent(chkbxTemperatureSmooth)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE)) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(spinnerTemperature))) + .addContainerGap()) + ); + + jPanel6.setBackground(new java.awt.Color(253, 254, 209)); + + jLabel20.setText("Connection Status:"); + jLabel20.setVerticalTextPosition(javax.swing.SwingConstants.TOP); + + btnView.setText("View Device Data"); + btnView.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + btnViewMouseClicked(evt); + } + }); + + btnControl.setText("Control Device"); + btnControl.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + btnControlMouseClicked(evt); + } + }); + + lblStatus.setFont(new java.awt.Font("Cantarell", 1, 15)); // NOI18N + lblStatus.setText("Not Connected"); + + javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6); + jPanel6.setLayout(jPanel6Layout); + jPanel6Layout.setHorizontalGroup( + jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel6Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel20) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(lblStatus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(btnControl) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(btnView) + .addContainerGap()) + ); + jPanel6Layout.setVerticalGroup( + jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jLabel20, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(btnView, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(btnControl) + .addComponent(lblStatus))) + .addContainerGap()) + ); + + jPanel8.setBackground(new java.awt.Color(220, 220, 220)); + + jLabel23.setFont(new java.awt.Font("Cantarell", 0, 18)); // NOI18N + jLabel23.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel23.setText("Humidity"); + + chkbxHumidityRandom.setText("Randomize Data"); + chkbxHumidityRandom.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkbxHumidityRandomActionPerformed(evt); + } + }); + + jSeparator5.setOrientation(javax.swing.SwingConstants.VERTICAL); + + jPanel9.setBackground(new java.awt.Color(220, 220, 220)); + + jLabel24.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + jLabel24.setText("Min"); + + txtHumidityMin.setHorizontalAlignment(javax.swing.JTextField.CENTER); + txtHumidityMin.setText("20"); + txtHumidityMin.setEnabled(false); + txtHumidityMin.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtHumidityMinActionPerformed(evt); + } + }); + + jLabel25.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + jLabel25.setText("Max"); + + txtHumidityMax.setHorizontalAlignment(javax.swing.JTextField.CENTER); + txtHumidityMax.setText("50"); + txtHumidityMax.setEnabled(false); + txtHumidityMax.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtHumidityMaxActionPerformed(evt); + } + }); + + txtHumiditySVF.setHorizontalAlignment(javax.swing.JTextField.CENTER); + txtHumiditySVF.setText("50"); + txtHumiditySVF.setEnabled(false); + txtHumiditySVF.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtHumiditySVFActionPerformed(evt); + } + }); + + jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + jLabel11.setText("SV %"); + + javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9); + jPanel9.setLayout(jPanel9Layout); + jPanel9Layout.setHorizontalGroup( + jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel9Layout.createSequentialGroup() + .addComponent(jLabel24) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtHumidityMin, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel25) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtHumidityMax, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel11) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtHumiditySVF, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + jPanel9Layout.setVerticalGroup( + jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel11) + .addComponent(txtHumiditySVF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txtHumidityMin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(txtHumidityMax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel25) + .addComponent(jLabel24))) + .addGap(35, 35, 35)) + ); + + spinnerHumidity.setFont(new java.awt.Font("Cantarell", 1, 24)); // NOI18N + spinnerHumidity.setModel(new javax.swing.SpinnerNumberModel(30, 0, 100, 1)); + spinnerHumidity.addChangeListener(new javax.swing.event.ChangeListener() { + public void stateChanged(javax.swing.event.ChangeEvent evt) { + spinnerHumidityStateChanged(evt); + } + }); + + chkbxHumiditySmooth.setText("Smooth Variation"); + chkbxHumiditySmooth.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkbxHumiditySmoothActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8); + jPanel8.setLayout(jPanel8Layout); + jPanel8Layout.setHorizontalGroup( + jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel8Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(spinnerHumidity)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jSeparator5, javax.swing.GroupLayout.PREFERRED_SIZE, 6, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel8Layout.createSequentialGroup() + .addComponent(chkbxHumidityRandom) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(chkbxHumiditySmooth))) + .addContainerGap()) + ); + jPanel8Layout.setVerticalGroup( + jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel8Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jSeparator5) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(chkbxHumidityRandom) + .addComponent(chkbxHumiditySmooth)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 1, Short.MAX_VALUE)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(spinnerHumidity))) + .addContainerGap()) + ); + + jPanel3.setBackground(new java.awt.Color(207, 233, 234)); + + jLabel7.setText("Data Push Interval:"); + + spinnerInterval.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(5), Integer.valueOf(1), null, Integer.valueOf(1))); + spinnerInterval.addChangeListener(new javax.swing.event.ChangeListener() { + public void stateChanged(javax.swing.event.ChangeEvent evt) { + spinnerIntervalStateChanged(evt); + } + }); + + jLabel8.setText("Seconds"); + + jLabel9.setText("Protocol:"); + + cmbProtocol.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "MQTT", "XMPP", "HTTP" })); + cmbProtocol.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cmbProtocolActionPerformed(evt); + } + }); + + jLabel12.setText("Interface:"); + + cmbInterface.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "eth0" })); + cmbInterface.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cmbInterfaceActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); + jPanel3.setLayout(jPanel3Layout); + jPanel3Layout.setHorizontalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel7) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(spinnerInterval, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel8) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel12) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(cmbInterface, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel9) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(cmbProtocol, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); + jPanel3Layout.setVerticalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel12) + .addComponent(cmbInterface, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel7) + .addComponent(spinnerInterval, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel8) + .addComponent(jLabel9) + .addComponent(cmbProtocol, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addContainerGap()) + ); + + jPanel4.setBackground(new java.awt.Color(169, 253, 173)); + + chkbxEmulate.setText("Emulate data"); + chkbxEmulate.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkbxEmulateActionPerformed(evt); + } + }); + + cmbPeriod.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1 hour", "1 day", "1 week", "1 month " })); + cmbPeriod.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cmbPeriodActionPerformed(evt); + } + }); + + jLabel1.setText("Emulation Period"); + + javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); + jPanel4.setLayout(jPanel4Layout); + jPanel4Layout.setHorizontalGroup( + jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel4Layout.createSequentialGroup() + .addContainerGap() + .addComponent(chkbxEmulate) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel1) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(cmbPeriod, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); + jPanel4Layout.setVerticalGroup( + jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(chkbxEmulate) + .addComponent(cmbPeriod, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel1)) + .addContainerGap()) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lblAgentName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(lblAgentName, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); + + pack(); + }// //GEN-END:initComponents + + private void btnControlMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnControlMouseClicked + // TODO add your handling code here: + }//GEN-LAST:event_btnControlMouseClicked + + private void btnViewMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnViewMouseClicked + // TODO add your handling code here: + }//GEN-LAST:event_btnViewMouseClicked + + private void chkbxTemperatureRandomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkbxTemperatureRandomActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_chkbxTemperatureRandomActionPerformed + + private void chkbxHumidityRandomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkbxHumidityRandomActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_chkbxHumidityRandomActionPerformed + + private void spinnerTemperatureStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spinnerTemperatureStateChanged + // TODO add your handling code here: + }//GEN-LAST:event_spinnerTemperatureStateChanged + + private void spinnerHumidityStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spinnerHumidityStateChanged + // TODO add your handling code here: + }//GEN-LAST:event_spinnerHumidityStateChanged + + private void txtTemperatureMinActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtTemperatureMinActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txtTemperatureMinActionPerformed + + private void txtTemperatureMaxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtTemperatureMaxActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txtTemperatureMaxActionPerformed + + private void txtHumidityMinActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtHumidityMinActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txtHumidityMinActionPerformed + + private void txtHumidityMaxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtHumidityMaxActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txtHumidityMaxActionPerformed + + private void spinnerIntervalStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spinnerIntervalStateChanged + // TODO add your handling code here: + }//GEN-LAST:event_spinnerIntervalStateChanged + + private void cmbInterfaceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbInterfaceActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_cmbInterfaceActionPerformed + + private void cmbProtocolActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbProtocolActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_cmbProtocolActionPerformed + + private void txtTemperatureSVFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtTemperatureSVFActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txtTemperatureSVFActionPerformed + + private void txtHumiditySVFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtHumiditySVFActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txtHumiditySVFActionPerformed + + private void chkbxTemperatureSmoothActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkbxTemperatureSmoothActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_chkbxTemperatureSmoothActionPerformed + + private void chkbxHumiditySmoothActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkbxHumiditySmoothActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_chkbxHumiditySmoothActionPerformed + + private void cmbPeriodActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbPeriodActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_cmbPeriodActionPerformed + + private void chkbxEmulateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkbxEmulateActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_chkbxEmulateActionPerformed + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton btnControl; + private javax.swing.JButton btnView; + private javax.swing.JCheckBox chkbxEmulate; + private javax.swing.JCheckBox chkbxHumidityRandom; + private javax.swing.JCheckBox chkbxHumiditySmooth; + private javax.swing.JCheckBox chkbxTemperatureRandom; + private javax.swing.JCheckBox chkbxTemperatureSmooth; + private javax.swing.JComboBox cmbInterface; + private javax.swing.JComboBox cmbPeriod; + private javax.swing.JComboBox cmbProtocol; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel10; + private javax.swing.JLabel jLabel11; + private javax.swing.JLabel jLabel12; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel20; + private javax.swing.JLabel jLabel23; + private javax.swing.JLabel jLabel24; + private javax.swing.JLabel jLabel25; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLabel6; + private javax.swing.JLabel jLabel7; + private javax.swing.JLabel jLabel8; + private javax.swing.JLabel jLabel9; + private javax.swing.JPanel jPanel1; + private javax.swing.JPanel jPanel2; + private javax.swing.JPanel jPanel3; + private javax.swing.JPanel jPanel4; + private javax.swing.JPanel jPanel6; + private javax.swing.JPanel jPanel7; + private javax.swing.JPanel jPanel8; + private javax.swing.JPanel jPanel9; + private javax.swing.JSeparator jSeparator1; + private javax.swing.JSeparator jSeparator5; + private javax.swing.JLabel lblAgentName; + private javax.swing.JLabel lblStatus; + private javax.swing.JPanel pnlBulbStatus; + private javax.swing.JSpinner spinnerHumidity; + private javax.swing.JSpinner spinnerInterval; + private javax.swing.JSpinner spinnerTemperature; + private javax.swing.JTextField txtHumidityMax; + private javax.swing.JTextField txtHumidityMin; + private javax.swing.JTextField txtHumiditySVF; + private javax.swing.JTextField txtTemperatureMax; + private javax.swing.JTextField txtTemperatureMin; + private javax.swing.JTextField txtTemperatureSVF; + // End of variables declaration//GEN-END:variables +} From 14455efd97ff0e78ecdefdfa9959e5240604027e Mon Sep 17 00:00:00 2001 From: Ace Date: Fri, 4 Nov 2016 19:41:33 +0530 Subject: [PATCH 003/856] merging changes with upstream partial --- pom.xml | 2 +- .../mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 83eefe902..0d8e5b5bf 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 2.2.5-SNAPSHOT + 2.2.6-SNAPSHOT ../pom.xml diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java index 0509eb80b..d302e7281 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java @@ -3,11 +3,10 @@ package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.analytics.api.AnalyticsDataAPI; +import org.wso2.carbon.analytics.api.AnalyticsDataAPIUtil; import org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse; -import org.wso2.carbon.analytics.dataservice.commons.AnalyticsDrillDownRequest; import org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry; import org.wso2.carbon.analytics.dataservice.commons.SortByField; -import org.wso2.carbon.analytics.dataservice.core.AnalyticsDataServiceUtils; import org.wso2.carbon.analytics.datasource.commons.Record; import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException; import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService; @@ -21,7 +20,6 @@ import org.wso2.carbon.event.output.adapter.core.OutputEventAdapterService; import org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService; import java.util.ArrayList; -import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -79,7 +77,7 @@ public class APIUtil { sortByFields); List recordIds = getRecordIds(resultEntries); AnalyticsDataResponse response = analyticsDataAPI.get(tenantId, tableName, 1, null, recordIds); - Map sensorDatas = createSensorData(AnalyticsDataServiceUtils.listRecords( + Map sensorDatas = createSensorData(AnalyticsDataAPIUtil.listRecords( analyticsDataAPI, response)); List sortedSensorData = getSortedSensorData(sensorDatas, resultEntries); return sortedSensorData; From 553ad83f673be8cf0cad6683f4d3f984204dc490 Mon Sep 17 00:00:00 2001 From: Ace Date: Fri, 4 Nov 2016 19:41:33 +0530 Subject: [PATCH 004/856] merging changes with upstream partial --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 53cd03c0d..edcaf1c5e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 2.2.5-SNAPSHOT + 2.2.6-SNAPSHOT ../pom.xml From fa3c5ae29f84da08a21aa191a3b49be5b922385e Mon Sep 17 00:00:00 2001 From: GPrathap Date: Tue, 8 Nov 2016 15:59:04 +0530 Subject: [PATCH 005/856] changing MQTT message broker port to 1886 --- .../mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java index feb8135db..2c6cd2840 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java @@ -67,7 +67,7 @@ public class ZipUtil { private static final String HTTPS_PROTOCOL_APPENDER = "https://"; private static final String HTTP_PROTOCOL_APPENDER = "http://"; private static final String CONFIG_TYPE = "general"; - private static final String DEFAULT_MQTT_ENDPOINT = "tcp://localhost:1883"; + private static final String DEFAULT_MQTT_ENDPOINT = "tcp://localhost:1886"; public static final String HOST_NAME = "HostName"; public ZipArchive createZipFile(String owner, String deviceType, String deviceId, String deviceName, From 85292f06c8cefdbc22b253e9a09a5d148d6eb9aa Mon Sep 17 00:00:00 2001 From: charitha Date: Wed, 16 Nov 2016 13:32:45 +0530 Subject: [PATCH 006/856] Update component versions for IoTS-1.0.0 release --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0d8e5b5bf..700881b18 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 2.2.6-SNAPSHOT + 3.0.0-SNAPSHOT ../pom.xml From aa6361179dca1df704fda2ff3940b08ae61c9602 Mon Sep 17 00:00:00 2001 From: charitha Date: Wed, 16 Nov 2016 13:32:45 +0530 Subject: [PATCH 007/856] Update component versions for IoTS-1.0.0 release --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index edcaf1c5e..b31d0d076 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 2.2.6-SNAPSHOT + 3.0.0-SNAPSHOT ../pom.xml From 99cbbd2eb044c71c5d7a235483a3f5cb5ec20fc5 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 16 Nov 2016 13:55:17 +0000 Subject: [PATCH 008/856] [maven-release-plugin] prepare release v3.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 700881b18..719d3211f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.0-SNAPSHOT + 3.0.0 ../pom.xml From 57f2764d133c09e9c5cefe965b5912eb64ff11e2 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 16 Nov 2016 13:55:17 +0000 Subject: [PATCH 009/856] [maven-release-plugin] prepare release v3.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b31d0d076..4df0f0131 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.0-SNAPSHOT + 3.0.0 ../pom.xml From e070efd2570621b126706c69e2bc24258f0ea636 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 16 Nov 2016 13:57:06 +0000 Subject: [PATCH 010/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 719d3211f..c4f55fe40 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.0 + 3.0.1-SNAPSHOT ../pom.xml From 9de9c9870c5f8c2188738203d2415b46c6b5ad32 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 16 Nov 2016 13:57:06 +0000 Subject: [PATCH 011/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4df0f0131..ce7b82f00 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.0 + 3.0.1-SNAPSHOT ../pom.xml From 8f2895daf3f135011182cedd91523c7ae5d850a1 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Sun, 20 Nov 2016 02:37:42 +0530 Subject: [PATCH 012/856] changed device access verification approach --- .../service/impl/VirtualFireAlarmServiceImpl.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java index ce54d9537..7e63fbf21 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java @@ -312,13 +312,10 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { VirtualFireAlarmConstants.DEVICE_TYPE, tags, KEY_TYPE, applicationUsername, true); } JWTClient jwtClient = APIUtil.getJWTClientManagerService().getJWTClient(); - String device = "{ \"scope\":\"mqtt-publisher mqtt-subscriber\", \"deviceIdentifiers\":[{\"id\":\""+deviceId+"\", " + - "\"type\":\""+VirtualFireAlarmConstants.DEVICE_TYPE+"\"}]}"; - Map params = new HashMap(); - params.put("device", Base64.encodeBase64String(device.getBytes())); + String scopes = " device_" + deviceId; AccessTokenInfo accessTokenInfo = jwtClient.getAccessToken(apiApplicationKey.getConsumerKey(), apiApplicationKey.getConsumerSecret(), owner, - null, params); + scopes); String accessToken = accessTokenInfo.getAccessToken(); String refreshToken = accessTokenInfo.getRefreshToken(); XmppAccount newXmppAccount = new XmppAccount(); From eb9652a13c31471756aa9800959b05e83f2d1fcc Mon Sep 17 00:00:00 2001 From: GPrathap Date: Sun, 20 Nov 2016 18:55:39 +0530 Subject: [PATCH 013/856] removed @API and @Permission annotations and added @SwaggerDefinition and @Authorization annotations --- .../service/impl/VirtualFireAlarmService.java | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java index 9d89050fb..faf40c962 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java @@ -18,7 +18,11 @@ package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl; -import org.wso2.carbon.apimgt.annotations.api.API; +import io.swagger.annotations.SwaggerDefinition; +import io.swagger.annotations.Info; +import io.swagger.annotations.ExtensionProperty; +import io.swagger.annotations.Extension; +import io.swagger.annotations.Tag; import org.wso2.carbon.apimgt.annotations.api.Scope; import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.DeviceType; import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.Feature; @@ -33,7 +37,21 @@ import javax.ws.rs.core.Response; * the transport 'Connectors' [XMPP & MQTT] specific to the VirtualFirealarm device-type in order to communicate with * such devices and to receive messages form it. */ -@API(name = "virtual_firealarm", version = "1.0.0", context = "/virtual_firealarm", tags = {"virtual_firealarm"}) +@SwaggerDefinition( + info = @Info( + version = "1.0.0", + title = "", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = "name", value = "virtual_firealarm"), + @ExtensionProperty(name = "context", value = "/virtual_firealarm"), + }) + } + ), + tags = { + @Tag(name = "virtual_firealarm", description = "") + } +) @DeviceType(value = "virtual_firealarm") public interface VirtualFireAlarmService { From a015e5529d20dbb6d0fca87e3ffa9ea572fc1220 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Mon, 21 Nov 2016 20:55:12 +0530 Subject: [PATCH 014/856] removed device type and feature annotation --- .../service/impl/VirtualFireAlarmService.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java index faf40c962..75db835b7 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java @@ -24,8 +24,6 @@ import io.swagger.annotations.ExtensionProperty; import io.swagger.annotations.Extension; import io.swagger.annotations.Tag; import org.wso2.carbon.apimgt.annotations.api.Scope; -import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.DeviceType; -import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.Feature; import javax.ws.rs.*; import javax.ws.rs.core.Response; @@ -52,7 +50,6 @@ import javax.ws.rs.core.Response; @Tag(name = "virtual_firealarm", description = "") } ) -@DeviceType(value = "virtual_firealarm") public interface VirtualFireAlarmService { /** @@ -67,7 +64,6 @@ public interface VirtualFireAlarmService { @POST @Path("device/{deviceId}/buzz") @Scope(key = "device:firealarm:enroll", name = "", description = "") - @Feature(code = "buzz", name = "Buzzer On / Off", description = "Switch on/off Virtual Fire Alarm Buzzer. (On / Off)") Response switchBuzzer(@PathParam("deviceId") String deviceId, @FormParam("state") String state); From 0f3e47bb460d2496ca0880adfd3171f7a3cb137a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 25 Nov 2016 09:11:13 +0000 Subject: [PATCH 015/856] [maven-release-plugin] prepare release v3.0.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c4f55fe40..df4515fb0 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.1-SNAPSHOT + 3.0.1 ../pom.xml From 3ea8cfc621480766e0516b46108e666184c0ad93 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 25 Nov 2016 09:11:13 +0000 Subject: [PATCH 016/856] [maven-release-plugin] prepare release v3.0.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ce7b82f00..857832c4f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.1-SNAPSHOT + 3.0.1 ../pom.xml From fe6accf78f033ace7927439ab4a8aadb38e63a33 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 25 Nov 2016 09:14:26 +0000 Subject: [PATCH 017/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index df4515fb0..ced582d94 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.1 + 3.0.2-SNAPSHOT ../pom.xml From b4232556a64bb39add18a8177c113a0ff950dfa3 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 25 Nov 2016 09:14:26 +0000 Subject: [PATCH 018/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 857832c4f..8cdb9596b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.1 + 3.0.2-SNAPSHOT ../pom.xml From cd6806c6ad6f2f2dad94c63a4d3804ec0604481b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 1 Dec 2016 13:50:48 +0000 Subject: [PATCH 019/856] [maven-release-plugin] prepare release v3.0.2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ced582d94..1b7542267 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.2-SNAPSHOT + 3.0.2 ../pom.xml From 402815bc4c8dbec5a02f0febc0821d2b2f2f51d5 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 1 Dec 2016 13:50:48 +0000 Subject: [PATCH 020/856] [maven-release-plugin] prepare release v3.0.2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8cdb9596b..f649862e4 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.2-SNAPSHOT + 3.0.2 ../pom.xml From cea3d593bff5b864d21e8a76595f15814853f02a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 1 Dec 2016 13:52:49 +0000 Subject: [PATCH 021/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1b7542267..d4573ade7 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.2 + 3.0.3-SNAPSHOT ../pom.xml From d22f40f9d5c4ec9b3be30018596306c937c34b5f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 1 Dec 2016 13:52:49 +0000 Subject: [PATCH 022/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f649862e4..c2c197b1b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.2 + 3.0.3-SNAPSHOT ../pom.xml From ccf117b21d603788f39d4a71b80da3b34f3e2f56 Mon Sep 17 00:00:00 2001 From: GPrathap Date: Mon, 5 Dec 2016 09:57:10 +0530 Subject: [PATCH 023/856] added expiration time of application access token --- .../service/impl/VirtualFireAlarmServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java index 7e63fbf21..c00dd6ab7 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java @@ -309,7 +309,8 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { APIManagementProviderService apiManagementProviderService = APIUtil.getAPIManagementProviderService(); String[] tags = {VirtualFireAlarmConstants.DEVICE_TYPE}; apiApplicationKey = apiManagementProviderService.generateAndRetrieveApplicationKeys( - VirtualFireAlarmConstants.DEVICE_TYPE, tags, KEY_TYPE, applicationUsername, true); + VirtualFireAlarmConstants.DEVICE_TYPE, tags, KEY_TYPE, applicationUsername, true, + VirtualFireAlarmConstants.APIM_APPLICATION_TOKEN_VALIDITY_PERIOD); } JWTClient jwtClient = APIUtil.getJWTClientManagerService().getJWTClient(); String scopes = " device_" + deviceId; From c0d46890059d3523e877011751e234401506391e Mon Sep 17 00:00:00 2001 From: Harshan Liyanage Date: Thu, 8 Dec 2016 16:40:18 +0530 Subject: [PATCH 024/856] Resolved conflicts --- pom.xml | 263 ++++++++++++ .../service/impl/VirtualFireAlarmService.java | 87 ++++ .../impl/VirtualFireAlarmServiceImpl.java | 345 ++++++++++++++++ .../service/impl/dto/SensorRecord.java | 68 +++ .../exception/VirtualFireAlarmException.java | 35 ++ .../service/impl/util/APIUtil.java | 196 +++++++++ .../util/VirtualFireAlarmServiceUtils.java | 51 +++ .../util/VirtualFireAlarmUtilConstants.java | 26 ++ .../service/impl/util/ZipArchive.java | 43 ++ .../service/impl/util/ZipUtil.java | 387 ++++++++++++++++++ .../service/impl/util/util/Utils.java | 61 +++ src/main/webapp/META-INF/permissions.xml | 52 +++ .../webapp/META-INF/webapp-classloading.xml | 33 ++ src/main/webapp/WEB-INF/cxf-servlet.xml | 38 ++ src/main/webapp/WEB-INF/web.xml | 42 ++ 15 files changed, 1727 insertions(+) create mode 100644 pom.xml create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dto/SensorRecord.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/exception/VirtualFireAlarmException.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmServiceUtils.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmUtilConstants.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipArchive.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/util/Utils.java create mode 100644 src/main/webapp/META-INF/permissions.xml create mode 100644 src/main/webapp/META-INF/webapp-classloading.xml create mode 100644 src/main/webapp/WEB-INF/cxf-servlet.xml create mode 100644 src/main/webapp/WEB-INF/web.xml diff --git a/pom.xml b/pom.xml new file mode 100644 index 000000000..d4573ade7 --- /dev/null +++ b/pom.xml @@ -0,0 +1,263 @@ + + + + + + virtual-fire-alarm-plugin + org.wso2.carbon.devicemgt-plugins + 3.0.3-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.wso2.carbon.device.mgt.iot.virtualfirealarm.api + war + WSO2 Carbon - IoT Server VirtualFireAlarm API + WSO2 Carbon - Virtual FireAlarm Service Management API Implementation + http://wso2.org + + + + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.common + provided + + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.core + provided + + + org.apache.axis2.wso2 + axis2-client + + + + + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.analytics.data.publisher + provided + + + org.apache.axis2.wso2 + axis2-client + + + + + + org.wso2.carbon.devicemgt + org.wso2.carbon.certificate.mgt.core + provided + + + commons-codec + commons-codec + + + + + + + + org.apache.cxf + cxf-rt-frontend-jaxws + provided + + + org.apache.cxf + cxf-rt-frontend-jaxrs + provided + + + org.apache.cxf + cxf-rt-transports-http + provided + + + + + org.eclipse.paho + org.eclipse.paho.client.mqttv3 + provided + + + + + org.apache.httpcomponents + httpasyncclient + 4.1 + provided + + + + + org.codehaus.jackson + jackson-core-asl + + + org.codehaus.jackson + jackson-jaxrs + + + javax + javaee-web-api + provided + + + javax.ws.rs + jsr311-api + provided + + + commons-httpclient.wso2 + commons-httpclient + provided + + + + org.wso2.carbon + org.wso2.carbon.utils + provided + + + org.bouncycastle.wso2 + bcprov-jdk15on + + + org.wso2.carbon + org.wso2.carbon.user.api + + + org.wso2.carbon + org.wso2.carbon.queuing + + + org.wso2.carbon + org.wso2.carbon.base + + + org.apache.axis2.wso2 + axis2 + + + org.igniterealtime.smack.wso2 + smack + + + org.igniterealtime.smack.wso2 + smackx + + + jaxen + jaxen + + + commons-fileupload.wso2 + commons-fileupload + + + org.apache.ant.wso2 + ant + + + org.apache.ant.wso2 + ant + + + commons-httpclient.wso2 + commons-httpclient + + + org.eclipse.equinox + javax.servlet + + + org.wso2.carbon + org.wso2.carbon.registry.api + + + + + commons-codec + commons-codec + + + org.wso2.carbon.devicemgt + org.wso2.carbon.apimgt.annotations + provided + + + org.igniterealtime.smack.wso2 + smack + provided + + + org.igniterealtime.smack.wso2 + smackx + provided + + + org.wso2.carbon.devicemgt + org.wso2.carbon.identity.jwt.client.extension + provided + + + org.wso2.carbon.devicemgt + org.wso2.carbon.apimgt.application.extension + provided + + + org.wso2.carbon.analytics + org.wso2.carbon.analytics.api + provided + + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.extensions + provided + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin + provided + + + + + + maven-compiler-plugin + + UTF-8 + ${wso2.maven.compiler.source} + ${wso2.maven.compiler.target} + + + + maven-war-plugin + + virtual_firealarm + + + + + + diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java new file mode 100644 index 000000000..75db835b7 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl; + +import io.swagger.annotations.SwaggerDefinition; +import io.swagger.annotations.Info; +import io.swagger.annotations.ExtensionProperty; +import io.swagger.annotations.Extension; +import io.swagger.annotations.Tag; +import org.wso2.carbon.apimgt.annotations.api.Scope; + +import javax.ws.rs.*; +import javax.ws.rs.core.Response; + +/** + * This class consists the functions/APIs specific to the "actions" of the VirtualFirealarm device-type. These APIs + * include the ones that are used by the [Device] to contact the server (i.e: Enrollment & Publishing Data) and the + * ones used by the [Server/Owner] to contact the [Device] (i.e: sending control signals). This class also initializes + * the transport 'Connectors' [XMPP & MQTT] specific to the VirtualFirealarm device-type in order to communicate with + * such devices and to receive messages form it. + */ +@SwaggerDefinition( + info = @Info( + version = "1.0.0", + title = "", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = "name", value = "virtual_firealarm"), + @ExtensionProperty(name = "context", value = "/virtual_firealarm"), + }) + } + ), + tags = { + @Tag(name = "virtual_firealarm", description = "") + } +) +public interface VirtualFireAlarmService { + + /** + * This is an API called/used from within the Server(Front-End) or by a device Owner. It sends a control command to + * the VirtualFirealarm device to switch `ON` or `OFF` its buzzer. The method also takes in the protocol to be used + * to connect-to and send the command to the device. + * + * @param deviceId the ID of the VirtualFirealarm device on which the buzzer needs to switched `ON` or `OFF`. + * @param state the state to which the buzzer on the device needs to be changed. Either "ON" or "OFF". + * (Case-Insensitive String) + */ + @POST + @Path("device/{deviceId}/buzz") + @Scope(key = "device:firealarm:enroll", name = "", description = "") + Response switchBuzzer(@PathParam("deviceId") String deviceId, + @FormParam("state") String state); + + /** + * Retrieve Sensor data for the device type + */ + @Path("device/stats/{deviceId}") + @GET + @Scope(key = "device:firealarm:enroll", name = "", description = "") + @Consumes("application/json") + @Produces("application/json") + Response getVirtualFirealarmStats(@PathParam("deviceId") String deviceId, @QueryParam("from") long from, + @QueryParam("to") long to); + + @Path("device/download") + @GET + @Produces("application/zip") + @Scope(key = "device:firealarm:enroll", name = "", description = "") + Response downloadSketch(@QueryParam("deviceName") String deviceName, @QueryParam("sketchType") String sketchType); + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java new file mode 100644 index 000000000..c00dd6ab7 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java @@ -0,0 +1,345 @@ +/* +* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. +* +* WSO2 Inc. licenses this file to you under the Apache License, +* Version 2.0 (the "License"); you may not use this file except +* in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl; + +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.io.FileUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.analytics.dataservice.commons.SortByField; +import org.wso2.carbon.analytics.dataservice.commons.SortType; +import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException; +import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService; +import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey; +import org.wso2.carbon.apimgt.application.extension.exception.APIManagerException; +import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.device.mgt.common.*; +import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationException; +import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroupConstants; +import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; +import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; +import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.constants.VirtualFireAlarmConstants; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.exception.VirtualFirealarmDeviceMgtPluginException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.impl.VirtualFirealarmSecurityManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.xmpp.XmppAccount; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.xmpp.XmppConfig; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.xmpp.XmppServerClient; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.dto.SensorRecord; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.exception.VirtualFireAlarmException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.APIUtil; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.VirtualFireAlarmServiceUtils; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.ZipArchive; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.ZipUtil; +import org.wso2.carbon.identity.jwt.client.extension.JWTClient; +import org.wso2.carbon.identity.jwt.client.extension.dto.AccessTokenInfo; +import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException; +import org.wso2.carbon.user.api.UserStoreException; + +import javax.ws.rs.Consumes; +import javax.ws.rs.FormParam; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.Response; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.security.PrivateKey; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.UUID; + +public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { + + private static final String XMPP_PROTOCOL = "XMPP"; + private static final String MQTT_PROTOCOL = "MQTT"; + private static final String KEY_TYPE = "PRODUCTION"; + private static ApiApplicationKey apiApplicationKey; + private static final String DEVICE_MGT_SCOPE_IDENTIFIER = "device-mgt"; + private static Log log = LogFactory.getLog(VirtualFireAlarmServiceImpl.class); + + @POST + @Path("device/{deviceId}/buzz") + public Response switchBuzzer(@PathParam("deviceId") String deviceId, @FormParam("state") String state) { + if (state == null || state.isEmpty()) { + log.error("State is not defined for the buzzer operation"); + return Response.status(Response.Status.BAD_REQUEST).build(); + } + String switchToState = state.toUpperCase(); + if (!switchToState.equals(VirtualFireAlarmConstants.STATE_ON) && !switchToState.equals( + VirtualFireAlarmConstants.STATE_OFF)) { + log.error("The requested state change shoud be either - 'ON' or 'OFF'"); + return Response.status(Response.Status.BAD_REQUEST).build(); + } + try { + if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized( + new DeviceIdentifier(deviceId, VirtualFireAlarmConstants.DEVICE_TYPE), + DeviceGroupConstants.Permissions.DEFAULT_OPERATOR_PERMISSIONS)) { + return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build(); + } + String resource = VirtualFireAlarmConstants.BULB_CONTEXT.replace("/", ""); + PrivateKey serverPrivateKey = VirtualFirealarmSecurityManager.getServerPrivateKey(); + String actualMessage = resource + ":" + switchToState; + String encryptedMsg = VirtualFireAlarmServiceUtils.prepareSecurePayLoad(actualMessage, + serverPrivateKey); + String publishTopic = APIUtil.getTenantDomainOftheUser() + "/" + + VirtualFireAlarmConstants.DEVICE_TYPE + "/" + deviceId; + + Operation commandOp = new CommandOperation(); + commandOp.setCode("buzz"); + commandOp.setType(Operation.Type.COMMAND); + commandOp.setEnabled(true); + commandOp.setPayLoad(encryptedMsg); + + Properties props = new Properties(); + props.setProperty(VirtualFireAlarmConstants.MQTT_ADAPTER_TOPIC_PROPERTY_NAME, publishTopic); + props.setProperty(VirtualFireAlarmConstants.CLIENT_JID_PROPERTY_KEY, deviceId + "@" + XmppConfig + .getInstance().getServerName()); + props.setProperty(VirtualFireAlarmConstants.SUBJECT_PROPERTY_KEY, "CONTROL-REQUEST"); + props.setProperty(VirtualFireAlarmConstants.MESSAGE_TYPE_PROPERTY_KEY, + VirtualFireAlarmConstants.CHAT_PROPERTY_KEY); + commandOp.setProperties(props); + + List deviceIdentifiers = new ArrayList<>(); + deviceIdentifiers.add(new DeviceIdentifier(deviceId, VirtualFireAlarmConstants.DEVICE_TYPE)); + APIUtil.getDeviceManagementService().addOperation(VirtualFireAlarmConstants.DEVICE_TYPE, commandOp, + deviceIdentifiers); + return Response.ok().build(); + } catch (InvalidDeviceException e) { + String msg = "Error occurred while executing command operation to send keywords"; + log.error(msg, e); + return Response.status(Response.Status.BAD_REQUEST).build(); + } catch (DeviceAccessAuthorizationException e) { + log.error(e.getErrorMessage(), e); + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); + } catch (VirtualFireAlarmException e) { + String errorMsg = "Preparing Secure payload failed for device - [" + deviceId + "]"; + log.error(errorMsg); + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); + } catch (OperationManagementException e) { + String msg = "Error occurred while executing command operation upon ringing the buzzer"; + log.error(msg, e); + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); + } + } + + @PUT + @Path("device/{deviceId}/policy") + public Response updatePolicy(@PathParam("deviceId") String deviceId, @QueryParam("protocol") String protocol, + @FormParam("policy") String policy) { + String protocolString = protocol.toUpperCase(); + if (log.isDebugEnabled()) { + log.debug("Sending request to update-policy of device [" + deviceId + "] via " + protocolString); + } + try { + if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized( + new DeviceIdentifier(deviceId, VirtualFireAlarmConstants.DEVICE_TYPE), + DeviceGroupConstants.Permissions.DEFAULT_MANAGE_POLICIES_PERMISSIONS)) { + return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build(); + } + PrivateKey serverPrivateKey = VirtualFirealarmSecurityManager.getServerPrivateKey(); + String actualMessage = VirtualFireAlarmConstants.POLICY_CONTEXT + ":" + policy; + String encryptedMsg = VirtualFireAlarmServiceUtils.prepareSecurePayLoad(actualMessage, + serverPrivateKey); + Map dynamicProperties = new HashMap<>(); + switch (protocolString) { + case XMPP_PROTOCOL: + dynamicProperties.put(VirtualFireAlarmConstants.JID_PROPERTY_KEY, + deviceId + "@" + XmppConfig.getInstance().getServerName()); + dynamicProperties.put(VirtualFireAlarmConstants.SUBJECT_PROPERTY_KEY, "POLICTY-REQUEST"); + dynamicProperties.put(VirtualFireAlarmConstants.MESSAGE_TYPE_PROPERTY_KEY, + VirtualFireAlarmConstants.CHAT_PROPERTY_KEY); + APIUtil.getOutputEventAdapterService().publish(VirtualFireAlarmConstants.XMPP_ADAPTER_NAME, + dynamicProperties, encryptedMsg); + break; + default: + + String publishTopic = APIUtil.getTenantDomainOftheUser() + "/" + + VirtualFireAlarmConstants.DEVICE_TYPE + "/" + deviceId; + dynamicProperties.put(VirtualFireAlarmConstants.ADAPTER_TOPIC_PROPERTY, publishTopic); + APIUtil.getOutputEventAdapterService().publish(VirtualFireAlarmConstants.MQTT_ADAPTER_NAME, + dynamicProperties, encryptedMsg); + break; + } + return Response.ok().build(); + } catch (DeviceAccessAuthorizationException e) { + log.error(e.getErrorMessage(), e); + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); + } catch (VirtualFireAlarmException e) { + log.error(e); + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); + } + } + + + @Path("device/stats/{deviceId}") + @GET + @Consumes("application/json") + @Produces("application/json") + public Response getVirtualFirealarmStats(@PathParam("deviceId") String deviceId, @QueryParam("from") long from, + @QueryParam("to") long to) { + String fromDate = String.valueOf(from); + String toDate = String.valueOf(to); + String query = "deviceId:" + deviceId + " AND deviceType:" + + VirtualFireAlarmConstants.DEVICE_TYPE + " AND time : [" + fromDate + " TO " + toDate + "]"; + String sensorTableName = VirtualFireAlarmConstants.TEMPERATURE_EVENT_TABLE; + try { + if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized( + new DeviceIdentifier(deviceId, VirtualFireAlarmConstants.DEVICE_TYPE), + DeviceGroupConstants.Permissions.DEFAULT_STATS_MONITOR_PERMISSIONS)) { + return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build(); + } + List sortByFields = new ArrayList<>(); + SortByField sortByField = new SortByField("time", SortType.ASC); + sortByFields.add(sortByField); + List sensorRecords = APIUtil.getAllEventsForDevice(sensorTableName, query, sortByFields); + return Response.status(Response.Status.OK.getStatusCode()).entity(sensorRecords).build(); + } catch (AnalyticsException e) { + String errorMsg = "Error on retrieving stats on table " + sensorTableName + " with query " + query; + log.error(errorMsg); + return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).entity(errorMsg).build(); + } catch (DeviceAccessAuthorizationException e) { + log.error(e.getErrorMessage(), e); + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); + } + } + + @Path("device/download") + @GET + @Produces("application/zip") + public Response downloadSketch(@QueryParam("deviceName") String deviceName, + @QueryParam("sketchType") String sketchType) { + try { + ZipArchive zipFile = createDownloadFile(APIUtil.getAuthenticatedUser(), deviceName, sketchType); + Response.ResponseBuilder response = Response.ok(FileUtils.readFileToByteArray(zipFile.getZipFile())); + response.status(Response.Status.OK); + response.type("application/zip"); + response.header("Content-Disposition", "attachment; filename=\"" + zipFile.getFileName() + "\""); + Response resp = response.build(); + zipFile.getZipFile().delete(); + return resp; + } catch (IllegalArgumentException ex) { + return Response.status(400).entity(ex.getMessage()).build();//bad request + } catch (DeviceManagementException ex) { + log.error(ex.getMessage(), ex); + return Response.status(500).entity(ex.getMessage()).build(); + } catch (JWTClientException ex) { + log.error(ex.getMessage(), ex); + return Response.status(500).entity(ex.getMessage()).build(); + } catch (APIManagerException ex) { + log.error(ex.getMessage(), ex); + return Response.status(500).entity(ex.getMessage()).build(); + } catch (IOException ex) { + log.error(ex.getMessage(), ex); + return Response.status(500).entity(ex.getMessage()).build(); + } catch (UserStoreException ex) { + log.error(ex.getMessage(), ex); + return Response.status(500).entity(ex.getMessage()).build(); + } catch (VirtualFirealarmDeviceMgtPluginException ex) { + log.error(ex.getMessage(), ex); + return Response.status(500).entity(ex.getMessage()).build(); + } + } + + private boolean register(String deviceId, String name) { + try { + DeviceIdentifier deviceIdentifier = new DeviceIdentifier(); + deviceIdentifier.setId(deviceId); + deviceIdentifier.setType(VirtualFireAlarmConstants.DEVICE_TYPE); + if (APIUtil.getDeviceManagementService().isEnrolled(deviceIdentifier)) { + return false; + } + Device device = new Device(); + device.setDeviceIdentifier(deviceId); + EnrolmentInfo enrolmentInfo = new EnrolmentInfo(); + enrolmentInfo.setDateOfEnrolment(new Date().getTime()); + enrolmentInfo.setDateOfLastUpdate(new Date().getTime()); + enrolmentInfo.setStatus(EnrolmentInfo.Status.ACTIVE); + enrolmentInfo.setOwnership(EnrolmentInfo.OwnerShip.BYOD); + device.setName(name); + device.setType(VirtualFireAlarmConstants.DEVICE_TYPE); + enrolmentInfo.setOwner(APIUtil.getAuthenticatedUser()); + device.setEnrolmentInfo(enrolmentInfo); + return APIUtil.getDeviceManagementService().enrollDevice(device); + } catch (DeviceManagementException e) { + log.error(e.getMessage(), e); + return false; + } + } + + private ZipArchive createDownloadFile(String owner, String deviceName, String sketchType) + throws DeviceManagementException, APIManagerException, JWTClientException, + UserStoreException, VirtualFirealarmDeviceMgtPluginException { + //create new device id + String deviceId = shortUUID(); + boolean status = register(deviceId, deviceName); + if (!status) { + String msg = "Error occurred while registering the device with " + "id: " + deviceId + " owner:" + owner; + throw new DeviceManagementException(msg); + } + if (apiApplicationKey == null) { + String applicationUsername = + PrivilegedCarbonContext.getThreadLocalCarbonContext().getUserRealm().getRealmConfiguration() + .getAdminUserName(); + APIManagementProviderService apiManagementProviderService = APIUtil.getAPIManagementProviderService(); + String[] tags = {VirtualFireAlarmConstants.DEVICE_TYPE}; + apiApplicationKey = apiManagementProviderService.generateAndRetrieveApplicationKeys( + VirtualFireAlarmConstants.DEVICE_TYPE, tags, KEY_TYPE, applicationUsername, true, + VirtualFireAlarmConstants.APIM_APPLICATION_TOKEN_VALIDITY_PERIOD); + } + JWTClient jwtClient = APIUtil.getJWTClientManagerService().getJWTClient(); + String scopes = " device_" + deviceId; + AccessTokenInfo accessTokenInfo = jwtClient.getAccessToken(apiApplicationKey.getConsumerKey(), + apiApplicationKey.getConsumerSecret(), owner, + scopes); + String accessToken = accessTokenInfo.getAccessToken(); + String refreshToken = accessTokenInfo.getRefreshToken(); + XmppAccount newXmppAccount = new XmppAccount(); + newXmppAccount.setAccountName(deviceId); + newXmppAccount.setUsername(deviceId); + newXmppAccount.setPassword(accessToken); + newXmppAccount.setEmail(deviceId + "@" + APIUtil.getTenantDomainOftheUser()); + + status = XmppServerClient.createAccount(newXmppAccount); + if (!status) { + String msg = "XMPP Account was not created for device - " + deviceId + " of owner - " + owner + + ".XMPP might have been disabled in org.wso2.carbon.device.mgt.iot" + + ".common.config.server.configs"; + throw new DeviceManagementException(msg); + } + ZipUtil ziputil = new ZipUtil(); + return ziputil.createZipFile(owner, sketchType, deviceId, deviceName, apiApplicationKey.toString(), + accessToken, refreshToken); + } + + private static String shortUUID() { + UUID uuid = UUID.randomUUID(); + long l = ByteBuffer.wrap(uuid.toString().getBytes(StandardCharsets.UTF_8)).getLong(); + return Long.toString(l, Character.MAX_RADIX); + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dto/SensorRecord.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dto/SensorRecord.java new file mode 100644 index 000000000..e1f46d2d7 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dto/SensorRecord.java @@ -0,0 +1,68 @@ +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.dto; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +@XmlRootElement +/** + * This stores sensor event data for android sense. + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class SensorRecord { + + @XmlElementWrapper(required = true, name = "values") + private Map values; + + /** The id. */ + @XmlElement(required = false, name = "id") + private String id; + + /** + * Gets the values. + * @return the values + */ + public Map getValues() { + return values; + } + + /** + * Sets the values. + * @param values the values + */ + public void setValues(Map values) { + this.values = values; + } + + /** + * Sets the id. + * @param id the new id + */ + public void setId(String id) { + this.id = id; + } + + /** + * Gets the id. + * @return the id + */ + public String getId() { + return id; + } + + @Override + public String toString(){ + List valueList = new ArrayList(); + for (Map.Entry entry : values.entrySet()) { + valueList.add(entry.getKey() + ":" + entry.getValue()); + } + return valueList.toString(); + + } + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/exception/VirtualFireAlarmException.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/exception/VirtualFireAlarmException.java new file mode 100644 index 000000000..4305ec7c0 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/exception/VirtualFireAlarmException.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.exception; + +public class VirtualFireAlarmException extends Exception { + private static final long serialVersionUID = 118512086957330189L; + + public VirtualFireAlarmException(String errorMessage) { + super(errorMessage); + } + + public VirtualFireAlarmException(String errorMessage, Throwable throwable) { + super(errorMessage, throwable); + } + + public VirtualFireAlarmException(Throwable cause) { + super(cause); + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java new file mode 100644 index 000000000..d302e7281 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java @@ -0,0 +1,196 @@ +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.analytics.api.AnalyticsDataAPI; +import org.wso2.carbon.analytics.api.AnalyticsDataAPIUtil; +import org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse; +import org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry; +import org.wso2.carbon.analytics.dataservice.commons.SortByField; +import org.wso2.carbon.analytics.datasource.commons.Record; +import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException; +import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService; +import org.wso2.carbon.context.CarbonContext; +import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationService; +import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfigurationManagementService; +import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.dto.SensorRecord; +import org.wso2.carbon.event.output.adapter.core.OutputEventAdapterService; +import org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * This class provides utility functions used by REST-API. + */ +public class APIUtil { + + private static Log log = LogFactory.getLog(APIUtil.class); + + public static String getAuthenticatedUser() { + PrivilegedCarbonContext threadLocalCarbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + String username = threadLocalCarbonContext.getUsername(); + String tenantDomain = threadLocalCarbonContext.getTenantDomain(); + if (username.endsWith(tenantDomain)) { + return username.substring(0, username.lastIndexOf("@")); + } + return username; + } + + public static DeviceManagementProviderService getDeviceManagementService() { + PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + DeviceManagementProviderService deviceManagementProviderService = + (DeviceManagementProviderService) ctx.getOSGiService(DeviceManagementProviderService.class, null); + if (deviceManagementProviderService == null) { + String msg = "Device Management service has not initialized."; + log.error(msg); + throw new IllegalStateException(msg); + } + return deviceManagementProviderService; + } + + public static AnalyticsDataAPI getAnalyticsDataAPI() { + PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + AnalyticsDataAPI analyticsDataAPI = + (AnalyticsDataAPI) ctx.getOSGiService(AnalyticsDataAPI.class, null); + if (analyticsDataAPI == null) { + String msg = "Analytics api service has not initialized."; + log.error(msg); + throw new IllegalStateException(msg); + } + return analyticsDataAPI; + } + + public static List getAllEventsForDevice(String tableName, String query, + List sortByFields) throws AnalyticsException { + int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); + AnalyticsDataAPI analyticsDataAPI = getAnalyticsDataAPI(); + int eventCount = analyticsDataAPI.searchCount(tenantId, tableName, query); + if (eventCount == 0) { + return null; + } + List resultEntries = analyticsDataAPI.search(tenantId, tableName, query, 0, eventCount, + sortByFields); + List recordIds = getRecordIds(resultEntries); + AnalyticsDataResponse response = analyticsDataAPI.get(tenantId, tableName, 1, null, recordIds); + Map sensorDatas = createSensorData(AnalyticsDataAPIUtil.listRecords( + analyticsDataAPI, response)); + List sortedSensorData = getSortedSensorData(sensorDatas, resultEntries); + return sortedSensorData; + } + + private static List getRecordIds(List searchResults) { + List ids = new ArrayList<>(); + for (SearchResultEntry searchResult : searchResults) { + ids.add(searchResult.getId()); + } + return ids; + } + + public static List getSortedSensorData(Map sensorDatas, + List searchResults) { + List sortedRecords = new ArrayList<>(); + for (SearchResultEntry searchResultEntry : searchResults) { + sortedRecords.add(sensorDatas.get(searchResultEntry.getId())); + } + return sortedRecords; + } + + /** + * Creates the SensorDatas from records. + * + * @param records the records + * @return the Map of SensorRecord + */ + public static Map createSensorData(List records) { + Map sensorDatas = new HashMap<>(); + for (Record record : records) { + SensorRecord sensorData = createSensorData(record); + sensorDatas.put(sensorData.getId(), sensorData); + } + return sensorDatas; + } + + /** + * Create a SensorRecord object out of a Record object + * + * @param record the record object + * @return SensorRecord object + */ + public static SensorRecord createSensorData(Record record) { + SensorRecord recordBean = new SensorRecord(); + recordBean.setId(record.getId()); + recordBean.setValues(record.getValues()); + return recordBean; + } + + public static APIManagementProviderService getAPIManagementProviderService() { + PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + APIManagementProviderService apiManagementProviderService = + (APIManagementProviderService) ctx.getOSGiService(APIManagementProviderService.class, null); + if (apiManagementProviderService == null) { + String msg = "API management provider service has not initialized."; + log.error(msg); + throw new IllegalStateException(msg); + } + return apiManagementProviderService; + } + + public static JWTClientManagerService getJWTClientManagerService() { + PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + JWTClientManagerService jwtClientManagerService = + (JWTClientManagerService) ctx.getOSGiService(JWTClientManagerService.class, null); + if (jwtClientManagerService == null) { + String msg = "JWT Client manager service has not initialized."; + log.error(msg); + throw new IllegalStateException(msg); + } + return jwtClientManagerService; + } + + public static String getTenantDomainOftheUser() { + PrivilegedCarbonContext threadLocalCarbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + return threadLocalCarbonContext.getTenantDomain(); + } + + public static DeviceAccessAuthorizationService getDeviceAccessAuthorizationService() { + PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + DeviceAccessAuthorizationService deviceAccessAuthorizationService = + (DeviceAccessAuthorizationService) ctx.getOSGiService(DeviceAccessAuthorizationService.class, null); + if (deviceAccessAuthorizationService == null) { + String msg = "Device Authorization service has not initialized."; + log.error(msg); + throw new IllegalStateException(msg); + } + return deviceAccessAuthorizationService; + } + + public static OutputEventAdapterService getOutputEventAdapterService() { + PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + OutputEventAdapterService outputEventAdapterService = + (OutputEventAdapterService) ctx.getOSGiService(OutputEventAdapterService.class, null); + if (outputEventAdapterService == null) { + String msg = "Device Authorization service has not initialized."; + log.error(msg); + throw new IllegalStateException(msg); + } + return outputEventAdapterService; + } + + public static PlatformConfigurationManagementService getTenantConfigurationManagementService() { + PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + PlatformConfigurationManagementService tenantConfigurationManagementService = + (PlatformConfigurationManagementService) ctx.getOSGiService(PlatformConfigurationManagementService.class, null); + if (tenantConfigurationManagementService == null) { + String msg = "Tenant configuration Management service not initialized."; + log.error(msg); + throw new IllegalStateException(msg); + } + return tenantConfigurationManagementService; + } + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmServiceUtils.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmServiceUtils.java new file mode 100644 index 000000000..277000e0f --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmServiceUtils.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util; + +import org.apache.commons.codec.binary.Base64; +import org.json.JSONObject; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.exception.VirtualFirealarmDeviceMgtPluginException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.impl.VirtualFirealarmSecurityManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.exception.VirtualFireAlarmException; + +import java.lang.*; +import java.security.PrivateKey; + +/** + * + */ +public class VirtualFireAlarmServiceUtils { + + private static final String JSON_MESSAGE_KEY = "Msg"; + private static final String JSON_SIGNATURE_KEY = "Sig"; + + public static String prepareSecurePayLoad(String message, PrivateKey signatureKey) throws VirtualFireAlarmException { + try { + message = Base64.encodeBase64String(message.getBytes()); + String signedPayload = VirtualFirealarmSecurityManager.signMessage(message, signatureKey); + JSONObject jsonPayload = new JSONObject(); + jsonPayload.put(JSON_MESSAGE_KEY, message); + jsonPayload.put(JSON_SIGNATURE_KEY, signedPayload); + return jsonPayload.toString(); + } catch (VirtualFirealarmDeviceMgtPluginException e) { + throw new VirtualFireAlarmException(e); + } + + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmUtilConstants.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmUtilConstants.java new file mode 100644 index 000000000..fae96848d --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmUtilConstants.java @@ -0,0 +1,26 @@ +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util; + +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.xmpp.XmppConfig; + +public class VirtualFireAlarmUtilConstants { + + public static final String TENANT_DOMAIN = "TENANT_DOMAIN"; + public static final String DEVICE_OWNER = "DEVICE_OWNER"; + public static final String DEVICE_ID = "DEVICE_ID"; + public static final String DEVICE_NAME = "DEVICE_NAME"; + public static final String HTTPS_EP = "HTTPS_EP"; + public static final String HTTP_EP = "HTTP_EP"; + public static final String APIM_EP = "APIM_EP"; + public static final String MQTT_EP = "MQTT_EP"; + public static final String XMPP_EP = "XMPP_EP"; + public static final String VIRTUAL_FIREALARM_HTTPS_EP = "VIRTUAL_FIREALARM_HTTPS_EP"; + public static final String VIRTUAL_FIREALARM_HTTP_EP = "VIRTUAL_FIREALARM_HTTP_EP"; + public static final String VIRTUAL_FIREALARM_APIM_EP = "VIRTUAL_FIREALARM_APIM_EP"; + public static final String VIRTUAL_FIREALARM_MQTT_EP = "VIRTUAL_FIREALARM_MQTT_EP"; + public static final String VIRTUAL_FIREALARM_XMPP_EP = "VIRTUAL_FIREALARM_XMPP_EP"; + public static final String API_APPLICATION_KEY = "API_APPLICATION_KEY"; + public static final String DEVICE_TOKEN = "DEVICE_TOKEN"; + public static final String DEVICE_REFRESH_TOKEN = "DEVICE_REFRESH_TOKEN"; + public static final String SERVER_NAME = "SERVER_NAME"; + public static final String SERVER_JID = "SERVER_JID"; +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipArchive.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipArchive.java new file mode 100644 index 000000000..22fda92b3 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipArchive.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util; + +import java.io.File; + +/** + * This is an utility class to hold zip files. + */ +public class ZipArchive { + + private File zipFile = null; + private String fileName = null; + + public ZipArchive(String fileName, File zipFile) { + this.fileName = fileName; + this.zipFile = zipFile; + } + + public File getZipFile() { + return zipFile; + } + + public String getFileName() { + return fileName; + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java new file mode 100644 index 000000000..2c6cd2840 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java @@ -0,0 +1,387 @@ +/* + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util; + +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.IOUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.json.JSONObject; +import org.wso2.carbon.apimgt.application.extension.constants.ApiApplicationConstants; +import org.wso2.carbon.base.ServerConfiguration; +import org.wso2.carbon.device.mgt.common.DeviceManagementException; +import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry; +import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException; +import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.xmpp.XmppConfig; +import org.wso2.carbon.utils.CarbonUtils; +import org.wso2.carbon.utils.NetworkUtils; + +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.SocketException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; + +/** + * This is used to create a zip file that includes the necessary configuration required for the agent. + */ +public class ZipUtil { + + private static final Log log = LogFactory.getLog(ZipUtil.class); + private static final String HTTPS_PORT_PROPERTY = "httpsPort"; + private static final String HTTP_PORT_PROPERTY = "httpPort"; + + private static final String LOCALHOST = "localhost"; + private static final String HTTPS_PROTOCOL_APPENDER = "https://"; + private static final String HTTP_PROTOCOL_APPENDER = "http://"; + private static final String CONFIG_TYPE = "general"; + private static final String DEFAULT_MQTT_ENDPOINT = "tcp://localhost:1886"; + public static final String HOST_NAME = "HostName"; + + public ZipArchive createZipFile(String owner, String deviceType, String deviceId, String deviceName, + String apiApplicationKey, String token, String refreshToken) + throws DeviceManagementException { + + String sketchFolder = "repository" + File.separator + "resources" + File.separator + "sketches"; + String archivesPath = + CarbonUtils.getCarbonHome() + File.separator + sketchFolder + File.separator + "archives" + + File.separator + deviceId; + String templateSketchPath = sketchFolder + File.separator + deviceType; + String iotServerIP; + + try { + iotServerIP = getServerUrl(); + String httpsServerPort = System.getProperty(HTTPS_PORT_PROPERTY); + String httpServerPort = System.getProperty(HTTP_PORT_PROPERTY); + String httpsServerEP = HTTPS_PROTOCOL_APPENDER + iotServerIP + ":" + httpsServerPort; + String httpServerEP = HTTP_PROTOCOL_APPENDER + iotServerIP + ":" + httpServerPort; + String mqttEndpoint = DEFAULT_MQTT_ENDPOINT; + if (mqttEndpoint.contains(LOCALHOST)) { + mqttEndpoint = mqttEndpoint.replace(LOCALHOST, iotServerIP); + } + + String xmppEndpoint = ""; + if (XmppConfig.getInstance().isEnabled()) { + xmppEndpoint = XmppConfig.getInstance().getHost() + ":" + XmppConfig.getInstance().getPort(); + if (xmppEndpoint.contains(LOCALHOST)) { + xmppEndpoint = xmppEndpoint.replace(LOCALHOST, iotServerIP); + } + } + PlatformConfiguration configuration = APIUtil.getTenantConfigurationManagementService().getConfiguration( + CONFIG_TYPE); + if (configuration != null && configuration.getConfiguration() != null && configuration + .getConfiguration().size() > 0) { + List configurations = configuration.getConfiguration(); + for (ConfigurationEntry configurationEntry : configurations) { + switch (configurationEntry.getName()) { + case VirtualFireAlarmUtilConstants.VIRTUAL_FIREALARM_HTTPS_EP: + httpsServerEP = (String)configurationEntry.getValue(); + break; + case VirtualFireAlarmUtilConstants.VIRTUAL_FIREALARM_HTTP_EP: + httpServerEP = (String)configurationEntry.getValue(); + break; + case VirtualFireAlarmUtilConstants.VIRTUAL_FIREALARM_MQTT_EP: + mqttEndpoint = (String)configurationEntry.getValue(); + break; + case VirtualFireAlarmUtilConstants.VIRTUAL_FIREALARM_XMPP_EP: + xmppEndpoint = (String)configurationEntry.getValue(); + break; + } + } + } + String base64EncodedApplicationKey = getBase64EncodedAPIAppKey(apiApplicationKey).trim(); + + Map contextParams = new HashMap<>(); + contextParams.put(VirtualFireAlarmUtilConstants.TENANT_DOMAIN, APIUtil.getTenantDomainOftheUser()); + contextParams.put(VirtualFireAlarmUtilConstants.DEVICE_OWNER, owner); + contextParams.put(VirtualFireAlarmUtilConstants.DEVICE_ID, deviceId); + contextParams.put(VirtualFireAlarmUtilConstants.DEVICE_NAME, deviceName); + contextParams.put(VirtualFireAlarmUtilConstants.HTTPS_EP, httpsServerEP); + contextParams.put(VirtualFireAlarmUtilConstants.HTTP_EP, httpServerEP); + contextParams.put(VirtualFireAlarmUtilConstants.APIM_EP, httpServerEP); + contextParams.put(VirtualFireAlarmUtilConstants.MQTT_EP, mqttEndpoint); + contextParams.put(VirtualFireAlarmUtilConstants.XMPP_EP, "XMPP:" + xmppEndpoint); + contextParams.put(VirtualFireAlarmUtilConstants.API_APPLICATION_KEY, base64EncodedApplicationKey); + contextParams.put(VirtualFireAlarmUtilConstants.DEVICE_TOKEN, token); + contextParams.put(VirtualFireAlarmUtilConstants.DEVICE_REFRESH_TOKEN, refreshToken); + contextParams.put(VirtualFireAlarmUtilConstants.SERVER_NAME, XmppConfig.getInstance().getServerName() == null + ? "" : XmppConfig.getInstance().getServerName()); + contextParams.put(VirtualFireAlarmUtilConstants.SERVER_JID, XmppConfig.getInstance().getJid() == null + ? "" : XmppConfig.getInstance().getJid()); + + ZipArchive zipFile; + zipFile = getSketchArchive(archivesPath, templateSketchPath, contextParams, deviceName); + return zipFile; + } catch (IOException e) { + throw new DeviceManagementException("Zip File Creation Failed", e); + } catch (ConfigurationManagementException e) { + throw new DeviceManagementException("Failed to retrieve configuration", e); + } + } + + private String getBase64EncodedAPIAppKey(String apiAppCredentialsAsJSONString) { + + JSONObject jsonObject = new JSONObject(apiAppCredentialsAsJSONString); + String consumerKey = jsonObject.get(ApiApplicationConstants.OAUTH_CLIENT_ID).toString(); + String consumerSecret = jsonObject.get(ApiApplicationConstants.OAUTH_CLIENT_SECRET).toString(); + String stringToEncode = consumerKey + ":" + consumerSecret; + return Base64.encodeBase64String(stringToEncode.getBytes()); + } + + public static String getServerUrl() { + String hostName = ServerConfiguration.getInstance().getFirstProperty(HOST_NAME); + try { + if (hostName == null) { + hostName = NetworkUtils.getLocalHostname(); + } + } catch (SocketException e) { + hostName = "localhost"; + log.warn("Failed retrieving the hostname, therefore set to localhost", e); + } + return hostName; + } + + public static ZipArchive getSketchArchive(String archivesPath, String templateSketchPath, Map contextParams + , String zipFileName) + throws DeviceManagementException, IOException { + String sketchPath = CarbonUtils.getCarbonHome() + File.separator + templateSketchPath; + FileUtils.deleteDirectory(new File(archivesPath));//clear directory + FileUtils.deleteDirectory(new File(archivesPath + ".zip"));//clear zip + if (!new File(archivesPath).mkdirs()) { //new dir + String message = "Could not create directory at path: " + archivesPath; + log.error(message); + throw new DeviceManagementException(message); + } + zipFileName = zipFileName + ".zip"; + try { + Map> properties = getProperties(sketchPath + File.separator + "sketch" + ".properties"); + List templateFiles = properties.get("templates"); + + for (String templateFile : templateFiles) { + parseTemplate(templateSketchPath + File.separator + templateFile, archivesPath + File.separator + templateFile, + contextParams); + } + + templateFiles.add("sketch.properties"); // ommit copying the props file + copyFolder(new File(sketchPath), new File(archivesPath), templateFiles); + createZipArchive(archivesPath); + FileUtils.deleteDirectory(new File(archivesPath)); + File zip = new File(archivesPath + ".zip"); + return new org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.ZipArchive(zipFileName, zip); + } catch (IOException ex) { + throw new DeviceManagementException( + "Error occurred when trying to read property " + "file sketch.properties", ex); + } + } + + private static Map> getProperties(String propertyFilePath) throws IOException { + Properties prop = new Properties(); + InputStream input = null; + + try { + + input = new FileInputStream(propertyFilePath); + + // load a properties file + prop.load(input); + Map> properties = new HashMap>(); + + String templates = prop.getProperty("templates"); + List list = new ArrayList(Arrays.asList(templates.split(","))); + properties.put("templates", list); + + final String filename = prop.getProperty("zipfilename"); + list = new ArrayList() {{ + add(filename); + }}; + properties.put("zipfilename", list); + return properties; + + } finally { + if (input != null) { + try { + input.close(); + } catch (IOException e) { + log.error("Failed closing connection", e); + } + } + } + } + + private static void parseTemplate(String srcFile, String dstFile, Map contextParams) throws IOException { + //read from file + FileInputStream inputStream = null; + FileOutputStream outputStream = null; + try { + inputStream = new FileInputStream(srcFile); + outputStream = new FileOutputStream(dstFile); + String content = IOUtils.toString(inputStream, StandardCharsets.UTF_8.toString()); + Iterator iterator = contextParams.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry mapEntry = (Map.Entry) iterator.next(); + content = content.replaceAll("\\$\\{" + mapEntry.getKey() + "\\}", mapEntry.getValue().toString()); + } + IOUtils.write(content, outputStream, StandardCharsets.UTF_8.toString()); + } finally { + if (inputStream != null) { + inputStream.close(); + } + if (outputStream != null) { + outputStream.close(); + } + } + } + + private static void copyFolder(File src, File dest, List excludeFileNames) throws IOException { + + if (src.isDirectory()) { + //if directory not exists, create it + if (!dest.exists() && !dest.mkdirs()) { + String message = "Could not create directory at path: " + dest; + log.error(message); + throw new IOException(message); + } + //list all the directory contents + String files[] = src.list(); + + if (files == null) { + log.warn("There are no files insides the directory " + src.getAbsolutePath()); + return; + } + + for (String file : files) { + //construct the src and dest file structure + File srcFile = new File(src, file); + File destFile = new File(dest, file); + //recursive copy + copyFolder(srcFile, destFile, excludeFileNames); + } + + } else { + for (String fileName : excludeFileNames) { + if (src.getName().equals(fileName)) { + return; + } + } + //if file, then copy it + //Use bytes stream to support all file types + InputStream in = null; + OutputStream out = null; + + try { + in = new FileInputStream(src); + out = new FileOutputStream(dest); + + byte[] buffer = new byte[1024]; + + int length; + //copy the file content in bytes + while ((length = in.read(buffer)) > 0) { + out.write(buffer, 0, length); + } + } finally { + if (in != null) { + in.close(); + } + if (out != null) { + out.close(); + } + } + } + } + + private static boolean createZipArchive(String srcFolder) throws IOException { + BufferedInputStream origin = null; + ZipOutputStream out = null; + + try { + final int BUFFER = 2048; + FileOutputStream dest = new FileOutputStream(new File(srcFolder + ".zip")); + out = new ZipOutputStream(new BufferedOutputStream(dest)); + byte data[] = new byte[BUFFER]; + File subDir = new File(srcFolder); + String subdirList[] = subDir.list(); + if (subdirList == null) { + log.warn("The sub directory " + subDir.getAbsolutePath() + " is empty"); + return false; + } + for (String sd : subdirList) { + // get a list of files from current directory + File f = new File(srcFolder + "/" + sd); + if (f.isDirectory()) { + String files[] = f.list(); + + if (files == null) { + log.warn("The current directory " + f.getAbsolutePath() + " is empty. Has no files"); + return false; + } + + for (int i = 0; i < files.length; i++) { + FileInputStream fi = new FileInputStream(srcFolder + "/" + sd + "/" + files[i]); + origin = new BufferedInputStream(fi, BUFFER); + ZipEntry entry = new ZipEntry(sd + "/" + files[i]); + out.putNextEntry(entry); + int count; + while ((count = origin.read(data, 0, BUFFER)) != -1) { + out.write(data, 0, count); + out.flush(); + } + + } + } else //it is just a file + { + FileInputStream fi = new FileInputStream(f); + origin = new BufferedInputStream(fi, BUFFER); + ZipEntry entry = new ZipEntry(sd); + out.putNextEntry(entry); + int count; + while ((count = origin.read(data, 0, BUFFER)) != -1) { + out.write(data, 0, count); + out.flush(); + } + } + } + out.flush(); + } finally { + if (origin != null) { + origin.close(); + } + if (out != null) { + out.close(); + } + } + return true; + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/util/Utils.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/util/Utils.java new file mode 100644 index 000000000..586de223c --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/util/Utils.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.util; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.IOUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.base.ServerConfiguration; +import org.wso2.carbon.device.mgt.common.DeviceManagementException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.ZipArchive; +import org.wso2.carbon.utils.CarbonUtils; +import org.wso2.carbon.utils.NetworkUtils; + +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.SocketException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; + +/** + * Provides utility methods required by the device type plugins. + */ +public class Utils { + + public static final String HOST_NAME = "HostName"; + private static final Log log = LogFactory.getLog(Utils.class); + + + +} diff --git a/src/main/webapp/META-INF/permissions.xml b/src/main/webapp/META-INF/permissions.xml new file mode 100644 index 000000000..fbad43f95 --- /dev/null +++ b/src/main/webapp/META-INF/permissions.xml @@ -0,0 +1,52 @@ + + + + + + + + + + Download device + /device-mgt/user/devices + /device/download + GET + virtual_firealarm_user + + + Control Buzz + /device-mgt/user/operation + /device/*/buzz + POST + virtual_firealarm_user + + + Get Stats + /device-mgt/user/stats + /device/stats/* + GET + virtual_firealarm_user + + \ No newline at end of file diff --git a/src/main/webapp/META-INF/webapp-classloading.xml b/src/main/webapp/META-INF/webapp-classloading.xml new file mode 100644 index 000000000..fa4461919 --- /dev/null +++ b/src/main/webapp/META-INF/webapp-classloading.xml @@ -0,0 +1,33 @@ + + + + + + + + + false + + + CXF,Carbon + diff --git a/src/main/webapp/WEB-INF/cxf-servlet.xml b/src/main/webapp/WEB-INF/cxf-servlet.xml new file mode 100644 index 000000000..37a69c268 --- /dev/null +++ b/src/main/webapp/WEB-INF/cxf-servlet.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 000000000..2d1c6e26b --- /dev/null +++ b/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,42 @@ + + + WSO2 IoT Server + WSO2 IoT Server + + + CXFServlet + org.apache.cxf.transport.servlet.CXFServlet + 1 + + + CXFServlet + /* + + + isAdminService + false + + + doAuthentication + true + + + providerTenantDomain + carbon.super + + + + + managed-api-enabled + true + + + managed-api-owner + admin + + + \ No newline at end of file From 46ab002721b84f9d684c5d70e19c6862515de103 Mon Sep 17 00:00:00 2001 From: Harshan Liyanage Date: Thu, 8 Dec 2016 16:40:18 +0530 Subject: [PATCH 025/856] Resolved conflicts --- pom.xml | 237 +++ .../iot/virtualfirealarm/agent/Bootstrap.java | 36 + .../http/FireAlarmHTTPCommunicator.java | 484 ++++++ .../mqtt/FireAlarmMQTTCommunicator.java | 290 ++++ .../xmpp/FireAlarmXMPPCommunicator.java | 263 +++ .../agent/core/AgentConfiguration.java | 191 +++ .../agent/core/AgentConstants.java | 128 ++ .../agent/core/AgentManager.java | 353 ++++ .../agent/core/AgentUtilOperations.java | 440 +++++ .../agent/enrollment/EnrollmentManager.java | 572 +++++++ .../AgentCoreOperationException.java | 57 + .../agent/transport/CommunicationUtils.java | 225 +++ .../agent/transport/TransportHandler.java | 47 + .../transport/TransportHandlerException.java | 56 + .../agent/transport/TransportUtils.java | 302 ++++ .../transport/http/HTTPTransportHandler.java | 91 ++ .../transport/mqtt/MQTTTransportHandler.java | 361 +++++ .../transport/xmpp/XMPPTransportHandler.java | 366 +++++ .../agent/virtual/VirtualHardwareManager.java | 213 +++ .../agent/virtual/ui/AgentUI.java | 954 +++++++++++ src/main/resources/alarm-off.gif | Bin 0 -> 4265 bytes src/main/resources/alarm-on.gif | Bin 0 -> 12067 bytes src/main/resources/deviceConfig.properties | 35 + src/main/resources/fireAlarmSound.mid | Bin 0 -> 6719 bytes src/main/ui/build.xml | 73 + src/main/ui/manifest.mf | 3 + src/main/ui/nbproject/build-impl.xml | 1413 +++++++++++++++++ src/main/ui/nbproject/genfiles.properties | 8 + .../ui/nbproject/private/private.properties | 2 + src/main/ui/nbproject/private/private.xml | 9 + src/main/ui/nbproject/project.properties | 73 + src/main/ui/nbproject/project.xml | 15 + src/main/ui/src/bulb-on.jpg | Bin 0 -> 6942 bytes .../mgt/iot/agent/virtual/VirtualAgentUI.java | 37 + .../mgt/iot/agent/virtual/ui/AgentUI.form | 803 ++++++++++ .../mgt/iot/agent/virtual/ui/AgentUI.java | 744 +++++++++ 36 files changed, 8881 insertions(+) create mode 100644 pom.xml create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/Bootstrap.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/http/FireAlarmHTTPCommunicator.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/xmpp/FireAlarmXMPPCommunicator.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/exception/AgentCoreOperationException.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandler.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandlerException.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/http/HTTPTransportHandler.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/mqtt/MQTTTransportHandler.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/xmpp/XMPPTransportHandler.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java create mode 100644 src/main/resources/alarm-off.gif create mode 100644 src/main/resources/alarm-on.gif create mode 100644 src/main/resources/deviceConfig.properties create mode 100644 src/main/resources/fireAlarmSound.mid create mode 100644 src/main/ui/build.xml create mode 100644 src/main/ui/manifest.mf create mode 100644 src/main/ui/nbproject/build-impl.xml create mode 100644 src/main/ui/nbproject/genfiles.properties create mode 100644 src/main/ui/nbproject/private/private.properties create mode 100644 src/main/ui/nbproject/private/private.xml create mode 100644 src/main/ui/nbproject/project.properties create mode 100644 src/main/ui/nbproject/project.xml create mode 100644 src/main/ui/src/bulb-on.jpg create mode 100644 src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/VirtualAgentUI.java create mode 100644 src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.form create mode 100644 src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java diff --git a/pom.xml b/pom.xml new file mode 100644 index 000000000..c2c197b1b --- /dev/null +++ b/pom.xml @@ -0,0 +1,237 @@ + + + + + 4.0.0 + + + virtual-fire-alarm-plugin + org.wso2.carbon.devicemgt-plugins + 3.0.3-SNAPSHOT + ../pom.xml + + + org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl + WSO2 Carbon - IoT Server VirtualFireAlarm Agent + WSO2 Carbon - VirtualFireAlarm Device Agent Implementation + http://wso2.org + + + + + org.apache.maven.plugins + maven-compiler-plugin + + UTF-8 + ${wso2.maven.compiler.source} + ${wso2.maven.compiler.target} + + 2.3.2 + + + + org.apache.maven.plugins + maven-assembly-plugin + + + + + org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.Bootstrap + + + + + jar-with-dependencies + + wso2-firealarm-virtual-agent + false + + + + make-assembly + + package + + + single + + + + + + + + + + + + + log4j + log4j + ${log4j.version} + + + + + + org.eclipse.jetty + jetty-server + ${jetty.version} + + + + + org.eclipse.paho + org.eclipse.paho.client.mqttv3 + ${paho.mqtt.version} + + + + + org.igniterealtime.smack.wso2 + smack + ${smack.wso2.version} + + + org.igniterealtime.smack.wso2 + smackx + ${smackx.wso2.version} + + + + + org.bouncycastle.wso2 + bcprov-jdk15on + ${bcprov.wso2.version} + + + org.bouncycastle.wso2 + bcpkix-jdk15on + ${bcpkix.wso2.version} + + + + + com.google.code.jscep.wso2 + jscep + ${jscep.version} + + + + commons-codec + commons-codec + + + + commons-lang + commons-lang + ${commons-lang.version} + + + + commons-logging + commons-logging + ${common-logging.version} + + + + commons-io + commons-io + ${commons.io} + + + + + org.slf4j + slf4j-api + ${slf4j.version} + + + org.slf4j + slf4j-simple + ${slf4j.version} + + + + org.json.wso2 + json + + + + commons-configuration + commons-configuration + 1.10 + + + + + + + + + wso2-nexus + WSO2 internal Repository + http://maven.wso2.org/nexus/content/groups/wso2-public/ + + true + daily + ignore + + + + wso2-maven2-repository + http://dist.wso2.org/maven2 + + + + + + + 1.7 + 1.7 + + + 8.1.3.v20120416 + + + 1.0.2 + + + 3.0.4.wso2v1 + 3.0.4.wso2v1 + + + 1.49.wso2v1 + 1.49.wso2v1 + + + 2.0.2.wso2v2 + + + 1.2.17 + 1.2 + 2.4 + 1.7 + 2.6 + + + 1.7.13 + + + diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/Bootstrap.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/Bootstrap.java new file mode 100644 index 000000000..63d4b2595 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/Bootstrap.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent; + +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentManager; + +public class Bootstrap { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog"); + System.setProperty("org.apache.commons.logging.simplelog.defaultlog", "info"); + System.setProperty("org.apache.commons.logging.simplelog.showdatetime", "true"); + System.setProperty("org.apache.commons.logging.simplelog.dateTimeFormat", "HH:mm:ss"); + AgentManager.getInstance().init(); + } + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/http/FireAlarmHTTPCommunicator.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/http/FireAlarmHTTPCommunicator.java new file mode 100644 index 000000000..98dbc6dc7 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/http/FireAlarmHTTPCommunicator.java @@ -0,0 +1,484 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.communication.http; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.eclipse.jetty.http.HttpStatus; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentConstants; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.exception.AgentCoreOperationException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandlerException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportUtils; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.http.HTTPTransportHandler; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.DataOutputStream; +import java.io.File; +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.Inet4Address; +import java.net.InetAddress; +import java.net.NetworkInterface; +import java.net.ProtocolException; +import java.net.SocketException; +import java.net.UnknownHostException; +import java.util.Enumeration; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; + +public class FireAlarmHTTPCommunicator extends HTTPTransportHandler { + private static final Log log = LogFactory.getLog(FireAlarmHTTPCommunicator.class); + + private ScheduledExecutorService service = Executors.newScheduledThreadPool(2); + private ScheduledFuture dataPushServiceHandler; + private ScheduledFuture connectorServiceHandler; + + public FireAlarmHTTPCommunicator() { + super(); + } + + public FireAlarmHTTPCommunicator(int port) { + super(port); + } + + public FireAlarmHTTPCommunicator(int port, int reconnectionInterval) { + super(port, reconnectionInterval); + } + + public ScheduledFuture getDataPushServiceHandler() { + return dataPushServiceHandler; + } + + public void connect() { + Runnable connect = new Runnable() { + public void run() { + if (!isConnected()) { + try { + processIncomingMessage(); + server.start(); + registerThisDevice(); + publishDeviceData(); + log.info("HTTP Server started at port: " + port); + + } catch (Exception e) { + if (log.isDebugEnabled()) { + log.warn("Unable to 'START' HTTP server. Will retry after " + + timeoutInterval / 1000 + " seconds."); + } + } + } + } + }; + + connectorServiceHandler = service.scheduleAtFixedRate(connect, 0, timeoutInterval, + TimeUnit.MILLISECONDS); + } + + + @Override + public void processIncomingMessage() { + server.setHandler(new AbstractHandler() { + public void handle(String s, Request request, HttpServletRequest + httpServletRequest, + HttpServletResponse httpServletResponse) + throws IOException, ServletException { + httpServletResponse.setContentType("text/html;charset=utf-8"); + httpServletResponse.setStatus(HttpServletResponse.SC_OK); + request.setHandled(true); + + AgentManager agentManager = AgentManager.getInstance(); + String pathContext = request.getPathInfo(); + String separator = File.separator; + + if (pathContext.toUpperCase().contains( + separator + AgentConstants.TEMPERATURE_CONTROL)) { + httpServletResponse.getWriter().println( + agentManager.getTemperature()); + + } else if (pathContext.toUpperCase().contains( + separator + AgentConstants.HUMIDITY_CONTROL)) { + httpServletResponse.getWriter().println( + agentManager.getHumidity()); + + } else if (pathContext.toUpperCase().contains( + separator + AgentConstants.BULB_CONTROL)) { + String[] pathVariables = pathContext.split(separator); + + if (pathVariables.length != 3) { + httpServletResponse.getWriter().println( + "Invalid BULB-control received by the device. Need to be in " + + "'{host}:{port}/BULB/{ON|OFF}' format."); + return; + } + + String switchState = pathVariables[2]; + + if (switchState == null) { + httpServletResponse.getWriter().println( + "Please specify switch-status of the BULB."); + } else { + boolean status = switchState.toUpperCase().equals( + AgentConstants.CONTROL_ON); + agentManager.changeAlarmStatus(status); + httpServletResponse.getWriter().println("Bulb is " + (status ? + AgentConstants.CONTROL_ON : AgentConstants.CONTROL_OFF)); + } + } else { + httpServletResponse.getWriter().println( + "Invalid control command received by the device."); + } + } + }); + } + + @Override + public void publishDeviceData() { + final AgentManager agentManager = AgentManager.getInstance(); + int publishInterval = agentManager.getPushInterval(); + final String deviceOwner = agentManager.getAgentConfigs().getDeviceOwner(); + final String deviceID = agentManager.getAgentConfigs().getDeviceId(); + boolean simulationMode = false; + int duration = 2 * 60; + int frequency = 5; + + Runnable pushDataRunnable = new Runnable() { + @Override + public void run() { + + String pushDataPayload = String.format(AgentConstants.PUSH_DATA_PAYLOAD, deviceOwner, + deviceID, (agentManager.getDeviceIP() + ":" + port), + agentManager.getTemperature()); + executeDataPush(pushDataPayload); + } + }; + + if (!simulationMode) { + dataPushServiceHandler = service.scheduleAtFixedRate(pushDataRunnable, publishInterval, + publishInterval, + TimeUnit.SECONDS); + } else { + String pushDataPayload = String.format(AgentConstants.PUSH_SIMULATION_DATA_PAYLOAD, deviceOwner, + deviceID, (agentManager.getDeviceIP() + ":" + port), + agentManager.getTemperature(), true, duration, frequency); + executeDataPush(pushDataPayload); + + } + } + + + private void executeDataPush(String pushDataPayload) { + AgentManager agentManager = AgentManager.getInstance(); + String pushDataEndPointURL = agentManager.getPushDataAPIEP(); + HttpURLConnection httpConnection; + int responseCode = -1; + + try { + httpConnection = TransportUtils.getHttpConnection(agentManager.getPushDataAPIEP()); + httpConnection.setRequestMethod(AgentConstants.HTTP_POST); + httpConnection.setRequestProperty("Authorization", + "Bearer " + agentManager.getAgentConfigs().getAuthToken()); + httpConnection.setRequestProperty("Content-Type", AgentConstants.APPLICATION_JSON); + + httpConnection.setDoOutput(true); + DataOutputStream dataOutPutWriter = new DataOutputStream(httpConnection.getOutputStream()); + dataOutPutWriter.writeBytes(pushDataPayload); + dataOutPutWriter.flush(); + dataOutPutWriter.close(); + + responseCode = httpConnection.getResponseCode(); + httpConnection.disconnect(); + + log.info(AgentConstants.LOG_APPENDER + "Message - '" + pushDataPayload + + "' was published to server at: " + httpConnection.getURL()); + + } catch (ProtocolException exception) { + String errorMsg = + "Protocol specific error occurred when trying to set method to " + + AgentConstants.HTTP_POST + " for:" + pushDataEndPointURL; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + + } catch (IOException exception) { + String errorMsg = + "An IO error occurred whilst trying to get the response code from: " + + pushDataEndPointURL + " for a " + AgentConstants.HTTP_POST + " method."; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + + } catch (TransportHandlerException exception) { + log.error(AgentConstants.LOG_APPENDER + + "Error encountered whilst trying to create HTTP-Connection to IoT-Server EP at: " + + pushDataEndPointURL); + } + + if (responseCode == HttpStatus.CONFLICT_409 || + responseCode == HttpStatus.PRECONDITION_FAILED_412) { + log.warn(AgentConstants.LOG_APPENDER + + "DeviceIP is being Re-Registered due to Push-Data failure with response code: " + + responseCode); + registerThisDevice(); + + } else if (responseCode != HttpStatus.NO_CONTENT_204) { + if (log.isDebugEnabled()) { + log.error(AgentConstants.LOG_APPENDER + "Status Code: " + responseCode + + " encountered whilst trying to Push-Device-Data to IoT Server at: " + + agentManager.getPushDataAPIEP()); + } + agentManager.updateAgentStatus(AgentConstants.SERVER_NOT_RESPONDING); + } + + if (log.isDebugEnabled()) { + log.debug(AgentConstants.LOG_APPENDER + "Push-Data call with payload - " + pushDataPayload + + ", to IoT Server returned status " + responseCode); + } + } + + @Override + public void disconnect() { + Runnable stopConnection = new Runnable() { + public void run() { + while (isConnected()) { + try { + dataPushServiceHandler.cancel(true); + connectorServiceHandler.cancel(true); + closeConnection(); + } catch (Exception e) { + if (log.isDebugEnabled()) { + log.warn(AgentConstants.LOG_APPENDER + "Unable to 'STOP' HTTP server at port: " + port); + } + + try { + Thread.sleep(timeoutInterval); + } catch (InterruptedException e1) { + log.error( + AgentConstants.LOG_APPENDER + "HTTP-Termination: Thread Sleep Interrupt Exception"); + } + } + } + } + }; + + Thread terminatorThread = new Thread(stopConnection); + terminatorThread.setDaemon(true); + terminatorThread.start(); + } + + @Override + public void processIncomingMessage(Object message, String... messageParams) { + + } + + @Override + public void publishDeviceData(String... publishData) { + + } + + public void registerThisDevice() { + final AgentManager agentManager = AgentManager.getInstance(); + agentManager.updateAgentStatus("Registering..."); + + final Runnable ipRegistration = new Runnable() { + @Override + public void run() { + while (isConnected()) { + try { + int responseCode = registerDeviceIP( + agentManager.getAgentConfigs().getDeviceOwner(), + agentManager.getAgentConfigs().getDeviceId()); + + if (responseCode == HttpStatus.OK_200) { + agentManager.updateAgentStatus(AgentConstants.REGISTERED); + break; + } else { + log.error(AgentConstants.LOG_APPENDER + + "Device Registration with IoT Server at:" + " " + + agentManager.getIpRegistrationEP() + + " failed with response - '" + responseCode + ":" + + HttpStatus.getMessage(responseCode) + "'"); + agentManager.updateAgentStatus(AgentConstants.RETRYING_TO_REGISTER); + } + } catch (AgentCoreOperationException exception) { + log.error(AgentConstants.LOG_APPENDER + + "Error encountered whilst trying to register the " + + "Device's IP at: " + + agentManager.getIpRegistrationEP() + + ".\nCheck whether the network-interface provided is " + + "accurate"); + agentManager.updateAgentStatus(AgentConstants.REGISTRATION_FAILED); + } + + try { + Thread.sleep(timeoutInterval); + } catch (InterruptedException e1) { + log.error(AgentConstants.LOG_APPENDER + + "Device Registration: Thread Sleep Interrupt Exception"); + } + } + } + }; + + Thread ipRegisterThread = new Thread(ipRegistration); + ipRegisterThread.setDaemon(true); + ipRegisterThread.start(); + } + + + /** + * This method calls the "Register-API" of the IoT Server in order to register the device's IP + * against its ID. + * + * @param deviceOwner the owner of the device by whose name the agent was downloaded. + * (Read from configuration file) + * @param deviceID the deviceId that is auto-generated whilst downloading the agent. + * (Read from configuration file) + * @return the status code of the HTTP-Post call to the Register-API of the IoT-Server + * @throws AgentCoreOperationException if any errors occur when an HTTPConnection session is + * created + */ + private int registerDeviceIP(String deviceOwner, String deviceID) + throws AgentCoreOperationException { + int responseCode = -1; + final AgentManager agentManager = AgentManager.getInstance(); + + String networkInterface = agentManager.getNetworkInterface(); + String deviceIPAddress = getDeviceIP(networkInterface); + + if (deviceIPAddress == null) { + throw new AgentCoreOperationException( + "An IP address could not be retrieved for the selected network interface - '" + + networkInterface + "."); + } + + agentManager.setDeviceIP(deviceIPAddress); + log.info(AgentConstants.LOG_APPENDER + "Device IP Address: " + deviceIPAddress); + + String deviceIPRegistrationEP = agentManager.getIpRegistrationEP(); + String registerEndpointURLString = + deviceIPRegistrationEP + File.separator + deviceOwner + File.separator + deviceID + + File.separator + deviceIPAddress + File.separator + port; + + if (log.isDebugEnabled()) { + log.debug(AgentConstants.LOG_APPENDER + "DeviceIP Registration EndPoint: " + + registerEndpointURLString); + } + + HttpURLConnection httpConnection; + try { + httpConnection = TransportUtils.getHttpConnection(registerEndpointURLString); + } catch (TransportHandlerException e) { + String errorMsg = + "Protocol specific error occurred when trying to fetch an HTTPConnection to:" + + " " + registerEndpointURLString; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + throw new AgentCoreOperationException(); + } + + try { + httpConnection.setRequestMethod(AgentConstants.HTTP_POST); + httpConnection.setRequestProperty("Authorization", "Bearer " + + agentManager.getAgentConfigs().getAuthToken()); + httpConnection.setDoOutput(true); + responseCode = httpConnection.getResponseCode(); + + } catch (ProtocolException exception) { + String errorMsg = "Protocol specific error occurred when trying to set method to " + + AgentConstants.HTTP_POST + " for:" + registerEndpointURLString; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + throw new AgentCoreOperationException(errorMsg, exception); + + } catch (IOException exception) { + String errorMsg = "An IO error occurred whilst trying to get the response code from:" + + " " + registerEndpointURLString + " for a " + AgentConstants.HTTP_POST + " method."; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + throw new AgentCoreOperationException(errorMsg, exception); + } + + log.info(AgentConstants.LOG_APPENDER + "DeviceIP - " + deviceIPAddress + + ", registration with IoT Server at : " + + agentManager.getAgentConfigs().getHTTPS_ServerEndpoint() + + " returned status " + + responseCode); + + return responseCode; + } + + /*------------------------------------------------------------------------------------------*/ + /* Utility methods relevant to creating and sending HTTP requests to the Iot-Server */ + /*------------------------------------------------------------------------------------------*/ + + /** + * This method is used to get the IP of the device in which the agent is run on. + * + * @return the IP Address of the device + * @throws AgentCoreOperationException if any errors occur whilst trying to get the IP address + */ + private String getDeviceIP() throws AgentCoreOperationException { + try { + return Inet4Address.getLocalHost().getHostAddress(); + } catch (UnknownHostException e) { + String errorMsg = "Error encountered whilst trying to get the device IP address."; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } + } + + /** + * This is an overloaded method that fetches the public IPv4 address of the given network + * interface + * + * @param networkInterfaceName the network-interface of whose IPv4 address is to be retrieved + * @return the IP Address iof the device + * @throws AgentCoreOperationException if any errors occur whilst trying to get details of the + * given network interface + */ + private String getDeviceIP(String networkInterfaceName) throws + AgentCoreOperationException { + String ipAddress = null; + try { + Enumeration interfaceIPAddresses = NetworkInterface.getByName( + networkInterfaceName).getInetAddresses(); + for (; interfaceIPAddresses.hasMoreElements(); ) { + InetAddress ip = interfaceIPAddresses.nextElement(); + ipAddress = ip.getHostAddress(); + if (log.isDebugEnabled()) { + log.debug(AgentConstants.LOG_APPENDER + "IP Address: " + ipAddress); + } + + if (TransportUtils.validateIPv4(ipAddress)) { + return ipAddress; + } + } + } catch (SocketException | NullPointerException exception) { + String errorMsg = + "Error encountered whilst trying to get IP Addresses of the network interface: " + + networkInterfaceName + + ".\nPlease check whether the name of the network interface used is correct"; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + throw new AgentCoreOperationException(errorMsg, exception); + } + + return ipAddress; + } + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java new file mode 100644 index 000000000..5b24783e7 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java @@ -0,0 +1,290 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.communication.mqtt; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.eclipse.paho.client.mqttv3.MqttException; +import org.eclipse.paho.client.mqttv3.MqttMessage; +import org.eclipse.paho.client.mqttv3.MqttSecurityException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentConstants; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentUtilOperations; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.exception.AgentCoreOperationException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandlerException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.mqtt.MQTTTransportHandler; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; + +//TODO:: Lincence header, comments and SPECIFIC class name since its not generic +public class FireAlarmMQTTCommunicator extends MQTTTransportHandler { + + private static final Log log = LogFactory.getLog(FireAlarmMQTTCommunicator.class); + + private ScheduledExecutorService service = Executors.newScheduledThreadPool(2); + private ScheduledFuture dataPushServiceHandler; + private static final String DEFAULT_PASSWORD = ""; + + public FireAlarmMQTTCommunicator(String deviceOwner, String deviceType, + String mqttBrokerEndPoint, String subscribeTopic) { + super(deviceOwner, deviceType, mqttBrokerEndPoint, subscribeTopic); + } + + @SuppressWarnings("unused") + public FireAlarmMQTTCommunicator(String deviceOwner, String deviceType, + String mqttBrokerEndPoint, String subscribeTopic, + int intervalInMillis) { + super(deviceOwner, deviceType, mqttBrokerEndPoint, subscribeTopic, intervalInMillis); + } + + public ScheduledFuture getDataPushServiceHandler() { + return dataPushServiceHandler; + } + + //TODO:: Terminate logs with a period + //TODO: Need to print exceptions + @Override + public void connect() { + final AgentManager agentManager = AgentManager.getInstance(); + Runnable connector = new Runnable() { + public void run() { + while (!isConnected()) { + try { + connectToQueue(agentManager.getAgentConfigs().getAuthToken(), DEFAULT_PASSWORD); + agentManager.updateAgentStatus("Connected to MQTT Queue"); + } catch (TransportHandlerException e) { + log.warn(AgentConstants.LOG_APPENDER + "Connection to MQTT Broker at: " + mqttBrokerEndPoint + + " failed.\n Will retry in " + timeoutInterval + " milli-seconds."); + + if (e.getCause() != null && e.getCause() instanceof MqttSecurityException) { + refreshOAuthToken((MqttSecurityException) e.getCause()); + } + } + + try { + if (isConnected()) { + subscribeToQueue(); + agentManager.updateAgentStatus("Subscribed to MQTT Queue"); + publishDeviceData(); + } + } catch (TransportHandlerException e) { + log.warn(AgentConstants.LOG_APPENDER + "Subscription to MQTT Broker at: " + + mqttBrokerEndPoint + " failed"); + agentManager.updateAgentStatus("Subscription to broker failed."); + } + + try { + Thread.sleep(timeoutInterval); + } catch (InterruptedException ex) { + log.error(AgentConstants.LOG_APPENDER + "MQTT: Connect-Thread Sleep Interrupt Exception."); + } + } + } + }; + + Thread connectorThread = new Thread(connector); + connectorThread.setDaemon(true); + connectorThread.start(); + } + + private void refreshOAuthToken(final MqttSecurityException exception) { + Runnable tokenRefresher = new Runnable() { + public void run() { + String authenticationMethod = AgentUtilOperations.getAuthenticationMethod(); + + try { + if (exception.getReasonCode() == MqttSecurityException.REASON_CODE_FAILED_AUTHENTICATION && + authenticationMethod.equals(AgentConstants.TOKEN_AUTHENTICATION_METHOD)) { + AgentUtilOperations.refreshOAuthToken(); + } + } catch (AgentCoreOperationException e1) { + log.error(AgentConstants.LOG_APPENDER + "Token Refresh Attempt Failed. " + e1); + } + } + }; + + Thread connectorThread = new Thread(tokenRefresher); + connectorThread.setDaemon(true); + connectorThread.start(); + } + + @Override + public void processIncomingMessage(MqttMessage message, String... messageParams) { + final AgentManager agentManager = AgentManager.getInstance(); + String tenantDomain = agentManager.getAgentConfigs().getTenantDomain(); + String deviceOwner = agentManager.getAgentConfigs().getDeviceOwner(); + String deviceID = agentManager.getAgentConfigs().getDeviceId(); + String receivedMessage; + String replyMessage; + String securePayLoad; + + try { + receivedMessage = AgentUtilOperations.extractMessageFromPayload(message.toString()); + log.info(AgentConstants.LOG_APPENDER + "Message [" + receivedMessage + "] was received"); + } catch (AgentCoreOperationException e) { + log.warn(AgentConstants.LOG_APPENDER + "Could not extract message from payload.", e); + return; + } + + + String[] controlSignal = receivedMessage.split(":"); + // message- ":" format.(ex: "BULB:ON", "TEMPERATURE", "HUMIDITY") + + try { + switch (controlSignal[0].toUpperCase()) { + case AgentConstants.BULB_CONTROL: + boolean stateToSwitch = controlSignal[1].equals(AgentConstants.CONTROL_ON); + agentManager.changeAlarmStatus(stateToSwitch); + log.info(AgentConstants.LOG_APPENDER + "Bulb was switched to state: '" + controlSignal[1] + "'"); + break; + + case AgentConstants.TEMPERATURE_CONTROL: + int currentTemperature = agentManager.getTemperature(); + + String replyTemperature = "Current temperature was read as: '" + currentTemperature + "C'"; + log.info(AgentConstants.LOG_APPENDER + replyTemperature); + + String tempPublishTopic = String.format(AgentConstants.MQTT_PUBLISH_TOPIC, tenantDomain, deviceID); + + replyMessage = AgentConstants.TEMPERATURE_CONTROL + ":" + currentTemperature; + securePayLoad = AgentUtilOperations.prepareSecurePayLoad(replyMessage); + publishToQueue(tempPublishTopic, securePayLoad); + break; + + case AgentConstants.HUMIDITY_CONTROL: + int currentHumidity = agentManager.getHumidity(); + + String replyHumidity = "Current humidity was read as: '" + currentHumidity + "%'"; + log.info(AgentConstants.LOG_APPENDER + replyHumidity); + + String humidPublishTopic = String.format( + AgentConstants.MQTT_PUBLISH_TOPIC, tenantDomain, deviceID); + + replyMessage = AgentConstants.HUMIDITY_CONTROL + ":" + currentHumidity; + securePayLoad = AgentUtilOperations.prepareSecurePayLoad(replyMessage); + publishToQueue(humidPublishTopic, securePayLoad); + break; + + default: + log.warn(AgentConstants.LOG_APPENDER + "'" + controlSignal[0] + + "' is invalid and not-supported for this device-type"); + break; + } + } catch (AgentCoreOperationException e) { + log.warn(AgentConstants.LOG_APPENDER + "Preparing Secure payload failed", e); + } catch (TransportHandlerException e) { + log.error(AgentConstants.LOG_APPENDER + + "MQTT - Publishing, reply message to the MQTT Queue at: " + + agentManager.getAgentConfigs().getMqttBrokerEndpoint() + " failed"); + } + + } + + @Override + public void publishDeviceData() { + final AgentManager agentManager = AgentManager.getInstance(); + int publishInterval = agentManager.getPushInterval(); + Runnable pushDataRunnable = new Runnable() { + @Override + public void run() { + int currentTemperature = agentManager.getTemperature(); + String message = "PUBLISHER:" + AgentConstants.TEMPERATURE_CONTROL + ":" + currentTemperature; + + try { + String payLoad = AgentUtilOperations.prepareSecurePayLoad(message); + + MqttMessage pushMessage = new MqttMessage(); + pushMessage.setPayload(payLoad.getBytes(StandardCharsets.UTF_8)); + pushMessage.setQos(DEFAULT_MQTT_QUALITY_OF_SERVICE); + pushMessage.setRetained(false); + + String topic = String.format(AgentConstants.MQTT_PUBLISH_TOPIC, + agentManager.getAgentConfigs().getTenantDomain(), + agentManager.getAgentConfigs().getDeviceId()); + + publishToQueue(topic, pushMessage); + log.info(AgentConstants.LOG_APPENDER + "Message: '" + message + "' published to MQTT Queue at [" + + agentManager.getAgentConfigs().getMqttBrokerEndpoint() + "] under topic [" + + topic + "]"); + + } catch (TransportHandlerException e) { + log.warn(AgentConstants.LOG_APPENDER + "Data Publish attempt to topic - [" + + AgentConstants.MQTT_PUBLISH_TOPIC + "] failed for payload [" + message + "]"); + } catch (AgentCoreOperationException e) { + log.warn(AgentConstants.LOG_APPENDER + "Preparing Secure payload failed", e); + } + } + }; + + dataPushServiceHandler = service.scheduleAtFixedRate(pushDataRunnable, publishInterval, publishInterval, + TimeUnit.SECONDS); + } + + + @Override + public void disconnect() { + Runnable stopConnection = new Runnable() { + public void run() { + while (isConnected()) { + + if (dataPushServiceHandler != null) { + dataPushServiceHandler.cancel(true); + } + + try { + closeConnection(); + + } catch (MqttException e) { + if (log.isDebugEnabled()) { + log.warn(AgentConstants.LOG_APPENDER + + "Unable to 'STOP' MQTT connection at broker at: " + + mqttBrokerEndPoint); + } + + try { + Thread.sleep(timeoutInterval); + } catch (InterruptedException e1) { + log.error(AgentConstants.LOG_APPENDER + + "MQTT-Terminator: Thread Sleep Interrupt Exception"); + } + } + } + } + }; + + Thread terminatorThread = new Thread(stopConnection); + terminatorThread.setDaemon(true); + terminatorThread.start(); + } + + @Override + public void processIncomingMessage() { + + } + + @Override + public void publishDeviceData(String... publishData) { + + } + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/xmpp/FireAlarmXMPPCommunicator.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/xmpp/FireAlarmXMPPCommunicator.java new file mode 100644 index 000000000..abb8d7965 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/xmpp/FireAlarmXMPPCommunicator.java @@ -0,0 +1,263 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.communication.xmpp; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.jivesoftware.smack.packet.Message; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentConfiguration; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentConstants; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentUtilOperations; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.exception.AgentCoreOperationException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandlerException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.xmpp.XMPPTransportHandler; + +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; + +public class FireAlarmXMPPCommunicator extends XMPPTransportHandler { + + private static final Log log = LogFactory.getLog(FireAlarmXMPPCommunicator.class); + + private ScheduledExecutorService service = Executors.newScheduledThreadPool(2); + private ScheduledFuture dataPushServiceHandler; + private ScheduledFuture connectorServiceHandler; + + private String username; + private String password; + private String resource; + private String xmppAdminJID; + private String xmppDeviceJID; + + public FireAlarmXMPPCommunicator(String server) { + super(server); + } + + public FireAlarmXMPPCommunicator(String server, int port) { + super(server, port); + } + + public FireAlarmXMPPCommunicator(String server, int port, int timeout) { + super(server, port, timeout); + } + + public ScheduledFuture getDataPushServiceHandler() { + return dataPushServiceHandler; + } + + @Override + public void connect() { + final AgentManager agentManager = AgentManager.getInstance(); + username = agentManager.getAgentConfigs().getDeviceId(); + password = agentManager.getAgentConfigs().getAuthToken(); + xmppDeviceJID = username + "@" + agentManager.getAgentConfigs().getXmppServerName(); + xmppAdminJID = agentManager.getAgentConfigs().getServerJID(); + + Runnable connect = new Runnable() { + public void run() { + if (!isConnected()) { + try { + connectToServer(); + } catch (TransportHandlerException e) { + log.warn(AgentConstants.LOG_APPENDER + "Connection to XMPP server at: " + server + " failed"); + } + + try { + loginToServer(username, password, resource); + agentManager.updateAgentStatus("Connected to XMPP Server"); + setMessageFilterAndListener(xmppAdminJID, xmppDeviceJID, true); + publishDeviceData(); + } catch (TransportHandlerException e) { + log.warn(AgentConstants.LOG_APPENDER + "Login to XMPP server at: " + server + " failed"); + agentManager.updateAgentStatus("No XMPP Account for Device"); + } + } + } + }; + + connectorServiceHandler = service.scheduleAtFixedRate(connect, 0, timeoutInterval, TimeUnit.MILLISECONDS); + } + + /** + * This is an abstract method used for post processing the received XMPP-message. This + * method will be implemented as per requirement at the time of creating an object of this + * class. + * + * @param xmppMessage the xmpp message received by the listener. + */ + @Override + public void processIncomingMessage(Message xmppMessage, String... messageParams) { + final AgentManager agentManager = AgentManager.getInstance(); + String from = xmppMessage.getFrom(); + String message = xmppMessage.getBody(); + String receivedMessage; + String replyMessage; + String securePayLoad; + + try { + receivedMessage = AgentUtilOperations.extractMessageFromPayload(message); + log.info(AgentConstants.LOG_APPENDER + "Message [" + receivedMessage + "] was received"); + } catch (AgentCoreOperationException e) { + log.warn(AgentConstants.LOG_APPENDER + "Could not extract message from payload.", e); + return; + } + + String[] controlSignal = receivedMessage.split(":"); + //message- ":" format. (ex: "BULB:ON", "TEMPERATURE", "HUMIDITY") + + try { + switch (controlSignal[0].toUpperCase()) { + case AgentConstants.BULB_CONTROL: + if (controlSignal.length != 2) { + replyMessage = "BULB controls need to be in the form - 'BULB:{ON|OFF}'"; + log.warn(replyMessage); + securePayLoad = AgentUtilOperations.prepareSecurePayLoad(replyMessage); + sendXMPPMessage(xmppAdminJID, securePayLoad, "CONTROL-REPLY"); + break; + } + + agentManager.changeAlarmStatus(controlSignal[1].equals(AgentConstants.CONTROL_ON)); + log.info(AgentConstants.LOG_APPENDER + "Bulb was switched to state: '" + controlSignal[1] + "'"); + break; + + case AgentConstants.TEMPERATURE_CONTROL: + int currentTemperature = agentManager.getTemperature(); + + String replyTemperature = + "The current temperature was read to be: '" + currentTemperature + + "C'"; + log.info(AgentConstants.LOG_APPENDER + replyTemperature); + + replyMessage = AgentConstants.TEMPERATURE_CONTROL + ":" + currentTemperature; + securePayLoad = AgentUtilOperations.prepareSecurePayLoad(replyMessage); + sendXMPPMessage(xmppAdminJID, securePayLoad, "CONTROL-REPLY"); + break; + + case AgentConstants.HUMIDITY_CONTROL: + int currentHumidity = agentManager.getHumidity(); + + String replyHumidity = "The current humidity was read to be: '" + currentHumidity + "%'"; + log.info(AgentConstants.LOG_APPENDER + replyHumidity); + + replyMessage = AgentConstants.HUMIDITY_CONTROL + ":" + currentHumidity; + securePayLoad = AgentUtilOperations.prepareSecurePayLoad(replyMessage); + sendXMPPMessage(xmppAdminJID, securePayLoad, "CONTROL-REPLY"); + break; + + default: + replyMessage = "'" + controlSignal[0] + "' is invalid and not-supported for this device-type"; + log.warn(replyMessage); + securePayLoad = AgentUtilOperations.prepareSecurePayLoad(replyMessage); + sendXMPPMessage(xmppAdminJID, securePayLoad, "CONTROL-ERROR"); + break; + } + } catch (AgentCoreOperationException e) { + log.warn(AgentConstants.LOG_APPENDER + "Preparing Secure payload failed", e); + } + + } + + + @Override + public void publishDeviceData() { + final AgentManager agentManager = AgentManager.getInstance(); + int publishInterval = agentManager.getPushInterval(); + + Runnable pushDataRunnable = new Runnable() { + @Override + public void run() { + Message xmppMessage = new Message(); + + try { + int currentTemperature = agentManager.getTemperature(); + + String message = AgentConstants.TEMPERATURE_CONTROL + ":" + currentTemperature; + String payLoad = AgentUtilOperations.prepareSecurePayLoad(message); + + xmppMessage.setTo(xmppAdminJID); + xmppMessage.setSubject(agentManager.getAgentConfigs().getTenantDomain()); + xmppMessage.setBody(payLoad); + xmppMessage.setType(Message.Type.chat); + + sendXMPPMessage(xmppAdminJID, xmppMessage); + log.info(AgentConstants.LOG_APPENDER + "Message: '" + message + "' sent to XMPP JID - " + + "[" + xmppAdminJID + "] under subject [" + xmppMessage.getSubject() + "]."); + } catch (AgentCoreOperationException e) { + log.warn(AgentConstants.LOG_APPENDER + "Preparing Secure payload failed for XMPP JID - " + + "[" + xmppAdminJID + "] with subject - [" + xmppMessage.getSubject() + "]."); + } + } + }; + + dataPushServiceHandler = service.scheduleAtFixedRate(pushDataRunnable, publishInterval, + publishInterval, TimeUnit.SECONDS); + } + + + @Override + public void disconnect() { + Runnable stopConnection = new Runnable() { + public void run() { + + if (dataPushServiceHandler != null) { + dataPushServiceHandler.cancel(true); + } + + if (connectorServiceHandler != null) { + connectorServiceHandler.cancel(true); + } + + while (isConnected()) { + closeConnection(); + + if (log.isDebugEnabled()) { + log.warn(AgentConstants.LOG_APPENDER + + "Unable to 'STOP' connection to XMPP server at: " + server); + } + + try { + Thread.sleep(timeoutInterval); + } catch (InterruptedException e1) { + log.error(AgentConstants.LOG_APPENDER + "XMPP-Terminator: Thread Sleep Interrupt Exception"); + } + + } + } + }; + + Thread terminatorThread = new Thread(stopConnection); + terminatorThread.setDaemon(true); + terminatorThread.start(); + } + + + @Override + public void processIncomingMessage() { + + } + + @Override + public void publishDeviceData(String... publishData) { + + } + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java new file mode 100644 index 000000000..d5db8993c --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java @@ -0,0 +1,191 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core; + +/** + * A Configuration class that holds all the Agent specific details that are read from the + * 'deviceConfig.properties' file. This file is generated by the IoT-Server at the time of + * downloading the device agent from the IoT-Server. + */ +public class AgentConfiguration { + private String tenantDomain; + private String deviceOwner; + private String deviceId; + private String deviceName; + private String controllerContext; + private String scepContext; + private String HTTPS_ServerEndpoint; + private String HTTP_ServerEndpoint; + private String apimGatewayEndpoint; + private String mqttBrokerEndpoint; + private String xmppServerEndpoint; + private String apiApplicationKey; + private String authMethod; + private String authToken; + private String refreshToken; + private int dataPushInterval; + private String xmppServerName; + private String serverJID; + + public String getTenantDomain() { + return tenantDomain; + } + + public void setTenantDomain(String tenantDomain) { + this.tenantDomain = tenantDomain; + } + + public String getDeviceOwner() { + return deviceOwner; + } + + public void setDeviceOwner(String deviceOwner) { + this.deviceOwner = deviceOwner; + } + + public String getDeviceId() { + return deviceId; + } + + public String getServerJID() { + return serverJID; + } + + public void setServerJID(String serverJID) { + this.serverJID = serverJID; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceName() { + return deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getControllerContext() { + return controllerContext; + } + + public void setControllerContext(String controllerContext) { + this.controllerContext = controllerContext; + } + + public String getHTTPS_ServerEndpoint() { + return HTTPS_ServerEndpoint; + } + + public void setHTTPS_ServerEndpoint(String HTTPS_ServerEndpoint) { + this.HTTPS_ServerEndpoint = HTTPS_ServerEndpoint; + } + + public String getHTTP_ServerEndpoint() { + return HTTP_ServerEndpoint; + } + + public void setHTTP_ServerEndpoint(String HTTP_ServerEndpoint) { + this.HTTP_ServerEndpoint = HTTP_ServerEndpoint; + } + + public String getApimGatewayEndpoint() { + return apimGatewayEndpoint; + } + + public void setApimGatewayEndpoint(String apimGatewayEndpoint) { + this.apimGatewayEndpoint = apimGatewayEndpoint; + } + + public String getMqttBrokerEndpoint() { + return mqttBrokerEndpoint; + } + + public void setMqttBrokerEndpoint(String mqttBrokerEndpoint) { + this.mqttBrokerEndpoint = mqttBrokerEndpoint; + } + + public String getXmppServerEndpoint() { + return xmppServerEndpoint; + } + + public void setXmppServerEndpoint(String xmppServerEndpoint) { + this.xmppServerEndpoint = xmppServerEndpoint; + } + + public String getApiApplicationKey() { + return apiApplicationKey; + } + + public void setApiApplicationKey(String apiApplicationKey) { + this.apiApplicationKey = apiApplicationKey; + } + + public String getAuthMethod() { + return authMethod; + } + + public void setAuthMethod(String authMethod) { + this.authMethod = authMethod; + } + + public String getAuthToken() { + return authToken; + } + + public void setAuthToken(String authToken) { + this.authToken = authToken; + } + + public String getRefreshToken() { + return refreshToken; + } + + public void setRefreshToken(String refreshToken) { + this.refreshToken = refreshToken; + } + + public int getDataPushInterval() { + return dataPushInterval; + } + + public void setDataPushInterval(int dataPushInterval) { + this.dataPushInterval = dataPushInterval; + } + + public String getScepContext() { + return scepContext; + } + + public void setScepContext(String scepContext) { + this.scepContext = scepContext; + } + + public String getXmppServerName() { + return xmppServerName; + } + + public void setXmppServerName(String xmppServerName) { + this.xmppServerName = xmppServerName; + } +} + + diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java new file mode 100644 index 000000000..566e5cfc0 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core; + +public class AgentConstants { + public static final String DEVICE_TYPE = "virtual_firealarm"; + public static final String LOG_APPENDER = "AGENT_LOG:: "; + public static final String PROPERTIES_FILE_PATH = ""; + public static final int DEFAULT_RETRY_THREAD_INTERVAL = 5000; // time in millis + public static final String TOKEN_AUTHENTICATION_METHOD = "token"; + /* --------------------------------------------------------------------------------------- + IoT-Server specific information + --------------------------------------------------------------------------------------- */ + public static final String DEVICE_ENROLLMENT_API_EP = "/scep"; + public static final String DEVICE_REGISTER_API_EP = "/register"; + public static final String DEVICE_PUSH_TEMPERATURE_API_EP = "/temperature"; + public static final String PUSH_DATA_PAYLOAD = + "{\"owner\":\"%s\",\"deviceId\":\"%s\",\"reply\":\"%s\",\"value\":\"%s\"}"; + + public static final String PUSH_SIMULATION_DATA_PAYLOAD = + "{\"owner\":\"%s\",\"deviceId\":\"%s\",\"reply\":\"%s\",\"value\":\"%s\",\"isSimulated\":\"%s\"," + + "\"duration\":\"%s\",\"frequency\":\"%s\"}"; + + public static final String DEVICE_DETAILS_PAGE_EP = "/devicemgt/device/%s?id=%s"; + public static final String DEVICE_ANALYTICS_PAGE_URL = + "/devicemgt/device/virtual_firealarm/analytics?deviceId=%s&deviceName=%s"; + + /* --------------------------------------------------------------------------------------- + HTTP Connection specific information for communicating with IoT-Server + --------------------------------------------------------------------------------------- */ + public static final String HTTP_POST = "POST"; + public static final String HTTP_GET = "GET"; + public static final String AUTHORIZATION_HEADER = "Authorization"; + public static final String CONTENT_TYPE_HEADER = "Content-Type"; + public static final String APPLICATION_JSON = "application/json"; + public static final String X_WWW_FORM_URLENCODED = "application/x-www-form-urlencoded"; + public static final String REGISTERED = "Registered"; + public static final String NOT_REGISTERED = "Not-Registered"; + public static final String REGISTRATION_FAILED = "Registration Failed"; + public static final String RETRYING_TO_REGISTER = "Registration Failed. Re-trying.."; + public static final String SERVER_NOT_RESPONDING = "Server not responding.."; + + /* --------------------------------------------------------------------------------------- + MQTT Connection specific information + --------------------------------------------------------------------------------------- */ + public static final int DEFAULT_MQTT_RECONNECTION_INTERVAL = 2; // time in seconds + public static final int DEFAULT_MQTT_QUALITY_OF_SERVICE = 0; + public static final String MQTT_SUBSCRIBE_TOPIC = "%s/" + DEVICE_TYPE + "/%s"; + public static final String MQTT_PUBLISH_TOPIC = "%s/" + DEVICE_TYPE + "/%s/publisher"; + + /* --------------------------------------------------------------------------------------- + Device/Agent specific properties to be read from the 'deviceConfig.properties' file + --------------------------------------------------------------------------------------- */ + public static final String AGENT_PROPERTIES_FILE_NAME = "deviceConfig.properties"; + public static final String TENANT_DOMAIN = "tenantDomain"; + public static final String DEVICE_OWNER_PROPERTY = "owner"; + public static final String DEVICE_ID_PROPERTY = "deviceId"; + public static final String SERVER_JID_PROPERTY = "server-jid"; + public static final String DEVICE_NAME_PROPERTY = "device-name"; + public static final String DEVICE_CONTROLLER_CONTEXT_PROPERTY = "controller-context"; + public static final String DEVICE_SCEP_CONTEXT_PROPERTY = "scep-context"; + public static final String SERVER_HTTPS_EP_PROPERTY = "https-ep"; + public static final String SERVER_HTTP_EP_PROPERTY = "http-ep"; + public static final String APIM_GATEWAY_EP_PROPERTY = "apim-ep"; + public static final String MQTT_BROKER_EP_PROPERTY = "mqtt-ep"; + public static final String XMPP_SERVER_EP_PROPERTY = "xmpp-ep"; + public static final String XMPP_SERVER_NAME_PROPERTY = "xmpp-server-name"; + public static final String API_APPLICATION_KEY = "application-key"; + public static final String AUTH_METHOD_PROPERTY = "auth-method"; + public static final String AUTH_TOKEN_PROPERTY = "auth-token"; + public static final String REFRESH_TOKEN_PROPERTY = "refresh-token"; + public static final String NETWORK_INTERFACE_PROPERTY = "network-interface"; + public static final String PUSH_INTERVAL_PROPERTY = "push-interval"; + /* --------------------------------------------------------------------------------------- + Default values for the Device/Agent specific configurations listed above + --------------------------------------------------------------------------------------- */ + public static final String DEFAULT_NETWORK_INTERFACE = "en0"; + public static final int DEFAULT_DATA_PUBLISH_INTERVAL = 15; // seconds + public static final String DEFAULT_PROTOCOL = "MQTT"; + /* --------------------------------------------------------------------------------------- + Control Signal specific constants to match the request context + --------------------------------------------------------------------------------------- */ + public static final String BULB_CONTROL = "BULB"; + public static final String TEMPERATURE_CONTROL = "TEMPERATURE"; + public static final String POLICY_SIGNAL = "POLICY"; + public static final String HUMIDITY_CONTROL = "HUMIDITY"; + public static final String CONTROL_ON = "ON"; + public static final String CONTROL_OFF = "OFF"; + public static final String AUDIO_FILE_NAME = "fireAlarmSound.mid"; + /* --------------------------------------------------------------------------------------- + Communication protocol specific Strings + --------------------------------------------------------------------------------------- */ + public static final String TCP_PREFIX = "tcp://"; + public static final String HTTP_PREFIX = "http://"; + public static final String HTTPS_PREFIX = "https://"; + public static final String HTTP_PROTOCOL = "HTTP"; + public static final String MQTT_PROTOCOL = "MQTT"; + public static final String XMPP_PROTOCOL = "XMPP"; + public static final String PROTOCOL_PROPERTY = "Protocol"; + public static final String HOST_PROPERTY = "Host"; + public static final String PORT_PROPERTY = "Port"; + + /* --------------------------------------------------------------------------------------- + Keystore specific strings for the device trustStore + --------------------------------------------------------------------------------------- */ + public static final String DEVICE_KEYSTORE_TYPE = "JKS"; + public static final String DEVICE_KEYSTORE = "virtual_firealarm.jks"; + public static final String DEVICE_KEYSTORE_PASSWORD = "wso2@virtual_firealarm"; + public static final String DEVICE_PRIVATE_KEY_ALIAS = "virtual_firealarm_key"; + public static final String DEVICE_CERT_ALIAS = "virtual_firealarm_cert"; + public static final String SERVER_CA_CERT_ALIAS = "ca_iotServer"; +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java new file mode 100644 index 000000000..2e7634054 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java @@ -0,0 +1,353 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.communication.http.FireAlarmHTTPCommunicator; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.communication.mqtt.FireAlarmMQTTCommunicator; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.communication.xmpp.FireAlarmXMPPCommunicator; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.enrollment.EnrollmentManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.exception.AgentCoreOperationException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandler; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandlerException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportUtils; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.virtual.VirtualHardwareManager; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class AgentManager { + + private static final Log log = LogFactory.getLog(AgentManager.class); + private static AgentManager agentManager; + private String rootPath = ""; + + private boolean deviceReady = false; + private boolean isAlarmOn = false; + + private String deviceMgtControlUrl, deviceMgtAnalyticUrl; + private String deviceName, agentStatus; + + private int pushInterval; // seconds + private String prevProtocol, protocol; + + private String networkInterface; + private List interfaceList, protocolList; + private Map agentCommunicator; + + private AgentConfiguration agentConfigs; + + private String deviceIP; + private String enrollmentEP; + private String ipRegistrationEP; + private String pushDataAPIEP; + + private AgentManager() { + } + + public static AgentManager getInstance() { + if (agentManager == null) { + agentManager = new AgentManager(); + } + return agentManager; + } + + public void init() { + + agentCommunicator = new HashMap<>(); + // Read IoT-Server specific configurations from the 'deviceConfig.properties' file + try { + this.agentConfigs = AgentUtilOperations.readIoTServerConfigs(); + } catch (AgentCoreOperationException e) { + log.error("Reading device configuration from configuration file failed:\n"); + log.error(e); + System.exit(0); + } + + // Initialise IoT-Server URL endpoints from the configuration read from file + AgentUtilOperations.initializeServerEndPoints(); + // Set the hostNameVerifier to the APIM-Server IPAddress to enable HTTPS handshake + AgentUtilOperations.setHTTPSConfigurations(); + + String analyticsPageContext = String.format(AgentConstants.DEVICE_ANALYTICS_PAGE_URL, + agentConfigs.getDeviceId(), + agentConfigs.getDeviceName()); + + String controlPageContext = String.format(AgentConstants.DEVICE_DETAILS_PAGE_EP, + AgentConstants.DEVICE_TYPE, + agentConfigs.getDeviceId()); + + this.deviceMgtAnalyticUrl = agentConfigs.getHTTPS_ServerEndpoint() + analyticsPageContext; + this.deviceMgtControlUrl = agentConfigs.getHTTPS_ServerEndpoint() + controlPageContext; + + this.agentStatus = AgentConstants.NOT_REGISTERED; + this.deviceName = this.agentConfigs.getDeviceName(); + + this.pushInterval = this.agentConfigs.getDataPushInterval(); + this.networkInterface = AgentConstants.DEFAULT_NETWORK_INTERFACE; + + this.protocol = AgentConstants.DEFAULT_PROTOCOL; + this.prevProtocol = protocol; + + Map xmppIPPortMap; + try { + xmppIPPortMap = TransportUtils.getHostAndPort(agentConfigs.getXmppServerEndpoint()); + String xmppServer = xmppIPPortMap.get("Host"); + int xmppPort = Integer.parseInt(xmppIPPortMap.get("Port")); + + TransportHandler xmppCommunicator = new FireAlarmXMPPCommunicator(xmppServer, xmppPort); + agentCommunicator.put(AgentConstants.XMPP_PROTOCOL, xmppCommunicator); + + } catch (TransportHandlerException e) { + log.error("XMPP Endpoint String - " + agentConfigs.getXmppServerEndpoint() + + ", provided in the configuration file is invalid."); + } + String mqttTopic = String.format(AgentConstants.MQTT_SUBSCRIBE_TOPIC, agentConfigs.getTenantDomain(), + agentConfigs.getDeviceId()); + +// TransportHandler httpCommunicator = new FireAlarmHTTPCommunicator(); + TransportHandler mqttCommunicator = new FireAlarmMQTTCommunicator(agentConfigs.getDeviceOwner(), + agentConfigs.getDeviceId(), + agentConfigs.getMqttBrokerEndpoint(), + mqttTopic); + +// agentCommunicator.put(AgentConstants.HTTP_PROTOCOL, httpCommunicator); + agentCommunicator.put(AgentConstants.MQTT_PROTOCOL, mqttCommunicator); + + try { + interfaceList = new ArrayList<>(TransportUtils.getInterfaceIPMap().keySet()); + protocolList = new ArrayList<>(agentCommunicator.keySet()); + } catch (TransportHandlerException e) { + log.error("An error occurred whilst retrieving all NetworkInterface-IP mappings"); + } + + //Initializing hardware at that point + //AgentManger.setDeviceReady() method should invoked from hardware after initialization + VirtualHardwareManager.getInstance().init(); + + //Wait till hardware get ready + while (!deviceReady) { + try { + Thread.sleep(500); + } catch (InterruptedException e) { + log.info(AgentConstants.LOG_APPENDER + "Sleep error in 'device ready-flag' checking thread"); + } + } + + try { + if (!EnrollmentManager.getInstance().isEnrolled()) { + EnrollmentManager.getInstance().beginEnrollmentFlow(); + } + } catch (AgentCoreOperationException e) { + log.error("Device Enrollment Failed:\n"); + log.error(e); + System.exit(0); + } + + //Start agent communication + agentCommunicator.get(protocol).connect(); + } + + private void switchCommunicator(String stopProtocol, String startProtocol) { + agentCommunicator.get(stopProtocol).disconnect(); + + while (agentCommunicator.get(stopProtocol).isConnected()) { + try { + Thread.sleep(250); + } catch (InterruptedException e) { + log.info(AgentConstants.LOG_APPENDER + + "Sleep error in 'Switch-Communicator' Thread's shutdown wait."); + } + } + + agentCommunicator.get(startProtocol).connect(); + } + + public void setInterface(int interfaceId) { + if (interfaceId != -1) { + String newInterface = interfaceList.get(interfaceId); + + if (!newInterface.equals(networkInterface)) { + networkInterface = newInterface; + + if (protocol.equals(AgentConstants.HTTP_PROTOCOL) && !protocol.equals( + prevProtocol)) { + switchCommunicator(prevProtocol, protocol); + } + } + } + } + + public void setProtocol(int protocolId) { + if (protocolId != -1) { + String newProtocol = protocolList.get(protocolId); + + if (!protocol.equals(newProtocol)) { + prevProtocol = protocol; + protocol = newProtocol; + switchCommunicator(prevProtocol, protocol); + } + } + } + + public void changeAlarmStatus(boolean isOn) { + VirtualHardwareManager.getInstance().changeAlarmStatus(isOn); + isAlarmOn = isOn; + } + + public void updateAgentStatus(String status) { + this.agentStatus = status; + } + + /*------------------------------------------------------------------------------------------*/ + /* Getter and Setter Methods for the private variables */ + /*------------------------------------------------------------------------------------------*/ + + public void setRootPath(String rootPath) { + this.rootPath = rootPath; + } + + public String getRootPath() { + return rootPath; + } + + public void setDeviceReady(boolean deviceReady) { + this.deviceReady = deviceReady; + } + + public String getDeviceMgtControlUrl() { + return deviceMgtControlUrl; + } + + public String getDeviceMgtAnalyticUrl() { + return deviceMgtAnalyticUrl; + } + + public AgentConfiguration getAgentConfigs() { + return agentConfigs; + } + + public String getDeviceIP() { + return deviceIP; + } + + public void setDeviceIP(String deviceIP) { + this.deviceIP = deviceIP; + } + + public String getEnrollmentEP() { + return enrollmentEP; + } + + public void setEnrollmentEP(String enrollmentEP) { + this.enrollmentEP = enrollmentEP; + } + + public String getIpRegistrationEP() { + return ipRegistrationEP; + } + + public void setIpRegistrationEP(String ipRegistrationEP) { + this.ipRegistrationEP = ipRegistrationEP; + } + + public String getPushDataAPIEP() { + return pushDataAPIEP; + } + + public void setPushDataAPIEP(String pushDataAPIEP) { + this.pushDataAPIEP = pushDataAPIEP; + } + + public String getDeviceName() { + return deviceName; + } + + public String getNetworkInterface() { + return networkInterface; + } + + public String getAgentStatus() { + return agentStatus; + } + + public int getPushInterval() { + return pushInterval; + } + + public void setPushInterval(int pushInterval) { + this.pushInterval = pushInterval; + TransportHandler transportHandler = agentCommunicator.get(protocol); + + switch (protocol) { + case AgentConstants.HTTP_PROTOCOL: + ((FireAlarmHTTPCommunicator) transportHandler).getDataPushServiceHandler() + .cancel(true); + break; + case AgentConstants.MQTT_PROTOCOL: + ((FireAlarmMQTTCommunicator) transportHandler).getDataPushServiceHandler() + .cancel(true); + break; + case AgentConstants.XMPP_PROTOCOL: + ((FireAlarmXMPPCommunicator) transportHandler).getDataPushServiceHandler() + .cancel(true); + break; + default: + log.warn("Unknown protocol " + protocol); + } + transportHandler.publishDeviceData(); + + if (log.isDebugEnabled()) { + log.debug("The Data Publish Interval was changed to: " + pushInterval); + } + } + + public List getInterfaceList() { + return interfaceList; + } + + public List getProtocolList() { + return protocolList; + } + + /** + * Get temperature reading from device + * + * @return Temperature + */ + public int getTemperature() { + return VirtualHardwareManager.getInstance().getTemperature(); + } + + /** + * Get humidity reading from device + * + * @return Humidity + */ + public int getHumidity() { + return VirtualHardwareManager.getInstance().getHumidity(); + } + + public boolean isAlarmOn() { + return isAlarmOn; + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java new file mode 100644 index 000000000..60c3941b8 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java @@ -0,0 +1,440 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core; + +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.configuration.ConfigurationException; +import org.apache.commons.configuration.PropertiesConfiguration; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.eclipse.jetty.http.HttpStatus; +import org.json.JSONObject; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.enrollment.EnrollmentManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.exception.AgentCoreOperationException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.CommunicationUtils; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandlerException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportUtils; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.SSLSession; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.ProtocolException; +import java.net.URL; +import java.net.URLDecoder; +import java.nio.charset.StandardCharsets; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.util.Properties; + +/** + * This class contains all the core operations of the FireAlarm agent that are common to both + * Virtual and Real Scenarios. These operations include, connecting to and subscribing to an MQTT + * queue and to a XMPP Server. Pushing temperature data to the IoT-Server at timely intervals. + * Reading device specific configuration from a configs file etc.... + */ +public class AgentUtilOperations { + + private static final Log log = LogFactory.getLog(AgentUtilOperations.class); + private static final String JSON_MESSAGE_KEY = "Msg"; + private static final String JSON_SIGNATURE_KEY = "Sig"; + private static final String JSON_SERIAL_KEY = "SerialNumber"; + + /** + * This method reads the agent specific configurations for the device from the + * "deviceConfigs.properties" file found at /repository/conf folder. + * If the properties file is not found in the specified path, then the configuration values + * are set to the default ones in the 'AgentConstants' class. + * + * @return an object of type 'AgentConfiguration' which contains all the necessary + * configuration attributes + */ + public static AgentConfiguration readIoTServerConfigs() throws AgentCoreOperationException { + AgentManager agentManager = AgentManager.getInstance(); + AgentConfiguration iotServerConfigs = new AgentConfiguration(); + Properties properties = new Properties(); + InputStream propertiesInputStream = null; + String propertiesFileName = AgentConstants.AGENT_PROPERTIES_FILE_NAME; + String rootPath = ""; + + try { + ClassLoader loader = AgentUtilOperations.class.getClassLoader(); + URL path = loader.getResource(propertiesFileName); + + if (path != null) { + log.info(AgentConstants.LOG_APPENDER + path); + rootPath = path.getPath().replace("wso2-firealarm-virtual-agent.jar!/deviceConfig.properties", "") + .replace("jar:", "").replace("file:", ""); + + rootPath = URLDecoder.decode(rootPath, StandardCharsets.UTF_8.toString()); + agentManager.setRootPath(rootPath); + + String deviceConfigFilePath = rootPath + AgentConstants.AGENT_PROPERTIES_FILE_NAME; + propertiesInputStream = new FileInputStream(deviceConfigFilePath); + + //load a properties file from class path, inside static method + properties.load(propertiesInputStream); + + iotServerConfigs.setTenantDomain(properties.getProperty( + AgentConstants.TENANT_DOMAIN)); + iotServerConfigs.setDeviceOwner(properties.getProperty( + AgentConstants.DEVICE_OWNER_PROPERTY)); + iotServerConfigs.setDeviceId(properties.getProperty( + AgentConstants.DEVICE_ID_PROPERTY)); + iotServerConfigs.setServerJID(properties.getProperty( + AgentConstants.SERVER_JID_PROPERTY)); + iotServerConfigs.setDeviceName(properties.getProperty( + AgentConstants.DEVICE_NAME_PROPERTY)); + iotServerConfigs.setControllerContext(properties.getProperty( + AgentConstants.DEVICE_CONTROLLER_CONTEXT_PROPERTY)); + iotServerConfigs.setScepContext(properties.getProperty( + AgentConstants.DEVICE_SCEP_CONTEXT_PROPERTY)); + iotServerConfigs.setHTTPS_ServerEndpoint(properties.getProperty( + AgentConstants.SERVER_HTTPS_EP_PROPERTY)); + iotServerConfigs.setHTTP_ServerEndpoint(properties.getProperty( + AgentConstants.SERVER_HTTP_EP_PROPERTY)); + iotServerConfigs.setApimGatewayEndpoint(properties.getProperty( + AgentConstants.APIM_GATEWAY_EP_PROPERTY)); + iotServerConfigs.setMqttBrokerEndpoint(properties.getProperty( + AgentConstants.MQTT_BROKER_EP_PROPERTY)); + iotServerConfigs.setXmppServerEndpoint(properties.getProperty( + AgentConstants.XMPP_SERVER_EP_PROPERTY)); + iotServerConfigs.setXmppServerName(properties.getProperty( + AgentConstants.XMPP_SERVER_NAME_PROPERTY)); + iotServerConfigs.setApiApplicationKey(properties.getProperty( + AgentConstants.API_APPLICATION_KEY)); + iotServerConfigs.setAuthMethod(properties.getProperty( + AgentConstants.AUTH_METHOD_PROPERTY)); + iotServerConfigs.setAuthToken(properties.getProperty( + AgentConstants.AUTH_TOKEN_PROPERTY)); + iotServerConfigs.setRefreshToken(properties.getProperty( + AgentConstants.REFRESH_TOKEN_PROPERTY)); + iotServerConfigs.setDataPushInterval(Integer.parseInt(properties.getProperty( + AgentConstants.PUSH_INTERVAL_PROPERTY))); + + log.info(AgentConstants.LOG_APPENDER + "Tenant Domain: " + + iotServerConfigs.getTenantDomain()); + log.info(AgentConstants.LOG_APPENDER + "Device Owner: " + + iotServerConfigs.getDeviceOwner()); + log.info(AgentConstants.LOG_APPENDER + "Device ID: " + iotServerConfigs.getDeviceId()); + log.info(AgentConstants.LOG_APPENDER + "Device Name: " + + iotServerConfigs.getDeviceName()); + log.info(AgentConstants.LOG_APPENDER + "Device Controller Context: " + + iotServerConfigs.getControllerContext()); + log.info(AgentConstants.LOG_APPENDER + "IoT Server HTTPS EndPoint: " + + iotServerConfigs.getHTTPS_ServerEndpoint()); + log.info(AgentConstants.LOG_APPENDER + "IoT Server HTTP EndPoint: " + + iotServerConfigs.getHTTP_ServerEndpoint()); + log.info(AgentConstants.LOG_APPENDER + "API-Manager Gateway EndPoint: " + + iotServerConfigs.getApimGatewayEndpoint()); + log.info(AgentConstants.LOG_APPENDER + "MQTT Broker EndPoint: " + + iotServerConfigs.getMqttBrokerEndpoint()); + log.info(AgentConstants.LOG_APPENDER + "XMPP Server EndPoint: " + + iotServerConfigs.getXmppServerEndpoint()); + log.info(AgentConstants.LOG_APPENDER + "Authentication Method: " + + iotServerConfigs.getAuthMethod()); + log.info(AgentConstants.LOG_APPENDER + "Base64Encoded API Application Key: " + + iotServerConfigs.getApiApplicationKey()); + log.info(AgentConstants.LOG_APPENDER + "Authentication Token: " + + iotServerConfigs.getAuthToken()); + log.info(AgentConstants.LOG_APPENDER + "Refresh Token: " + + iotServerConfigs.getRefreshToken()); + log.info(AgentConstants.LOG_APPENDER + "Data Push Interval: " + + iotServerConfigs.getDataPushInterval()); + log.info(AgentConstants.LOG_APPENDER + "XMPP Server Name: " + + iotServerConfigs.getXmppServerName()); + } else { + throw new AgentCoreOperationException( + "Failed to load path of resource [" + propertiesFileName + "] from this classpath."); + } + } catch (FileNotFoundException ex) { + String errorMsg = "[" + propertiesFileName + "] file not found at: " + rootPath; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + throw new AgentCoreOperationException(errorMsg); + + } catch (IOException ex) { + String errorMsg = "Error occurred whilst trying to fetch [" + propertiesFileName + "] from: " + + AgentConstants.PROPERTIES_FILE_PATH; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + throw new AgentCoreOperationException(errorMsg); + } finally { + if (propertiesInputStream != null) { + try { + propertiesInputStream.close(); + } catch (IOException e) { + log.error(AgentConstants.LOG_APPENDER + + "Error occurred whilst trying to close InputStream resource used to read the '" + + propertiesFileName + "' file"); + } + } + } + return iotServerConfigs; + } + + /** + * This method constructs the URLs for each of the API Endpoints called by the device agent + * Ex: Register API, Push-Data API + */ + public static void initializeServerEndPoints() { + AgentManager agentManager = AgentManager.getInstance(); + String serverSecureEndpoint = agentManager.getAgentConfigs().getHTTPS_ServerEndpoint(); + String serverUnSecureEndpoint = agentManager.getAgentConfigs().getHTTP_ServerEndpoint(); + String backEndContext = agentManager.getAgentConfigs().getControllerContext(); + String scepBackEndContext = agentManager.getAgentConfigs().getScepContext(); + + String deviceControllerAPIEndpoint = serverSecureEndpoint + backEndContext; + + String deviceEnrollmentEndpoint = + serverUnSecureEndpoint + scepBackEndContext + AgentConstants.DEVICE_ENROLLMENT_API_EP; + agentManager.setEnrollmentEP(deviceEnrollmentEndpoint); + + String registerEndpointURL = + deviceControllerAPIEndpoint + AgentConstants.DEVICE_REGISTER_API_EP; + agentManager.setIpRegistrationEP(registerEndpointURL); + + String pushDataEndPointURL = + deviceControllerAPIEndpoint + AgentConstants.DEVICE_PUSH_TEMPERATURE_API_EP; + agentManager.setPushDataAPIEP(pushDataEndPointURL); + + log.info(AgentConstants.LOG_APPENDER + "IoT Server's Device Controller API Endpoint: " + + deviceControllerAPIEndpoint); + log.info(AgentConstants.LOG_APPENDER + "Device Enrollment EndPoint: " + + registerEndpointURL); + log.info(AgentConstants.LOG_APPENDER + "DeviceIP Registration EndPoint: " + + registerEndpointURL); + log.info(AgentConstants.LOG_APPENDER + "Push-Data API EndPoint: " + pushDataEndPointURL); + } + + public static void setHTTPSConfigurations() { + String apimEndpoint = AgentManager.getInstance().getAgentConfigs().getApimGatewayEndpoint(); + System.setProperty("javax.net.ssl.trustStore", AgentConstants.DEVICE_KEYSTORE); + System.setProperty("javax.net.ssl.trustStorePassword", AgentConstants.DEVICE_KEYSTORE_PASSWORD); + + try { + final String apimHost = TransportUtils.getHostAndPort(apimEndpoint).get(AgentConstants.HOST_PROPERTY); + + HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() { + public boolean verify(String hostname, SSLSession session) { + return hostname.equals(apimHost); + } + }); + } catch (TransportHandlerException e) { + log.error(AgentConstants.LOG_APPENDER + + "Failed to set HTTPS HostNameVerifier to the APIMServer-Host using the APIM-Endpoint " + + "string [" + apimEndpoint + "]."); + log.error(AgentConstants.LOG_APPENDER + e); + } + } + + public static String prepareSecurePayLoad(String message) throws AgentCoreOperationException { + PrivateKey devicePrivateKey = EnrollmentManager.getInstance().getPrivateKey(); + String encodedMessage = Base64.encodeBase64String(message.getBytes()); + String signedPayload; + try { + signedPayload = CommunicationUtils.signMessage(encodedMessage, devicePrivateKey); + } catch (TransportHandlerException e) { + String errorMsg = "Error occurred whilst trying to sign encrypted message of: [" + message + "]"; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } + + JSONObject jsonPayload = new JSONObject(); + jsonPayload.put(JSON_MESSAGE_KEY, encodedMessage); + jsonPayload.put(JSON_SIGNATURE_KEY, signedPayload); + //below statements are temporary fix. + jsonPayload.put(JSON_SERIAL_KEY, EnrollmentManager.getInstance().getSCEPCertificate().getSerialNumber()); + return jsonPayload.toString(); + } + + public static String extractMessageFromPayload(String message) throws AgentCoreOperationException { + String actualMessage; + + PublicKey serverPublicKey = EnrollmentManager.getInstance().getServerPublicKey(); + JSONObject jsonPayload = new JSONObject(message); + Object encodedMessage = jsonPayload.get(JSON_MESSAGE_KEY); + Object signedPayload = jsonPayload.get(JSON_SIGNATURE_KEY); + boolean verification; + + if (encodedMessage != null && signedPayload != null) { + try { + verification = CommunicationUtils.verifySignature( + encodedMessage.toString(), signedPayload.toString(), serverPublicKey); + } catch (TransportHandlerException e) { + String errorMsg = + "Error occurred whilst trying to verify signature on received message: [" + message + "]"; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } + } else { + String errorMsg = "The received message is in an INVALID format. " + + "Need to be JSON - {\"Msg\":\"\", \"Sig\":\"\"}."; + throw new AgentCoreOperationException(errorMsg); + } + if (verification) { + actualMessage = new String(Base64.decodeBase64(encodedMessage.toString()), StandardCharsets.UTF_8); + } else { + String errorMsg = "Could not verify payload signature. The message was not signed by a valid client"; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg); + } + return actualMessage; + } + + public static String getAuthenticationMethod() { + String authMethod = AgentManager.getInstance().getAgentConfigs().getAuthMethod(); + switch (authMethod) { + case AgentConstants.TOKEN_AUTHENTICATION_METHOD: + return AgentConstants.TOKEN_AUTHENTICATION_METHOD; + default: + return ""; + } + } + + public static void refreshOAuthToken() throws AgentCoreOperationException { + + AgentManager agentManager = AgentManager.getInstance(); + String tokenEndpoint = agentManager.getAgentConfigs().getApimGatewayEndpoint(); + tokenEndpoint = tokenEndpoint + APIManagerTokenUtils.TOKEN_ENDPOINT; + + HttpURLConnection httpConnection = null; + BufferedReader connectionBuffer = null; + String requestPayload; + String dataFromBuffer; + StringBuilder responseMessage = new StringBuilder(); + + try { + String refreshToken = agentManager.getAgentConfigs().getRefreshToken(); + String applicationScope = "device_type_" + AgentConstants.DEVICE_TYPE + + " device_" + agentManager.getAgentConfigs().getDeviceId(); + + requestPayload = APIManagerTokenUtils.GRANT_TYPE + "=" + APIManagerTokenUtils.REFRESH_TOKEN + "&" + + APIManagerTokenUtils.REFRESH_TOKEN + "=" + refreshToken + "&" + + APIManagerTokenUtils.SCOPE + "=" + applicationScope; + + httpConnection = TransportUtils.getHttpConnection(tokenEndpoint); + httpConnection.setRequestMethod(AgentConstants.HTTP_POST); + httpConnection.setRequestProperty(AgentConstants.AUTHORIZATION_HEADER, + "Basic " + agentManager.getAgentConfigs().getApiApplicationKey()); + httpConnection.setRequestProperty(AgentConstants.CONTENT_TYPE_HEADER, AgentConstants.X_WWW_FORM_URLENCODED); + httpConnection.setDoOutput(true); + + DataOutputStream dataOutPutWriter = new DataOutputStream(httpConnection.getOutputStream()); + dataOutPutWriter.writeBytes(requestPayload); + dataOutPutWriter.flush(); + dataOutPutWriter.close(); + + log.info(AgentConstants.LOG_APPENDER + "Request to refresh OAuth token was sent to [" + + httpConnection.getURL() + "] with payload [" + requestPayload + "]."); + log.info(AgentConstants.LOG_APPENDER + "Response [" + httpConnection.getResponseCode() + ":" + + httpConnection.getResponseMessage() + "] was received for token refresh attempt."); + + if (httpConnection.getResponseCode() == HttpStatus.OK_200) { + connectionBuffer = new BufferedReader(new InputStreamReader(httpConnection.getInputStream())); + while ((dataFromBuffer = connectionBuffer.readLine()) != null) { + responseMessage.append(dataFromBuffer); + } + + log.info(AgentConstants.LOG_APPENDER + + "Response " + responseMessage + " was received for the token refresh call."); + updateExistingTokens(responseMessage.toString()); + } else if (httpConnection.getResponseCode() == HttpStatus.BAD_REQUEST_400) { + log.error(AgentConstants.LOG_APPENDER + + "Token refresh call returned with a [400 Bad Request].\nThe refresh-token has " + + "probably expired.\nPlease contact System-Admin to get a valid refresh-token."); + } else { + log.warn(AgentConstants.LOG_APPENDER + "There was an issue with refreshing the Access Token."); + } + + } catch (TransportHandlerException e) { + throw new AgentCoreOperationException(e); + } catch (ProtocolException e) { + String errorMsg = "Protocol specific error occurred when trying to set method to " + + AgentConstants.HTTP_POST + " for endpoint at: " + tokenEndpoint; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + + } catch (IOException e) { + String errorMsg = "An IO error occurred whilst trying to get the response code from: " + tokenEndpoint + + " for a HTTP " + AgentConstants.HTTP_POST + " call."; + log.error(AgentConstants.LOG_APPENDER + errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } finally { + if (connectionBuffer != null) { + try { + connectionBuffer.close(); + } catch (IOException e) { + log.error(AgentConstants.LOG_APPENDER + + "Error encounter whilst attempting to close buffer to connection at: " + + tokenEndpoint); + } + } + + if (httpConnection != null) { + httpConnection.disconnect(); + } + } + } + + private static void updateExistingTokens(String responseFromTokenEP) throws AgentCoreOperationException { + JSONObject jsonTokenObject = new JSONObject(responseFromTokenEP); + String newAccessToken = jsonTokenObject.get(APIManagerTokenUtils.ACCESS_TOKEN).toString(); + String newRefreshToken = jsonTokenObject.get(APIManagerTokenUtils.REFRESH_TOKEN).toString(); + + if (newAccessToken == null || newRefreshToken == null) { + String msg = + "Neither Access-Token nor Refresh-Token was found in the response [" + responseFromTokenEP + "]."; + log.error(AgentConstants.LOG_APPENDER + msg); + throw new AgentCoreOperationException(msg); + } + + AgentManager.getInstance().getAgentConfigs().setAuthToken(newAccessToken); + AgentManager.getInstance().getAgentConfigs().setRefreshToken(newRefreshToken); + String deviceConfigFilePath = + AgentManager.getInstance().getRootPath() + AgentConstants.AGENT_PROPERTIES_FILE_NAME; + + try { + PropertiesConfiguration propertyFileConfiguration = new PropertiesConfiguration(deviceConfigFilePath); + propertyFileConfiguration.setProperty(AgentConstants.AUTH_TOKEN_PROPERTY, newAccessToken); + propertyFileConfiguration.setProperty(AgentConstants.REFRESH_TOKEN_PROPERTY, newRefreshToken); + propertyFileConfiguration.save(); + } catch (ConfigurationException e) { + String msg = "Error occurred whilst trying to update the [" + AgentConstants.AGENT_PROPERTIES_FILE_NAME + + "] at: " + deviceConfigFilePath + " will the new tokens."; + log.error(AgentConstants.LOG_APPENDER + msg); + throw new AgentCoreOperationException(msg); + } + } + + private class APIManagerTokenUtils { + public static final String TOKEN_ENDPOINT = "/oauth2/token"; + public static final String GRANT_TYPE = "grant_type"; + public static final String ACCESS_TOKEN = "access_token"; + public static final String REFRESH_TOKEN = "refresh_token"; + public static final String SCOPE = "scope"; + } + +} + diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java new file mode 100644 index 000000000..6059483bc --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java @@ -0,0 +1,572 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.enrollment; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.bouncycastle.asn1.x500.X500Name; +import org.bouncycastle.asn1.x500.X500NameBuilder; +import org.bouncycastle.asn1.x500.style.BCStyle; +import org.bouncycastle.cert.X509v3CertificateBuilder; +import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter; +import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.bouncycastle.operator.ContentSigner; +import org.bouncycastle.operator.OperatorCreationException; +import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder; +import org.bouncycastle.pkcs.PKCS10CertificationRequest; +import org.bouncycastle.pkcs.PKCS10CertificationRequestBuilder; +import org.bouncycastle.pkcs.jcajce.JcaPKCS10CertificationRequestBuilder; +import org.jscep.client.Client; +import org.jscep.client.ClientException; +import org.jscep.client.EnrollmentResponse; +import org.jscep.client.verification.CertificateVerifier; +import org.jscep.client.verification.OptimisticCertificateVerifier; +import org.jscep.transaction.TransactionException; +import org.jscep.transport.response.Capabilities; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentConstants; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.exception.AgentCoreOperationException; +import sun.security.x509.X509CertImpl; + +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.math.BigInteger; +import java.net.MalformedURLException; +import java.net.URL; +import java.security.Key; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.NoSuchProviderException; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.security.SecureRandom; +import java.security.Security; +import java.security.UnrecoverableKeyException; +import java.security.cert.CertStore; +import java.security.cert.CertStoreException; +import java.security.cert.Certificate; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import java.util.Date; + +/** + * This class controls the entire SCEP enrolment process of the client. It is a singleton for any single client which + * has the agent code running in it. The main functionality of this class includes generating a Private-Public Key + * Pair for the enrollment flow, creating the Certificate-Sign-Request using the generated Public-Key to send to the + * SEP server, Contacting the SCEP server to receive the Signed Certificate and requesting for the server's public + * key for encrypting the payloads. + * The provider for all Cryptographic functions used in this class are "BouncyCastle" and the Asymmetric-Key pair + * algorithm used is "RSA" with a key size of 2048. The signature algorithm used is "SHA1withRSA". + * This class also holds the "SCEPUrl" (Server Url read from the configs file), the Private-Public Keys of the + * client, Signed SCEP certificate and the server's public certificate. + */ + +//TODO: Need to save cert and keys to file after initial enrollment... +public class EnrollmentManager { + private static final Log log = LogFactory.getLog(EnrollmentManager.class); + private static EnrollmentManager enrollmentManager; + + private static final String KEY_PAIR_ALGORITHM = "RSA"; + private static final String PROVIDER = "BC"; + private static final String SIGNATURE_ALG = "SHA1withRSA"; + private static final String CERT_IS_CA_EXTENSION = "is_ca"; + private static final int KEY_SIZE = 2048; + + // Seed to our PRNG. Make sure this is initialised randomly, NOT LIKE THIS + private static final byte[] SEED = ")(*&^%$#@!".getBytes(); + private static final int CERT_VALIDITY = 730; + + // URL of our SCEP server + private String SCEPUrl; + private PrivateKey privateKey; + private PublicKey publicKey; + private PublicKey serverPublicKey; + private X509Certificate SCEPCertificate; + private boolean isEnrolled = false; + + + /** + * Constructor of the EnrollmentManager. Initializes the SCEPUrl as read from the configuration file by the + * AgentManager. + */ + private EnrollmentManager() { + this.SCEPUrl = AgentManager.getInstance().getEnrollmentEP(); + setEnrollmentStatus(); + } + + /** + * Method to return the current singleton instance of the EnrollmentManager. + * + * @return the current singleton instance if available and if not initializes a new instance and returns it. + */ + public static EnrollmentManager getInstance() { + if (enrollmentManager == null) { + enrollmentManager = new EnrollmentManager(); + } + return enrollmentManager; + } + + + public void setEnrollmentStatus() { + KeyStore keyStore; + + try { + keyStore = KeyStore.getInstance(AgentConstants.DEVICE_KEYSTORE_TYPE); + keyStore.load(new FileInputStream(AgentConstants.DEVICE_KEYSTORE), + AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray()); + + this.isEnrolled = (keyStore.containsAlias(AgentConstants.DEVICE_CERT_ALIAS) && + keyStore.containsAlias(AgentConstants.DEVICE_PRIVATE_KEY_ALIAS) && + keyStore.containsAlias(AgentConstants.SERVER_CA_CERT_ALIAS)); + + } catch (KeyStoreException e) { + log.error(AgentConstants.LOG_APPENDER + "An error occurred whilst accessing the device KeyStore '" + + AgentConstants.DEVICE_KEYSTORE + "' with keystore type [" + + AgentConstants.DEVICE_KEYSTORE_TYPE + "] to ensure enrollment status."); + log.error(AgentConstants.LOG_APPENDER + e); + log.warn(AgentConstants.LOG_APPENDER + "Device will be re-enrolled."); + return; + } catch (CertificateException | NoSuchAlgorithmException e) { + log.error(AgentConstants.LOG_APPENDER + "An error occurred whilst trying to [load] the device KeyStore '" + + AgentConstants.DEVICE_KEYSTORE + "'."); + log.error(AgentConstants.LOG_APPENDER + e); + log.warn(AgentConstants.LOG_APPENDER + "Device will be re-enrolled."); + return; + } catch (IOException e) { + log.error(AgentConstants.LOG_APPENDER + + "An error occurred whilst trying to load input stream with the keystore file: " + + AgentConstants.DEVICE_KEYSTORE); + log.error(AgentConstants.LOG_APPENDER + e); + log.warn(AgentConstants.LOG_APPENDER + "Device will be re-enrolled."); + return; + } + + try { + if (this.isEnrolled) { + this.SCEPCertificate = (X509Certificate) keyStore.getCertificate(AgentConstants.DEVICE_CERT_ALIAS); + this.privateKey = (PrivateKey) keyStore.getKey(AgentConstants.DEVICE_PRIVATE_KEY_ALIAS, + AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray()); + this.publicKey = SCEPCertificate.getPublicKey(); + + X509Certificate serverCACert = (X509Certificate) keyStore.getCertificate( + AgentConstants.SERVER_CA_CERT_ALIAS); + this.serverPublicKey = serverCACert.getPublicKey(); + log.info(AgentConstants.LOG_APPENDER + + "Device has already been enrolled. Hence, loaded certificate information from device" + + " trust-store."); + } + } catch (UnrecoverableKeyException | NoSuchAlgorithmException | KeyStoreException e) { + log.error(AgentConstants.LOG_APPENDER + "An error occurred whilst accessing the device KeyStore '" + + AgentConstants.DEVICE_KEYSTORE + "' to ensure enrollment status."); + log.error(AgentConstants.LOG_APPENDER + e); + log.warn(AgentConstants.LOG_APPENDER + "Device will be re-enrolled."); + this.isEnrolled = false; + } + } + + /** + * Method to control the entire enrollment flow. This method calls the method to create the Private-Public Key + * Pair, calls the specific method to generate the Certificate-Sign-Request, creates a one time self signed + * certificate to present to the SCEP server with the initial CSR, calls the specific method to connect to the + * SCEP Server and to get the SCEP Certificate and also calls the method that requests the SCEP Server for its + * PublicKey for future payload encryption. + * + * @throws AgentCoreOperationException if the private method generateCertSignRequest() fails with an error or if + * there is an error creating a self-sign certificate to present to the + * server (whilst trying to get the CSR signed) + */ + public void beginEnrollmentFlow() throws AgentCoreOperationException { + Security.addProvider(new BouncyCastleProvider()); + + KeyPair keyPair = generateKeyPair(); + this.privateKey = keyPair.getPrivate(); + this.publicKey = keyPair.getPublic(); + + if (log.isDebugEnabled()) { + log.info(AgentConstants.LOG_APPENDER + "DevicePrivateKey:\n[\n" + privateKey + "\n]\n"); + log.info(AgentConstants.LOG_APPENDER + "DevicePublicKey:\n[\n" + publicKey + "\n]\n"); + } + + PKCS10CertificationRequest certSignRequest = generateCertSignRequest(); + + /** + * ----------------------------------------------------------------------------------------------- + * Generate an ephemeral self-signed certificate. This is needed to present to the CA in the SCEP request. + * In the future, add proper EKU and attributes in the request. The CA does NOT have to honour any of this. + * ----------------------------------------------------------------------------------------------- + */ + X500Name issuer = new X500Name("CN=Temporary Issuer"); + BigInteger serial = new BigInteger(32, new SecureRandom()); + Date fromDate = new Date(); + Date toDate = new Date(System.currentTimeMillis() + (CERT_VALIDITY * 86400000L)); + + // Build the self-signed cert using BC, sign it with our private key (self-signed) + X509v3CertificateBuilder certBuilder = new X509v3CertificateBuilder(issuer, serial, fromDate, toDate, + certSignRequest.getSubject(), + certSignRequest.getSubjectPublicKeyInfo()); + ContentSigner sigGen; + X509Certificate tmpCert; + + try { + sigGen = new JcaContentSignerBuilder(SIGNATURE_ALG).setProvider(PROVIDER).build(keyPair.getPrivate()); + tmpCert = new JcaX509CertificateConverter().setProvider(PROVIDER).getCertificate(certBuilder.build(sigGen)); + } catch (OperatorCreationException e) { + String errorMsg = "Error occurred whilst creating a ContentSigner for the Temp-Self-Signed Certificate."; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } catch (CertificateException e) { + String errorMsg = "Error occurred whilst trying to create Temp-Self-Signed Certificate."; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } + /** + * ----------------------------------------------------------------------------------------------- + */ + + this.SCEPCertificate = getSignedCertificateFromServer(tmpCert, certSignRequest); + this.serverPublicKey = initPublicKeyOfServer(); + + storeCertificateToStore(AgentConstants.DEVICE_CERT_ALIAS, SCEPCertificate); + storeKeyToKeyStore(AgentConstants.DEVICE_PRIVATE_KEY_ALIAS, this.privateKey, SCEPCertificate); + + if (log.isDebugEnabled()) { + log.info(AgentConstants.LOG_APPENDER + + "SCEPCertificate, DevicePrivateKey, ServerPublicKey was saved to device keystore [" + + AgentConstants.DEVICE_KEYSTORE + "]"); + log.info(AgentConstants.LOG_APPENDER + "TemporaryCertPublicKey:\n[\n" + tmpCert.getPublicKey() + "\n]\n"); + log.info(AgentConstants.LOG_APPENDER + "ServerPublicKey:\n[\n" + serverPublicKey + "\n]\n"); + } + } + + private void storeCertificateToStore(String alias, Certificate certificate) { + KeyStore keyStore; + try { + keyStore = KeyStore.getInstance(AgentConstants.DEVICE_KEYSTORE_TYPE); + keyStore.load(new FileInputStream(AgentConstants.DEVICE_KEYSTORE), + AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray()); + + keyStore.setCertificateEntry(alias, certificate); + keyStore.store(new FileOutputStream(AgentConstants.DEVICE_KEYSTORE), + AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray()); + + } catch (KeyStoreException | CertificateException | NoSuchAlgorithmException | IOException e) { + log.error(AgentConstants.LOG_APPENDER + + "An error occurred whilst trying to store the Certificate received from the SCEP " + + "Enrollment."); + log.error(AgentConstants.LOG_APPENDER + e); + log.warn(AgentConstants.LOG_APPENDER + + "SCEP Certificate was not stored in the keystore; " + + "Hence the device will be re-enrolled during next restart."); + } + } + + + private void storeKeyToKeyStore(String alias, Key cryptoKey, Certificate certInCertChain) { + KeyStore keyStore; + try { + keyStore = KeyStore.getInstance(AgentConstants.DEVICE_KEYSTORE_TYPE); + keyStore.load(new FileInputStream(AgentConstants.DEVICE_KEYSTORE), + AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray()); + + Certificate[] certChain = new Certificate[1]; + certChain[0] = certInCertChain; + + keyStore.setKeyEntry(alias, cryptoKey, AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray(), certChain); + keyStore.store(new FileOutputStream(AgentConstants.DEVICE_KEYSTORE), + AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray()); + + } catch (KeyStoreException | CertificateException | NoSuchAlgorithmException | IOException e) { + log.error(AgentConstants.LOG_APPENDER + + "An error occurred whilst trying to store the key with alias " + + "[" + alias + "] in the device keystore."); + log.error(AgentConstants.LOG_APPENDER + e); + log.warn(AgentConstants.LOG_APPENDER + + "Key [" + alias + "] was not stored in the keystore; " + + "Hence the device will be re-enrolled during next restart."); + } + } + + /** + * This method creates the Public-Private Key pair for the current client. + * + * @return the generated KeyPair object + * @throws AgentCoreOperationException when the given Security Provider does not exist or the Algorithmn used to + * generate the key pair is invalid. + */ + private KeyPair generateKeyPair() throws AgentCoreOperationException { + + // Generate key pair + KeyPairGenerator keyPairGenerator; + try { + keyPairGenerator = KeyPairGenerator.getInstance(KEY_PAIR_ALGORITHM, PROVIDER); + keyPairGenerator.initialize(KEY_SIZE, new SecureRandom(SEED)); + } catch (NoSuchAlgorithmException e) { + String errorMsg = "Algorithm [" + KEY_PAIR_ALGORITHM + "] provided for KeyPairGenerator is invalid."; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } catch (NoSuchProviderException e) { + String errorMsg = "Provider [" + PROVIDER + "] provided for KeyPairGenerator does not exist."; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } + + return keyPairGenerator.genKeyPair(); + } + + + /** + * This method creates the PKCS10 Certificate Sign Request which is to be sent to the SCEP Server using the + * generated PublicKey of the client. The certificate parameters used here are the ones from the AgentManager + * which are the values read from the configurations file. + * + * @return the PKCS10CertificationRequest object created using the client specific configs and the generated + * PublicKey + * @throws AgentCoreOperationException if an error occurs when creating a content signer to sign the CSR. + */ + private PKCS10CertificationRequest generateCertSignRequest() throws AgentCoreOperationException { + // Build the CN for the cert that's being requested. + X500NameBuilder nameBld = new X500NameBuilder(BCStyle.INSTANCE); + nameBld.addRDN(BCStyle.CN, AgentManager.getInstance().getAgentConfigs().getTenantDomain()); + nameBld.addRDN(BCStyle.O, AgentManager.getInstance().getAgentConfigs().getDeviceOwner()); + nameBld.addRDN(BCStyle.OU, AgentManager.getInstance().getAgentConfigs().getDeviceOwner()); + nameBld.addRDN(BCStyle.UNIQUE_IDENTIFIER, AgentManager.getInstance().getAgentConfigs().getDeviceId()); + nameBld.addRDN(BCStyle.SERIALNUMBER, AgentManager.getInstance().getAgentConfigs().getDeviceId()); + X500Name principal = nameBld.build(); + + JcaContentSignerBuilder contentSignerBuilder = new JcaContentSignerBuilder(SIGNATURE_ALG).setProvider(PROVIDER); + ContentSigner contentSigner; + + try { + contentSigner = contentSignerBuilder.build(this.privateKey); + } catch (OperatorCreationException e) { + String errorMsg = "Could not create content signer with private key."; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } + + // Generate the certificate signing request (csr = PKCS10) + PKCS10CertificationRequestBuilder reqBuilder = new JcaPKCS10CertificationRequestBuilder(principal, + this.publicKey); + return reqBuilder.build(contentSigner); + } + + + /** + * This method connects to the SCEP Server to fetch the signed SCEP Certificate. + * + * @param tempCert the temporary self-signed certificate of the client required for the initial CSR + * request against the SCEP Server. + * @param certSignRequest the PKCS10 Certificate-Sign-Request that is to be sent to the SCEP Server. + * @return the SCEP-Certificate for the client signed by the SCEP-Server. + * @throws AgentCoreOperationException if the SCEPUrl is invalid or if the flow of sending the CSR and getting + * the signed certificate fails or if the signed certificate cannot be + * retrieved from the reply from the server. + */ + private X509Certificate getSignedCertificateFromServer(X509Certificate tempCert, + PKCS10CertificationRequest certSignRequest) + throws AgentCoreOperationException { + + X509Certificate signedSCEPCertificate = null; + URL url; + EnrollmentResponse enrolResponse; + CertStore certStore; + + try { + // The URL where we are going to request our cert from + url = new URL(this.SCEPUrl); + + /* // This is called when we get the certificate for our CSR signed by CA + // Implement this handler to check the CA cert in prod. We can do cert pinning here + CallbackHandler cb = new CallbackHandler() { + @Override + public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { + //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated + methods, choose Tools | Templates. + } + };*/ + + // Implement verification of the CA cert. VERIFY the CA + CertificateVerifier ocv = new OptimisticCertificateVerifier(); + + // Instantiate our SCEP client + Client scepClient = new Client(url, ocv); + + // Submit our cert for signing. SCEP server should allow the client to specify + // the SCEP CA to issue the request against, if there are multiple CAs + enrolResponse = scepClient.enrol(tempCert, this.privateKey, certSignRequest); + + // Verify we got what we want, and just print out the cert. + certStore = enrolResponse.getCertStore(); + + for (Certificate x509Certificate : certStore.getCertificates(null)) { + if (log.isDebugEnabled()) { + log.debug(x509Certificate.toString()); + } + signedSCEPCertificate = (X509Certificate) x509Certificate; + } + + } catch (MalformedURLException ex) { + String errorMsg = "Could not create valid URL from given SCEP URI: " + SCEPUrl; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, ex); + } catch (TransactionException | ClientException e) { + String errorMsg = "Enrollment process to SCEP Server at: " + SCEPUrl + " failed."; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } catch (CertStoreException e) { + String errorMsg = "Could not retrieve [Signed-Certificate] from the response message from SCEP-Server."; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } + + return signedSCEPCertificate; + } + + + /** + * Gets the Public Key of the SCEP-Server and initializes it for later use. This method contacts the SCEP Server + * and fetches its CA Cert and extracts the Public Key of the server from the received reply. + * + * @return the public key of the SCEP Server which is to be used to encrypt pyloads. + * @throws AgentCoreOperationException if the SCEPUrl is invalid or if the flow of sending the CSR and getting + * the signed certificate fails or if the signed certificate cannot be + * retrieved from the reply from the server. + */ + private PublicKey initPublicKeyOfServer() throws AgentCoreOperationException { + URL url; + CertStore certStore; + PublicKey serverCertPublicKey = null; + + try { + // The URL where we are going to request our cert from + url = new URL(this.SCEPUrl); + + /* // This is called when we get the certificate for our CSR signed by CA + // Implement this handler to check the CA cert in prod. We can do cert pinning here + CallbackHandler cb = new CallbackHandler() { + @Override + public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { + //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated + methods, choose Tools | Templates. + } + };*/ + + // Implement verification of the CA cert. VERIFY the CA + CertificateVerifier ocv = new OptimisticCertificateVerifier(); + + // Instantiate our SCEP client + Client scepClient = new Client(url, ocv); + + // Get the CA capabilities. Should return SHA1withRSA for strongest hash and sig. Returns MD5. + if (log.isDebugEnabled()) { + Capabilities cap = scepClient.getCaCapabilities(); + log.debug(String.format( + "\nStrongestCipher: %s,\nStrongestMessageDigest: %s,\nStrongestSignatureAlgorithm: %s," + + "\nIsRenewalSupported: %s,\nIsRolloverSupported: %s", + cap.getStrongestCipher(), cap.getStrongestMessageDigest(), cap.getStrongestSignatureAlgorithm(), + cap.isRenewalSupported(), cap.isRolloverSupported())); + } + + certStore = scepClient.getCaCertificate(); + + for (Certificate cert : certStore.getCertificates(null)) { + if (cert instanceof X509Certificate) { + if (log.isDebugEnabled()) { + log.debug(((X509Certificate) cert).getIssuerDN().getName()); + } + + // I have chosen the CA cert based on its BasicConstraintExtension "is_ca" being set to "true" + // This is because the returned keystore may contain many certificates including RAs. + if (((Boolean) ((X509CertImpl) cert).getBasicConstraintsExtension().get(CERT_IS_CA_EXTENSION))) { + serverCertPublicKey = cert.getPublicKey(); + storeCertificateToStore(AgentConstants.SERVER_CA_CERT_ALIAS, cert); + } + } + } + + } catch (MalformedURLException ex) { + String errorMsg = "Could not create valid URL from given SCEP URI: " + SCEPUrl; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, ex); + } catch (ClientException e) { + String errorMsg = "Could not retrieve [Server-Certificate] from the SCEP-Server."; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } catch (CertStoreException e) { + String errorMsg = "Could not retrieve [Server-Certificates] from the response message from SCEP-Server."; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } catch (IOException e) { + String errorMsg = "Error occurred whilst trying to get property ['is_ca'] from the retreived Certificates"; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } + + return serverCertPublicKey; + } + + /** + * Gets the Public-Key of the client. + * + * @return the public key of the client. + */ + public PublicKey getPublicKey() { + return publicKey; + } + + /** + * Gets the Private-Key of the client. + * + * @return the private key of the client. + */ + public PrivateKey getPrivateKey() { + return privateKey; + } + + /** + * Gets the SCEP-Certificate of the client. + * + * @return the SCEP Certificate of the client. + */ + public X509Certificate getSCEPCertificate() { + return SCEPCertificate; + } + + /** + * Gets the Public-Key of the Server. + * + * @return the pubic key of the server. + */ + public PublicKey getServerPublicKey() { + return serverPublicKey; + } + + /** + * Checks whether the device has already been enrolled with the SCEP Server. + * + * @return the enrollment status; 'TRUE' if already enrolled else 'FALSE'. + */ + public boolean isEnrolled() { + return isEnrolled; + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/exception/AgentCoreOperationException.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/exception/AgentCoreOperationException.java new file mode 100644 index 000000000..fac321ef9 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/exception/AgentCoreOperationException.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.exception; + + +public class AgentCoreOperationException extends Exception{ + private static final long serialVersionUID = 2736466230451105710L; + + private String errorMessage; + + public String getErrorMessage() { + return errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + public AgentCoreOperationException(String msg, Exception nestedEx) { + super(msg, nestedEx); + setErrorMessage(msg); + } + + public AgentCoreOperationException(String message, Throwable cause) { + super(message, cause); + setErrorMessage(message); + } + + public AgentCoreOperationException(String msg) { + super(msg); + setErrorMessage(msg); + } + + public AgentCoreOperationException() { + super(); + } + + public AgentCoreOperationException(Throwable cause) { + super(cause); + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java new file mode 100644 index 000000000..bb445a3d9 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java @@ -0,0 +1,225 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport; + +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import javax.crypto.BadPaddingException; +import javax.crypto.Cipher; +import javax.crypto.IllegalBlockSizeException; +import javax.crypto.NoSuchPaddingException; +import java.nio.charset.StandardCharsets; +import java.security.InvalidKeyException; +import java.security.Key; +import java.security.NoSuchAlgorithmException; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.security.Signature; +import java.security.SignatureException; + +/** + * This is a utility class which contains methods common to the communication process of a client and the server. The + * methods include encryption/decryption of payloads and signing/verification of payloads received and to be sent. + */ +public class CommunicationUtils { + private static final Log log = LogFactory.getLog(TransportUtils.class); + + // The Signature Algorithm used. + private static final String SIGNATURE_ALG = "SHA1withRSA"; + // The Encryption Algorithm and the Padding used. + private static final String CIPHER_PADDING = "RSA/ECB/PKCS1Padding"; + + + /** + * Encrypts the message with the key that's passed in. + * + * @param message the message to be encrypted. + * @param encryptionKey the key to use for the encryption of the message. + * @return the encrypted message in String format. + * @throws TransportHandlerException if an error occurs with the encryption flow which can be due to Padding + * issues, encryption key being invalid or the algorithm used is unrecognizable. + */ + public static String encryptMessage(String message, Key encryptionKey) throws TransportHandlerException { + Cipher encrypter; + byte[] cipherData; + + try { + encrypter = Cipher.getInstance(CIPHER_PADDING); + encrypter.init(Cipher.ENCRYPT_MODE, encryptionKey); + cipherData = encrypter.doFinal(message.getBytes(StandardCharsets.UTF_8)); + + } catch (NoSuchAlgorithmException e) { + String errorMsg = "Algorithm not found exception occurred for Cipher instance of [" + CIPHER_PADDING + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (NoSuchPaddingException e) { + String errorMsg = "No Padding error occurred for Cipher instance of [" + CIPHER_PADDING + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (InvalidKeyException e) { + String errorMsg = "InvalidKey exception occurred for encryptionKey \n[\n" + encryptionKey + "\n]\n"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (BadPaddingException e) { + String errorMsg = "Bad Padding error occurred for Cipher instance of [" + CIPHER_PADDING + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (IllegalBlockSizeException e) { + String errorMsg = "Illegal blockSize error occurred for Cipher instance of [" + CIPHER_PADDING + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } + + return Base64.encodeBase64String(cipherData); + } + +///TODO:: Exception needs to change according to the common package + /** + * Signed a given message using the PrivateKey that's passes in. + * + * @param message the message to be signed. Ideally some encrypted payload. + * @param signatureKey the PrivateKey with which the message is to be signed. + * @return the Base64Encoded String of the signed payload. + * @throws TransportHandlerException if some error occurs with the signing process which may be related to the + * signature algorithm used or the key used for signing. + */ + public static String signMessage(String message, PrivateKey signatureKey) throws TransportHandlerException { + + Signature signature; + String signedEncodedString; + + try { + signature = Signature.getInstance(SIGNATURE_ALG); + signature.initSign(signatureKey); + signature.update(Base64.decodeBase64(message)); + + byte[] signatureBytes = signature.sign(); + signedEncodedString = Base64.encodeBase64String(signatureBytes); + + } catch (NoSuchAlgorithmException e) { + String errorMsg = + "Algorithm not found exception occurred for Signature instance of [" + SIGNATURE_ALG + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (SignatureException e) { + String errorMsg = "Signature exception occurred for Signature instance of [" + SIGNATURE_ALG + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (InvalidKeyException e) { + String errorMsg = "InvalidKey exception occurred for signatureKey \n[\n" + signatureKey + "\n]\n"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } + + return signedEncodedString; + } + + + /** + * Verifies some signed-data against the a Public-Key to ensure that it was produced by the holder of the + * corresponding Private Key. + * + * @param data the actual payoad which was signed by some Private Key. + * @param signedData the signed data produced by signing the payload using a Private Key. + * @param verificationKey the corresponding Public Key which is an exact pair of the Private-Key with we expect + * the data to be signed by. + * @return true if the signed data verifies to be signed by the corresponding Private Key. + * @throws TransportHandlerException if some error occurs with the verification process which may be related to + * the signature algorithm used or the key used for signing. + */ + public static boolean verifySignature(String data, String signedData, PublicKey verificationKey) + throws TransportHandlerException { + + Signature signature; + boolean verified; + + try { + signature = Signature.getInstance(SIGNATURE_ALG); + signature.initVerify(verificationKey); + signature.update(Base64.decodeBase64(data)); + + verified = signature.verify(Base64.decodeBase64(signedData)); + + } catch (NoSuchAlgorithmException e) { + String errorMsg = + "Algorithm not found exception occurred for Signature instance of [" + SIGNATURE_ALG + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (SignatureException e) { + String errorMsg = "Signature exception occurred for Signature instance of [" + SIGNATURE_ALG + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (InvalidKeyException e) { + String errorMsg = "InvalidKey exception occurred for signatureKey \n[\n" + verificationKey + "\n]\n"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } + + return verified; + } + + + /** + * Encrypts the message with the key that's passed in. + * + * @param encryptedMessage the encrypted message that is supposed to be decrypted. + * @param decryptKey the key to use in the decryption process. + * @return the decrypted message in String format. + * @throws TransportHandlerException if an error occurs with the encryption flow which can be due to Padding + * issues, encryption key being invalid or the algorithm used is unrecognizable. + */ + public static String decryptMessage(String encryptedMessage, Key decryptKey) throws TransportHandlerException { + + Cipher decrypter; + String decryptedMessage; + + try { + + decrypter = Cipher.getInstance(CIPHER_PADDING); + decrypter.init(Cipher.DECRYPT_MODE, decryptKey); + decryptedMessage = new String(decrypter.doFinal(Base64.decodeBase64(encryptedMessage)), + StandardCharsets.UTF_8); + + } catch (NoSuchAlgorithmException e) { + String errorMsg = "Algorithm not found exception occurred for Cipher instance of [" + CIPHER_PADDING + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (NoSuchPaddingException e) { + String errorMsg = "No Padding error occurred for Cipher instance of [" + CIPHER_PADDING + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (InvalidKeyException e) { + String errorMsg = "InvalidKey exception occurred for encryptionKey \n[\n" + decryptKey + "\n]\n"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (BadPaddingException e) { + String errorMsg = "Bad Padding error occurred for Cipher instance of [" + CIPHER_PADDING + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (IllegalBlockSizeException e) { + String errorMsg = "Illegal blockSize error occurred for Cipher instance of [" + CIPHER_PADDING + "]"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } + + return decryptedMessage; + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandler.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandler.java new file mode 100644 index 000000000..fa45cdbb0 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandler.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport; + +/** + * This interface consists of the core functionality related to the transport between any device and the server. The + * interface is an abstraction, regardless of the underlying protocol used for the transport. Implementation of this + * interface by any class that caters a specific protocol (ex: HTTP, XMPP, MQTT, CoAP) would ideally have methods + * specific to the protocol used for communication and thees methods that implement the logic related to the devices + * using the protocol. + * + * @param a message type specific to the protocol implemented + */ +public interface TransportHandler { + int DEFAULT_TIMEOUT_INTERVAL = 5000; // millis ~ 10 sec + + void connect(); + + boolean isConnected(); + + //TODO:: Any errors needs to be thrown ahead + void processIncomingMessage(T message, String... messageParams); + + void processIncomingMessage(); + + void publishDeviceData(String... publishData); + + void publishDeviceData(); + + void disconnect(); +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandlerException.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandlerException.java new file mode 100644 index 000000000..9ae69a998 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandlerException.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport; + +public class TransportHandlerException extends Exception { + private static final long serialVersionUID = 2736466230451105440L; + + private String errorMessage; + + public String getErrorMessage() { + return errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + public TransportHandlerException(String msg, Exception nestedEx) { + super(msg, nestedEx); + setErrorMessage(msg); + } + + public TransportHandlerException(String message, Throwable cause) { + super(message, cause); + setErrorMessage(message); + } + + public TransportHandlerException(String msg) { + super(msg); + setErrorMessage(msg); + } + + public TransportHandlerException() { + super(); + } + + public TransportHandlerException(Throwable cause) { + super(cause); + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java new file mode 100644 index 000000000..11ebc04bf --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java @@ -0,0 +1,302 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentConstants; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandlerException; + +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.DatagramSocket; +import java.net.HttpURLConnection; +import java.net.InetAddress; +import java.net.MalformedURLException; +import java.net.NetworkInterface; +import java.net.ServerSocket; +import java.net.SocketException; +import java.net.URL; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Map; +import java.util.Random; + +public class TransportUtils { + private static final Log log = LogFactory.getLog(TransportUtils.class); + + public static final int MIN_PORT_NUMBER = 9000; + public static final int MAX_PORT_NUMBER = 11000; + + /** + * Given a server endpoint as a String, this method splits it into Protocol, Host and Port + * + * @param ipString a network endpoint in the format - '://:' + * @return a map with keys "Protocol", "Host" & "Port" for the related values from the ipString + * @throws TransportHandlerException + */ + public static Map getHostAndPort(String ipString) + throws TransportHandlerException { + Map ipPortMap = new HashMap(); + String[] ipPortArray = ipString.split(":"); + + if (ipPortArray.length != 3) { + String errorMsg = + "The IP String - '" + ipString + + "' is invalid. It needs to be in format '://:'."; + log.info(errorMsg); + throw new TransportHandlerException(errorMsg); + } + + ipPortMap.put(AgentConstants.PROTOCOL_PROPERTY, ipPortArray[0]); + ipPortMap.put(AgentConstants.HOST_PROPERTY, ipPortArray[1].replace("/", "")); + ipPortMap.put(AgentConstants.PORT_PROPERTY, ipPortArray[2]); + return ipPortMap; + } + + /** + * This method validates whether a specific IP Address is of IPv4 type + * + * @param ipAddress the IP Address which needs to be validated + * @return true if it is of IPv4 type and false otherwise + */ + public static boolean validateIPv4(String ipAddress) { + try { + if (ipAddress == null || ipAddress.isEmpty()) { + return false; + } + + String[] parts = ipAddress.split("\\."); + if (parts.length != 4) { + return false; + } + + for (String s : parts) { + int i = Integer.parseInt(s); + if ((i < 0) || (i > 255)) { + return false; + } + } + return !ipAddress.endsWith("."); + + } catch (NumberFormatException nfe) { + log.warn("The IP Address: " + ipAddress + " could not be validated against IPv4-style"); + return false; + } + } + + + public static Map getInterfaceIPMap() throws TransportHandlerException { + + Map interfaceToIPMap = new HashMap(); + Enumeration networkInterfaces; + String networkInterfaceName = ""; + String ipAddress; + + try { + networkInterfaces = NetworkInterface.getNetworkInterfaces(); + } catch (SocketException exception) { + String errorMsg = + "Error encountered whilst trying to get the list of network-interfaces"; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, exception); + } + + try { + for (; networkInterfaces.hasMoreElements(); ) { + networkInterfaceName = networkInterfaces.nextElement().getName(); + + if (log.isDebugEnabled()) { + log.debug("Network Interface: " + networkInterfaceName); + log.debug("------------------------------------------"); + } + + Enumeration interfaceIPAddresses = NetworkInterface.getByName( + networkInterfaceName).getInetAddresses(); + + for (; interfaceIPAddresses.hasMoreElements(); ) { + ipAddress = interfaceIPAddresses.nextElement().getHostAddress(); + + if (log.isDebugEnabled()) { + log.debug("IP Address: " + ipAddress); + } + + if (TransportUtils.validateIPv4(ipAddress)) { + interfaceToIPMap.put(networkInterfaceName, ipAddress); + } + } + + if (log.isDebugEnabled()) { + log.debug("------------------------------------------"); + } + } + } catch (SocketException exception) { + String errorMsg = + "Error encountered whilst trying to get the IP Addresses of the network " + + "interface: " + networkInterfaceName; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, exception); + } + + return interfaceToIPMap; + } + + + /** + * Attempts to find a free port between the MIN_PORT_NUMBER(9000) and MAX_PORT_NUMBER(11000). + * Tries 'RANDOMLY picked' port numbers between this range up-until "randomAttempts" number of + * times. If still fails, then tries each port in descending order from the MAX_PORT_NUMBER + * whilst skipping already attempted ones via random selection. + * + * @param randomAttempts no of times to TEST port numbers picked randomly over the given range + * @return an available/free port + */ + public static synchronized int getAvailablePort(int randomAttempts) { + ArrayList failedPorts = new ArrayList(randomAttempts); + + Random randomNum = new Random(); + int randomPort = MAX_PORT_NUMBER; + + while (randomAttempts > 0) { + randomPort = randomNum.nextInt(MAX_PORT_NUMBER - MIN_PORT_NUMBER) + MIN_PORT_NUMBER; + + if (checkIfPortAvailable(randomPort)) { + return randomPort; + } + failedPorts.add(randomPort); + randomAttempts--; + } + + randomPort = MAX_PORT_NUMBER; + + while (true) { + if (!failedPorts.contains(randomPort) && checkIfPortAvailable(randomPort)) { + return randomPort; + } + randomPort--; + } + } + + + private static boolean checkIfPortAvailable(int port) { + ServerSocket tcpSocket = null; + DatagramSocket udpSocket = null; + + try { + tcpSocket = new ServerSocket(port); + tcpSocket.setReuseAddress(true); + + udpSocket = new DatagramSocket(port); + udpSocket.setReuseAddress(true); + return true; + } catch (IOException ex) { + // denotes the port is in use + } finally { + if (tcpSocket != null) { + try { + tcpSocket.close(); + } catch (IOException e) { + /* not to be thrown */ + } + } + + if (udpSocket != null) { + udpSocket.close(); + } + } + + return false; + } + + + /** + * This is a utility method that creates and returns a HTTP connection object. + * + * @param urlString the URL pattern to which the connection needs to be created + * @return an HTTPConnection object which cn be used to send HTTP requests + * @throws TransportHandlerException if errors occur when creating the HTTP connection with + * the given URL string + */ + public static HttpURLConnection getHttpConnection(String urlString) throws + TransportHandlerException { + URL connectionUrl; + HttpURLConnection httpConnection; + + try { + connectionUrl = new URL(urlString); + httpConnection = (HttpURLConnection) connectionUrl.openConnection(); + } catch (MalformedURLException e) { + String errorMsg = "Error occured whilst trying to form HTTP-URL from string: " + urlString; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, e); + } catch (IOException exception) { + String errorMsg = "Error occured whilst trying to open a connection to: " + urlString; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, exception); + } + return httpConnection; + } + + /** + * This is a utility method that reads and returns the response from a HTTP connection + * + * @param httpConnection the connection from which a response is expected + * @return the response (as a string) from the given HTTP connection + * @throws TransportHandlerException if any errors occur whilst reading the response from + * the connection stream + */ + public static String readResponseFromHttpRequest(HttpURLConnection httpConnection) + throws TransportHandlerException { + BufferedReader bufferedReader; + try { + bufferedReader = new BufferedReader(new InputStreamReader( + httpConnection.getInputStream(), StandardCharsets.UTF_8)); + } catch (IOException exception) { + String errorMsg = "There is an issue with connecting the reader to the input stream at: " + + httpConnection.getURL(); + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, exception); + } + + String responseLine; + StringBuilder completeResponse = new StringBuilder(); + + try { + while ((responseLine = bufferedReader.readLine()) != null) { + completeResponse.append(responseLine); + } + } catch (IOException exception) { + String errorMsg = "Error occured whilst trying read from the connection stream at: " + + httpConnection.getURL(); + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, exception); + } + try { + bufferedReader.close(); + } catch (IOException exception) { + log.error("Could not succesfully close the bufferedReader to the connection at: " + httpConnection.getURL()); + } + return completeResponse.toString(); + } + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/http/HTTPTransportHandler.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/http/HTTPTransportHandler.java new file mode 100644 index 000000000..c771eb8ed --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/http/HTTPTransportHandler.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.http; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.eclipse.jetty.server.Server; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandler; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportUtils; + +/** + * This is an abstract class that implements the "TransportHandler" interface. The interface is an abstraction for + * the core functionality with regards to device-server communication regardless of the Transport protocol. This + * specific class contains the HTTP-Transport specific implementations. The class implements utility methods for the + * case of a HTTP communication. However, this "abstract class", even-though it implements the "TransportHandler" + * interface, does not contain the logic relevant to the interface methods. The specific functionality of the + * interface methods are intended to be implemented by the concrete class that extends this abstract class and + * utilizes the HTTP specific functionality (ideally a device API writer who would like to communicate to the device + * via HTTP Protocol). + */ +public abstract class HTTPTransportHandler implements TransportHandler { + private static final Log log = LogFactory.getLog(HTTPTransportHandler.class); + + protected Server server; + protected int port; + protected int timeoutInterval; + + protected HTTPTransportHandler() { + this.port = TransportUtils.getAvailablePort(10); + this.server = new Server(port); + timeoutInterval = DEFAULT_TIMEOUT_INTERVAL; + } + + protected HTTPTransportHandler(int port) { + this.port = port; + this.server = new Server(this.port); + timeoutInterval = DEFAULT_TIMEOUT_INTERVAL; + } + + protected HTTPTransportHandler(int port, int timeoutInterval) { + this.port = port; + this.server = new Server(this.port); + this.timeoutInterval = timeoutInterval; + } + + public void setTimeoutInterval(int timeoutInterval) { + this.timeoutInterval = timeoutInterval; + } + + /** + * Checks whether the HTTP server is up and listening for incoming requests. + * + * @return true if the server is up & listening for requests, else false. + */ + public boolean isConnected() { + return server.isStarted(); + } + + + protected void incrementPort() { + this.port = this.port + 1; + server = new Server(port); + } + + /** + * Shuts-down the HTTP Server. + */ + public void closeConnection() throws Exception { + if (server != null && isConnected()) { + server.stop(); + } + } + + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/mqtt/MQTTTransportHandler.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/mqtt/MQTTTransportHandler.java new file mode 100644 index 000000000..f7c6864c1 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/mqtt/MQTTTransportHandler.java @@ -0,0 +1,361 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.mqtt; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken; +import org.eclipse.paho.client.mqttv3.MqttCallback; +import org.eclipse.paho.client.mqttv3.MqttClient; +import org.eclipse.paho.client.mqttv3.MqttConnectOptions; +import org.eclipse.paho.client.mqttv3.MqttException; +import org.eclipse.paho.client.mqttv3.MqttMessage; +import org.eclipse.paho.client.mqttv3.MqttSecurityException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandler; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandlerException; + +import java.io.File; +import java.nio.charset.StandardCharsets; + +/** + * This is an abstract class that implements the "TransportHandler" interface. The interface is an abstraction for + * the core functionality with regards to device-server communication regardless of the Transport protocol. This + * specific class contains the HTTP-Transport specific implementations. The class implements utility methods for the + * case of a HTTP communication. However, this "abstract class", even-though it implements the "TransportHandler" + * interface, does not contain the logic relevant to the interface methods. The specific functionality of the + * interface methods are intended to be implemented by the concrete class that extends this abstract class and + * utilizes the HTTP specific functionality (ideally a device API writer who would like to communicate to the device + * via HTTP Protocol). + *

+ * This class contains the Device-Management specific implementation for all the MQTT functionality. This includes + * connecting to a MQTT Broker & subscribing to the appropriate MQTT-topic, action plan upon losing connection or + * successfully delivering a message to the broker and processing incoming messages. Makes use of the 'Paho-MQTT' + * library provided by Eclipse Org. + */ +public abstract class MQTTTransportHandler + implements MqttCallback, TransportHandler { + private static final Log log = LogFactory.getLog(MQTTTransportHandler.class); + public static final int DEFAULT_MQTT_QUALITY_OF_SERVICE = 0; + + private MqttClient client; + private String clientId; + private MqttConnectOptions options; + private String clientWillTopic; + + protected String mqttBrokerEndPoint; + protected int timeoutInterval; + protected String subscribeTopic; + + /** + * Constructor for the MQTTTransportHandler which takes in the owner, type of the device + * and the MQTT Broker URL and the topic to subscribe. + * + * @param deviceOwner the owner of the device. + * @param deviceType the CDMF Device-Type of the device. + * @param mqttBrokerEndPoint the IP/URL of the MQTT broker endpoint. + * @param subscribeTopic the MQTT topic to which the client is to be subscribed + */ + protected MQTTTransportHandler(String deviceOwner, String deviceType, + String mqttBrokerEndPoint, + String subscribeTopic) { + this.clientId = deviceOwner + ":" + deviceType; + this.subscribeTopic = subscribeTopic; + this.clientWillTopic = deviceType + File.separator + "disconnection"; + this.mqttBrokerEndPoint = mqttBrokerEndPoint; + this.timeoutInterval = DEFAULT_TIMEOUT_INTERVAL; + this.initSubscriber(); + } + + /** + * Constructor for the MQTTTransportHandler which takes in the owner, type of the device + * and the MQTT Broker URL and the topic to subscribe. Additionally this constructor takes in + * the reconnection-time interval between successive attempts to connect to the broker. + * + * @param deviceOwner the owner of the device. + * @param deviceType the CDMF Device-Type of the device. + * @param mqttBrokerEndPoint the IP/URL of the MQTT broker endpoint. + * @param subscribeTopic the MQTT topic to which the client is to be subscribed + * @param intervalInMillis the time interval in MILLI-SECONDS between successive + * attempts to connect to the broker. + */ + protected MQTTTransportHandler(String deviceOwner, String deviceType, + String mqttBrokerEndPoint, String subscribeTopic, + int intervalInMillis) { + this.clientId = deviceOwner + ":" + deviceType; + this.subscribeTopic = subscribeTopic; + //TODO:: Use constant strings + this.clientWillTopic = deviceType + File.separator + "disconnection"; + this.mqttBrokerEndPoint = mqttBrokerEndPoint; + this.timeoutInterval = intervalInMillis; + this.initSubscriber(); + } + + public void setTimeoutInterval(int timeoutInterval) { + this.timeoutInterval = timeoutInterval; + } + + /** + * Initializes the MQTT-Client. Creates a client using the given MQTT-broker endpoint and the + * clientId (which is constructed by a concatenation of [deviceOwner]:[deviceType]). Also sets + * the client's options parameter with the clientWillTopic (in-case of connection failure) and + * other info. Also sets the call-back this current class. + */ + private void initSubscriber() { + try { + client = new MqttClient(this.mqttBrokerEndPoint, clientId, null); + //TODO:: Need to check for debug + log.info("MQTT subscriber was created with ClientID : " + clientId); + } catch (MqttException ex) { + //TODO:: Remove unnecessary formatting and print exception + String errorMsg = "MQTT Client Error\n" + "\tReason: " + ex.getReasonCode() + + "\n\tMessage: " + ex.getMessage() + "\n\tLocalMsg: " + + ex.getLocalizedMessage() + "\n\tCause: " + ex.getCause() + + "\n\tException: " + ex; + log.error(errorMsg); + //TODO:: Throw the error out + } + + options = new MqttConnectOptions(); + options.setCleanSession(false); + //TODO:: Use constant strings + options.setWill(clientWillTopic, "Connection-Lost".getBytes(StandardCharsets.UTF_8), 2, + true); + client.setCallback(this); + } + + /** + * Checks whether the connection to the MQTT-Broker persists. + * + * @return true if the client is connected to the MQTT-Broker, else false. + */ + @Override + public boolean isConnected() { + return client.isConnected(); + } + + + protected void connectToQueue(String username, String password) throws TransportHandlerException { + options.setUserName(username); + options.setPassword(password.toCharArray()); + connectToQueue(); + } + + /** + * Connects to the MQTT-Broker and if successfully established connection. + * + * @throws TransportHandlerException in the event of 'Connecting to' the MQTT broker fails. + */ + protected void connectToQueue() throws TransportHandlerException { + try { + client.connect(options); + + if (log.isDebugEnabled()) { + log.debug("Subscriber connected to queue at: " + this.mqttBrokerEndPoint); + } + } catch (MqttSecurityException ex) { + String errorMsg = "MQTT Security Exception when connecting to queue\n" + "\tReason: " + + " " + + ex.getReasonCode() + "\n\tMessage: " + ex.getMessage() + + "\n\tLocalMsg: " + ex.getLocalizedMessage() + "\n\tCause: " + + ex.getCause() + "\n\tException: " + ex; + //TODO:: Compulsory log of errors and remove formatted error + if (log.isDebugEnabled()) { + log.debug(errorMsg); + } + throw new TransportHandlerException(errorMsg, ex); + + } catch (MqttException ex) { + //TODO:: Compulsory log of errors and remove formatted error + String errorMsg = "MQTT Exception when connecting to queue\n" + "\tReason: " + + ex.getReasonCode() + "\n\tMessage: " + ex.getMessage() + + "\n\tLocalMsg: " + ex.getLocalizedMessage() + "\n\tCause: " + + ex.getCause() + "\n\tException: " + ex; + if (log.isDebugEnabled()) { + log.debug(errorMsg); + } + throw new TransportHandlerException(errorMsg, ex); + } + } + + /** + * Subscribes to the MQTT-Topic specific to this MQTT Client. (The MQTT-Topic specific to the + * device is taken in as a constructor parameter of this class) . + * + * @throws TransportHandlerException in the event of 'Subscribing to' the MQTT broker + * fails. + */ + protected void subscribeToQueue() throws TransportHandlerException { + try { + //TODO:: QoS Level take it from a variable + client.subscribe(subscribeTopic, 0); + log.info("Subscriber '" + clientId + "' subscribed to topic: " + subscribeTopic); + } catch (MqttException ex) { + //TODO:: Compulsory log of errors and remove formatted error + String errorMsg = "MQTT Exception when trying to subscribe to topic: " + + subscribeTopic + "\n\tReason: " + ex.getReasonCode() + + "\n\tMessage: " + ex.getMessage() + "\n\tLocalMsg: " + + ex.getLocalizedMessage() + "\n\tCause: " + ex.getCause() + + "\n\tException: " + ex; + if (log.isDebugEnabled()) { + log.debug(errorMsg); + } + + throw new TransportHandlerException(errorMsg, ex); + } + } + + + /** + * This method is used to publish reply-messages for the control signals received. + * Invocation of this method calls its overloaded-method with a QoS equal to that of the + * default value. + * + * @param topic the topic to which the reply message is to be published. + * @param payLoad the reply-message (payload) of the MQTT publish action. + */ + protected void publishToQueue(String topic, String payLoad) + throws TransportHandlerException { + publishToQueue(topic, payLoad, DEFAULT_MQTT_QUALITY_OF_SERVICE, false); + } + + /** + * This is an overloaded method that publishes MQTT reply-messages for control signals + * received form the IoT-Server. + * + * @param topic the topic to which the reply message is to be published + * @param payLoad the reply-message (payload) of the MQTT publish action. + * @param qos the Quality-of-Service of the current publish action. + * Could be 0(At-most once), 1(At-least once) or 2(Exactly once) + */ + protected void publishToQueue(String topic, String payLoad, int qos, boolean retained) + throws TransportHandlerException { + try { + client.publish(topic, payLoad.getBytes(StandardCharsets.UTF_8), qos, retained); + if (log.isDebugEnabled()) { + log.debug("Message: " + payLoad + " to MQTT topic [" + topic + "] published successfully"); + } + } catch (MqttException ex) { + String errorMsg = + "MQTT Client Error" + "\n\tReason: " + ex.getReasonCode() + "\n\tMessage: " + + ex.getMessage() + "\n\tLocalMsg: " + ex.getLocalizedMessage() + + "\n\tCause: " + ex.getCause() + "\n\tException: " + ex; + log.info(errorMsg); + throw new TransportHandlerException(errorMsg, ex); + } + } + + + protected void publishToQueue(String topic, MqttMessage message) + throws TransportHandlerException { + try { + client.publish(topic, message); + if (log.isDebugEnabled()) { + log.debug("Message: " + message.toString() + " to MQTT topic [" + topic + "] published successfully"); + } + } catch (MqttException ex) { + //TODO:: Compulsory log of errors and remove formatted error + String errorMsg = + "MQTT Client Error" + "\n\tReason: " + ex.getReasonCode() + "\n\tMessage: " + + ex.getMessage() + "\n\tLocalMsg: " + ex.getLocalizedMessage() + + "\n\tCause: " + ex.getCause() + "\n\tException: " + ex; + log.info(errorMsg); + throw new TransportHandlerException(errorMsg, ex); + } + } + + + /** + * Callback method which is triggered once the MQTT client losers its connection to the broker. + * Spawns a new thread that executes necessary actions to try and reconnect to the endpoint. + * + * @param throwable a Throwable Object containing the details as to why the failure occurred. + */ + @Override + public void connectionLost(Throwable throwable) { + log.warn("Lost Connection for client: " + this.clientId + + " to " + this.mqttBrokerEndPoint + ".\nThis was due to - " + throwable.getMessage()); + + Thread reconnectThread = new Thread() { + public void run() { + connect(); + } + }; + reconnectThread.start(); + } + + /** + * Callback method which is triggered upon receiving a MQTT Message from the broker. Spawns a + * new thread that executes any actions to be taken with the received message. + * + * @param topic the MQTT-Topic to which the received message was published to and the + * client was subscribed to. + * @param mqttMessage the actual MQTT-Message that was received from the broker. + */ + @Override + public void messageArrived(final String topic, final MqttMessage mqttMessage) { + if (log.isDebugEnabled()) { + log.info("Got an MQTT message '" + mqttMessage.toString() + "' for topic '" + topic + "'."); + } + + Thread messageProcessorThread = new Thread() { + public void run() { + processIncomingMessage(mqttMessage, topic); + } + }; + messageProcessorThread.setDaemon(true); + messageProcessorThread.start(); + } + + /** + * Callback method which gets triggered upon successful completion of a message delivery to + * the broker. + * + * @param iMqttDeliveryToken the MQTT-DeliveryToken which includes the details about the + * specific message delivery. + */ + @Override + public void deliveryComplete(IMqttDeliveryToken iMqttDeliveryToken) { + String message = ""; + try { + message = iMqttDeliveryToken.getMessage().toString(); + } catch (MqttException e) { + //TODO:: Throw errors + log.error( + "Error occurred whilst trying to read the message from the MQTT delivery token."); + } + String topic = iMqttDeliveryToken.getTopics()[0]; + String client = iMqttDeliveryToken.getClient().getClientId(); + + if (log.isDebugEnabled()) { + log.debug("Message - '" + message + "' of client [" + client + "] for the topic (" + + topic + ") was delivered successfully."); + } + } + + /** + * Closes the connection to the MQTT Broker. + */ + public void closeConnection() throws MqttException { + if (client != null && isConnected()) { + client.disconnect(); + } + } +} + diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/xmpp/XMPPTransportHandler.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/xmpp/XMPPTransportHandler.java new file mode 100644 index 000000000..4ac76f45b --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/xmpp/XMPPTransportHandler.java @@ -0,0 +1,366 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.xmpp; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.jivesoftware.smack.ConnectionConfiguration; +import org.jivesoftware.smack.PacketListener; +import org.jivesoftware.smack.SmackConfiguration; +import org.jivesoftware.smack.XMPPConnection; +import org.jivesoftware.smack.XMPPException; +import org.jivesoftware.smack.filter.AndFilter; +import org.jivesoftware.smack.filter.FromContainsFilter; +import org.jivesoftware.smack.filter.OrFilter; +import org.jivesoftware.smack.filter.PacketFilter; +import org.jivesoftware.smack.filter.PacketTypeFilter; +import org.jivesoftware.smack.filter.ToContainsFilter; +import org.jivesoftware.smack.packet.Message; +import org.jivesoftware.smack.packet.Packet; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandler; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.transport.TransportHandlerException; + +/** + * This is an abstract class that implements the "TransportHandler" interface. The interface is an abstraction for + * the core functionality with regards to device-server communication regardless of the Transport protocol. This + * specific class contains the HTTP-Transport specific implementations. The class implements utility methods for the + * case of a HTTP communication. However, this "abstract class", even-though it implements the "TransportHandler" + * interface, does not contain the logic relevant to the interface methods. The specific functionality of the + * interface methods are intended to be implemented by the concrete class that extends this abstract class and + * utilizes the HTTP specific functionality (ideally a device API writer who would like to communicate to the device + * via HTTP Protocol). + *

+ * This class contains the IoT-Server specific implementation for all the XMPP functionality. This includes + * connecting to a XMPP Server & Login-In using the device's/server's XMPP-Account, Setting listeners and filters on + * incoming XMPP messages and Sending XMPP replies for messages received. Makes use of the 'Smack-XMPP' library + * provided by jivesoftware/igniterealtime. + */ +public abstract class XMPPTransportHandler implements TransportHandler { + private static final Log log = LogFactory.getLog(XMPPTransportHandler.class); + + protected String server; + protected int timeoutInterval; // millis + + //TODO:: Shouldnt be hard-coded. Need to be read from configs + private static final int DEFAULT_XMPP_PORT = 5222; + private XMPPConnection connection; + private int port; + private ConnectionConfiguration config; + private PacketFilter filter; + private PacketListener listener; + + + /** + * Constructor for XMPPTransportHandler passing only the server-IP. + * + * @param server the IP of the XMPP server. + */ + protected XMPPTransportHandler(String server) { + this.server = server; + this.port = DEFAULT_XMPP_PORT; + this.timeoutInterval = DEFAULT_TIMEOUT_INTERVAL; + initXMPPClient(); + } + + /** + * Constructor for XMPPTransportHandler passing server-IP and the XMPP-port. + * + * @param server the IP of the XMPP server. + * @param port the XMPP server's port to connect to. (default - 5222) + */ + protected XMPPTransportHandler(String server, int port) { + this.server = server; + this.port = port; + this.timeoutInterval = DEFAULT_TIMEOUT_INTERVAL; + initXMPPClient(); + } + + /** + * Constructor for XMPPTransportHandler passing server-IP, the XMPP-port and the + * timeoutInterval used by listeners to the server and for reconnection schedules. + * + * @param server the IP of the XMPP server. + * @param port the XMPP server's port to connect to. (default - 5222) + * @param timeoutInterval the timeout interval to use for the connection and reconnection + */ + protected XMPPTransportHandler(String server, int port, int timeoutInterval) { + this.server = server; + this.port = port; + this.timeoutInterval = timeoutInterval; + initXMPPClient(); + } + + /** + * Sets the client's time-out-limit whilst waiting for XMPP-replies from server. + * + * @param millis the time in millis to be set as the time-out-limit whilst waiting for a + * XMPP-reply. + */ + public void setTimeoutInterval(int millis) { + this.timeoutInterval = millis; + } + + /** + * Checks whether the connection to the XMPP-Server persists. + * + * @return true if the client is connected to the XMPP-Server, else false. + */ + @Override + public boolean isConnected() { + return connection.isConnected(); + } + + /** + * Initializes the XMPP Client. Sets the time-out-limit whilst waiting for XMPP-replies from + * server. Sets the XMPP configurations to connect to the server and creates the + * XMPPConnection object used for connecting and Logging-In. + */ + private void initXMPPClient() { + log.info(String.format("Initializing connection to XMPP Server at %1$s via port " + + "%2$d.", server, port)); + SmackConfiguration.setPacketReplyTimeout(timeoutInterval); + config = new ConnectionConfiguration(server, port); +// TODO:: Need to enable SASL-Authentication appropriately + config.setSASLAuthenticationEnabled(false); + config.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled); + connection = new XMPPConnection(config); + } + +//TODO:: Re-check all exception handling + + /** + * Connects to the XMPP-Server and if attempt unsuccessful, then throws exception. + * + * @throws TransportHandlerException in the event of 'Connecting to' the XMPP server fails. + */ + protected void connectToServer() throws TransportHandlerException { + try { + connection.connect(); + log.info(String.format("Connection to XMPP Server at %1$s established successfully......", server)); + + } catch (XMPPException xmppExcepion) { + String errorMsg = "Connection attempt to the XMPP Server at " + server + " via port " + port + " failed."; + log.info(errorMsg); + throw new TransportHandlerException(errorMsg, xmppExcepion); + } + } + + /** + * If successfully established connection, then tries to Log in using the device's XMPP + * Account credentials. + * + * @param username the username of the device's XMPP-Account. + * @param password the password of the device's XMPP-Account. + * @param resource the resource the resource, specific to the XMPP-Account to which the login + * is made to + * @throws TransportHandlerException in the event of 'Logging into' the XMPP server fails. + */ + protected void loginToServer(String username, String password, String resource) + throws TransportHandlerException { + if (isConnected()) { + try { + if (resource == null) { + connection.login(username, password); + log.info(String.format("Logged into XMPP Server at %1$s as user %2$s......", server, username)); + } else { + connection.login(username, password, resource); + log.info(String.format("Logged into XMPP Server at %1$s as user %2$s on resource %3$s......", + server, username, resource)); + } + } catch (XMPPException xmppException) { + String errorMsg = + "Login attempt to the XMPP Server at " + server + " with username - " + username + " failed."; + log.error(errorMsg); + throw new TransportHandlerException(errorMsg, xmppException); + } + } else { + String errorMsg = "Not connected to XMPP-Server to attempt Login. Please 'connectToServer' before Login"; + throw new TransportHandlerException(errorMsg); + } + } + + + /** + * Sets a filter for all the incoming XMPP-Messages on the Sender's JID (XMPP-Account ID). + * Also creates a listener for the incoming messages and connects the listener to the + * XMPPConnection alongside the set filter. + * + * @param senderJID the JID (XMPP-Account ID of the sender) to which the filter is to be set. + */ + protected void setFilterOnSender(String senderJID) { + filter = new AndFilter(new PacketTypeFilter(Message.class), new FromContainsFilter( + senderJID)); + listener = new PacketListener() { + @Override + public void processPacket(Packet packet) { + if (packet instanceof Message) { + final Message xmppMessage = (Message) packet; + Thread msgProcessThread = new Thread() { + public void run() { + processIncomingMessage(xmppMessage); + } + }; + msgProcessThread.setDaemon(true); + msgProcessThread.start(); + } + } + }; + + connection.addPacketListener(listener, filter); + } + + + /** + * Sets a filter for all the incoming XMPP-Messages on the Receiver's JID (XMPP-Account ID). + * Also creates a listener for the incoming messages and connects the listener to the + * XMPPConnection alongside the set filter. + * + * @param receiverJID the JID (XMPP-Account ID of the receiver) to which the filter is to be + * set. + */ + protected void setFilterOnReceiver(String receiverJID) { + filter = new AndFilter(new PacketTypeFilter(Message.class), new ToContainsFilter( + receiverJID)); + listener = new PacketListener() { + @Override + public void processPacket(Packet packet) { + if (packet instanceof Message) { + final Message xmppMessage = (Message) packet; + Thread msgProcessThread = new Thread() { + public void run() { + processIncomingMessage(xmppMessage); + } + }; + msgProcessThread.setDaemon(true); + msgProcessThread.start(); + } + } + }; + + connection.addPacketListener(listener, filter); + } + + + /** + * Sets a filter for all the incoming XMPP-Messages on the From-JID & To-JID (XMPP-Account IDs) + * passed in. Also creates a listener for the incoming messages and connects the listener to + * the XMPPConnection alongside the set filter. + * + * @param senderJID the From-JID (XMPP-Account ID) to which the filter is to be set. + * @param receiverJID the To-JID (XMPP-Account ID) to which the filter is to be set. + * @param andCondition if true: then filter is set with 'AND' operator (senderJID && + * receiverJID), + * if false: then the filter is set with 'OR' operator (senderJID | + * receiverJID) + */ + protected void setMessageFilterAndListener(String senderJID, String receiverJID, boolean + andCondition) { + PacketFilter jidFilter; + + if (andCondition) { + jidFilter = new AndFilter(new FromContainsFilter(senderJID), new ToContainsFilter( + receiverJID)); + } else { + jidFilter = new OrFilter(new FromContainsFilter(senderJID), new ToContainsFilter( + receiverJID)); + } + + filter = new AndFilter(new PacketTypeFilter(Message.class), jidFilter); + listener = new PacketListener() { + @Override + public void processPacket(Packet packet) { + if (packet instanceof Message) { + final Message xmppMessage = (Message) packet; + Thread msgProcessThread = new Thread() { + public void run() { + processIncomingMessage(xmppMessage); + } + }; + msgProcessThread.setDaemon(true); + msgProcessThread.start(); + } + } + }; + + connection.addPacketListener(listener, filter); + } + + + /** + * Sends an XMPP message. Calls the overloaded method with Subject set to "Reply-From-Device" + * + * @param JID the JID (XMPP Account ID) to which the message is to be sent to. + * @param message the XMPP-Message that is to be sent. + */ + protected void sendXMPPMessage(String JID, String message) { + sendXMPPMessage(JID, message, "XMPP-Message"); + } + + + /** + * Overloaded method to send an XMPP message. Includes the subject to be mentioned in the + * message that is sent. + * + * @param JID the JID (XMPP Account ID) to which the message is to be sent to. + * @param message the XMPP-Message that is to be sent. + * @param subject the subject that the XMPP-Message would carry. + */ + protected void sendXMPPMessage(String JID, String message, String subject) { + Message xmppMessage = new Message(); + xmppMessage.setTo(JID); + xmppMessage.setSubject(subject); + xmppMessage.setBody(message); + xmppMessage.setType(Message.Type.chat); + sendXMPPMessage(JID, xmppMessage); + } + + + /** + * Sends an XMPP message. + * + * @param JID the JID (XMPP Account ID) to which the message is to be sent to. + * @param xmppMessage the XMPP-Message that is to be sent. + */ + protected void sendXMPPMessage(String JID, Message xmppMessage) { + connection.sendPacket(xmppMessage); + if (log.isDebugEnabled()) { + log.debug("Message: '" + xmppMessage.getBody() + "' sent to XMPP JID [" + JID + + "] sent successfully."); + } + } + + + /** + * Disables default debugger provided by the XMPPConnection. + */ + protected void disableDebugger() { + connection.DEBUG_ENABLED = false; + } + + + /** + * Closes the connection to the XMPP Server. + */ + public void closeConnection() { + if (connection != null && isConnected()) { + connection.disconnect(); + } + } + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java new file mode 100644 index 000000000..3b777cf75 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java @@ -0,0 +1,213 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.virtual; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentConstants; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentUtilOperations; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.virtual.ui.AgentUI; + +import javax.sound.midi.InvalidMidiDataException; +import javax.sound.midi.MidiSystem; +import javax.sound.midi.MidiUnavailableException; +import javax.sound.midi.Sequence; +import javax.sound.midi.Sequencer; +import javax.sound.sampled.Clip; +import javax.swing.*; +import java.io.IOException; +import java.io.InputStream; + +/** + * This class use to emulate virtual hardware functionality + */ +public class VirtualHardwareManager { + + private static final Log log = LogFactory.getLog(VirtualHardwareManager.class); + + private static VirtualHardwareManager virtualHardwareManager; + + private AgentUI agentUI; + private Sequencer sequencer = null; + + private int temperature = 30, humidity = 30; + private int temperatureMin = 20, temperatureMax = 50, humidityMin = 20, humidityMax = 50; + private int temperatureSVF = 50, humiditySVF = 50; + private boolean isTemperatureRandomized, isHumidityRandomized; + private boolean isTemperatureSmoothed, isHumiditySmoothed; + + private VirtualHardwareManager(){ + } + + public static VirtualHardwareManager getInstance(){ + if (virtualHardwareManager == null){ + virtualHardwareManager = new VirtualHardwareManager(); + } + return virtualHardwareManager; + } + + public void init(){ + try { + // Set System L&F for Device UI + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (UnsupportedLookAndFeelException e) { + log.error( + "'UnsupportedLookAndFeelException' error occurred whilst initializing the" + + " Agent UI."); + } catch (ClassNotFoundException e) { + log.error( + "'ClassNotFoundException' error occurred whilst initializing the Agent UI."); + } catch (InstantiationException e) { + log.error( + "'InstantiationException' error occurred whilst initializing the Agent UI."); + } catch (IllegalAccessException e) { + log.error( + "'IllegalAccessException' error occurred whilst initializing the Agent UI."); + } + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + agentUI = new AgentUI(); + agentUI.setVisible(true); + } + }); + setAudioSequencer(); + } + + /** + * Get temperature from emulated device + * @return Temperature + */ + public int getTemperature() { + if (isTemperatureRandomized) { + temperature = getRandom(temperatureMax, temperatureMin, temperature, + isTemperatureSmoothed, temperatureSVF); + agentUI.updateTemperature(temperature); + } + return temperature; + } + + public void setTemperature(int temperature) { + this.temperature = temperature; + } + + /** + * Get humidity from emulated device + * @return Humidity + */ + public int getHumidity() { + if (isHumidityRandomized) { + humidity = getRandom(humidityMax, humidityMin, humidity, isHumiditySmoothed, + humiditySVF); + agentUI.updateHumidity(humidity); + } + return humidity; + } + + public void setHumidity(int humidity) { + this.humidity = humidity; + } + + public void setTemperatureMin(int temperatureMin) { + this.temperatureMin = temperatureMin; + } + + public void setTemperatureMax(int temperatureMax) { + this.temperatureMax = temperatureMax; + } + + public void setHumidityMin(int humidityMin) { + this.humidityMin = humidityMin; + } + + public void setHumidityMax(int humidityMax) { + this.humidityMax = humidityMax; + } + + public void setIsHumidityRandomized(boolean isHumidityRandomized) { + this.isHumidityRandomized = isHumidityRandomized; + } + + public void setIsTemperatureRandomized(boolean isTemperatureRandomized) { + this.isTemperatureRandomized = isTemperatureRandomized; + } + + public void setTemperatureSVF(int temperatureSVF) { + this.temperatureSVF = temperatureSVF; + } + + public void setHumiditySVF(int humiditySVF) { + this.humiditySVF = humiditySVF; + } + + public void setIsTemperatureSmoothed(boolean isTemperatureSmoothed) { + this.isTemperatureSmoothed = isTemperatureSmoothed; + } + + public void setIsHumiditySmoothed(boolean isHumiditySmoothed) { + this.isHumiditySmoothed = isHumiditySmoothed; + } + + public void changeAlarmStatus(boolean isOn) { + agentUI.setAlarmStatus(isOn); + + if (isOn) { + sequencer.start(); + } else { + sequencer.stop(); + } + } + + private int getRandom(int max, int min, int current, boolean isSmoothed, int svf) { + + if (isSmoothed) { + int offset = (max - min) * svf / 100; + double mx = current + offset; + max = (mx > max) ? max : (int) Math.round(mx); + + double mn = current - offset; + min = (mn < min) ? min : (int) Math.round(mn); + } + + double rnd = Math.random() * (max - min) + min; + return (int) Math.round(rnd); + + } + + private void setAudioSequencer() { + InputStream audioSrc = AgentUtilOperations.class.getResourceAsStream( + "/" + AgentConstants.AUDIO_FILE_NAME); + Sequence sequence; + + try { + sequence = MidiSystem.getSequence(audioSrc); + sequencer = MidiSystem.getSequencer(); + sequencer.open(); + sequencer.setSequence(sequence); + } catch (InvalidMidiDataException e) { + log.error("AudioReader: Error whilst setting MIDI Audio reader sequence"); + } catch (IOException e) { + log.error("AudioReader: Error whilst getting audio sequence from stream"); + } catch (MidiUnavailableException e) { + log.error("AudioReader: Error whilst openning MIDI Audio reader sequencer"); + } + + sequencer.setLoopCount(Clip.LOOP_CONTINUOUSLY); + } + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java new file mode 100644 index 000000000..4a9b76c86 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java @@ -0,0 +1,954 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.virtual.ui; + +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentConstants; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.virtual.VirtualHardwareManager; + +import javax.swing.*; +import java.awt.*; +import java.net.URI; +import java.net.URL; + +public class AgentUI extends JFrame { + + private boolean isTemperatureRandomized, isHumidityRandomized; + private boolean isTemperatureSmoothed, isHumiditySmoothed; + + private volatile boolean isAlarmOn = false; + + private JLabel picLabelBulbOn, picLabelBulbOff; + + // Variables declaration - do not modify + private JButton btnControl; + private JButton btnView; + private JCheckBox chkbxEmulate; + private JCheckBox chkbxHumidityRandom; + private JCheckBox chkbxHumiditySmooth; + private JCheckBox chkbxTemperatureRandom; + private JCheckBox chkbxTemperatureSmooth; + private JComboBox cmbInterface; + private JComboBox cmbPeriod; + private JComboBox cmbProtocol; + private JLabel jLabel1; + private JLabel jLabel10; + private JLabel jLabel11; + private JLabel jLabel12; + private JLabel jLabel2; + private JLabel jLabel20; + private JLabel jLabel23; + private JLabel jLabel24; + private JLabel jLabel25; + private JLabel jLabel3; + private JLabel jLabel4; + private JLabel jLabel5; + private JLabel jLabel6; + private JLabel jLabel7; + private JLabel jLabel8; + private JLabel jLabel9; + private JPanel jPanel1; + private JPanel jPanel2; + private JPanel jPanel3; + private JPanel jPanel4; + private JPanel jPanel6; + private JPanel jPanel7; + private JPanel jPanel8; + private JPanel jPanel9; + private JSeparator jSeparator1; + private JSeparator jSeparator5; + private JLabel lblAgentName; + private JLabel lblStatus; + private JPanel pnlBulbStatus; + private JSpinner spinnerHumidity; + private JSpinner spinnerInterval; + private JSpinner spinnerTemperature; + private JTextField txtHumidityMax; + private JTextField txtHumidityMin; + private JTextField txtHumiditySVF; + private JTextField txtTemperatureMax; + private JTextField txtTemperatureMin; + private JTextField txtTemperatureSVF; + // End of variables declaration + + private Runnable uiUpdater = new Runnable() { + @Override + public void run() { + while (true) { + EventQueue.invokeLater(new Runnable() { + @Override + public void run() { + pnlBulbStatus.removeAll(); + pnlBulbStatus.add(isAlarmOn ? picLabelBulbOn : picLabelBulbOff); + pnlBulbStatus.updateUI(); + lblStatus.setText(AgentManager.getInstance().getAgentStatus()); + if (isTemperatureRandomized) { + txtTemperatureMinActionPerformed(null); + txtTemperatureMaxActionPerformed(null); + if (isTemperatureSmoothed) { + txtTemperatureSVFActionPerformed(null); + } + } + if (isHumidityRandomized) { + txtHumidityMinActionPerformed(null); + txtHumidityMaxActionPerformed(null); + if (isHumiditySmoothed) { + txtHumiditySVFActionPerformed(null); + } + } + } + }); + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + break; + } + } + } + }; + + /** + * Creates new form AgentUI + */ + public AgentUI() { + initComponents(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + private void initComponents() { + + lblAgentName = new JLabel(); + jLabel2 = new JLabel(); + jPanel1 = new JPanel(); + jLabel3 = new JLabel(); + pnlBulbStatus = new JPanel(); + jPanel2 = new JPanel(); + jLabel4 = new JLabel(); + chkbxTemperatureRandom = new JCheckBox(); + jSeparator1 = new JSeparator(); + jPanel7 = new JPanel(); + jLabel5 = new JLabel(); + txtTemperatureMin = new JTextField(); + jLabel6 = new JLabel(); + txtTemperatureMax = new JTextField(); + jLabel10 = new JLabel(); + txtTemperatureSVF = new JTextField(); + spinnerTemperature = new JSpinner(); + chkbxTemperatureSmooth = new JCheckBox(); + jPanel6 = new JPanel(); + jLabel20 = new JLabel(); + btnView = new JButton(); + btnControl = new JButton(); + lblStatus = new JLabel(); + jPanel8 = new JPanel(); + jLabel23 = new JLabel(); + chkbxHumidityRandom = new JCheckBox(); + jSeparator5 = new JSeparator(); + jPanel9 = new JPanel(); + jLabel24 = new JLabel(); + txtHumidityMin = new JTextField(); + jLabel25 = new JLabel(); + txtHumidityMax = new JTextField(); + txtHumiditySVF = new JTextField(); + jLabel11 = new JLabel(); + spinnerHumidity = new JSpinner(); + chkbxHumiditySmooth = new JCheckBox(); + jPanel3 = new JPanel(); + jLabel7 = new JLabel(); + spinnerInterval = new JSpinner(); + jLabel8 = new JLabel(); + jLabel9 = new JLabel(); + cmbProtocol = new JComboBox(); + jLabel12 = new JLabel(); + cmbInterface = new JComboBox(); + jPanel4 = new JPanel(); + chkbxEmulate = new JCheckBox(); + cmbPeriod = new JComboBox(); + jLabel1 = new JLabel(); + + setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); + setTitle("Fire Alarm Emulator"); + setResizable(false); + Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); + setLocation(dim.width / 2 - 650 / 2, dim.height / 2 - 440 / 2); + + lblAgentName.setFont(new Font("Cantarell", 1, 24)); // NOI18N + lblAgentName.setHorizontalAlignment(SwingConstants.LEFT); + lblAgentName.setText("Device Name: " + AgentManager.getInstance().getDeviceName()); + + jLabel2.setHorizontalAlignment(SwingConstants.CENTER); + jLabel2.setText("Copyright (c) 2015, WSO2 Inc."); + + jPanel1.setBackground(new Color(220, 220, 220)); + + jLabel3.setFont(new Font("Cantarell", 0, 18)); // NOI18N + jLabel3.setHorizontalAlignment(SwingConstants.CENTER); + jLabel3.setText("Alarm Status"); + + pnlBulbStatus.setBackground(new Color(220, 220, 220)); + + GroupLayout pnlBulbStatusLayout = new GroupLayout(pnlBulbStatus); + pnlBulbStatus.setLayout(pnlBulbStatusLayout); + pnlBulbStatusLayout.setHorizontalGroup( + pnlBulbStatusLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGap(0, 0, Short.MAX_VALUE) + ); + pnlBulbStatusLayout.setVerticalGroup( + pnlBulbStatusLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGap(0, 167, Short.MAX_VALUE) + ); + + GroupLayout jPanel1Layout = new GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.TRAILING) + .addComponent(pnlBulbStatus, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel3, GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE)) + .addContainerGap()) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel3) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(pnlBulbStatus, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap()) + ); + + jPanel2.setBackground(new Color(220, 220, 220)); + + jLabel4.setFont(new Font("Cantarell", 0, 18)); // NOI18N + jLabel4.setHorizontalAlignment(SwingConstants.CENTER); + jLabel4.setText("Temperature"); + + chkbxTemperatureRandom.setText("Randomize Data"); + chkbxTemperatureRandom.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkbxTemperatureRandomActionPerformed(evt); + } + }); + + jSeparator1.setOrientation(SwingConstants.VERTICAL); + + jPanel7.setBackground(new Color(220, 220, 220)); + + jLabel5.setHorizontalAlignment(SwingConstants.LEFT); + jLabel5.setText("Min"); + + txtTemperatureMin.setHorizontalAlignment(JTextField.CENTER); + txtTemperatureMin.setText("20"); + txtTemperatureMin.setEnabled(false); + txtTemperatureMin.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtTemperatureMinActionPerformed(evt); + } + }); + + jLabel6.setHorizontalAlignment(SwingConstants.RIGHT); + jLabel6.setText("Max"); + + txtTemperatureMax.setHorizontalAlignment(JTextField.CENTER); + txtTemperatureMax.setText("50"); + txtTemperatureMax.setEnabled(false); + txtTemperatureMax.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtTemperatureMaxActionPerformed(evt); + } + }); + + jLabel10.setHorizontalAlignment(SwingConstants.RIGHT); + jLabel10.setText("SV %"); + + txtTemperatureSVF.setHorizontalAlignment(JTextField.CENTER); + txtTemperatureSVF.setText("50"); + txtTemperatureSVF.setEnabled(false); + txtTemperatureSVF.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtTemperatureSVFActionPerformed(evt); + } + }); + + GroupLayout jPanel7Layout = new GroupLayout(jPanel7); + jPanel7.setLayout(jPanel7Layout); + jPanel7Layout.setHorizontalGroup( + jPanel7Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel7Layout.createSequentialGroup() + .addComponent(jLabel5) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtTemperatureMin, GroupLayout.PREFERRED_SIZE, 45, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel6) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtTemperatureMax, GroupLayout.PREFERRED_SIZE, 45, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel10) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtTemperatureSVF, GroupLayout.PREFERRED_SIZE, 45, GroupLayout.PREFERRED_SIZE) + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + jPanel7Layout.setVerticalGroup( + jPanel7Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup() + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel7Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(txtTemperatureMin, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addComponent(txtTemperatureMax, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel6) + .addComponent(jLabel5) + .addComponent(jLabel10) + .addComponent(txtTemperatureSVF, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) + .addGap(35, 35, 35)) + ); + + spinnerTemperature.setFont(new Font("Cantarell", 1, 24)); // NOI18N + spinnerTemperature.setModel(new SpinnerNumberModel(30, 0, 100, 1)); + spinnerTemperature.addChangeListener(new javax.swing.event.ChangeListener() { + public void stateChanged(javax.swing.event.ChangeEvent evt) { + spinnerTemperatureStateChanged(evt); + } + }); + + chkbxTemperatureSmooth.setText("Smooth Variation"); + chkbxTemperatureSmooth.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkbxTemperatureSmoothActionPerformed(evt); + } + }); + + GroupLayout jPanel2Layout = new GroupLayout(jPanel2); + jPanel2.setLayout(jPanel2Layout); + jPanel2Layout.setHorizontalGroup( + jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false) + .addComponent(jLabel4, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(spinnerTemperature)) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jSeparator1, GroupLayout.PREFERRED_SIZE, 6, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(jPanel7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(chkbxTemperatureRandom) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(chkbxTemperatureSmooth))) + .addContainerGap()) + ); + jPanel2Layout.setVerticalGroup( + jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(jSeparator1) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGroup(jPanel2Layout.createParallelGroup( + + GroupLayout.Alignment.BASELINE) + .addComponent(chkbxTemperatureRandom) + .addComponent(chkbxTemperatureSmooth)) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel7, GroupLayout.PREFERRED_SIZE, 51, GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE)) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jLabel4, GroupLayout.PREFERRED_SIZE, 23, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(spinnerTemperature))) + .addContainerGap()) + ); + + jPanel6.setBackground(new Color(253, 254, 209)); + + jLabel20.setText("Connection Status:"); + jLabel20.setVerticalTextPosition(SwingConstants.TOP); + + btnView.setText("View Device Data"); + btnView.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + btnViewMouseClicked(evt); + } + }); + + btnControl.setText("Control Device"); + btnControl.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + btnControlMouseClicked(evt); + } + }); + + lblStatus.setFont(new Font("Cantarell", 1, 15)); // NOI18N + lblStatus.setText("Not Connected"); + + GroupLayout jPanel6Layout = new GroupLayout(jPanel6); + jPanel6.setLayout(jPanel6Layout); + jPanel6Layout.setHorizontalGroup( + jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel6Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel20) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(lblStatus, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(btnControl) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(btnView) + .addContainerGap()) + ); + jPanel6Layout.setVerticalGroup( + jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup() + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false) + .addComponent(jLabel20, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(btnView, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(btnControl) + .addComponent(lblStatus))) + .addContainerGap()) + ); + + jPanel8.setBackground(new Color(220, 220, 220)); + + jLabel23.setFont(new Font("Cantarell", 0, 18)); // NOI18N + jLabel23.setHorizontalAlignment(SwingConstants.CENTER); + jLabel23.setText("Humidity"); + + chkbxHumidityRandom.setText("Randomize Data"); + chkbxHumidityRandom.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkbxHumidityRandomActionPerformed(evt); + } + }); + + jSeparator5.setOrientation(SwingConstants.VERTICAL); + + jPanel9.setBackground(new Color(220, 220, 220)); + + jLabel24.setHorizontalAlignment(SwingConstants.LEFT); + jLabel24.setText("Min"); + + txtHumidityMin.setHorizontalAlignment(JTextField.CENTER); + txtHumidityMin.setText("20"); + txtHumidityMin.setEnabled(false); + txtHumidityMin.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtHumidityMinActionPerformed(evt); + } + }); + + jLabel25.setHorizontalAlignment(SwingConstants.RIGHT); + jLabel25.setText("Max"); + + txtHumidityMax.setHorizontalAlignment(JTextField.CENTER); + txtHumidityMax.setText("50"); + txtHumidityMax.setEnabled(false); + txtHumidityMax.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtHumidityMaxActionPerformed(evt); + } + }); + + txtHumiditySVF.setHorizontalAlignment(JTextField.CENTER); + txtHumiditySVF.setText("50"); + txtHumiditySVF.setEnabled(false); + txtHumiditySVF.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtHumiditySVFActionPerformed(evt); + } + }); + + jLabel11.setHorizontalAlignment(SwingConstants.RIGHT); + jLabel11.setText("SV %"); + + GroupLayout jPanel9Layout = new GroupLayout(jPanel9); + jPanel9.setLayout(jPanel9Layout); + jPanel9Layout.setHorizontalGroup( + jPanel9Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel9Layout.createSequentialGroup() + .addComponent(jLabel24) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtHumidityMin, GroupLayout.PREFERRED_SIZE, 45, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel25) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtHumidityMax, GroupLayout.PREFERRED_SIZE, 45, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel11) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtHumiditySVF, GroupLayout.PREFERRED_SIZE, 45, GroupLayout.PREFERRED_SIZE) + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + jPanel9Layout.setVerticalGroup( + jPanel9Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup() + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel9Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel9Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(jLabel11) + .addComponent(txtHumiditySVF, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel9Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(txtHumidityMin, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addComponent(txtHumidityMax, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel25) + .addComponent(jLabel24))) + .addGap(35, 35, 35)) + ); + + spinnerHumidity.setFont(new Font("Cantarell", 1, 24)); // NOI18N + spinnerHumidity.setModel(new SpinnerNumberModel(30, 0, 100, 1)); + spinnerHumidity.addChangeListener(new javax.swing.event.ChangeListener() { + public void stateChanged(javax.swing.event.ChangeEvent evt) { + spinnerHumidityStateChanged(evt); + } + }); + + chkbxHumiditySmooth.setText("Smooth Variation"); + chkbxHumiditySmooth.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkbxHumiditySmoothActionPerformed(evt); + } + }); + + GroupLayout jPanel8Layout = new GroupLayout(jPanel8); + jPanel8.setLayout(jPanel8Layout); + jPanel8Layout.setHorizontalGroup( + jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel8Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(jLabel23, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE) + .addComponent(spinnerHumidity)) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jSeparator5, GroupLayout.PREFERRED_SIZE, 6, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false) + .addComponent(jPanel9, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel8Layout.createSequentialGroup() + .addComponent(chkbxHumidityRandom) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(chkbxHumiditySmooth))) + .addContainerGap()) + ); + jPanel8Layout.setVerticalGroup( + jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel8Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(jSeparator5) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGroup(jPanel8Layout.createParallelGroup( + GroupLayout.Alignment.BASELINE) + .addComponent(chkbxHumidityRandom) + .addComponent(chkbxHumiditySmooth)) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel9, GroupLayout.PREFERRED_SIZE, 51, GroupLayout.PREFERRED_SIZE) + .addGap(0, 1, Short.MAX_VALUE)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addComponent(jLabel23, GroupLayout.PREFERRED_SIZE, 23, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(spinnerHumidity))) + .addContainerGap()) + ); + + jPanel3.setBackground(new Color(207, 233, 234)); + + jLabel7.setText("Data Push Interval:"); + + spinnerInterval.setModel(new SpinnerNumberModel(Integer.valueOf(AgentManager.getInstance().getPushInterval()), Integer.valueOf(1), null, Integer.valueOf(1))); + spinnerInterval.addChangeListener(new javax.swing.event.ChangeListener() { + public void stateChanged(javax.swing.event.ChangeEvent evt) { + spinnerIntervalStateChanged(evt); + } + }); + + jLabel8.setText("Seconds"); + + jLabel9.setText("Protocol:"); + + cmbProtocol.setModel(new DefaultComboBoxModel(new String[] { "MQTT", "XMPP", "HTTP" })); + cmbProtocol.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cmbProtocolActionPerformed(evt); + } + }); + + jLabel12.setText("Interface:"); + + cmbInterface.setModel(new DefaultComboBoxModel(new String[] { "eth0" })); + cmbInterface.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cmbInterfaceActionPerformed(evt); + } + }); + + GroupLayout jPanel3Layout = new GroupLayout(jPanel3); + jPanel3.setLayout(jPanel3Layout); + jPanel3Layout.setHorizontalGroup( + jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel7) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(spinnerInterval, GroupLayout.PREFERRED_SIZE, 55, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel8) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel12) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(cmbInterface, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel9) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(cmbProtocol, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); + jPanel3Layout.setVerticalGroup( + jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(jLabel12) + .addComponent(cmbInterface, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(jLabel7) + .addComponent(spinnerInterval, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel8) + .addComponent(jLabel9) + .addComponent(cmbProtocol, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))) + .addContainerGap()) + ); + + jPanel4.setBackground(new Color(169, 253, 173)); + + chkbxEmulate.setText("Emulate data"); + chkbxEmulate.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkbxEmulateActionPerformed(evt); + } + }); + + cmbPeriod.setModel(new DefaultComboBoxModel(new String[] { "1 hour", "1 day", "1 week", "1 month " })); + cmbPeriod.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cmbPeriodActionPerformed(evt); + } + }); + + jLabel1.setText("Emulation Period"); + + GroupLayout jPanel4Layout = new GroupLayout(jPanel4); + jPanel4.setLayout(jPanel4Layout); + jPanel4Layout.setHorizontalGroup( + jPanel4Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(jPanel4Layout.createSequentialGroup() + .addContainerGap() + .addComponent(chkbxEmulate) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel1) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(cmbPeriod, GroupLayout.PREFERRED_SIZE, 162, GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); + jPanel4Layout.setVerticalGroup( + jPanel4Layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel4Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(chkbxEmulate) + .addComponent(cmbPeriod, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel1)) + .addContainerGap()) + ); + + GroupLayout layout = new GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(lblAgentName, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel6, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup( + GroupLayout.Alignment.LEADING) + .addComponent(jPanel8, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel2, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addComponent(jLabel2, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel4, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel3, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(lblAgentName, GroupLayout.PREFERRED_SIZE, 53, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel8, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) + .addComponent(jPanel1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel2, GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); + + pack(); + + chkbxTemperatureSmooth.setEnabled(false); + chkbxTemperatureSmooth.setEnabled(false); + + cmbInterface.removeAllItems(); + for (String item : AgentManager.getInstance().getInterfaceList()){ + cmbInterface.addItem(item); + } + cmbInterface.setEnabled(false); + + cmbProtocol.removeAllItems(); + for (String item : AgentManager.getInstance().getProtocolList()){ + cmbProtocol.addItem(item); + } + cmbProtocol.setSelectedItem(AgentConstants.DEFAULT_PROTOCOL); + + URL urlAlarmOn = this.getClass().getResource("/alarm-on.gif"); + ImageIcon imageIconAlarmOn = new ImageIcon(urlAlarmOn); + + URL urlAlarmOff = this.getClass().getResource("/alarm-off.gif"); + ImageIcon imageIconAlarmOff = new ImageIcon(urlAlarmOff); + + picLabelBulbOn = new JLabel(imageIconAlarmOn); + picLabelBulbOn.setSize(pnlBulbStatus.getSize()); + + picLabelBulbOff = new JLabel(imageIconAlarmOff); + picLabelBulbOff.setSize(pnlBulbStatus.getSize()); + + new Thread(uiUpdater).start(); + + AgentManager.getInstance().setDeviceReady(true); + } + + private void btnControlMouseClicked(java.awt.event.MouseEvent evt) { + Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null; + if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) { + try { + URI uri = new URI(AgentManager.getInstance().getDeviceMgtControlUrl()); + desktop.browse(uri); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + private void btnViewMouseClicked(java.awt.event.MouseEvent evt) { + Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null; + if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) { + try { + URI uri = new URI(AgentManager.getInstance().getDeviceMgtAnalyticUrl()); + desktop.browse(uri); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + private void chkbxTemperatureRandomActionPerformed(java.awt.event.ActionEvent evt) { + isTemperatureRandomized = chkbxTemperatureRandom.isSelected(); + VirtualHardwareManager.getInstance().setIsTemperatureRandomized(isTemperatureRandomized); + spinnerTemperature.setEnabled(!isTemperatureRandomized); + txtTemperatureMax.setEnabled(isTemperatureRandomized); + txtTemperatureMin.setEnabled(isTemperatureRandomized); + chkbxTemperatureSmooth.setEnabled(isTemperatureRandomized); + txtTemperatureSVF.setEnabled(isTemperatureRandomized && isTemperatureSmoothed); + } + + private void chkbxHumidityRandomActionPerformed(java.awt.event.ActionEvent evt) { + isHumidityRandomized = chkbxHumidityRandom.isSelected(); + VirtualHardwareManager.getInstance().setIsHumidityRandomized(isHumidityRandomized); + spinnerHumidity.setEnabled(!isHumidityRandomized); + txtHumidityMax.setEnabled(isHumidityRandomized); + txtHumidityMin.setEnabled(isHumidityRandomized); + chkbxHumiditySmooth.setEnabled(isHumidityRandomized); + txtTemperatureSVF.setEnabled(isHumidityRandomized && isHumiditySmoothed); + } + + private void spinnerTemperatureStateChanged(javax.swing.event.ChangeEvent evt) { + if (!isTemperatureRandomized) { + try { + int temperature = Integer.parseInt(spinnerTemperature.getValue().toString()); + VirtualHardwareManager.getInstance().setTemperature(temperature); + } catch (NumberFormatException e) { + JOptionPane.showMessageDialog(this, "Invalid temperature value", "Error", JOptionPane.ERROR_MESSAGE); + spinnerTemperature.setValue(VirtualHardwareManager.getInstance().getTemperature()); + } + } + } + + private void spinnerHumidityStateChanged(javax.swing.event.ChangeEvent evt) { + if (!isHumidityRandomized) { + try { + int humidity = Integer.parseInt(spinnerHumidity.getValue().toString()); + VirtualHardwareManager.getInstance().setHumidity(humidity); + } catch (NumberFormatException e) { + JOptionPane.showMessageDialog(this, "Invalid humidity value", "Error", JOptionPane.ERROR_MESSAGE); + spinnerHumidity.setValue(VirtualHardwareManager.getInstance().getHumidity()); + } + } + } + + private void txtTemperatureMinActionPerformed(java.awt.event.ActionEvent evt) { + try { + int temperature = Integer.parseInt(txtTemperatureMin.getText()); + VirtualHardwareManager.getInstance().setTemperatureMin(temperature); + } catch (NumberFormatException e) { + JOptionPane.showMessageDialog(this, "Invalid temperature value", "Error", JOptionPane.ERROR_MESSAGE); + txtTemperatureMin.setText("20"); + } + } + + private void txtTemperatureMaxActionPerformed(java.awt.event.ActionEvent evt) { + try { + int temperature = Integer.parseInt(txtTemperatureMax.getText()); + VirtualHardwareManager.getInstance().setTemperatureMax(temperature); + } catch (NumberFormatException e) { + JOptionPane.showMessageDialog(this, "Invalid temperature value", "Error", JOptionPane.ERROR_MESSAGE); + txtTemperatureMax.setText("50"); + } + } + + private void txtHumidityMinActionPerformed(java.awt.event.ActionEvent evt) { + try { + int humidity = Integer.parseInt(txtHumidityMin.getText()); + VirtualHardwareManager.getInstance().setHumidityMin(humidity); + } catch (NumberFormatException e) { + JOptionPane.showMessageDialog(this, "Invalid humidity value", "Error", JOptionPane.ERROR_MESSAGE); + txtHumidityMin.setText("20"); + } + } + + private void txtHumidityMaxActionPerformed(java.awt.event.ActionEvent evt) { + try { + int humidity = Integer.parseInt(txtHumidityMax.getText()); + VirtualHardwareManager.getInstance().setHumidityMax(humidity); + } catch (NumberFormatException e) { + JOptionPane.showMessageDialog(this, "Invalid humidity value", "Error", JOptionPane.ERROR_MESSAGE); + txtHumidityMax.setText("50"); + } + } + + private void spinnerIntervalStateChanged(javax.swing.event.ChangeEvent evt) { + try { + int interval = Integer.parseInt(spinnerInterval.getValue().toString()); + AgentManager.getInstance().setPushInterval(interval); + } catch (NumberFormatException e) { + JOptionPane.showMessageDialog(this, "Invalid time interval value", "Error", JOptionPane.ERROR_MESSAGE); + spinnerInterval.setValue(5); + } + } + + private void cmbInterfaceActionPerformed(java.awt.event.ActionEvent evt) { + AgentManager.getInstance().setInterface(cmbInterface.getSelectedIndex()); + } + + private void cmbProtocolActionPerformed(java.awt.event.ActionEvent evt) { + if (cmbProtocol.getSelectedIndex() != -1 && cmbProtocol.getItemAt( + cmbProtocol.getSelectedIndex()).equals(AgentConstants.HTTP_PROTOCOL)) { + cmbInterface.setEnabled(true); + } else { + cmbInterface.setEnabled(false); + } + + AgentManager.getInstance().setProtocol(cmbProtocol.getSelectedIndex()); + + } + + private void txtTemperatureSVFActionPerformed(java.awt.event.ActionEvent evt) { + try { + int temperatureSVF = Integer.parseInt(txtTemperatureSVF.getText()); + VirtualHardwareManager.getInstance().setTemperatureSVF(temperatureSVF); + } catch (NumberFormatException e) { + JOptionPane.showMessageDialog(this, "Invalid value", "Error", JOptionPane.ERROR_MESSAGE); + txtTemperatureSVF.setText("50"); + } + } + + private void txtHumiditySVFActionPerformed(java.awt.event.ActionEvent evt) { + try { + int humiditySVF = Integer.parseInt(txtHumiditySVF.getText()); + VirtualHardwareManager.getInstance().setHumiditySVF(humiditySVF); + } catch (NumberFormatException e) { + JOptionPane.showMessageDialog(this, "Invalid value", "Error", JOptionPane.ERROR_MESSAGE); + txtHumiditySVF.setText("50"); + } + } + + private void chkbxTemperatureSmoothActionPerformed(java.awt.event.ActionEvent evt) { + isTemperatureSmoothed = chkbxTemperatureSmooth.isSelected(); + txtTemperatureSVF.setEnabled(isTemperatureSmoothed); + VirtualHardwareManager.getInstance().setIsTemperatureSmoothed(isTemperatureSmoothed); + } + + private void chkbxHumiditySmoothActionPerformed(java.awt.event.ActionEvent evt) { + isHumiditySmoothed = chkbxHumiditySmooth.isSelected(); + txtHumiditySVF.setEnabled(isHumiditySmoothed); + VirtualHardwareManager.getInstance().setIsHumiditySmoothed(isHumiditySmoothed); + } + + private void cmbPeriodActionPerformed(java.awt.event.ActionEvent evt) { + // TODO add your handling code here: + } + + private void chkbxEmulateActionPerformed(java.awt.event.ActionEvent evt) { + // TODO add your handling code here: + } + + public void setAlarmStatus(boolean isAlarmOn) { + this.isAlarmOn = isAlarmOn; + } + + public void updateTemperature(int temperature) { + spinnerTemperature.setValue(temperature); + spinnerTemperature.updateUI(); + } + + public void updateHumidity(int humidity) { + spinnerHumidity.setValue(humidity); + spinnerHumidity.updateUI(); + } + +} diff --git a/src/main/resources/alarm-off.gif b/src/main/resources/alarm-off.gif new file mode 100644 index 0000000000000000000000000000000000000000..c346605ad00627e4bda392cd37ab24bde7643395 GIT binary patch literal 4265 zcmcgu`Bzhi62A9lyJWoy1j2p^TTsM=O`@ntSQ-H_EFyx?fC`9O0|=s6y&-^TPy>Rc ziZ(&qu?>repf+J~DQa<{;>HW8h>9ANTCFWS-aqlaU*^pD&dhx0n{(#OH%r2UglSiR zlfYE~n4X><7#Nt2jh$|6oSsRqUWH-U%L}cpuAXjd<8U|vfq=t7>gwuxdwUxj8!unJ z{OQxDqN1YdEnAM_aPQu|yLIbUYisN1=x9SjLqtS`N~Iba8cI)3&(6*ki^XcSIyN>| zC=}-9EJMnudIT>!8hhNp*yra7GRGm_HN zy}Z1pKYc=Ac%~*PHg>9^LEz<8S6wX>2$GUw)oN8yUfy#6KoB@0LM#>v^M%46)avx4 zq`bUrwMvzpJ)%p`f?-a^C-h2^(kR*3}6FUa_$e1GjFeR7I_=jh_JEa%=01 zC;vCNe8GbZU?<=W%;0}J5s{`apjcH>TDGfv_a1e{-hKNul~o6-YYzTU`{SX*bw`f= zq}A0QYdC)5q+*Y*iYCm3noDy`t_jX5|A7m zZ^27@UVST|DVT+f~Q_Dd|=7UV?p{0$_BkJV+)A`YQpPs)8Jzm)v>3;! z@EX&WSZ9yv%014E)mH?*9y_K9pY^JtIwAYj@!E_tuTIo?*cr?0pS%K-F7qUj1c#u0 z5y@Gj%>ZtT%_1PJ;7kM_tR;b5Yd*98mjuj=1#Zc4ZD3RWeT~QW$xRL<&jJNg0|&{^ zdR|fJL1}4_Ids9o>wc0-O7)38+$j6B0iM9?fEsS0+2GSM$6%nacn=JcWz}t3g3afX zXY>yex+)1y{xT`iqgG=X2lh^i*h{BYp*k9T^OF+aGZb*Z>bO$g1p{imp^?Ee7`kBx z?EQYLy=JkRz@}Od?~1faTtD8Vf?USpkBjYin$!yGa((>zb17)oDy}RaqxS1{6vr?`75*6ZqI3Zr^dL?mvM1D*78xd@pr z4CvbQ>)OAZAEhs5iMQ?eUY^oK^L96aS;t{C$r-za;tVH>7T#eiwmFiRgwG= zXyKh3(G2NNebT6VeRibH(}wZr{AvDwZ(75@Y~*8 zC7k*!p|4uKq6`zkI|h{0AUCHcCS>R5IPJb0$3PXeoakh3RG}EY>^TDaPkok9MIY2$ zP^mh@zj({`6+U5b=&82`v^;C71Qz&v>dL~D zi|i8(6bS&OE5DmHdFTddd)3_XLQ|^Sy(p^ErqeL#GW^3C?pN@6*Hx2^;{LkcU% zYqYqv<5G622w#oI&slj2ibwT8ai9qo+4&f^*%q>Fy@qf34WrS~NLuSLky_}bcJhm1 zyz2+ur1Cj@5!63E0?`h$A+se$8^pxtJCmEjO;f?v=G8b}ZSo?yCqzWRlY4X)%l{R2 z3152ywM`f;^=|lWeJI|e{I_KedH`86;6pD|$Nk%daj!qe%~tQC4=RDLTQ}l+*8$GT zmyOQNu%APDGMkzU-aQg}qDTyo$!qF6oqE89zZop350y4I$@oxRBW=~L_Wu+bX4zjS zS~%9XP)^MO9AyTO8v7G2ad_1em~7F}qGXJft(%=cL~OOJ|1vJY9XU2m;qY6CXf$*= zWIWx5$L_!QdS&9~T0cKSXDvDaI4J;C6u1aJ)qOt8?`$mA_JdQ_Jd>owLJ3jLCYrx|kto~Hwn2_r^2G;jP>?K>afmUe z$o5%xc7&s0wu0zVcDrKRSi@ezm$mqgu%_Iq3rVw%WQGtwoDg4m##Hy z@-8LYJBi|!Egy`3b0!nKZRs24lMNL(U_VCQ=*4XVa2y#*eAn__FseWB@TnRF9Z-wW z21om(>N7+9Oc>GEF3OvO>ufpKQW5qmX*)iDgd$gmBgN2%-5j{qmoZzvYGFW&{pPAa zN`JinsOMGmmN^i3Y%v0ToH!kA-^b%r8mkf0>FBoy1Y_7{FdFx0i7N_%Z|~1S6!L)+ z7*W4#>3I5-{nx?k(QVB?+#1hV@bzK;zP8qrOW$TEe|9jM9xEOr@T=?=q%jb$U3+z}0FYDm_fMwOK zG$~p%G{wbHV5z0=r-#Me`6;os;sqmIr5Bdv6beh3(RUr*DFKh7kGJkd@^s9oYVUDT zb4bSuyz7r5{HXS)+*8GDM(B_i!*L-}HK5t0P(>C!W84VIqU3J(irRJ2iyM~FK)=r7 zmhF>Zi>o@e<~QM@w~DK12O8D?P+B*2|A!dAv1^FJ(x^-rF;PZ9$GgCsIDjSp3!|G& zgxFTajiSDzhphLQm#NhQ5JJp0G85nfv2C3{Z^7 zk@ZP7Sqb*laKf*-m$_N`rvV3bln0Yg{;)q)0rcbr6Rx|V`X!$Ci@+&G(9;q0<_jR$ zg&+VypC+4@w1Cnc7KO_gT>}J~=KgsesCFliOweTgPO5B<#KVttitpaTeB=v_Vc^YY zkT(bh53AlN@sCYlUhg77{e1BRCln#XG&wB_vPw#uIcESDAao$mTr;%&qpO4&zrSgV zb7*w&nmH;N7^wg}$$BVa30<40g~mo1!Jtd)wo|;rHhz_g7eH;)uvO0UZxeJjmqI1`^WvSgE(I&%XO*)$^s4^zHgpr7 zCtrs51nu-dpo~BfAs?&4sG3yhc;(h-cF{2@U&WShT|r01;lPg$kM)*om(_UIg7Z5C4`ck;y;btojbgoB4_LbG8Jh$183`fys8cj5R zx!w-p?^`4;EV>6;2z}#>i)LBQbxxf7S7qviKAy<;UBQYjmfpt4w@B}v>nXn5HaVdz)80{2VZ?%V4V=d7W1bEOyVE!{B;rjFtx zjkLjhXK~2lWDzcoKl}GIC`bX}CkkxzOQQ~E`Q&aLM441LgspMz3EA^BC)i57$Nf$T zO}^rT9*5TwBqA^ZThL~+m}jzDu9^QVZqdsSs54XImzGkxyKV>QH;+Vcdl$tPKHOy$d&-N;IunuVTIH8()DUEt3J*xVF}H*k}Z>@y;Kq! zU$4>s;eN(NEBFlb=sXZ~{;p@4pSsz4*amI z-oR{XdF9s2^qe+2uYlYe{#bPJ#QOY$8=lWRDO%4VljD}jJmHA_xj)zaUFm-8pr@Y% zBK}4DJtMd8d{f@l%m;R%`MI7}p`y%Y&zJTZpvb<4T@}A zyYHc6RqWyF2sU{q4uZ%veLy^AT_hI0OJX zoxZTJK)17_x3tjzRmaAVNTjqhuB4=de(xSHFRzl45-%^Nrlw|ebhM?VrN6)b@bEA( zF_9h{dkqHL-QAs@p6=@ET3=tUtE)3NH&01PSzTTA^70A{4Aj%p%gM>Hv$NCG)QpOX za&vPliHgGgOaDg1VCd`Xe>FAfIXTie9DR4!&fNT8!w>)@A(8aeRXQ(k_diKqUeeOi z^ut3868W!>o1NX?x;iCk>6(%fO(i8aH@lpil*Fj0H2}b1kmlxkdYYOSH8sm~a=hH! zqM`zGQc?l~|7mgi*YdB_)KnTB?T`A8FwK^Ka%*aol%(zK%onDoQ&JMUx?27%NPkxs z@c%Fg)0wS}9PADBY>bo@6k*`MsfB;Q5o~}vAom{`|Jf#hkxm3iDXD4c8JStxIk|cH z1?0k_;*!#`@`}o;>YA(9u2XK*-mI%{xYgLye7mLfPFwrkj?S*`dp*7PA3W^qe>6bt zRhO3@9hH|?ADnC%Rz{#^VbAAbvk1h*RK~Eh^0TF-H{=TfAP&36n59KV5Y( zuj{@KKJ-(5)MbjFXgmYQrjp9h+zZ?BCw6B`!Z zX&t`MCJdkRdsVs_@B#JY?=^v+=MIM@6&b@GOh6A=k*SB|o~*I9#@~O_RB^|E{Z31s`FL7uvyFkTtcKIFygU+*zZU=094J}%<~&@G zTh*K|{DMJsu%Y|Zc(8>+|M>P*4#N*#K?%MuC*tMT15Kflrv%wkn@JW;mHU})Alt=9gE z@L5l}x51+`wi&qXrrh348fz()Q%dkUWMH3cu?n{Vi??O!aj^F0PMq$YdnbWkocqg8 zbcRbafKp@de&7>w9a*O^RK82mNxJo- zbaOfxfx(9l?z9>ZKt`{P{s$k4QFg;uKXeN$!&MlgDrOZ=AKMpo_ogPm*yHddhU1yI zKa9uyF(gKI9PZZ}Pevda#v9xL(f1mmD}5&zxlRwi$~6rggt3$NK@>ZYoD3_CqV^zo ze1IXOaK#%WzoItF$Gj`7zNvF04@*G&h6> zjmQv9xQy#1zByn_W`qN&#W**ZXm7dW)oD`UBn@du0ojK3N%6(*s2h?X*Y@5eHX8!V z6O&=XaRMV(7n}h{OGd;2&}nx=O#h)Os}2s%%nQPQaub@vU!hOdx z3Xn$+5!m2!ziSyV#M3W67qY`NJ&uVgjj|rtWM$60{2=B>y?YT|;8`sIox~Y4f5+w& zQQzW@4<@s?v(fXi8mXMv866(rMi_nu&$xXAtmw@V+xv)&T4az}1Ax%IctQ27Y$Tje zghYBEH5JpOzSDql!v^?IiDVyt(8*TYZkKQnM4qMqsyx$yhI za$#X^OCnW!Bg;|}4_yDrOhoBXwN$hKN)r;$kPk<)ni6Y;XI2fIC+3t%IQT&c5pmcs zkgEn%|1Or2(lcjbwd|mz5dq6Wv&jj)`HOu108~-~4RW5Xeg^LX$ z1jr!VhfsdL-w=+&LvX4hgp3<>*KJSh+a@ATXe2|H?L_oJ2zRzr1q!i1vd?X*EtNz;GA*?r`F{}y52wL410v($1i+9<=_!E? z1?DlijF}VL%|C4i*DnzJ3d2ww-grno315DO1E2Y}Ly18gVb;Fp+5kPQXE z#u0`~f~XMhK56H$72HUIK#L?0?cM{j_$rAr$T?6RxWMEZA&krhzy{|*$s~C&#_dD0 zp%n1e=m!QZ0tBm|4VFFxIC#TJQZ!Y-94~=Ypm_9>2p~^|BGReF*JM5qhRakE7HJ2c zB;W=#{%wRv4VCO_zmBWlhSd^T)?{x0Hhf zP|w+^PJ*DvDI+;Ak^;1)zQ!ZV==)k5W|Xqkmqa8BhNR?1g;^d3^BGZzuvcO8tQrTf z-;Wp0s*{2MDlxK@7t}gV%LU_zJ{!D5`Aj@W%Dab*3@5U6sQ?i=K(p1^F$^y-i`}Jy zE);#Dx-;y}vF>;i!Weq|#j9-IaKMb2`n1*Zdw7`PKIHb!ap3VZ zfMOw}NGH;0-hD()RvPK|ZY7vhq6#<0Si^}FkkpmUi#RH*rU%r&qO`N92B7v=0EyvhCP@MwS;POZ^d%ddeI|77lkq*C0w9%_ z06zQ7luR$Yl?0Q(lf-oiDQH{|Ok{jNU_b#BF?^etdFKA0d?+ZU!NXL-Jji^WoV;{j z0WL<~R6Y{Y?>KjCD|MWRvfK}AK8{agYt-jJ>O#l%JHg{*s=aeypfrX&*!qZwofjzg9nAVfo7679eeTErp91$jj@f7W`1OfQFdiaS7e_^s+++&b2Q=RB- zhr<{?@P&ldfYURPtD*?C8Lf+@msiqL*?ht2;>&8`7N>0BaYj(AlO{3-nkq|6?*ikF z&b6qk^~8~jeULDC>l@wCh>U@{tHrT|P0 zAPdFYOETse5;}%+@{m&FQVfcoR|RP>Cfd1wcV;*jz)t~ExZ=5Skf28X2XSai5*oh< zXwh`#7{h*VBz~2$H9pJ{EHCg-2|BS>;79>ZQ!SY&VBBcro9A(u@C?=;HmvOcD=}_- z6j*kN!@W>94TmHso?nrWpfrdky0|qIh-8^?6JX!di)8qK;Dw@mlVT;5V@NL;iv(G0 z;HzK3nMHLioGV^BMqd*ea4GpArS`kAbWAG{!KJm;?|pa`*tpW&U!l;HIgrb2@4>C7`)dCtaF8u@6Wj5Aa%xT~g$33T~8 z#6pB`nbmv|1r=i=R-D03Sbz{-yS)S){1&Ehm;w?m6iEfPy(hDgt?DK17yutu#SlH3 z_4H`OR(z!}xti}MJ$tS0G#>?2L0I%R0PDN}ay{g8nPb_!mdp`|-b!9K!fP96@Kf~p zh|toqx)m*kO@?^zTqnKB*LWf8h!YURRC_yIW*YTwu{Rc@#nGZuKQodZHw4Ft$J8}| z3^+*hF=cTP*b1mw@-90!;dR?UQ>fj4Ar+`bgi+EEsTuAa27Zszfva4U8mW+^5kmQe zz`8LP`c^m##tMyTmKeD7SPR8)jW{{9$$RAeX9T}4lz)FKl z&CoCIiGuv?fSL`0*~abIp%DuW{2mo`Ccf5e$vsh~dG4M$`wW=e>>KWDAqGG#+eTeH zfqd--GST40^*fJT{9M09nwo1eYrr4*S*T}(e~dGFv|wrYq(xHfIyZN#f`oSX0mw6< zj&%yWG<<`J2#<2}i`vl5%Y@|iL7{dq${4Ojs~&O={~(>iKmZO@Lsy4e%*7$qsy5E- zn<*D9{w&zZEQU|l0YClD#|FCHn+HTGpc)mDqr!x7@mL0E@J9zX4bDJ>9OA$*t}w%g z23KSPaLhnY>gfsNbC(Q^)F@XL#~?e4I8jBP-p|Ci z3)ybXt_TSMi4i#<`l5x_J-cJ=11klHg)<>TT9upV9*-_}9{-f9Fuk_tb#2#VqB zOHDP85g`p5#IbPCS}n-Q=d3z^4{1if!{E*pV@;W!Zbu-@VFYSScS>CVKlwvpqqn`c z-33cL%*TLBFV!;x{rF-$Ex1ga)SzEteJOyG^#>ri+T&+8_-+)&X`<-16%8Xz>n<_!V5rQB1BGc1KbBCD?FI+lkNmS9k!(P;jk~Wg9TEvL>pAF&`Vbc@3pSei zM3(67BwBcv+&)T&G^uBeyW6KrhfsZbB_}PynTJXH7HDyYFx6fMF;_+!9Q{~p>`DKs zqx)Gr%$}y-8VG5GL-qApJo|xG?nD#|^bFRgW;t3MQ+qV*k~BL?c=;{L|;^*S`R zL?Le1B20i&UMqT!nN41e0a=odQAzrO`1^wG;I9NCS9tW1DDjd`V5=z6_HoqTQ9D+g ztQ!u_Nr6XcWvHh?(~gL@w};AdpNQd8Hf8OS+=`jQgY_4+nEfI5DQmR4Cff{55rA=G zVC)mOVvm{lP5RW=5Am#n{CKEj2NceDoJpVuCYfgxn~&V}HfH<**>0o=ESRBfASD9a zme4s67ucbb0P~+-teKvE4xZbX&WZ+?qfXB`88#e|*y};`VG^67W}8YVj!+PF*y(3M z?rs@sZhqG3K&Wo<-Nfj`z)qWN0EHG7A8OLfO1ne4t6sxEY3^D0GU$STB9mk#+-~04 zW%4VVl_VyvZ39!GX=GD~!;QMi<#w+AGhVTCJOq4?XiQdvyNB%a7cBTi??>tLHDsC^ zJz2{n3Rd-QHcllbb<@FhGQzdD(9Fu;q{@GELBCjb;fy8J=yz6-V9LOadT0Pp3=CwV zj!`1D@?UteC!AL2f{vDE{Lj%{6xYE{hsFFnU31^*!V9`W`1_Goj>qJYKlQap1dOtX zR$&C2vLO(hg51i`_2mhT{1fc28@d$`tyW##VO64XNncg>zSzFbYfIEml3EH;R+Y9G zm@F_5#YQp!-2Ysfa9YMGPCR`Mnv~D8nb#Ojw(uOD1|6P9%P$T-_Ai=w+4x0UTb|h| z0wX%S41~WT2x?+xKrx%;6;aQ{I`d_fn)!3DjT!L^UsqqspH{0`P9rZqdcEB8S-C2e z$q7VrzLyZ|JRbYyWC0~~`4yOE9{X4HG{^bnj{fQL{x_voi)S}m(6raZWT;w&c2KDF zOOMUoo0;4Dc>Q}piYOhn8A-#^a?Vz~zWcbAR;jqM z`ANHQRy%;C+zAMO(33!)*QydxDWh4O=zi0qJDeJ0f!4iwr~y4duSwOdRZ&hnuN4|p zmXi}Ut{1TO@>{%AD3+ z9gk9PAP5$F(WR9BN?9s%KYO|F43i{IgUwHQLq8AMG65g&A3iC{#Lcf2C znzcq!Mfgs?6WP$$<7nqwq%u2W*%;aP-B{J{2y;Z`@73AvhCby_6co|M?3aAm?j^jN zi&S%(J8ldEicSGP9-)5y{Z#Q(;7sc0+pEkG2C|&b1vbtL*bm9J6M2pxVB)X#S6i&E zJP=(AJzQ0T$dWQRfMbTwsf`c8jnEcFM#T|tKC1%mn2l9$vuRm9@5|jL!EarXsL*{2`r@s=~IIQOY7uQ>{ z$;-&h2>RhI8-9ZmUs4D7VQ=`}wxbE`XhxEtn1|qVTV^SC$w0bb&KqVn*zq(-n$rt? zZ-4(`Ava3+sH;$6edfpTtaR|rW0?g^4+_6d3&Tp!2wdM|4lNddy?Ix0{l`7UFI*iw ztBSxAWpK)aZ|M}X_CD`plH8fMLf@3OdMU?VU=&}^Z~(JtA(HqBp>OwzKLd(hofqd7 zyvw{;Amn)6MJ9zefc^Uo%AXDTZ{k~)FV`i$Ut!w5!Y*gcdU}?A_A`eYo#oecsXqm@ z_j{a*$-np`&~sF*(%!FMXE2+4%qG06Wvs0;#fyZ|#$ z2;>6*1D#3?HejX-=Tzp>D$!j<5V&I{aXUF?I+QWgEYz$0 zWot|p>FZX*st-)o%llt28bVyk&N0#^WTan^MakRb>Pu^rtJ7u6$|-L0DK#0YvROIu zu)6wcRp}cYE{HqzvdWi~Tkln)I;jq_{XKVs5Pc&VvV+qm6ZNY1T~SYJiY{I}PndhU z3U<#dHaVgCZ=tN^jcnxQm3Q7uC&$Gj5)jcIBdTlm5AR59{t#=U6~@`yafbV}+6>5W z)Y>YW7S2A*te3F7e=)ZiB<3C8a+h-SGPsm6zHnRQ_rV2(1cpbJ;-`G?ElZ&grRU`j zlD2%T;5wgskm$`i#N;JT&2nz17Or=0q|{(FL#SZc7Y=Yb`3on9T9%bbPIq(DnPa^x zcz_tsCR|#Y)cH)$Y$7G_6D((vZpmO1k} z&uKhIW$6RG<~UUs*O8l03(VdTsb*t!a4I-n*IrMr17i3Mb$Fl z0#=%MY_}gaK4y37`#UFM=ZwPgj<__2C+x=8goQ96tM7=Qfg=grIjUE{gK<_PK{>+* z;C$lVz|m{6zPMRZ&fdr?FAIEphfidEF=}A2ZKRj=v&qOgaTZUs2+0mL^eQH)ExJBI z2XI1Nv9NvcTfs>M*W1JyWwb?l=`$Th%vqinjz}C9(Dlx9>AlG?ZFki$=~CAcW1;+s z75JT^6E9!3%3o*-+_5+kuy$@HuLeH@HSX+soue*9OWyhZE?0f``+Ks9!jH8Q=g=P? zD*W#JSg(oQ{jovGQ24o7S04IvtMS&IpW7`xyFYi@A1nO&*tHl+|MjVNXXynz0(V8c1T9OLO`QLjnB*vpe@B9R5;J59r6FUpDD6^;1Q~VbRu>?o%sY zX?8OEBzFM&Z18Di&SNTkGRr;z+8I=)kdG+}cRp}jH{iwRYoV$gPi6kSXc{I@!9)4t4qKF zKUvdk`*TaO$i32ME;VzGpo1ViRVK%~60pZzf#FV`#b#=6o39{0uy}o+hL5>5c{bA2 zAw`%y)uhPRA-T0xM2@`#V{i`}>2rE2NNi1gI%50|f^4+T1uUSD`Jpc807u^(yxRj7 z_(h^=tDTs3s$Ate)&$-==S;~^Hm{e|~cnGB&)-cZd|{e%&$ z$b>BizqU&V7e45ffrGWg3zEYk*N{)ykBP}7I4UVU!$uaml0x+3fJtW>Da+>ORlqrlYtp4< zDl1et(u&J&G^!+CZEau~_+Vu$7#gRrC*gJc~^Az}6gh{*k zL#aO<^)g)bX@H+LD|bz%luM9FB|{$)l%;emn^7c;IAZ0 z3vdA%QQL4@$1O5lu+jl1TJ)^YQcAmc`(Vqs$xcR`QAq%bnqiW*?)>7DZM0)ArA}09 z_FVJC=Nt50_^{&m>1p}}Mm>&NyO~_6(8Z4aO7#FvOIaHybk~-t$F0O4Lgy0P>P z|JPxO?_<~N#H`#;M)^C^&4GQdes7>7446Ll`_TZk&o73O_r!52(WMAp;6(BPqdRWB z-gpFks2E4bxg}oQ^h{*k=ElXtk$RrELDO;J6x6&kF~M@AXAzCa-#iau81RCQDad56 zbj|u`TJHCV^7BlV_b?{;d!LaM4?~t8?qqD>=18(|gvlscK6CTDDX46c&OYK<@!^90 zD*^#BO9((DGekP9dz;s_8=SK5XfjFBoyam`wi)9gRC$wC4Vhpz8uRfQ56Xc|5^EqW z#)0*%3%U(m2q*?|YmSh#&B2CZ`8u~Ptg_*xxHuN#Te|_Ub>R`R?$T0y~jFj1I%vs z=Ja#A_?nj4Jr6>nZrOBvJrx25VbruN?S@rc}D{p76Ch&-<+H;0X59>)nU1N7Mz@ecc*#$x?HQA6C&bSFTB!3M<%}RUv4138Co&mU zp0%R#54_~S$&|^d-EAWvGM!ZC+esgdJ_&s$moaF5ZP{vQc zmmGPgh*RetG0%_UO?mXXtT2v!rI}-8*Z6-t6Bj5d++X5BDJ#(5vR`;;hns7xFTNoc z&SGHG)5S?lLeh|HZ$+yiSCfG>*-HUi-lukJtMF7g{N*J6H$$BDdgdManVj$iNUQ;z z@=rbwJx}2GxqXH~#LPcwVGQnI4xg6N4)dA(vK~b-!v>Vaa>6sc`1DY2;fBU*OrnWd z*N-FYt&EZRa>-^EY#&%OF9+L{*JK^jOHI|0so+sZ_+WqHq$(e{`yTm_N%$>Bqwh-g z*$rk^qOWMz8t27N-DtQDn5MJj-JLk0Vyv;JaYHIYX9&mXXsOTeR8~m9kS9kGZ9b>s z8Fv$%@Yjr}vn_{{(3*N>!!b*T&nrxJOqn_crp~xH+<5tRxxv)gt*V%vgNbJjSs!R_ z|ArzdlW%$~j$dguS*yzrlcx_U+rb)N<8CE~3ppXP9deocfg8e9m1Z)wRU$0X=C$|n z2QvIq*vuA|R+5ga80JZcUPdJb&`Pdj3qpeBW}C-~#UxNCTPX~#=n$FGlO^{mH%J8k=$uhRo_=I)Vf zvcrx2Hn^Sc?GiiEH%*{*Y(aO^+uOHazr$=%Rhz4Q70YIfL_Ul$Td_QcCcX)!6; z#+m7liE5m!EvLzVUQ*-bo&{xiLq* zO*4ILsII)b_v`tNlk%@sE`OzG1~rNv`ZjzV!5n?zr($aqftnq zEeC0YVe%{DYnS^u$4sOrJA8v06!o$TLs%t}%JE|p^m2cvP#@P&57QdARKo|h#9L=5 zlp@s+_wSy!yIq+Lz@^y(rIIACEA^Gm&l->&`vX_vcO^#UT`K*JoN@AnLCW`+9W6e{ z>2y@mxKY}aAZ(;|;5>%f8<7VlrJX!?*J~)1OS|rq@2}vSyn_ZhRXcul)YP#?+cTMR zqN>~c9Qi`nKe=6Yy_B@zOJ$V69Kky&%)C1niQx+u3oN;I?tfemp1is&)FYztk?U#9 zN9xm~E@1RA;-kjgyP9CjBisx^of6>e&bc`)N;|*3aHQlSf^qRY2i63hw zC`RGW6+T}`ip_0Rd}AiTQ~^)$!}(Z;8PQyZqg7*s4Khqb{H+V%UPkZ`L)KY0@4tG5 zP>~tCuxMFSJ@3~oW#NSl>;omb1=swMO9~gU;&zeVy6(@`x zQ@Us1h8k*;0$uN@4Aw?$ZyJ(v7YMu|@t5D0Q;hHx0Z{0W>+n^OWoA=Rxe?f^mSJ%- zWD;CS-x451n8Q;|xhXQBifO_bgNg9YDW->CwzpgJDy7`cB+`ayRjUi(BR3;X9rIGw zPL;WZr7B$z!RyZQIONOBK&^nE0ls}j;bnx89ME={n zgLBBY1sA{8Z!g?qKYd#yWXK;b`ILtoF8kkVJzNRy`E>X){IUGe|JmYwi<44+8zi=FPCsxbw zzU?dR6a0(jDf)c)d%&LClA7_8p;Pv&ew?~u2uGnSQ_fCS(^>C*#`Zte@64W@q0}<_ zc5PX4ATccoJXJh-SxH1!{dC-y*0HW2lkN8lvGdB;P@F*wy~VkRvt7bCgqab04drht zSwhl5(gBY7_dQOL;_@ko&Go#NQ}-4B>l=m?{6ip>m+|U1!!h6Sn^yrJ$Dx^f9-dz7KUPzcHkWgx-qEK z4%&8)M>otCC+jfH&AE6<@#qUz*)YVN&iQ$er3Tvwh^0WPuaHm6iU#;8#+1c|~bebxFmwnzU=RIh6W_o3%BKjSa2Mw<}BAZ{F!H?rbXR z?Yh^W_wYKIdjHXA%JAKR&atV&y2lSETBhf3wdX!xSgF6AzWkEbHd6L}weKx$W9`X} z#m(y1b5B0(OzvGhT>maL6?Fu zH$_G-^Q!!mIm+@hEff_j^ND5mov>iy!FD0p8!RH8X(W7fQSm!d#kj?FP-#{_T_L|0 zA~0buIeGJRnoM2>Cw@NN`L>#Fw91=jE#E5K^0W>c6mxBEoZ`%xZ;`vHNx!5;I{QMN z+NyoO>5uOt4m^G5sI=cgZZ?<}@^PhPWnc<4!agZ>TBE$F2K%KffO@mi2hrcmM0g z%uS2y*8LB@?JRW$y?NUI@Mw=VoD+7d|4YF1%2c)S8(D?Kxm~3cua-yAzn|r74IH6r`5U|NO=%?8)uu|28$!*0(H!xHa-3(@U@n zn<>2OuxP(-CSIgvnOyI6_6zN(HcO?b;%0u=^cpTj?cN3UH1>CmD;fsem7FeD6eXJ0 z?06aK7E0XYmrI=mRC$ZEDG_Ebu1E~|^OeY4mRNT_vf)FE|Kgzkb=ZLaNm_%zKlqvvMs!aGwEqX< C_s;DA literal 0 HcmV?d00001 diff --git a/src/main/resources/deviceConfig.properties b/src/main/resources/deviceConfig.properties new file mode 100644 index 000000000..ba7e9922b --- /dev/null +++ b/src/main/resources/deviceConfig.properties @@ -0,0 +1,35 @@ +ad# +# Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +#[Device-Configurations] +server-name=WSO2IoTServer +owner=shabirmean +deviceId=t4ctwq8qfl11 +device-name=SMEAN_t4ctwq8qfl11 +controller-context=/virtual_firealarm/device +scep-context=/virtual_firealarm_scep +https-ep=https://localhost:9443 +http-ep=http://localhost:9763 +apim-ep=http://192.168.67.21:8281 +mqtt-ep=tcp://192.168.67.21:1883 +xmpp-ep=http://204.232.188.215:5222 +auth-method=token +auth-token=79d68b50ae5f5a06e812889979b3453 +refresh-token=8bdda6359dddad218cff3354d5a8cb3b +network-interface=en0 +push-interval=14 +xmpp-server-name=localhost \ No newline at end of file diff --git a/src/main/resources/fireAlarmSound.mid b/src/main/resources/fireAlarmSound.mid new file mode 100644 index 0000000000000000000000000000000000000000..d1a2241b2d87d668b9cfa999f05be6a8c477d895 GIT binary patch literal 6719 zcmeI%&rc&|7zglY+L=<>4Yh|&?8cA@YYBz~Q>>7XY15%lD8d3Q;20ul)6PO!VUezl zB_jA>{7SQ2H^mm&olGP zJ2TJw%nQsdZ6t}vMjSb~-{+QgFS9L)3btqF;=7mCUGc&NDl7>iQ=)>x^OooARCwK@ zZyniZ(aJrzM}?QDl;au|toEq-*4yfKLZt$Kc4|(XP&287Dtca_g2?sIL#L*l;W)d+ zZng7vo84jmhaR3M@uFtoI5r@T74j&7tuA3Ml+h^A(|nnUn9RJ^%MC?8rCSRNy9|p zqwdy-9l}CxB6d_wl!bhVvXHM)v{UEGKYv0mOzOaOv1ji`S+G)I72q!yM?-gK$&)2t zmcm)RCfpglEIb+g@%u8YJ}8`lr{QUM8lHylz<1y~@E!OTd<(t>--2(#H{qM`P53%| z9lj1TiJ4 zj(9>kV%4&Dy!ooa<(m1j>>~!u@{XW|v0Y0q%^(uMW@~Y*AfaKy!a%p(<8= zd21G`#eBKg#|dqJWIv&dl|INX{!Gp~EJrK5)l2?--C-@~s?XkXs_T1CZdgz0B~~6h zO_`L?%X$e}Tn9!8eYYqauoC){0(8)@jx2vXvW|*LbFoiS8eP@)-n*(Sq?CSROI}FH z=YAol0rla^&c}=8Z6-5oD$g7KkjA<1 zdEr*qLgV&p)f;(FRr3|a+V)$_NrxooVxJ~7+R*lL357P4jIkxthOGWdP6O)0m7R|l z%deOuZPPi;#`?rgd5PW7XN%Xie~vw-2nC}w5uwQ_g(5T+rRj^ggnnb$GYng3rkAFB zX|k8bZ6tsFPUmmRiG2{Ir>z&bMB@?#C7O_EQlgMVQxZ)}6qablORshppNDWr(+-++ z(72W4$DEh=OCayMU7nZ14+8%e`MKN8mPL>8IxFVP#Xe(mGNtY1*_=!%8DmSPl&n4= zrvdfh%Ff4&RvUB~RX0hU}ZIZNn zolU}Kd0UOO>6BH|#_TtVQT=shbKNnf&5vo}PO~Y)-GAh(te7ts`+QN`dw)^M6o1O< zZ{)0@Qpnh)c00dPb3h9@YIC-b;>O5-AI4L1DODvg(tL&EVKI?&xbBup!Y2Imu5g!? ygz*a{MNtMz>YM7$#+7aMZ + + + + + + + + + + Builds, tests, and runs the project VirtualAgentUI. + + + diff --git a/src/main/ui/manifest.mf b/src/main/ui/manifest.mf new file mode 100644 index 000000000..328e8e5bc --- /dev/null +++ b/src/main/ui/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/src/main/ui/nbproject/build-impl.xml b/src/main/ui/nbproject/build-impl.xml new file mode 100644 index 000000000..112454207 --- /dev/null +++ b/src/main/ui/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/ui/nbproject/genfiles.properties b/src/main/ui/nbproject/genfiles.properties new file mode 100644 index 000000000..a6df38fd8 --- /dev/null +++ b/src/main/ui/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=e60df945 +build.xml.script.CRC32=7c331eea +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=e60df945 +nbproject/build-impl.xml.script.CRC32=4fa004f7 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/src/main/ui/nbproject/private/private.properties b/src/main/ui/nbproject/private/private.properties new file mode 100644 index 000000000..e59ac1df6 --- /dev/null +++ b/src/main/ui/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=/home/charitha/.netbeans/8.0.2/build.properties diff --git a/src/main/ui/nbproject/private/private.xml b/src/main/ui/nbproject/private/private.xml new file mode 100644 index 000000000..2f9a6910b --- /dev/null +++ b/src/main/ui/nbproject/private/private.xml @@ -0,0 +1,9 @@ + + + + + + file:/home/charitha/git/IoT/iot-server-agents/FireAlarmVirtualAgent/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java + + + diff --git a/src/main/ui/nbproject/project.properties b/src/main/ui/nbproject/project.properties new file mode 100644 index 000000000..fb798f614 --- /dev/null +++ b/src/main/ui/nbproject/project.properties @@ -0,0 +1,73 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/VirtualAgentUI.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=org.wso2.carbon.device.mgt.iot.agent.virtual.VirtualAgentUI +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/src/main/ui/nbproject/project.xml b/src/main/ui/nbproject/project.xml new file mode 100644 index 000000000..438f1e6a3 --- /dev/null +++ b/src/main/ui/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + VirtualAgentUI + + + + + + + + + diff --git a/src/main/ui/src/bulb-on.jpg b/src/main/ui/src/bulb-on.jpg new file mode 100644 index 0000000000000000000000000000000000000000..51d40cd834db53f1bf305997832ad4c5f7a00356 GIT binary patch literal 6942 zcmb7oby!qg_x23K&{9J;14s=ul$3M`gM`wdq#z|-0s=}62n^jJ(lvlc3DOK8-Aadm zNQa=nZ+zb8{eIu~=eN!|*R{@G`<#8Qv+sM|Ywz2++Z6!0rrHBF01#_1APfMw{R&V9 zfN*gBo>;@ho?rqn7#9~zgpZF$Kte=9LQF(Ve20{h{0=DvDKRlQ4LJpbikh05gp8Js zhKi1oikj;0OMoEkGq_+vFqn|)4)GnT|8KkP0#FbDN&xL3AO!%20tli2-u3{P001B^ z2nhJU3_B7S2M?bB8)X0j0XY9}6a)t1;Nsmb07$UyIOHI5>-!aCTuJ3mRK#sC0#-~Ntlle0_H&yVF!WCoLCKmDsLVVM0l zKHajYnVIuPy^Gy)%xN^Ind8QfKW|r9KU6!RNC4mkV4(Lge`Z>#T{_;$R?4}y7ap{? zTigQf2VGUB_oq3WdQ6R7>`H&Vd@^t1m}cM|yWjkX6X}+EkuKTU@I+v|^pgLEciXv1zHBC$8?hNLzH-hjViwbG7tm5)iy!5|JBM-emmS_afh+SC{fM85tZzr$xB= zo&f-)PO$XWy-R`fmcS6*OQP!=X=IJI8UKXRCpyGRyug&3$)=2VW!1{Fce_}2LKG`om#KFwZi%)Q~O_(@1M#iPE4X0KS_D?@i*r2^E7#H zMnYTP=C#z3sd_oyd$AzvnGXQ)G<}uTI1TbxJ;)hdoN=i1Y59=Nu+wa? zB$vl?wl4{Jr?6l8?h7pbi;WlETe0|MwOsDCtDE&UQ;oj*QKR*V+crQT$A2$Y~%r2YRcie8#^mMK|^^R{z^rwQ}!e@G~2e6$0R3a%ZPDQEi zU%ZRbZJr0MhqpaGR?3)WC|39z{X3#t%Y$$0OT|)Rgkl>fpC<_u{u2P;WWCMu-rlT~ z8u6OE8&~^pD*!GbCpy!xWGJ!qb*BLH?&*Kq!MTj~t!g|cF+u34|F!{0iNpQb{@$@- znJhq#^SAq@9XkOz>QkWch zIu&fu3hmbM3=$jD=Fu8kNBy}8QV7<<$#_#?w2}qd>qaM*b>~AKTRo2VEIeBK!1pwY z!+t>Axk>N2C)GHA@>dV06dS4}aaoQZgfZl$Xx*w+^x1-h!)d~MH-3(YAiKwkskKXP z>N5~3ex}85`yK|jfW-NmbE-49th2cr@0twACo2&p^!{8lBeXmyy#9KR@6n*E>nuFd zw(8|4nHk7qRs9e-Ik&#mGEA#-GfvFfqAN1_VDtD|Ik3;N_UGjI+3RU~1KYVBlBP0O z?h81fU*@bJR}ZqedGJST;=lh>uv*bTvA6o%C$93T)M z7pqABq8N)<3QAmZ2phYIB2-vGj~Yw`x8e}h{Rg5TAW$B-`MCfkBW>$*5A95T(|hF- z;{3(8uLH@Pf+?7*bv`$yY!V}WLrQaO zS2XX+z2;Ps;t#d3{mx*6`uQHS6ZB*(eNX8Fkz@4PApghv8A+9Obpw=^UC@{{0|;N~ zuKl>vYwz|0w7GeZ{=Q}>CNsU#p?ZRHdaT&=nsVQSav(|Be7lMoT4Z^qZRo=6Jj4x) z%Md3_Of>J6wVu+pvu)%`q`OQs$?C3Ecq8GW?Qgtp%shivW za0{>>ClPtaSo>6?oMVTHNcJ92YF(ek%YktI#K*`VYs&mB+$=D-W@Gx=)6WTs_3Gwl zeyS8}qeibypz|~$=o2WcTGf+3!{w#abBhcYl^rGqu{v?vY*r1yJp&smg|2F8J=-Bp z?f5wruCV5mIXmsAx;tUs1!KXB1EK$wMoc2x5)MCWCjAUi2^tA|1b0AUC>J;2OgCNL*Ct=AT^m7e_ciY`KMl|KDVX z&2<#)l)@qqDk!;vA{!j6q^zrF<&ORbNLbLx1Fy}P;&sn5_D%NZu}6B1^O(*s1C+bGm+RwP02c_5d+6;w{jFEJ2!Ti>J-cWz6B6!IqxK_a_Fo2 zJ|yWI-d#=kS_g;xgd?&Wp18*P1rD{lt+eI!zzq>oeAlJbafy8_BCvL{lsnOdd7J0uRk=(YI1LzlXYzAT47mmPCG46 z-gu+e){{k9?6{HC4RMswL5}bEK8YNOQUx5Y%GkMRGUyr9RI}zycN61q8U%+pkp=a9IqxzzjC{i?^E#R0&t=2Dp}v|g z;~@-mcW&&h$4BN>2-tm!qI+8EMOk$m^xdsnyEzhM!+g_6zn~7I%53Lnp)p=YI6M}` z(a;z3-b5O$%zfG{S%)4kBWdO*u7$LN5zem3MwU@MT1{i)JkCS?mwR50@r;Q!9)ZD{ zM>iUA0V{fx2V!Ej$^l$DoTb#z5>$D+{pP z1FnR{O#wL-o4!YABD!;2^pUma1RiHtIO<>B#FNLFaxn`bq6-TCTrTgN~I2a&gCErty%f5TK*A)fh#GCxc- zHsT~LtIwaV2(Sff&J6JUg zQy$m%JjG?44%+<%-q+vJZ3;zWem@(Sbw{8czVN)dzv-j#u3GV@3&AgrZy7(YB_yXN z6$(LfWV?QDUnCzgb;#v;F@5jXym1QNUW0#o1P(CcctRqOvRr1+#%v#gmR?)zjLq*? zGk>(~u=2aoCrZ{+Ct?ufBCE_F&qseoaMT8K{NdkEf6PVP2HPRMQK^17#(cy5tMW&k zp)ba=xUNIDe2L_P8RJ)S7ReYuhz?zRqtmhW`!EfBN7m2IAJb=+zXhZUMz(cL1oQ1Q z5Pwp-8XT5c8bv+hxJmgr20YNxmFt+IW$AAC|tlsI7TM4^|q7T^=5(~yV zSN~g;$+KVakz0a>mpJ^kH$r~tqz z+2k2{lkC@jedz%n{aQ1`*;_b^Yc!fH=YFM-VRwv)5^?S$J8<-8s5ne6rvJFeN+Huj z->Uq9HNRQ(o78=Oxg#O3p5QvBQy03-5b6fTx+dDhfltfMhU|>p3XXsozye2fqoz-G zsnfU6eG-{AfYlHy8MqNr2)USIVC95lt~NM^!#!k5PG9iPnA}=h^M5l ztvseO5K16vxdn7Au#<;P1;fYLV*DNwQ}+5PZQeDPCTZFe94U6WLc-9KeidtG#3U(w z!hxX6kBe}rvdniip|YsVDOX4p*Ukh?xhkGAL)P=^`1>CuZ%4uG4{3W3Ls3~Yx8{x9 zs?%VaItN3-{PoCw3fUmR?zfmVhx618VJ#9*bMLFcN4y1hz*qR+9ZoIHGKKX&SWm2u zT@yAsk%e4o_|e}25VdJS0YuW*DnX1YU4krDuUr1ycNFCHP#XSD;H=22j!Rw62!F$n z`-cKm6YAxx72BHs3p7@2wI!{zX<0&Xv65%pU$iVApR-D!66PYAiCjCAWtG>(y^^xI zhJJ+K#2iMI8%T}gv(b~@m{N>RQ46RlE9l|bLZ?4*{d~RzP5$7zFXt(czOg@a71rO` z1g}md>~f2-!&w?{pT&PxA=Z_`mh}Ga3){@*an1Tj{$QPgH%ICfaxOWmbwjYjs<#mz zaqrv$_)=K)(lYkb1{+0!<@z~z7Dh}pFRbo3RAtAmx;JS5R*Q)TzS8~p{I}L`zSg@+ zV|Wq%g*;|jjNAKK?SfpNOw206)G;~5RPdW2Wm@65YRb!D9`i2t)3~n0NY9X0g2j1 zB9E2kuFIs825I$Apv#e1od2`60Qg%2lB3jY@M);Xoj6gfaa>F$96vcx5A+H2&CpM5 zQBNMLt%0C_-9_nf)B6`myi___1ED{(ir}a6WWRRkAphd_}4-F?SLgWFSZu>TZ!QQ?=}jM zf}CB1O%baixdKvi_74T7EBMpeP(*DNDnCPU6w4@j%84!`KOR__c8ye#?tq^HjUH1H$;tgc4ZtOSRtPEs7sGRcPWhixrycnUcm?b zr#y>%egU-zb zJCvrJ1jUyj&b31b$AIs3(2{$}xk69EPPAVmdD<;3hJ7reXzg@_w@kC&5|lQZ7eWRe zQz5+P_WQN*F+0AnG~Qvmviw(#D$qMSL*vm|Bwr|GtaiA05+3#~M&B1VOI;_EPO6$*)K5K1se;RXGJIvM8e>}^So;BrVPC7Q2G5o(nh z8o_wB88^_GO-NX#Y};YqEyZ2-;<~Iwq#=rIfg49*PSWkq-x`&d0=q+qg$8y_j`yF% z4mRok#f2~y7z&}f?ggFWhl%K;|5KlmpYCnxn{XX!yktE%kPpAQ1!P^a&OmmrG#(gF z$^5M0N@kcjbgn@L8)cfz9g1&A$VGIg*t&+slZ~#(w_O{y;o-oygxcE@0imA$rkm*5PX}h!>+8Ryd|ck>BwI({YVJ^JfAPMJ?>8*&= zs>Gf)vPt>%TY$B(#dZ&i%cu6e^ivO(V%elgb=XS)D?8nR)(G^4>tN?RfDtajQY?{* zw_r06 z2v|Ayc&JVpde|VLy5Efk1ROE?fx^FHB(w%~2GwJork-O|MnH>00>$li{(ceOY-z9R zPw9_9lw!94V(e0Bf==JHf9Jsk=vP>9%2W{*ZU3SC-`V{u>HqNlzncE9q+7YOg(i|0 zV2O|JJUseeO((y~2u4bG{m4p{=VOh&zMmHrd04U*9P|gub-mmb>?cpTeo(SzYQQ{s zBz_Cv1!aNC#jK4gwcb~0ML^$?kK1i)x4(LEfHRA;W-9Ku$2XQ7-?R}*Et_Tohd*nr6rB`HhgGVW7|A})gk+5d6}=?480$J6P1s2Uu`@P4>YLSGo{xB z#T+1LyoehJ)3x>u0?T`-B_W1?9`nv^@5&{Eg}5ZmefkQWPHeJf_x9F$*ry#z4O<3h zDI1C2UaMhV8mGqtWelxezWN0IbV&0-_G6Co84HmZKyRW>_lK^2?pReYhlEoPMLB$M zX9^m%o}V_u(s5A<=5b?GaGsAP(}a>Xr>3V=4)+HaL^}ysiRGv$ZGbG0#fO^DE5C8l zEP*ax8xQxF>6)+@$OtoO5I;Q+*KU>7vo&#;HZx@As@Oj-(m_3{$k6OYEbiXp3Wt2t zP1}twKACH7HT=G$>+D0oRwBI0y|lh8qZ=OE-G_nj!rtElUW0{N?jMJmcQ-_2v`%+9 zE2Uaf1)`q>nC`tQn}kqWF~3yjq)|-9Z$p^LvT+#M%<289jfb&v&P!g^mgOK8r%c}f zH*89Re8KXiTs1FHiTw}1PlAew6`oE$5WyW{MHa|_LOw2nPx^DW>m{#p-`jih94o;H z256}A=QlfJbYUJ^zCc3gKr=z%7hlS?DEENZq*hxy0^JCSPYnXURh|-1#uhf!vW65^ zwe>%DJ%b^NYVG;<%U;D)Q12^`@YC!e+;j-7x@6;x&FhE`5b!(E5&G&~^p-AvhWu#& z5#63@Pp+9XKZxkr;rT6T7I|=Oxop&>3fe!YpW05Yd!0s{2C1*a9r|wUA5bDc9c`kx z)A(p3>zE;EF!&*R%xDC)6X}r@%PrvKfCPPiw>G3zk<&<04zJbUEje0Yek6MR(wvrh z)@SGo{Ks3FGt&Dg)N1-r(lA55Qnu##&ldMbYQDHag(rsM3kBgS+B9zax?%aC7&}>p z6EK}Lthn6)%3qk}HXHD^AR{9yZOBjni->T&_@Y{ogt=-# zzKOEu1x5;?d}(&19dp0lNI^_A7M3Ie*Wpq0zOZe?-Nuw9v#`j!v#mheGHQa<9s0fO z04V`#r`XE2ttb9zq8rFlyj3MbwM`zil{;2)#Ccg9?|7#teAT2=(8;*Pd4x7ax^^@~ z*;F+PPrDtK)3e6#8mks^v}na)UwSQuIGAsuIh@xjzWZ#MF%FQ9;6HWAksND!c z`$H&iK2Eq@?ji)_Hx$roPm(nF3t*YP@NrmSY02*#rDdo0@@Ia$Cw%VE-N_icK&|=={Sb$ literal 0 HcmV?d00001 diff --git a/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/VirtualAgentUI.java b/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/VirtualAgentUI.java new file mode 100644 index 000000000..a2aa2116a --- /dev/null +++ b/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/VirtualAgentUI.java @@ -0,0 +1,37 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.wso2.carbon.device.mgt.iot.agent.virtual; + +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import org.wso2.carbon.device.mgt.iot.agent.virtual.ui.AgentUI; + +/** + * + * @author charitha + */ +public class VirtualAgentUI { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + try { + // Set System L&F + UIManager.setLookAndFeel( + UIManager.getSystemLookAndFeelClassName()); + } catch (UnsupportedLookAndFeelException | ClassNotFoundException | InstantiationException | IllegalAccessException e) { + // handle exception + } + + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new AgentUI().setVisible(true); + } + }); + } + +} diff --git a/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.form b/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.form new file mode 100644 index 000000000..23b70e036 --- /dev/null +++ b/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.form @@ -0,0 +1,803 @@ + + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java b/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java new file mode 100644 index 000000000..470a7d8fe --- /dev/null +++ b/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java @@ -0,0 +1,744 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.wso2.carbon.device.mgt.iot.agent.virtual.ui; + +/** + * + * @author charitha + */ +public class AgentUI extends javax.swing.JFrame { + + /** + * Creates new form AgentUI + */ + public AgentUI() { + initComponents(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + lblAgentName = new javax.swing.JLabel(); + jLabel2 = new javax.swing.JLabel(); + jPanel1 = new javax.swing.JPanel(); + jLabel3 = new javax.swing.JLabel(); + pnlBulbStatus = new javax.swing.JPanel(); + jPanel2 = new javax.swing.JPanel(); + jLabel4 = new javax.swing.JLabel(); + chkbxTemperatureRandom = new javax.swing.JCheckBox(); + jSeparator1 = new javax.swing.JSeparator(); + jPanel7 = new javax.swing.JPanel(); + jLabel5 = new javax.swing.JLabel(); + txtTemperatureMin = new javax.swing.JTextField(); + jLabel6 = new javax.swing.JLabel(); + txtTemperatureMax = new javax.swing.JTextField(); + jLabel10 = new javax.swing.JLabel(); + txtTemperatureSVF = new javax.swing.JTextField(); + spinnerTemperature = new javax.swing.JSpinner(); + chkbxTemperatureSmooth = new javax.swing.JCheckBox(); + jPanel6 = new javax.swing.JPanel(); + jLabel20 = new javax.swing.JLabel(); + btnView = new javax.swing.JButton(); + btnControl = new javax.swing.JButton(); + lblStatus = new javax.swing.JLabel(); + jPanel8 = new javax.swing.JPanel(); + jLabel23 = new javax.swing.JLabel(); + chkbxHumidityRandom = new javax.swing.JCheckBox(); + jSeparator5 = new javax.swing.JSeparator(); + jPanel9 = new javax.swing.JPanel(); + jLabel24 = new javax.swing.JLabel(); + txtHumidityMin = new javax.swing.JTextField(); + jLabel25 = new javax.swing.JLabel(); + txtHumidityMax = new javax.swing.JTextField(); + txtHumiditySVF = new javax.swing.JTextField(); + jLabel11 = new javax.swing.JLabel(); + spinnerHumidity = new javax.swing.JSpinner(); + chkbxHumiditySmooth = new javax.swing.JCheckBox(); + jPanel3 = new javax.swing.JPanel(); + jLabel7 = new javax.swing.JLabel(); + spinnerInterval = new javax.swing.JSpinner(); + jLabel8 = new javax.swing.JLabel(); + jLabel9 = new javax.swing.JLabel(); + cmbProtocol = new javax.swing.JComboBox(); + jLabel12 = new javax.swing.JLabel(); + cmbInterface = new javax.swing.JComboBox(); + jPanel4 = new javax.swing.JPanel(); + chkbxEmulate = new javax.swing.JCheckBox(); + cmbPeriod = new javax.swing.JComboBox(); + jLabel1 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("Fire Alarm Emulator"); + setResizable(false); + + lblAgentName.setFont(new java.awt.Font("Cantarell", 1, 24)); // NOI18N + lblAgentName.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + lblAgentName.setText("Device Name: WSO2 IoT Virtual Agent"); + + jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel2.setText("Copyright (c) 2015, WSO2 Inc."); + + jPanel1.setBackground(new java.awt.Color(220, 220, 220)); + + jLabel3.setFont(new java.awt.Font("Cantarell", 0, 18)); // NOI18N + jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel3.setText("Bulb Status"); + + pnlBulbStatus.setBackground(new java.awt.Color(220, 220, 220)); + + javax.swing.GroupLayout pnlBulbStatusLayout = new javax.swing.GroupLayout(pnlBulbStatus); + pnlBulbStatus.setLayout(pnlBulbStatusLayout); + pnlBulbStatusLayout.setHorizontalGroup( + pnlBulbStatusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 0, Short.MAX_VALUE) + ); + pnlBulbStatusLayout.setVerticalGroup( + pnlBulbStatusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 167, Short.MAX_VALUE) + ); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(pnlBulbStatus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE)) + .addContainerGap()) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel3) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(pnlBulbStatus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap()) + ); + + jPanel2.setBackground(new java.awt.Color(220, 220, 220)); + + jLabel4.setFont(new java.awt.Font("Cantarell", 0, 18)); // NOI18N + jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel4.setText("Temperature"); + + chkbxTemperatureRandom.setText("Randomize Data"); + chkbxTemperatureRandom.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkbxTemperatureRandomActionPerformed(evt); + } + }); + + jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL); + + jPanel7.setBackground(new java.awt.Color(220, 220, 220)); + + jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + jLabel5.setText("Min"); + + txtTemperatureMin.setHorizontalAlignment(javax.swing.JTextField.CENTER); + txtTemperatureMin.setText("20"); + txtTemperatureMin.setEnabled(false); + txtTemperatureMin.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtTemperatureMinActionPerformed(evt); + } + }); + + jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + jLabel6.setText("Max"); + + txtTemperatureMax.setHorizontalAlignment(javax.swing.JTextField.CENTER); + txtTemperatureMax.setText("50"); + txtTemperatureMax.setEnabled(false); + txtTemperatureMax.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtTemperatureMaxActionPerformed(evt); + } + }); + + jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + jLabel10.setText("SV %"); + + txtTemperatureSVF.setHorizontalAlignment(javax.swing.JTextField.CENTER); + txtTemperatureSVF.setText("50"); + txtTemperatureSVF.setEnabled(false); + txtTemperatureSVF.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtTemperatureSVFActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7); + jPanel7.setLayout(jPanel7Layout); + jPanel7Layout.setHorizontalGroup( + jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel7Layout.createSequentialGroup() + .addComponent(jLabel5) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtTemperatureMin, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel6) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtTemperatureMax, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel10) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtTemperatureSVF, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + jPanel7Layout.setVerticalGroup( + jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txtTemperatureMin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(txtTemperatureMax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel6) + .addComponent(jLabel5) + .addComponent(jLabel10) + .addComponent(txtTemperatureSVF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(35, 35, 35)) + ); + + spinnerTemperature.setFont(new java.awt.Font("Cantarell", 1, 24)); // NOI18N + spinnerTemperature.setModel(new javax.swing.SpinnerNumberModel(30, 0, 100, 1)); + spinnerTemperature.addChangeListener(new javax.swing.event.ChangeListener() { + public void stateChanged(javax.swing.event.ChangeEvent evt) { + spinnerTemperatureStateChanged(evt); + } + }); + + chkbxTemperatureSmooth.setText("Smooth Variation"); + chkbxTemperatureSmooth.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkbxTemperatureSmoothActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); + jPanel2.setLayout(jPanel2Layout); + jPanel2Layout.setHorizontalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(spinnerTemperature)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 6, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(chkbxTemperatureRandom) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(chkbxTemperatureSmooth))) + .addContainerGap()) + ); + jPanel2Layout.setVerticalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jSeparator1) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(chkbxTemperatureRandom) + .addComponent(chkbxTemperatureSmooth)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE)) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(spinnerTemperature))) + .addContainerGap()) + ); + + jPanel6.setBackground(new java.awt.Color(253, 254, 209)); + + jLabel20.setText("Connection Status:"); + jLabel20.setVerticalTextPosition(javax.swing.SwingConstants.TOP); + + btnView.setText("View Device Data"); + btnView.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + btnViewMouseClicked(evt); + } + }); + + btnControl.setText("Control Device"); + btnControl.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + btnControlMouseClicked(evt); + } + }); + + lblStatus.setFont(new java.awt.Font("Cantarell", 1, 15)); // NOI18N + lblStatus.setText("Not Connected"); + + javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6); + jPanel6.setLayout(jPanel6Layout); + jPanel6Layout.setHorizontalGroup( + jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel6Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel20) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(lblStatus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(btnControl) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(btnView) + .addContainerGap()) + ); + jPanel6Layout.setVerticalGroup( + jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jLabel20, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(btnView, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(btnControl) + .addComponent(lblStatus))) + .addContainerGap()) + ); + + jPanel8.setBackground(new java.awt.Color(220, 220, 220)); + + jLabel23.setFont(new java.awt.Font("Cantarell", 0, 18)); // NOI18N + jLabel23.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + jLabel23.setText("Humidity"); + + chkbxHumidityRandom.setText("Randomize Data"); + chkbxHumidityRandom.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkbxHumidityRandomActionPerformed(evt); + } + }); + + jSeparator5.setOrientation(javax.swing.SwingConstants.VERTICAL); + + jPanel9.setBackground(new java.awt.Color(220, 220, 220)); + + jLabel24.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + jLabel24.setText("Min"); + + txtHumidityMin.setHorizontalAlignment(javax.swing.JTextField.CENTER); + txtHumidityMin.setText("20"); + txtHumidityMin.setEnabled(false); + txtHumidityMin.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtHumidityMinActionPerformed(evt); + } + }); + + jLabel25.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + jLabel25.setText("Max"); + + txtHumidityMax.setHorizontalAlignment(javax.swing.JTextField.CENTER); + txtHumidityMax.setText("50"); + txtHumidityMax.setEnabled(false); + txtHumidityMax.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtHumidityMaxActionPerformed(evt); + } + }); + + txtHumiditySVF.setHorizontalAlignment(javax.swing.JTextField.CENTER); + txtHumiditySVF.setText("50"); + txtHumiditySVF.setEnabled(false); + txtHumiditySVF.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txtHumiditySVFActionPerformed(evt); + } + }); + + jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); + jLabel11.setText("SV %"); + + javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9); + jPanel9.setLayout(jPanel9Layout); + jPanel9Layout.setHorizontalGroup( + jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel9Layout.createSequentialGroup() + .addComponent(jLabel24) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtHumidityMin, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel25) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtHumidityMax, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel11) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txtHumiditySVF, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + jPanel9Layout.setVerticalGroup( + jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel11) + .addComponent(txtHumiditySVF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txtHumidityMin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(txtHumidityMax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel25) + .addComponent(jLabel24))) + .addGap(35, 35, 35)) + ); + + spinnerHumidity.setFont(new java.awt.Font("Cantarell", 1, 24)); // NOI18N + spinnerHumidity.setModel(new javax.swing.SpinnerNumberModel(30, 0, 100, 1)); + spinnerHumidity.addChangeListener(new javax.swing.event.ChangeListener() { + public void stateChanged(javax.swing.event.ChangeEvent evt) { + spinnerHumidityStateChanged(evt); + } + }); + + chkbxHumiditySmooth.setText("Smooth Variation"); + chkbxHumiditySmooth.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkbxHumiditySmoothActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8); + jPanel8.setLayout(jPanel8Layout); + jPanel8Layout.setHorizontalGroup( + jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel8Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(spinnerHumidity)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jSeparator5, javax.swing.GroupLayout.PREFERRED_SIZE, 6, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel8Layout.createSequentialGroup() + .addComponent(chkbxHumidityRandom) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(chkbxHumiditySmooth))) + .addContainerGap()) + ); + jPanel8Layout.setVerticalGroup( + jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel8Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jSeparator5) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(chkbxHumidityRandom) + .addComponent(chkbxHumiditySmooth)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 1, Short.MAX_VALUE)) + .addGroup(jPanel8Layout.createSequentialGroup() + .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(spinnerHumidity))) + .addContainerGap()) + ); + + jPanel3.setBackground(new java.awt.Color(207, 233, 234)); + + jLabel7.setText("Data Push Interval:"); + + spinnerInterval.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(5), Integer.valueOf(1), null, Integer.valueOf(1))); + spinnerInterval.addChangeListener(new javax.swing.event.ChangeListener() { + public void stateChanged(javax.swing.event.ChangeEvent evt) { + spinnerIntervalStateChanged(evt); + } + }); + + jLabel8.setText("Seconds"); + + jLabel9.setText("Protocol:"); + + cmbProtocol.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "MQTT", "XMPP", "HTTP" })); + cmbProtocol.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cmbProtocolActionPerformed(evt); + } + }); + + jLabel12.setText("Interface:"); + + cmbInterface.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "eth0" })); + cmbInterface.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cmbInterfaceActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); + jPanel3.setLayout(jPanel3Layout); + jPanel3Layout.setHorizontalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel7) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(spinnerInterval, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel8) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel12) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(cmbInterface, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel9) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(cmbProtocol, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); + jPanel3Layout.setVerticalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel12) + .addComponent(cmbInterface, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel7) + .addComponent(spinnerInterval, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel8) + .addComponent(jLabel9) + .addComponent(cmbProtocol, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addContainerGap()) + ); + + jPanel4.setBackground(new java.awt.Color(169, 253, 173)); + + chkbxEmulate.setText("Emulate data"); + chkbxEmulate.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkbxEmulateActionPerformed(evt); + } + }); + + cmbPeriod.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1 hour", "1 day", "1 week", "1 month " })); + cmbPeriod.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cmbPeriodActionPerformed(evt); + } + }); + + jLabel1.setText("Emulation Period"); + + javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); + jPanel4.setLayout(jPanel4Layout); + jPanel4Layout.setHorizontalGroup( + jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel4Layout.createSequentialGroup() + .addContainerGap() + .addComponent(chkbxEmulate) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel1) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(cmbPeriod, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); + jPanel4Layout.setVerticalGroup( + jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(chkbxEmulate) + .addComponent(cmbPeriod, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel1)) + .addContainerGap()) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lblAgentName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(lblAgentName, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); + + pack(); + }// //GEN-END:initComponents + + private void btnControlMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnControlMouseClicked + // TODO add your handling code here: + }//GEN-LAST:event_btnControlMouseClicked + + private void btnViewMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnViewMouseClicked + // TODO add your handling code here: + }//GEN-LAST:event_btnViewMouseClicked + + private void chkbxTemperatureRandomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkbxTemperatureRandomActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_chkbxTemperatureRandomActionPerformed + + private void chkbxHumidityRandomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkbxHumidityRandomActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_chkbxHumidityRandomActionPerformed + + private void spinnerTemperatureStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spinnerTemperatureStateChanged + // TODO add your handling code here: + }//GEN-LAST:event_spinnerTemperatureStateChanged + + private void spinnerHumidityStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spinnerHumidityStateChanged + // TODO add your handling code here: + }//GEN-LAST:event_spinnerHumidityStateChanged + + private void txtTemperatureMinActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtTemperatureMinActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txtTemperatureMinActionPerformed + + private void txtTemperatureMaxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtTemperatureMaxActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txtTemperatureMaxActionPerformed + + private void txtHumidityMinActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtHumidityMinActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txtHumidityMinActionPerformed + + private void txtHumidityMaxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtHumidityMaxActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txtHumidityMaxActionPerformed + + private void spinnerIntervalStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spinnerIntervalStateChanged + // TODO add your handling code here: + }//GEN-LAST:event_spinnerIntervalStateChanged + + private void cmbInterfaceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbInterfaceActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_cmbInterfaceActionPerformed + + private void cmbProtocolActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbProtocolActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_cmbProtocolActionPerformed + + private void txtTemperatureSVFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtTemperatureSVFActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txtTemperatureSVFActionPerformed + + private void txtHumiditySVFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtHumiditySVFActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txtHumiditySVFActionPerformed + + private void chkbxTemperatureSmoothActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkbxTemperatureSmoothActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_chkbxTemperatureSmoothActionPerformed + + private void chkbxHumiditySmoothActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkbxHumiditySmoothActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_chkbxHumiditySmoothActionPerformed + + private void cmbPeriodActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbPeriodActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_cmbPeriodActionPerformed + + private void chkbxEmulateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkbxEmulateActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_chkbxEmulateActionPerformed + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton btnControl; + private javax.swing.JButton btnView; + private javax.swing.JCheckBox chkbxEmulate; + private javax.swing.JCheckBox chkbxHumidityRandom; + private javax.swing.JCheckBox chkbxHumiditySmooth; + private javax.swing.JCheckBox chkbxTemperatureRandom; + private javax.swing.JCheckBox chkbxTemperatureSmooth; + private javax.swing.JComboBox cmbInterface; + private javax.swing.JComboBox cmbPeriod; + private javax.swing.JComboBox cmbProtocol; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel10; + private javax.swing.JLabel jLabel11; + private javax.swing.JLabel jLabel12; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel20; + private javax.swing.JLabel jLabel23; + private javax.swing.JLabel jLabel24; + private javax.swing.JLabel jLabel25; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLabel6; + private javax.swing.JLabel jLabel7; + private javax.swing.JLabel jLabel8; + private javax.swing.JLabel jLabel9; + private javax.swing.JPanel jPanel1; + private javax.swing.JPanel jPanel2; + private javax.swing.JPanel jPanel3; + private javax.swing.JPanel jPanel4; + private javax.swing.JPanel jPanel6; + private javax.swing.JPanel jPanel7; + private javax.swing.JPanel jPanel8; + private javax.swing.JPanel jPanel9; + private javax.swing.JSeparator jSeparator1; + private javax.swing.JSeparator jSeparator5; + private javax.swing.JLabel lblAgentName; + private javax.swing.JLabel lblStatus; + private javax.swing.JPanel pnlBulbStatus; + private javax.swing.JSpinner spinnerHumidity; + private javax.swing.JSpinner spinnerInterval; + private javax.swing.JSpinner spinnerTemperature; + private javax.swing.JTextField txtHumidityMax; + private javax.swing.JTextField txtHumidityMin; + private javax.swing.JTextField txtHumiditySVF; + private javax.swing.JTextField txtTemperatureMax; + private javax.swing.JTextField txtTemperatureMin; + private javax.swing.JTextField txtTemperatureSVF; + // End of variables declaration//GEN-END:variables +} From aa68d5242e76791cd92687c6120302c0a8386a55 Mon Sep 17 00:00:00 2001 From: Milan Perera Date: Thu, 8 Dec 2016 20:41:44 +0530 Subject: [PATCH 026/856] Commiting permission-scope mapping improvements --- .../service/impl/VirtualFireAlarmService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java index 75db835b7..62be0f612 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java @@ -63,7 +63,7 @@ public interface VirtualFireAlarmService { */ @POST @Path("device/{deviceId}/buzz") - @Scope(key = "device:firealarm:enroll", name = "", description = "") + //@Scope(key = "device:firealarm:enroll", name = "", description = "") Response switchBuzzer(@PathParam("deviceId") String deviceId, @FormParam("state") String state); @@ -72,7 +72,7 @@ public interface VirtualFireAlarmService { */ @Path("device/stats/{deviceId}") @GET - @Scope(key = "device:firealarm:enroll", name = "", description = "") + //@Scope(key = "device:firealarm:enroll", name = "", description = "") @Consumes("application/json") @Produces("application/json") Response getVirtualFirealarmStats(@PathParam("deviceId") String deviceId, @QueryParam("from") long from, @@ -81,7 +81,7 @@ public interface VirtualFireAlarmService { @Path("device/download") @GET @Produces("application/zip") - @Scope(key = "device:firealarm:enroll", name = "", description = "") + //@Scope(key = "device:firealarm:enroll", name = "", description = "") Response downloadSketch(@QueryParam("deviceName") String deviceName, @QueryParam("sketchType") String sketchType); } From d088aa01ead4bb4ad57488f5c0536d9dd2ee3a71 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 9 Dec 2016 05:43:17 +0000 Subject: [PATCH 027/856] [maven-release-plugin] prepare release v3.0.3 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d4573ade7..1bbd4fe79 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.3-SNAPSHOT + 3.0.3 ../pom.xml From e2917e9a271617985ee271f250807e13dd143406 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 9 Dec 2016 05:43:17 +0000 Subject: [PATCH 028/856] [maven-release-plugin] prepare release v3.0.3 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c2c197b1b..4893a9c71 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.3-SNAPSHOT + 3.0.3 ../pom.xml From e8f1b14b7edd4e3f3785697f0c8205173c28644e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 9 Dec 2016 05:46:04 +0000 Subject: [PATCH 029/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1bbd4fe79..ffa239d28 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.3 + 3.0.4-SNAPSHOT ../pom.xml From 7bf6ea8835dda4c04cc417d6ad9ea761addcc25a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 9 Dec 2016 05:46:04 +0000 Subject: [PATCH 030/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4893a9c71..2e6be1e5b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.3 + 3.0.4-SNAPSHOT ../pom.xml From 4e9cc26ea07d8d884b8f86175a3b1ee2e7720383 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 24 Dec 2016 03:13:35 +0000 Subject: [PATCH 031/856] [maven-release-plugin] prepare release v3.0.4 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ffa239d28..bac409f51 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.4-SNAPSHOT + 3.0.4 ../pom.xml From 20d26f654471248f9af19252712ed172e23b2618 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 24 Dec 2016 03:13:35 +0000 Subject: [PATCH 032/856] [maven-release-plugin] prepare release v3.0.4 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2e6be1e5b..50174735a 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.4-SNAPSHOT + 3.0.4 ../pom.xml From c15234c371fb0adba6f80d4e21cecc07cad1463f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 24 Dec 2016 03:15:18 +0000 Subject: [PATCH 033/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bac409f51..59ccc4a79 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.4 + 3.0.5-SNAPSHOT ../pom.xml From 2025179df088cfb9332fe949fd5079bc165ad3c6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 24 Dec 2016 03:15:18 +0000 Subject: [PATCH 034/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 50174735a..4e3e50615 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.4 + 3.0.5-SNAPSHOT ../pom.xml From fddf834ee7f31b84e1682f4f1113701bcc3dfb17 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Thu, 5 Jan 2017 17:57:04 +0530 Subject: [PATCH 035/856] removed provider tenant domain and user from the web.xml --- src/main/webapp/WEB-INF/web.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 2d1c6e26b..d250c67de 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -34,9 +34,5 @@ managed-api-enabled true - - managed-api-owner - admin - \ No newline at end of file From d41bea9cfe435e1df309076b4bd0618626fd5c40 Mon Sep 17 00:00:00 2001 From: Maninda Date: Thu, 5 Jan 2017 19:36:52 +0530 Subject: [PATCH 036/856] Fixed some issues reported with FindBugs while security plugin is enabled. --- .../agent/communication/http/FireAlarmHTTPCommunicator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/http/FireAlarmHTTPCommunicator.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/http/FireAlarmHTTPCommunicator.java index 98dbc6dc7..ead68c528 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/http/FireAlarmHTTPCommunicator.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/http/FireAlarmHTTPCommunicator.java @@ -111,7 +111,7 @@ public class FireAlarmHTTPCommunicator extends HTTPTransportHandler { AgentManager agentManager = AgentManager.getInstance(); String pathContext = request.getPathInfo(); - String separator = File.separator; + String separator = File.separatorChar=='\\' ? "\\\\" : File.separator ; if (pathContext.toUpperCase().contains( separator + AgentConstants.TEMPERATURE_CONTROL)) { From c650c65c3821949ca9146e4eeae9139d150eb46d Mon Sep 17 00:00:00 2001 From: Milan Perera Date: Fri, 6 Jan 2017 10:10:45 +0530 Subject: [PATCH 037/856] Refactored scopes strings --- pom.xml | 6 +- .../service/impl/VirtualFireAlarmService.java | 62 ++++++++++++++++--- 2 files changed, 59 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 59ccc4a79..6c9cc0636 100644 --- a/pom.xml +++ b/pom.xml @@ -240,7 +240,11 @@ org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin provided - + + org.wso2.carbon.devicemgt + org.wso2.carbon.apimgt.annotations + + diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java index 62be0f612..6585280f0 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java @@ -18,14 +18,12 @@ package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl; -import io.swagger.annotations.SwaggerDefinition; -import io.swagger.annotations.Info; -import io.swagger.annotations.ExtensionProperty; -import io.swagger.annotations.Extension; -import io.swagger.annotations.Tag; +import io.swagger.annotations.*; import org.wso2.carbon.apimgt.annotations.api.Scope; +import org.wso2.carbon.apimgt.annotations.api.Scopes; import javax.ws.rs.*; +import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; /** @@ -50,8 +48,20 @@ import javax.ws.rs.core.Response; @Tag(name = "virtual_firealarm", description = "") } ) +@Scopes( + scopes = { + @Scope( + name = "Enroll device", + description = "", + key = "perm:firealarm:enroll", + permissions = {"/device-mgt/devices/enroll/firealarm"} + ) + } +) public interface VirtualFireAlarmService { + String SCOPE = "scope"; + /** * This is an API called/used from within the Server(Front-End) or by a device Owner. It sends a control command to * the VirtualFirealarm device to switch `ON` or `OFF` its buzzer. The method also takes in the protocol to be used @@ -63,7 +73,19 @@ public interface VirtualFireAlarmService { */ @POST @Path("device/{deviceId}/buzz") - //@Scope(key = "device:firealarm:enroll", name = "", description = "") + @ApiOperation( + consumes = MediaType.APPLICATION_JSON, + httpMethod = "POST", + value = "Switch Buzzer", + notes = "", + response = Response.class, + tags = "virtual_firealarm", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = SCOPE, value = "perm:firealarm:enroll") + }) + } + ) Response switchBuzzer(@PathParam("deviceId") String deviceId, @FormParam("state") String state); @@ -72,7 +94,19 @@ public interface VirtualFireAlarmService { */ @Path("device/stats/{deviceId}") @GET - //@Scope(key = "device:firealarm:enroll", name = "", description = "") + @ApiOperation( + consumes = MediaType.APPLICATION_JSON, + httpMethod = "GET", + value = "Retrieve Sensor data for the device type", + notes = "", + response = Response.class, + tags = "virtual_firealarm", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = SCOPE, value = "perm:firealarm:enroll") + }) + } + ) @Consumes("application/json") @Produces("application/json") Response getVirtualFirealarmStats(@PathParam("deviceId") String deviceId, @QueryParam("from") long from, @@ -81,7 +115,19 @@ public interface VirtualFireAlarmService { @Path("device/download") @GET @Produces("application/zip") - //@Scope(key = "device:firealarm:enroll", name = "", description = "") + @ApiOperation( + consumes = MediaType.APPLICATION_JSON, + httpMethod = "GET", + value = "Download agent", + notes = "", + response = Response.class, + tags = "virtual_firealarm", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = SCOPE, value = "perm:firealarm:enroll") + }) + } + ) Response downloadSketch(@QueryParam("deviceName") String deviceName, @QueryParam("sketchType") String sketchType); } From 0aae89e86414299ba8f4a810a58964d855fae06d Mon Sep 17 00:00:00 2001 From: ayyoob Date: Sat, 7 Jan 2017 14:54:46 +0530 Subject: [PATCH 038/856] removed scep impl from virtual fire alarm --- pom.xml | 5 - .../impl/VirtualFireAlarmServiceImpl.java | 65 +++------ .../constants/VirtualFireAlarmConstants.java | 84 ++++++++++++ .../util/VirtualFireAlarmServiceUtils.java | 51 ------- .../util/VirtualFireAlarmUtilConstants.java | 1 - .../service/impl/util/ZipUtil.java | 2 +- .../xmpp/VirtualFirealarmXMPPException.java | 56 ++++++++ .../service/impl/xmpp/XmppAccount.java | 63 +++++++++ .../service/impl/xmpp/XmppConfig.java | 124 ++++++++++++++++++ .../service/impl/xmpp/XmppServerClient.java | 66 ++++++++++ src/main/webapp/WEB-INF/web.xml | 2 + src/main/webapp/WEB-INF/xmpp.properties | 25 ++++ 12 files changed, 439 insertions(+), 105 deletions(-) create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java delete mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmServiceUtils.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/VirtualFirealarmXMPPException.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppAccount.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppConfig.java create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppServerClient.java create mode 100644 src/main/webapp/WEB-INF/xmpp.properties diff --git a/pom.xml b/pom.xml index 59ccc4a79..7d00d0033 100644 --- a/pom.xml +++ b/pom.xml @@ -235,11 +235,6 @@ org.wso2.carbon.device.mgt.extensions provided - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin - provided - diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java index c00dd6ab7..f5bb1d84b 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java @@ -18,7 +18,6 @@ package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl; -import org.apache.commons.codec.binary.Base64; import org.apache.commons.io.FileUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -35,18 +34,15 @@ import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroupConstants; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.constants.VirtualFireAlarmConstants; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.exception.VirtualFirealarmDeviceMgtPluginException; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.impl.VirtualFirealarmSecurityManager; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.xmpp.XmppAccount; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.xmpp.XmppConfig; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.xmpp.XmppServerClient; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.constants.VirtualFireAlarmConstants; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.dto.SensorRecord; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.exception.VirtualFireAlarmException; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.APIUtil; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.VirtualFireAlarmServiceUtils; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.ZipArchive; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.ZipUtil; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.xmpp.VirtualFirealarmXMPPException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.xmpp.XmppAccount; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.xmpp.XmppConfig; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.xmpp.XmppServerClient; import org.wso2.carbon.identity.jwt.client.extension.JWTClient; import org.wso2.carbon.identity.jwt.client.extension.dto.AccessTokenInfo; import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException; @@ -76,11 +72,8 @@ import java.util.UUID; public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { - private static final String XMPP_PROTOCOL = "XMPP"; - private static final String MQTT_PROTOCOL = "MQTT"; private static final String KEY_TYPE = "PRODUCTION"; private static ApiApplicationKey apiApplicationKey; - private static final String DEVICE_MGT_SCOPE_IDENTIFIER = "device-mgt"; private static Log log = LogFactory.getLog(VirtualFireAlarmServiceImpl.class); @POST @@ -103,10 +96,7 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build(); } String resource = VirtualFireAlarmConstants.BULB_CONTEXT.replace("/", ""); - PrivateKey serverPrivateKey = VirtualFirealarmSecurityManager.getServerPrivateKey(); String actualMessage = resource + ":" + switchToState; - String encryptedMsg = VirtualFireAlarmServiceUtils.prepareSecurePayLoad(actualMessage, - serverPrivateKey); String publishTopic = APIUtil.getTenantDomainOftheUser() + "/" + VirtualFireAlarmConstants.DEVICE_TYPE + "/" + deviceId; @@ -114,7 +104,7 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { commandOp.setCode("buzz"); commandOp.setType(Operation.Type.COMMAND); commandOp.setEnabled(true); - commandOp.setPayLoad(encryptedMsg); + commandOp.setPayLoad(actualMessage); Properties props = new Properties(); props.setProperty(VirtualFireAlarmConstants.MQTT_ADAPTER_TOPIC_PROPERTY_NAME, publishTopic); @@ -137,10 +127,6 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { } catch (DeviceAccessAuthorizationException e) { log.error(e.getErrorMessage(), e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); - } catch (VirtualFireAlarmException e) { - String errorMsg = "Preparing Secure payload failed for device - [" + deviceId + "]"; - log.error(errorMsg); - return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); } catch (OperationManagementException e) { String msg = "Error occurred while executing command operation upon ringing the buzzer"; log.error(msg, e); @@ -162,37 +148,22 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { DeviceGroupConstants.Permissions.DEFAULT_MANAGE_POLICIES_PERMISSIONS)) { return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build(); } - PrivateKey serverPrivateKey = VirtualFirealarmSecurityManager.getServerPrivateKey(); String actualMessage = VirtualFireAlarmConstants.POLICY_CONTEXT + ":" + policy; - String encryptedMsg = VirtualFireAlarmServiceUtils.prepareSecurePayLoad(actualMessage, - serverPrivateKey); Map dynamicProperties = new HashMap<>(); - switch (protocolString) { - case XMPP_PROTOCOL: - dynamicProperties.put(VirtualFireAlarmConstants.JID_PROPERTY_KEY, - deviceId + "@" + XmppConfig.getInstance().getServerName()); - dynamicProperties.put(VirtualFireAlarmConstants.SUBJECT_PROPERTY_KEY, "POLICTY-REQUEST"); - dynamicProperties.put(VirtualFireAlarmConstants.MESSAGE_TYPE_PROPERTY_KEY, - VirtualFireAlarmConstants.CHAT_PROPERTY_KEY); - APIUtil.getOutputEventAdapterService().publish(VirtualFireAlarmConstants.XMPP_ADAPTER_NAME, - dynamicProperties, encryptedMsg); - break; - default: - - String publishTopic = APIUtil.getTenantDomainOftheUser() + "/" - + VirtualFireAlarmConstants.DEVICE_TYPE + "/" + deviceId; - dynamicProperties.put(VirtualFireAlarmConstants.ADAPTER_TOPIC_PROPERTY, publishTopic); - APIUtil.getOutputEventAdapterService().publish(VirtualFireAlarmConstants.MQTT_ADAPTER_NAME, - dynamicProperties, encryptedMsg); - break; - } + String publishTopic = APIUtil.getTenantDomainOftheUser() + "/" + + VirtualFireAlarmConstants.DEVICE_TYPE + "/" + deviceId; + dynamicProperties.put(VirtualFireAlarmConstants.ADAPTER_TOPIC_PROPERTY, publishTopic); + dynamicProperties.put(VirtualFireAlarmConstants.JID_PROPERTY_KEY, + deviceId + "@" + XmppConfig.getInstance().getServerName()); + dynamicProperties.put(VirtualFireAlarmConstants.SUBJECT_PROPERTY_KEY, "POLICTY-REQUEST"); + dynamicProperties.put(VirtualFireAlarmConstants.MESSAGE_TYPE_PROPERTY_KEY, + VirtualFireAlarmConstants.CHAT_PROPERTY_KEY); + APIUtil.getOutputEventAdapterService().publish(VirtualFireAlarmConstants.XMPP_ADAPTER_NAME, + dynamicProperties, actualMessage); return Response.ok().build(); } catch (DeviceAccessAuthorizationException e) { log.error(e.getErrorMessage(), e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); - } catch (VirtualFireAlarmException e) { - log.error(e); - return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); } } @@ -260,7 +231,7 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { } catch (UserStoreException ex) { log.error(ex.getMessage(), ex); return Response.status(500).entity(ex.getMessage()).build(); - } catch (VirtualFirealarmDeviceMgtPluginException ex) { + } catch (VirtualFirealarmXMPPException ex) { log.error(ex.getMessage(), ex); return Response.status(500).entity(ex.getMessage()).build(); } @@ -294,7 +265,7 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { private ZipArchive createDownloadFile(String owner, String deviceName, String sketchType) throws DeviceManagementException, APIManagerException, JWTClientException, - UserStoreException, VirtualFirealarmDeviceMgtPluginException { + UserStoreException, VirtualFirealarmXMPPException { //create new device id String deviceId = shortUUID(); boolean status = register(deviceId, deviceName); diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java new file mode 100644 index 000000000..204ede004 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.constants; + +public class VirtualFireAlarmConstants { + public final static String DEVICE_TYPE = "virtual_firealarm"; + public final static String DEVICE_PLUGIN_DEVICE_NAME = "DEVICE_NAME"; + public final static String DEVICE_PLUGIN_DEVICE_ID = "VIRTUAL_FIREALARM_DEVICE_ID"; + public final static String STATE_ON = "ON"; + public final static String STATE_OFF = "OFF"; + + public static final String URL_PREFIX = "http://"; + public static final String BULB_CONTEXT = "BULB"; + public static final String POLICY_CONTEXT = "POLICY"; + + //sensor events sumerized table name for temperature + public static final String TEMPERATURE_EVENT_TABLE = "DEVICE_TEMPERATURE_SUMMARY"; + public final static String DEVICE_TYPE_PROVIDER_DOMAIN = "carbon.super"; + + //mqtt tranport related constants + public static final String MQTT_ADAPTER_NAME = "virtual_firealarm_mqtt"; + public static final String MQTT_ADAPTER_TYPE = "oauth-mqtt"; + public static final String ADAPTER_TOPIC_PROPERTY = "topic"; + public static final String MQTT_PORT = "\\$\\{mqtt.broker.port\\}"; + public static final String MQTT_BROKER_HOST = "\\$\\{mqtt.broker.host\\}"; + public static final String CARBON_CONFIG_PORT_OFFSET = "Ports.Offset"; + public static final String DEFAULT_CARBON_LOCAL_IP_PROPERTY = "carbon.local.ip"; + public static final int CARBON_DEFAULT_PORT_OFFSET = 0; + public static final int DEFAULT_MQTT_PORT = 1886; + + //xmpp transport related constants + public static final String XMPP_ADAPTER_NAME = "virtual_firealarm_xmpp"; + public static final String XMPP_ADAPTER_TYPE = "xmpp"; + public static final String PASSWORD_PROPERTY_KEY = "password"; + public static final String JID_PROPERTY_KEY = "jid"; + public static final String CLIENT_JID_PROPERTY_KEY = "xmpp.client.jid"; + public static final String SUBJECT_PROPERTY_KEY = "xmpp.client.subject"; + public static final String MESSAGE_TYPE_PROPERTY_KEY = "xmpp.client.messageType"; + public static final String CHAT_PROPERTY_KEY = "chat"; + + public static final String USERNAME_PROPERTY_KEY = "username"; + public static final String DCR_PROPERTY_KEY = "dcrUrl"; + public static final String BROKER_URL_PROPERTY_KEY = "url"; + public static final String SCOPES_PROPERTY_KEY = "scopes"; + public static final String QOS_PROPERTY_KEY = "qos"; + public static final String CLIENT_ID_PROPERTY_KEY = "qos"; + public static final String CLEAR_SESSION_PROPERTY_KEY = "clearSession"; + public static final String TOPIC = "topic"; + public static final String SUBSCRIBED_TOPIC = "carbon.super/virtual_firealarm/+/publisher"; + + public static final String CONTENT_VALIDATION = "contentValidator"; + public static final String CONTENT_TRANSFORMATION = "contentTransformer"; + public static final String RESOURCE = "resource"; + + public static final String JSON_SERIAL_KEY = "SerialNumber"; + public static final String TEMPERATURE_STREAM_DEFINITION = "org.wso2.iot.devices.temperature"; + public static final String JSON_MESSAGE_KEY = "Msg"; + public static final String JSON_SIGNATURE_KEY = "Sig"; + + public static final String HOST_KEY = "host"; + public static final String PORT_KEY = "port"; + + public static final String SERVER_NAME = "serverName"; + + public static final String MQTT_ADAPTER_TOPIC_PROPERTY_NAME = "mqtt.adapter.topic"; + + public static final String APIM_APPLICATION_TOKEN_VALIDITY_PERIOD = "3600"; +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmServiceUtils.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmServiceUtils.java deleted file mode 100644 index 277000e0f..000000000 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmServiceUtils.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util; - -import org.apache.commons.codec.binary.Base64; -import org.json.JSONObject; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.exception.VirtualFirealarmDeviceMgtPluginException; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.impl.VirtualFirealarmSecurityManager; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.exception.VirtualFireAlarmException; - -import java.lang.*; -import java.security.PrivateKey; - -/** - * - */ -public class VirtualFireAlarmServiceUtils { - - private static final String JSON_MESSAGE_KEY = "Msg"; - private static final String JSON_SIGNATURE_KEY = "Sig"; - - public static String prepareSecurePayLoad(String message, PrivateKey signatureKey) throws VirtualFireAlarmException { - try { - message = Base64.encodeBase64String(message.getBytes()); - String signedPayload = VirtualFirealarmSecurityManager.signMessage(message, signatureKey); - JSONObject jsonPayload = new JSONObject(); - jsonPayload.put(JSON_MESSAGE_KEY, message); - jsonPayload.put(JSON_SIGNATURE_KEY, signedPayload); - return jsonPayload.toString(); - } catch (VirtualFirealarmDeviceMgtPluginException e) { - throw new VirtualFireAlarmException(e); - } - - } -} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmUtilConstants.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmUtilConstants.java index fae96848d..a255b9537 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmUtilConstants.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmUtilConstants.java @@ -1,6 +1,5 @@ package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.xmpp.XmppConfig; public class VirtualFireAlarmUtilConstants { diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java index 2c6cd2840..39e938f2b 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java @@ -30,7 +30,7 @@ import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.xmpp.XmppConfig; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.xmpp.XmppConfig; import org.wso2.carbon.utils.CarbonUtils; import org.wso2.carbon.utils.NetworkUtils; diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/VirtualFirealarmXMPPException.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/VirtualFirealarmXMPPException.java new file mode 100644 index 000000000..57d0b8a0b --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/VirtualFirealarmXMPPException.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.xmpp; + + +public class VirtualFirealarmXMPPException extends Exception{ + + private String errorMessage; + + public String getErrorMessage() { + return errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + public VirtualFirealarmXMPPException(String msg, Exception nestedEx) { + super(msg, nestedEx); + setErrorMessage(msg); + } + + public VirtualFirealarmXMPPException(String message, Throwable cause) { + super(message, cause); + setErrorMessage(message); + } + + public VirtualFirealarmXMPPException(String msg) { + super(msg); + setErrorMessage(msg); + } + + public VirtualFirealarmXMPPException() { + super(); + } + + public VirtualFirealarmXMPPException(Throwable cause) { + super(cause); + } + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppAccount.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppAccount.java new file mode 100644 index 000000000..162ea957f --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppAccount.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.xmpp; + +/** + * holds the information related to account that needs to be created on xmpp server. + */ +public class XmppAccount { + + private String username; + private String password; + private String accountName; + private String email; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getAccountName() { + return accountName; + } + + public void setAccountName(String accountName) { + this.accountName = accountName; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppConfig.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppConfig.java new file mode 100644 index 000000000..d96f14c6e --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppConfig.java @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.xmpp; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; + +public class XmppConfig { + + private String host; + private int port; + private String username; + private String password; + private String serverName; + private boolean enabled; + private String jid; + private static XmppConfig xmppConfig = new XmppConfig(); + private static final Log log = LogFactory.getLog(XmppConfig.class); + private static final String ENABLED = "enabled"; + private static final String USERNAME = "username"; + private static final String PASSWORD = "password"; + private static final String HOST = "host"; + private static final String PORT = "port"; + private static final String SERVERNAME = "serverName"; + private static final String JID = "jid"; + + private XmppConfig() { + ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); + InputStream input = classLoader.getResourceAsStream("../xmpp.properties"); + Properties properties = new Properties(); + try { + properties.load(input); + enabled = Boolean.parseBoolean(properties.getProperty(ENABLED, "false")); + host = properties.getProperty(HOST); + port = Integer.parseInt(properties.getProperty(PORT)); + username = properties.getProperty(USERNAME); + password = properties.getProperty(PASSWORD); + serverName = properties.getProperty(SERVERNAME); + jid = properties.getProperty(JID); + } catch (IOException e) { + log.error("Failed to load xmpp config properties."); + } + } + + public static XmppConfig getInstance() { + return xmppConfig; + } + + public String getHost() { + return host; + } + + public void setHost(String host) { + this.host = host; + } + + public int getPort() { + return port; + } + + public void setPort(int port) { + this.port = port; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getServerName() { + return serverName; + } + + public void setServerName(String serverName) { + this.serverName = serverName; + } + + public boolean isEnabled() { + return enabled; + } + + public void setEnabled(boolean enabled) { + this.enabled = enabled; + } + + public String getJid() { + return jid; + } + + public void setJid(String jid) { + this.jid = jid; + } +} diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppServerClient.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppServerClient.java new file mode 100644 index 000000000..7369f90a4 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppServerClient.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.xmpp; + +import org.jivesoftware.smack.AccountManager; +import org.jivesoftware.smack.ConnectionConfiguration; +import org.jivesoftware.smack.XMPPConnection; +import org.jivesoftware.smack.XMPPException; + +import java.util.HashMap; +import java.util.Map; + +public class XmppServerClient { + + public static boolean createAccount(XmppAccount xmppAccount) throws VirtualFirealarmXMPPException { + if (XmppConfig.getInstance().isEnabled()) { + if (xmppAccount != null) { + try { + ConnectionConfiguration config = new ConnectionConfiguration(XmppConfig.getInstance().getHost(), + XmppConfig.getInstance().getPort(), + "Accounts"); + XMPPConnection xmppConnection = new XMPPConnection(config); + xmppConnection.connect(); + xmppConnection.login(XmppConfig.getInstance().getUsername(), XmppConfig.getInstance().getPassword()); + AccountManager accountManager = xmppConnection.getAccountManager(); + Map attributes = new HashMap<>(); + attributes.put("username", xmppAccount.getUsername()); + attributes.put("password", xmppAccount.getPassword()); + attributes.put("email", xmppAccount.getEmail()); + attributes.put("name", xmppAccount.getAccountName()); + accountManager.createAccount(xmppAccount.getUsername(), xmppAccount.getPassword(), attributes); + xmppConnection.disconnect(); + return true; + } catch (XMPPException e) { + if (e.getXMPPError().getCode() == 409) { + //AccountAlreadyExist + return true; + } else { + throw new VirtualFirealarmXMPPException( + "XMPP account creation failed. Error: " + e.getLocalizedMessage(), e); + } + } + } else { + throw new VirtualFirealarmXMPPException("Invalid XMPP attributes"); + } + } else { + return true; + } + } +} diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index d250c67de..eb4a397bf 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -35,4 +35,6 @@ true + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/xmpp.properties b/src/main/webapp/WEB-INF/xmpp.properties new file mode 100644 index 000000000..3a173cb92 --- /dev/null +++ b/src/main/webapp/WEB-INF/xmpp.properties @@ -0,0 +1,25 @@ +# +# Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +#[XMPP-Configurations] +enabled=false +username=admin +password=admin +host=localhost +port=5222 +serverName=localhost +jid=admin@localhost \ No newline at end of file From 37969ba0a0b355f4b137f392928fc9af25f700ec Mon Sep 17 00:00:00 2001 From: ayyoob Date: Sat, 7 Jan 2017 14:54:46 +0530 Subject: [PATCH 039/856] removed scep impl from virtual fire alarm --- .../mqtt/FireAlarmMQTTCommunicator.java | 5 +- .../xmpp/FireAlarmXMPPCommunicator.java | 6 +- .../agent/core/AgentConstants.java | 2 +- .../agent/core/AgentManager.java | 18 ++-- .../agent/core/AgentUtilOperations.java | 90 ++++++++++--------- .../agent/enrollment/EnrollmentManager.java | 2 +- 6 files changed, 68 insertions(+), 55 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java index 5b24783e7..8f89750fd 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java @@ -208,7 +208,10 @@ public class FireAlarmMQTTCommunicator extends MQTTTransportHandler { @Override public void run() { int currentTemperature = agentManager.getTemperature(); - String message = "PUBLISHER:" + AgentConstants.TEMPERATURE_CONTROL + ":" + currentTemperature; + String message = "{\"event\": {\"metaData\": {\"owner\": \"" + AgentManager + .getInstance().getAgentConfigs().getDeviceOwner() + "\",\"deviceId\": \"" + AgentManager + .getInstance().getAgentConfigs().getDeviceId() + "\",\"time\": " + + "0},\"payloadData\": { \"temperature\": " + currentTemperature + "} }}"; try { String payLoad = AgentUtilOperations.prepareSecurePayLoad(message); diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/xmpp/FireAlarmXMPPCommunicator.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/xmpp/FireAlarmXMPPCommunicator.java index abb8d7965..0780f2d84 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/xmpp/FireAlarmXMPPCommunicator.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/xmpp/FireAlarmXMPPCommunicator.java @@ -189,8 +189,10 @@ public class FireAlarmXMPPCommunicator extends XMPPTransportHandler { try { int currentTemperature = agentManager.getTemperature(); - - String message = AgentConstants.TEMPERATURE_CONTROL + ":" + currentTemperature; + String message = "{\"event\": {\"metaData\": {\"owner\": \"" + AgentManager + .getInstance().getAgentConfigs().getDeviceOwner() + "\",\"deviceId\": \"" + AgentManager + .getInstance().getAgentConfigs().getDeviceId() + "\",\"time\": " + + "0},\"payloadData\": { \"temperature\": " + currentTemperature + "} }}"; String payLoad = AgentUtilOperations.prepareSecurePayLoad(message); xmppMessage.setTo(xmppAdminJID); diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java index 566e5cfc0..f1372b25a 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java @@ -62,7 +62,7 @@ public class AgentConstants { public static final int DEFAULT_MQTT_RECONNECTION_INTERVAL = 2; // time in seconds public static final int DEFAULT_MQTT_QUALITY_OF_SERVICE = 0; public static final String MQTT_SUBSCRIBE_TOPIC = "%s/" + DEVICE_TYPE + "/%s"; - public static final String MQTT_PUBLISH_TOPIC = "%s/" + DEVICE_TYPE + "/%s/publisher"; + public static final String MQTT_PUBLISH_TOPIC = "%s/" + DEVICE_TYPE + "/%s/temperature"; /* --------------------------------------------------------------------------------------- Device/Agent specific properties to be read from the 'deviceConfig.properties' file diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java index 2e7634054..6ee95dceb 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java @@ -153,15 +153,15 @@ public class AgentManager { } } - try { - if (!EnrollmentManager.getInstance().isEnrolled()) { - EnrollmentManager.getInstance().beginEnrollmentFlow(); - } - } catch (AgentCoreOperationException e) { - log.error("Device Enrollment Failed:\n"); - log.error(e); - System.exit(0); - } +// try { +// if (!EnrollmentManager.getInstance().isEnrolled()) { +// EnrollmentManager.getInstance().beginEnrollmentFlow(); +// } +// } catch (AgentCoreOperationException e) { +// log.error("Device Enrollment Failed:\n"); +// log.error(e); +// System.exit(0); +// } //Start agent communication agentCommunicator.get(protocol).connect(); diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java index 60c3941b8..7a365174b 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java @@ -250,57 +250,65 @@ public class AgentUtilOperations { } public static String prepareSecurePayLoad(String message) throws AgentCoreOperationException { - PrivateKey devicePrivateKey = EnrollmentManager.getInstance().getPrivateKey(); - String encodedMessage = Base64.encodeBase64String(message.getBytes()); - String signedPayload; - try { - signedPayload = CommunicationUtils.signMessage(encodedMessage, devicePrivateKey); - } catch (TransportHandlerException e) { - String errorMsg = "Error occurred whilst trying to sign encrypted message of: [" + message + "]"; - log.error(errorMsg); - throw new AgentCoreOperationException(errorMsg, e); - } + if (EnrollmentManager.getInstance().isEnrolled()) { + PrivateKey devicePrivateKey = EnrollmentManager.getInstance().getPrivateKey(); + String encodedMessage = Base64.encodeBase64String(message.getBytes()); + String signedPayload; + try { + signedPayload = CommunicationUtils.signMessage(encodedMessage, devicePrivateKey); + } catch (TransportHandlerException e) { + String errorMsg = "Error occurred whilst trying to sign encrypted message of: [" + message + "]"; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } - JSONObject jsonPayload = new JSONObject(); - jsonPayload.put(JSON_MESSAGE_KEY, encodedMessage); - jsonPayload.put(JSON_SIGNATURE_KEY, signedPayload); - //below statements are temporary fix. - jsonPayload.put(JSON_SERIAL_KEY, EnrollmentManager.getInstance().getSCEPCertificate().getSerialNumber()); - return jsonPayload.toString(); + JSONObject jsonPayload = new JSONObject(); + jsonPayload.put(JSON_MESSAGE_KEY, encodedMessage); + jsonPayload.put(JSON_SIGNATURE_KEY, signedPayload); + //below statements are temporary fix. + jsonPayload.put(JSON_SERIAL_KEY, EnrollmentManager.getInstance().getSCEPCertificate().getSerialNumber()); + return jsonPayload.toString(); + } else { + return message; + } } public static String extractMessageFromPayload(String message) throws AgentCoreOperationException { - String actualMessage; + if (EnrollmentManager.getInstance().isEnrolled()) { + String actualMessage; - PublicKey serverPublicKey = EnrollmentManager.getInstance().getServerPublicKey(); - JSONObject jsonPayload = new JSONObject(message); - Object encodedMessage = jsonPayload.get(JSON_MESSAGE_KEY); - Object signedPayload = jsonPayload.get(JSON_SIGNATURE_KEY); - boolean verification; + PublicKey serverPublicKey = EnrollmentManager.getInstance().getServerPublicKey(); + JSONObject jsonPayload = new JSONObject(message); + Object encodedMessage = jsonPayload.get(JSON_MESSAGE_KEY); + Object signedPayload = jsonPayload.get(JSON_SIGNATURE_KEY); + boolean verification; - if (encodedMessage != null && signedPayload != null) { - try { - verification = CommunicationUtils.verifySignature( - encodedMessage.toString(), signedPayload.toString(), serverPublicKey); - } catch (TransportHandlerException e) { - String errorMsg = - "Error occurred whilst trying to verify signature on received message: [" + message + "]"; + if (encodedMessage != null && signedPayload != null) { + try { + verification = CommunicationUtils.verifySignature( + encodedMessage.toString(), signedPayload.toString(), serverPublicKey); + } catch (TransportHandlerException e) { + String errorMsg = + "Error occurred whilst trying to verify signature on received message: [" + message + "]"; + log.error(errorMsg); + throw new AgentCoreOperationException(errorMsg, e); + } + } else { + String errorMsg = "The received message is in an INVALID format. " + + "Need to be JSON - {\"Msg\":\"\", \"Sig\":\"\"}."; + throw new AgentCoreOperationException(errorMsg); + } + if (verification) { + actualMessage = new String(Base64.decodeBase64(encodedMessage.toString()), StandardCharsets.UTF_8); + } else { + String errorMsg = "Could not verify payload signature. The message was not signed by a valid client"; log.error(errorMsg); - throw new AgentCoreOperationException(errorMsg, e); + throw new AgentCoreOperationException(errorMsg); } + return actualMessage; } else { - String errorMsg = "The received message is in an INVALID format. " + - "Need to be JSON - {\"Msg\":\"\", \"Sig\":\"\"}."; - throw new AgentCoreOperationException(errorMsg); - } - if (verification) { - actualMessage = new String(Base64.decodeBase64(encodedMessage.toString()), StandardCharsets.UTF_8); - } else { - String errorMsg = "Could not verify payload signature. The message was not signed by a valid client"; - log.error(errorMsg); - throw new AgentCoreOperationException(errorMsg); + return message; } - return actualMessage; } public static String getAuthenticationMethod() { diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java index 6059483bc..deaa5ac24 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java @@ -111,7 +111,7 @@ public class EnrollmentManager { */ private EnrollmentManager() { this.SCEPUrl = AgentManager.getInstance().getEnrollmentEP(); - setEnrollmentStatus(); + //setEnrollmentStatus(); } /** From c3cd99895cf9e2af2ab0aeec4de24fb9e15cc707 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 7 Jan 2017 11:22:33 +0000 Subject: [PATCH 040/856] [maven-release-plugin] prepare release v3.0.5 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6c9cc0636..47a7e940b 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.5-SNAPSHOT + 3.0.5 ../pom.xml From 20d0dc0f8d1ec459d96b0267d1f7916131035056 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 7 Jan 2017 11:22:33 +0000 Subject: [PATCH 041/856] [maven-release-plugin] prepare release v3.0.5 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4e3e50615..53ca0ea28 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.5-SNAPSHOT + 3.0.5 ../pom.xml From 2f538b3d1f51c5ec5841727841e1336e685345c1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 7 Jan 2017 11:25:51 +0000 Subject: [PATCH 042/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 47a7e940b..a864e988a 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.5 + 3.0.6-SNAPSHOT ../pom.xml From 8c259c54a1f43ac4efc8f3ae8582934a2f0ecc1a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 7 Jan 2017 11:25:51 +0000 Subject: [PATCH 043/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 53ca0ea28..bc54bbb8f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.5 + 3.0.6-SNAPSHOT ../pom.xml From 3fa57e1dc61985c7f07910ac65880879a215da8d Mon Sep 17 00:00:00 2001 From: ayyoob Date: Sun, 8 Jan 2017 21:26:14 +0530 Subject: [PATCH 044/856] moved common configuration to global properties for input and output adapters --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index a37fc8ad4..ab9ed68ed 100644 --- a/pom.xml +++ b/pom.xml @@ -238,6 +238,7 @@ org.wso2.carbon.devicemgt org.wso2.carbon.apimgt.annotations + provided From 64aa89906a75ea6b40c889a51ef0bb9105b2affb Mon Sep 17 00:00:00 2001 From: ayyoob Date: Thu, 12 Jan 2017 19:29:59 +0530 Subject: [PATCH 045/856] moved to gateway mode --- src/main/webapp/WEB-INF/web.xml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index eb4a397bf..4337c5720 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -16,18 +16,10 @@ CXFServlet /* - - isAdminService - false - doAuthentication true - - providerTenantDomain - carbon.super - From 6afdf17a8b2af427d7890b72e82c9813be7db7cd Mon Sep 17 00:00:00 2001 From: ayyoob Date: Fri, 13 Jan 2017 04:49:35 +0530 Subject: [PATCH 046/856] moved the traffic through the gateway --- .../iot/virtualfirealarm/agent/core/AgentUtilOperations.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java index 7a365174b..8f6fe409b 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java @@ -437,7 +437,7 @@ public class AgentUtilOperations { } private class APIManagerTokenUtils { - public static final String TOKEN_ENDPOINT = "/oauth2/token"; + public static final String TOKEN_ENDPOINT = "/token"; public static final String GRANT_TYPE = "grant_type"; public static final String ACCESS_TOKEN = "access_token"; public static final String REFRESH_TOKEN = "refresh_token"; From 40e16b9d2ed483221ab39809b520b50485f265e3 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Fri, 13 Jan 2017 04:49:35 +0530 Subject: [PATCH 047/856] moved the traffic through the gateway --- .../service/impl/util/ZipUtil.java | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java index 39e938f2b..e9bcb6c60 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java @@ -25,14 +25,13 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.json.JSONObject; import org.wso2.carbon.apimgt.application.extension.constants.ApiApplicationConstants; -import org.wso2.carbon.base.ServerConfiguration; +import org.wso2.carbon.core.util.Utils; import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.xmpp.XmppConfig; import org.wso2.carbon.utils.CarbonUtils; -import org.wso2.carbon.utils.NetworkUtils; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; @@ -64,10 +63,10 @@ public class ZipUtil { private static final String HTTP_PORT_PROPERTY = "httpPort"; private static final String LOCALHOST = "localhost"; - private static final String HTTPS_PROTOCOL_APPENDER = "https://"; - private static final String HTTP_PROTOCOL_APPENDER = "http://"; + private static final String HTTPS_PROTOCOL_URL = "https://${iot.gateway.host}:${iot.gateway.https.port}"; + private static final String HTTP_PROTOCOL_URL = "http://${iot.gateway.host}:${iot.gateway.http.port}"; private static final String CONFIG_TYPE = "general"; - private static final String DEFAULT_MQTT_ENDPOINT = "tcp://localhost:1886"; + private static final String DEFAULT_MQTT_ENDPOINT = "tcp://${mqtt.broker.host}:${mqtt.broker.port}"; public static final String HOST_NAME = "HostName"; public ZipArchive createZipFile(String owner, String deviceType, String deviceId, String deviceName, @@ -83,13 +82,13 @@ public class ZipUtil { try { iotServerIP = getServerUrl(); - String httpsServerPort = System.getProperty(HTTPS_PORT_PROPERTY); - String httpServerPort = System.getProperty(HTTP_PORT_PROPERTY); - String httpsServerEP = HTTPS_PROTOCOL_APPENDER + iotServerIP + ":" + httpsServerPort; - String httpServerEP = HTTP_PROTOCOL_APPENDER + iotServerIP + ":" + httpServerPort; - String mqttEndpoint = DEFAULT_MQTT_ENDPOINT; + String httpsServerEP = Utils.replaceSystemProperty(HTTPS_PROTOCOL_URL); + String httpServerEP = Utils.replaceSystemProperty(HTTP_PROTOCOL_URL); + String mqttEndpoint = Utils.replaceSystemProperty(DEFAULT_MQTT_ENDPOINT); if (mqttEndpoint.contains(LOCALHOST)) { mqttEndpoint = mqttEndpoint.replace(LOCALHOST, iotServerIP); + httpsServerEP = httpsServerEP.replace(LOCALHOST, iotServerIP); + httpServerEP = httpServerEP.replace(LOCALHOST, iotServerIP); } String xmppEndpoint = ""; @@ -161,16 +160,12 @@ public class ZipUtil { } public static String getServerUrl() { - String hostName = ServerConfiguration.getInstance().getFirstProperty(HOST_NAME); try { - if (hostName == null) { - hostName = NetworkUtils.getLocalHostname(); - } + return org.apache.axis2.util.Utils.getIpAddress(); } catch (SocketException e) { - hostName = "localhost"; log.warn("Failed retrieving the hostname, therefore set to localhost", e); + return "localhost"; } - return hostName; } public static ZipArchive getSketchArchive(String archivesPath, String templateSketchPath, Map contextParams From 01842cfce8531b10a4b0998d54e4cd9c27d385c7 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 14 Jan 2017 12:17:46 +0000 Subject: [PATCH 048/856] [maven-release-plugin] prepare release v3.0.6 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bc54bbb8f..cc1ddcd6d 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.6-SNAPSHOT + 3.0.6 ../pom.xml From 5f550ac56618ececd6616547c92f4de8d77cf722 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 14 Jan 2017 12:17:46 +0000 Subject: [PATCH 049/856] [maven-release-plugin] prepare release v3.0.6 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ab9ed68ed..220b86ceb 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.6-SNAPSHOT + 3.0.6 ../pom.xml From 2a5ee6ee47a7a3f25bebec02f01b14aa70a44ddc Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 14 Jan 2017 12:22:40 +0000 Subject: [PATCH 050/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cc1ddcd6d..49cd2dc3a 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.6 + 3.0.7-SNAPSHOT ../pom.xml From 4268aed9d241a83fae5d5f07de5e1e0a1848e50c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 14 Jan 2017 12:22:40 +0000 Subject: [PATCH 051/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 220b86ceb..51f74e071 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.6 + 3.0.7-SNAPSHOT ../pom.xml From 8353954b16c2bc70cc4575e4e19ac697e4dcf669 Mon Sep 17 00:00:00 2001 From: warunalakshitha Date: Tue, 17 Jan 2017 16:05:42 +0530 Subject: [PATCH 052/856] Fix Message digest is weak security bug --- .../agent/transport/CommunicationUtils.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java index bb445a3d9..46a43a0ba 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java @@ -43,7 +43,7 @@ public class CommunicationUtils { private static final Log log = LogFactory.getLog(TransportUtils.class); // The Signature Algorithm used. - private static final String SIGNATURE_ALG = "SHA1withRSA"; + private static final String SHA_512 = "SHA-512"; // The Encryption Algorithm and the Padding used. private static final String CIPHER_PADDING = "RSA/ECB/PKCS1Padding"; @@ -107,7 +107,7 @@ public class CommunicationUtils { String signedEncodedString; try { - signature = Signature.getInstance(SIGNATURE_ALG); + signature = Signature.getInstance(SHA_512); signature.initSign(signatureKey); signature.update(Base64.decodeBase64(message)); @@ -116,11 +116,11 @@ public class CommunicationUtils { } catch (NoSuchAlgorithmException e) { String errorMsg = - "Algorithm not found exception occurred for Signature instance of [" + SIGNATURE_ALG + "]"; + "Algorithm not found exception occurred for Signature instance of [" + SHA_512 + "]"; log.error(errorMsg); throw new TransportHandlerException(errorMsg, e); } catch (SignatureException e) { - String errorMsg = "Signature exception occurred for Signature instance of [" + SIGNATURE_ALG + "]"; + String errorMsg = "Signature exception occurred for Signature instance of [" + SHA_512 + "]"; log.error(errorMsg); throw new TransportHandlerException(errorMsg, e); } catch (InvalidKeyException e) { @@ -152,7 +152,7 @@ public class CommunicationUtils { boolean verified; try { - signature = Signature.getInstance(SIGNATURE_ALG); + signature = Signature.getInstance(SHA_512); signature.initVerify(verificationKey); signature.update(Base64.decodeBase64(data)); @@ -160,11 +160,11 @@ public class CommunicationUtils { } catch (NoSuchAlgorithmException e) { String errorMsg = - "Algorithm not found exception occurred for Signature instance of [" + SIGNATURE_ALG + "]"; + "Algorithm not found exception occurred for Signature instance of [" + SHA_512 + "]"; log.error(errorMsg); throw new TransportHandlerException(errorMsg, e); } catch (SignatureException e) { - String errorMsg = "Signature exception occurred for Signature instance of [" + SIGNATURE_ALG + "]"; + String errorMsg = "Signature exception occurred for Signature instance of [" + SHA_512 + "]"; log.error(errorMsg); throw new TransportHandlerException(errorMsg, e); } catch (InvalidKeyException e) { From 5dbcbbe43a6d758a2fedf8dad4fee28fd7ea80c4 Mon Sep 17 00:00:00 2001 From: warunalakshitha Date: Tue, 17 Jan 2017 16:07:02 +0530 Subject: [PATCH 053/856] Fix Predictable pseudorandom number generator security issue --- .../agent/transport/TransportUtils.java | 39 ++++++++++--------- .../agent/virtual/VirtualHardwareManager.java | 14 ++++--- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java index 11ebc04bf..b55aee02d 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java @@ -36,6 +36,8 @@ import java.net.ServerSocket; import java.net.SocketException; import java.net.URL; import java.nio.charset.StandardCharsets; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; import java.util.ArrayList; import java.util.Enumeration; import java.util.HashMap; @@ -173,27 +175,26 @@ public class TransportUtils { */ public static synchronized int getAvailablePort(int randomAttempts) { ArrayList failedPorts = new ArrayList(randomAttempts); - - Random randomNum = new Random(); - int randomPort = MAX_PORT_NUMBER; - - while (randomAttempts > 0) { - randomPort = randomNum.nextInt(MAX_PORT_NUMBER - MIN_PORT_NUMBER) + MIN_PORT_NUMBER; - - if (checkIfPortAvailable(randomPort)) { - return randomPort; + try { + SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG"); + int randomPort = MAX_PORT_NUMBER; + while (randomAttempts > 0) { + randomPort = secureRandom.nextInt(MAX_PORT_NUMBER - MIN_PORT_NUMBER) + MIN_PORT_NUMBER; + if (checkIfPortAvailable(randomPort)) { + return randomPort; + } + failedPorts.add(randomPort); + randomAttempts--; } - failedPorts.add(randomPort); - randomAttempts--; - } - - randomPort = MAX_PORT_NUMBER; - - while (true) { - if (!failedPorts.contains(randomPort) && checkIfPortAvailable(randomPort)) { - return randomPort; + randomPort = MAX_PORT_NUMBER; + while (true) { + if (!failedPorts.contains(randomPort) && checkIfPortAvailable(randomPort)) { + return randomPort; + } + randomPort--; } - randomPort--; + } catch (NoSuchAlgorithmException e) { + throw new RuntimeException("SHA1PRNG algorithm could not be found."); } } diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java index 3b777cf75..61135c58a 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java @@ -33,6 +33,8 @@ import javax.sound.sampled.Clip; import javax.swing.*; import java.io.IOException; import java.io.InputStream; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; /** * This class use to emulate virtual hardware functionality @@ -174,19 +176,19 @@ public class VirtualHardwareManager { } private int getRandom(int max, int min, int current, boolean isSmoothed, int svf) { - if (isSmoothed) { int offset = (max - min) * svf / 100; double mx = current + offset; max = (mx > max) ? max : (int) Math.round(mx); - double mn = current - offset; min = (mn < min) ? min : (int) Math.round(mn); } - - double rnd = Math.random() * (max - min) + min; - return (int) Math.round(rnd); - + try { + SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG"); + return secureRandom.nextInt(max - min) + min; + } catch (NoSuchAlgorithmException e) { + throw new RuntimeException("SHA1PRNG algorithm could not be found."); + } } private void setAudioSequencer() { From 5eea20e887324272c14bdac7168b50104fa8e63c Mon Sep 17 00:00:00 2001 From: warunalakshitha Date: Tue, 17 Jan 2017 16:08:00 +0530 Subject: [PATCH 054/856] Fix Hard Coded Password security warning --- .../agent/enrollment/EnrollmentManager.java | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java index deaa5ac24..26006620f 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java @@ -129,11 +129,8 @@ public class EnrollmentManager { public void setEnrollmentStatus() { KeyStore keyStore; - try { keyStore = KeyStore.getInstance(AgentConstants.DEVICE_KEYSTORE_TYPE); - keyStore.load(new FileInputStream(AgentConstants.DEVICE_KEYSTORE), - AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray()); this.isEnrolled = (keyStore.containsAlias(AgentConstants.DEVICE_CERT_ALIAS) && keyStore.containsAlias(AgentConstants.DEVICE_PRIVATE_KEY_ALIAS) && @@ -146,21 +143,7 @@ public class EnrollmentManager { log.error(AgentConstants.LOG_APPENDER + e); log.warn(AgentConstants.LOG_APPENDER + "Device will be re-enrolled."); return; - } catch (CertificateException | NoSuchAlgorithmException e) { - log.error(AgentConstants.LOG_APPENDER + "An error occurred whilst trying to [load] the device KeyStore '" + - AgentConstants.DEVICE_KEYSTORE + "'."); - log.error(AgentConstants.LOG_APPENDER + e); - log.warn(AgentConstants.LOG_APPENDER + "Device will be re-enrolled."); - return; - } catch (IOException e) { - log.error(AgentConstants.LOG_APPENDER + - "An error occurred whilst trying to load input stream with the keystore file: " + - AgentConstants.DEVICE_KEYSTORE); - log.error(AgentConstants.LOG_APPENDER + e); - log.warn(AgentConstants.LOG_APPENDER + "Device will be re-enrolled."); - return; } - try { if (this.isEnrolled) { this.SCEPCertificate = (X509Certificate) keyStore.getCertificate(AgentConstants.DEVICE_CERT_ALIAS); @@ -262,9 +245,6 @@ public class EnrollmentManager { KeyStore keyStore; try { keyStore = KeyStore.getInstance(AgentConstants.DEVICE_KEYSTORE_TYPE); - keyStore.load(new FileInputStream(AgentConstants.DEVICE_KEYSTORE), - AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray()); - keyStore.setCertificateEntry(alias, certificate); keyStore.store(new FileOutputStream(AgentConstants.DEVICE_KEYSTORE), AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray()); @@ -285,9 +265,6 @@ public class EnrollmentManager { KeyStore keyStore; try { keyStore = KeyStore.getInstance(AgentConstants.DEVICE_KEYSTORE_TYPE); - keyStore.load(new FileInputStream(AgentConstants.DEVICE_KEYSTORE), - AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray()); - Certificate[] certChain = new Certificate[1]; certChain[0] = certInCertChain; From 52462bb620a7936a7cb3322c821117e9b7acc550 Mon Sep 17 00:00:00 2001 From: Megala Date: Wed, 18 Jan 2017 09:47:00 +0530 Subject: [PATCH 055/856] resolving conflicts --- .../agent/enrollment/EnrollmentManager.java | 23 ----------- .../agent/transport/CommunicationUtils.java | 14 +++---- .../agent/transport/TransportUtils.java | 39 ++++++++++--------- .../agent/virtual/VirtualHardwareManager.java | 14 ++++--- 4 files changed, 35 insertions(+), 55 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java index deaa5ac24..26006620f 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java @@ -129,11 +129,8 @@ public class EnrollmentManager { public void setEnrollmentStatus() { KeyStore keyStore; - try { keyStore = KeyStore.getInstance(AgentConstants.DEVICE_KEYSTORE_TYPE); - keyStore.load(new FileInputStream(AgentConstants.DEVICE_KEYSTORE), - AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray()); this.isEnrolled = (keyStore.containsAlias(AgentConstants.DEVICE_CERT_ALIAS) && keyStore.containsAlias(AgentConstants.DEVICE_PRIVATE_KEY_ALIAS) && @@ -146,21 +143,7 @@ public class EnrollmentManager { log.error(AgentConstants.LOG_APPENDER + e); log.warn(AgentConstants.LOG_APPENDER + "Device will be re-enrolled."); return; - } catch (CertificateException | NoSuchAlgorithmException e) { - log.error(AgentConstants.LOG_APPENDER + "An error occurred whilst trying to [load] the device KeyStore '" + - AgentConstants.DEVICE_KEYSTORE + "'."); - log.error(AgentConstants.LOG_APPENDER + e); - log.warn(AgentConstants.LOG_APPENDER + "Device will be re-enrolled."); - return; - } catch (IOException e) { - log.error(AgentConstants.LOG_APPENDER + - "An error occurred whilst trying to load input stream with the keystore file: " + - AgentConstants.DEVICE_KEYSTORE); - log.error(AgentConstants.LOG_APPENDER + e); - log.warn(AgentConstants.LOG_APPENDER + "Device will be re-enrolled."); - return; } - try { if (this.isEnrolled) { this.SCEPCertificate = (X509Certificate) keyStore.getCertificate(AgentConstants.DEVICE_CERT_ALIAS); @@ -262,9 +245,6 @@ public class EnrollmentManager { KeyStore keyStore; try { keyStore = KeyStore.getInstance(AgentConstants.DEVICE_KEYSTORE_TYPE); - keyStore.load(new FileInputStream(AgentConstants.DEVICE_KEYSTORE), - AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray()); - keyStore.setCertificateEntry(alias, certificate); keyStore.store(new FileOutputStream(AgentConstants.DEVICE_KEYSTORE), AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray()); @@ -285,9 +265,6 @@ public class EnrollmentManager { KeyStore keyStore; try { keyStore = KeyStore.getInstance(AgentConstants.DEVICE_KEYSTORE_TYPE); - keyStore.load(new FileInputStream(AgentConstants.DEVICE_KEYSTORE), - AgentConstants.DEVICE_KEYSTORE_PASSWORD.toCharArray()); - Certificate[] certChain = new Certificate[1]; certChain[0] = certInCertChain; diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java index bb445a3d9..46a43a0ba 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java @@ -43,7 +43,7 @@ public class CommunicationUtils { private static final Log log = LogFactory.getLog(TransportUtils.class); // The Signature Algorithm used. - private static final String SIGNATURE_ALG = "SHA1withRSA"; + private static final String SHA_512 = "SHA-512"; // The Encryption Algorithm and the Padding used. private static final String CIPHER_PADDING = "RSA/ECB/PKCS1Padding"; @@ -107,7 +107,7 @@ public class CommunicationUtils { String signedEncodedString; try { - signature = Signature.getInstance(SIGNATURE_ALG); + signature = Signature.getInstance(SHA_512); signature.initSign(signatureKey); signature.update(Base64.decodeBase64(message)); @@ -116,11 +116,11 @@ public class CommunicationUtils { } catch (NoSuchAlgorithmException e) { String errorMsg = - "Algorithm not found exception occurred for Signature instance of [" + SIGNATURE_ALG + "]"; + "Algorithm not found exception occurred for Signature instance of [" + SHA_512 + "]"; log.error(errorMsg); throw new TransportHandlerException(errorMsg, e); } catch (SignatureException e) { - String errorMsg = "Signature exception occurred for Signature instance of [" + SIGNATURE_ALG + "]"; + String errorMsg = "Signature exception occurred for Signature instance of [" + SHA_512 + "]"; log.error(errorMsg); throw new TransportHandlerException(errorMsg, e); } catch (InvalidKeyException e) { @@ -152,7 +152,7 @@ public class CommunicationUtils { boolean verified; try { - signature = Signature.getInstance(SIGNATURE_ALG); + signature = Signature.getInstance(SHA_512); signature.initVerify(verificationKey); signature.update(Base64.decodeBase64(data)); @@ -160,11 +160,11 @@ public class CommunicationUtils { } catch (NoSuchAlgorithmException e) { String errorMsg = - "Algorithm not found exception occurred for Signature instance of [" + SIGNATURE_ALG + "]"; + "Algorithm not found exception occurred for Signature instance of [" + SHA_512 + "]"; log.error(errorMsg); throw new TransportHandlerException(errorMsg, e); } catch (SignatureException e) { - String errorMsg = "Signature exception occurred for Signature instance of [" + SIGNATURE_ALG + "]"; + String errorMsg = "Signature exception occurred for Signature instance of [" + SHA_512 + "]"; log.error(errorMsg); throw new TransportHandlerException(errorMsg, e); } catch (InvalidKeyException e) { diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java index 11ebc04bf..b55aee02d 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java @@ -36,6 +36,8 @@ import java.net.ServerSocket; import java.net.SocketException; import java.net.URL; import java.nio.charset.StandardCharsets; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; import java.util.ArrayList; import java.util.Enumeration; import java.util.HashMap; @@ -173,27 +175,26 @@ public class TransportUtils { */ public static synchronized int getAvailablePort(int randomAttempts) { ArrayList failedPorts = new ArrayList(randomAttempts); - - Random randomNum = new Random(); - int randomPort = MAX_PORT_NUMBER; - - while (randomAttempts > 0) { - randomPort = randomNum.nextInt(MAX_PORT_NUMBER - MIN_PORT_NUMBER) + MIN_PORT_NUMBER; - - if (checkIfPortAvailable(randomPort)) { - return randomPort; + try { + SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG"); + int randomPort = MAX_PORT_NUMBER; + while (randomAttempts > 0) { + randomPort = secureRandom.nextInt(MAX_PORT_NUMBER - MIN_PORT_NUMBER) + MIN_PORT_NUMBER; + if (checkIfPortAvailable(randomPort)) { + return randomPort; + } + failedPorts.add(randomPort); + randomAttempts--; } - failedPorts.add(randomPort); - randomAttempts--; - } - - randomPort = MAX_PORT_NUMBER; - - while (true) { - if (!failedPorts.contains(randomPort) && checkIfPortAvailable(randomPort)) { - return randomPort; + randomPort = MAX_PORT_NUMBER; + while (true) { + if (!failedPorts.contains(randomPort) && checkIfPortAvailable(randomPort)) { + return randomPort; + } + randomPort--; } - randomPort--; + } catch (NoSuchAlgorithmException e) { + throw new RuntimeException("SHA1PRNG algorithm could not be found."); } } diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java index 3b777cf75..61135c58a 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java @@ -33,6 +33,8 @@ import javax.sound.sampled.Clip; import javax.swing.*; import java.io.IOException; import java.io.InputStream; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; /** * This class use to emulate virtual hardware functionality @@ -174,19 +176,19 @@ public class VirtualHardwareManager { } private int getRandom(int max, int min, int current, boolean isSmoothed, int svf) { - if (isSmoothed) { int offset = (max - min) * svf / 100; double mx = current + offset; max = (mx > max) ? max : (int) Math.round(mx); - double mn = current - offset; min = (mn < min) ? min : (int) Math.round(mn); } - - double rnd = Math.random() * (max - min) + min; - return (int) Math.round(rnd); - + try { + SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG"); + return secureRandom.nextInt(max - min) + min; + } catch (NoSuchAlgorithmException e) { + throw new RuntimeException("SHA1PRNG algorithm could not be found."); + } } private void setAudioSequencer() { From 11f27d66611a8df64ebf8d2bf34671a8a96bfae7 Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Thu, 19 Jan 2017 10:46:42 +0530 Subject: [PATCH 056/856] Adding permission updater for other device types. --- .../constants/VirtualFireAlarmConstants.java | 5 + ...tualFireAlarmPermissionUpdateListener.java | 113 ++++++++++++++++++ src/main/webapp/WEB-INF/web.xml | 4 +- 3 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/listener/VirtualFireAlarmPermissionUpdateListener.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java index 204ede004..31a140efe 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java @@ -81,4 +81,9 @@ public class VirtualFireAlarmConstants { public static final String MQTT_ADAPTER_TOPIC_PROPERTY_NAME = "mqtt.adapter.topic"; public static final String APIM_APPLICATION_TOKEN_VALIDITY_PERIOD = "3600"; + + public static final String PERM_ENROLL_FIRE_ALARM = "/permission/admin/device-mgt/devices/enroll/firealarm"; + public static final String PERM_OWNING_DEVICE_VIEW = "/permission/admin/device-mgt/devices/owning-device/view"; + + public static final String ROLE_NAME = "internal/devicemgt-user"; } diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/listener/VirtualFireAlarmPermissionUpdateListener.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/listener/VirtualFireAlarmPermissionUpdateListener.java new file mode 100644 index 000000000..829868010 --- /dev/null +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/listener/VirtualFireAlarmPermissionUpdateListener.java @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.listener; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.CarbonConstants; +import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.constants.VirtualFireAlarmConstants; +import org.wso2.carbon.user.api.AuthorizationManager; +import org.wso2.carbon.user.api.Permission; +import org.wso2.carbon.user.api.UserStoreException; +import org.wso2.carbon.user.api.UserStoreManager; +import org.wso2.carbon.user.core.service.RealmService; + +import javax.servlet.ServletContextEvent; +import javax.servlet.ServletContextListener; + +public class VirtualFireAlarmPermissionUpdateListener implements ServletContextListener { + + private static Log log = LogFactory.getLog(VirtualFireAlarmPermissionUpdateListener.class); + + @Override + public void contextInitialized(ServletContextEvent servletContextEvent) { + + UserStoreManager userStoreManager = getUserStoreManager(); + try { + if (userStoreManager != null) { + if (!userStoreManager.isExistingRole(VirtualFireAlarmConstants.ROLE_NAME)) { + userStoreManager.addRole(VirtualFireAlarmConstants.ROLE_NAME, null, getPermissions()); + } else { + getAuthorizationManager().authorizeRole(VirtualFireAlarmConstants.ROLE_NAME, + VirtualFireAlarmConstants.PERM_ENROLL_FIRE_ALARM, CarbonConstants.UI_PERMISSION_ACTION); + getAuthorizationManager().authorizeRole(VirtualFireAlarmConstants.ROLE_NAME, + VirtualFireAlarmConstants.PERM_OWNING_DEVICE_VIEW, CarbonConstants.UI_PERMISSION_ACTION); + } + } } catch (UserStoreException e) { + log.error("Error while creating a role and adding a user for Raspberry PI.", e); + } + } + + @Override + public void contextDestroyed(ServletContextEvent servletContextEvent) { + + } + + public static UserStoreManager getUserStoreManager() { + RealmService realmService; + UserStoreManager userStoreManager; + try { + PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + realmService = (RealmService) ctx.getOSGiService(RealmService.class, null); + if (realmService == null) { + String msg = "Realm service has not initialized."; + log.error(msg); + throw new IllegalStateException(msg); + } + int tenantId = ctx.getTenantId(); + userStoreManager = realmService.getTenantUserRealm(tenantId).getUserStoreManager(); + realmService.getTenantUserRealm(tenantId).getAuthorizationManager(); + } catch (UserStoreException e) { + String msg = "Error occurred while retrieving current user store manager"; + log.error(msg, e); + throw new IllegalStateException(msg); + } + return userStoreManager; + } + + public static AuthorizationManager getAuthorizationManager() { + RealmService realmService; + AuthorizationManager authorizationManager; + try { + PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + realmService = (RealmService) ctx.getOSGiService(RealmService.class, null); + if (realmService == null) { + String msg = "Realm service has not initialized."; + log.error(msg); + throw new IllegalStateException(msg); + } + int tenantId = ctx.getTenantId(); + authorizationManager = realmService.getTenantUserRealm(tenantId).getAuthorizationManager(); + } catch (UserStoreException e) { + String msg = "Error occurred while retrieving current user store manager"; + log.error(msg, e); + throw new IllegalStateException(msg); + } + return authorizationManager; + } + + private Permission[] getPermissions() { + + Permission androidSense = new Permission(VirtualFireAlarmConstants.PERM_ENROLL_FIRE_ALARM, + CarbonConstants.UI_PERMISSION_ACTION); + Permission view = new Permission(VirtualFireAlarmConstants.PERM_OWNING_DEVICE_VIEW, CarbonConstants + .UI_PERMISSION_ACTION); + + return new Permission[]{androidSense, view}; + } + +} diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 4337c5720..6f59c5a7c 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -27,6 +27,8 @@ true - + + org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.listener.VirtualFireAlarmPermissionUpdateListener + \ No newline at end of file From 6c34c8568d3eba2fa618483c023fa0e57d6dcb37 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 20 Jan 2017 02:03:09 +0000 Subject: [PATCH 057/856] [maven-release-plugin] prepare release v3.0.7 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 51f74e071..af5dfbcb1 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.7-SNAPSHOT + 3.0.7 ../pom.xml From 6c488add27ececa75f42808f3c5e60112183d161 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 20 Jan 2017 02:03:09 +0000 Subject: [PATCH 058/856] [maven-release-plugin] prepare release v3.0.7 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 49cd2dc3a..aa53aa916 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.7-SNAPSHOT + 3.0.7 ../pom.xml From 988a0a57853b15cfae2e7e3fbcf4961218c18b2a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 20 Jan 2017 02:04:54 +0000 Subject: [PATCH 059/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index af5dfbcb1..6b960c6ff 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.7 + 3.0.8-SNAPSHOT ../pom.xml From c870e81d22fb6a34573713a76a1fff3cc4eabdc9 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 20 Jan 2017 02:04:54 +0000 Subject: [PATCH 060/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index aa53aa916..722f8e757 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.7 + 3.0.8-SNAPSHOT ../pom.xml From 5b27beff740110192ad547cc6b9042441cf9391c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 20 Jan 2017 13:31:44 +0000 Subject: [PATCH 061/856] [maven-release-plugin] prepare release v3.0.8 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6b960c6ff..a51b5e4cf 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.8-SNAPSHOT + 3.0.8 ../pom.xml From 6e81fa50004a92356befda70c0f327eb3c869a65 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 20 Jan 2017 13:31:44 +0000 Subject: [PATCH 062/856] [maven-release-plugin] prepare release v3.0.8 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 722f8e757..6f65e1fc9 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.8-SNAPSHOT + 3.0.8 ../pom.xml From d17ed2377369c160f08ee88783a77874145ea279 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 20 Jan 2017 13:36:50 +0000 Subject: [PATCH 063/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a51b5e4cf..890431608 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.8 + 3.0.9-SNAPSHOT ../pom.xml From 8c82c4fc55c5d0ff269dc5fc7c3174ee27608b78 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 20 Jan 2017 13:36:50 +0000 Subject: [PATCH 064/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6f65e1fc9..dd0913181 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.8 + 3.0.9-SNAPSHOT ../pom.xml From e3a11b0a446f6981acc2b432d7239d3aa7c790e3 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Tue, 24 Jan 2017 19:57:25 +0530 Subject: [PATCH 065/856] resolved merge issues --- .../impl/VirtualFireAlarmServiceImpl.java | 34 ------------------- .../service/impl/util/APIUtil.java | 13 ------- 2 files changed, 47 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java index f5bb1d84b..b283bcb3d 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java @@ -134,40 +134,6 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { } } - @PUT - @Path("device/{deviceId}/policy") - public Response updatePolicy(@PathParam("deviceId") String deviceId, @QueryParam("protocol") String protocol, - @FormParam("policy") String policy) { - String protocolString = protocol.toUpperCase(); - if (log.isDebugEnabled()) { - log.debug("Sending request to update-policy of device [" + deviceId + "] via " + protocolString); - } - try { - if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized( - new DeviceIdentifier(deviceId, VirtualFireAlarmConstants.DEVICE_TYPE), - DeviceGroupConstants.Permissions.DEFAULT_MANAGE_POLICIES_PERMISSIONS)) { - return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build(); - } - String actualMessage = VirtualFireAlarmConstants.POLICY_CONTEXT + ":" + policy; - Map dynamicProperties = new HashMap<>(); - String publishTopic = APIUtil.getTenantDomainOftheUser() + "/" - + VirtualFireAlarmConstants.DEVICE_TYPE + "/" + deviceId; - dynamicProperties.put(VirtualFireAlarmConstants.ADAPTER_TOPIC_PROPERTY, publishTopic); - dynamicProperties.put(VirtualFireAlarmConstants.JID_PROPERTY_KEY, - deviceId + "@" + XmppConfig.getInstance().getServerName()); - dynamicProperties.put(VirtualFireAlarmConstants.SUBJECT_PROPERTY_KEY, "POLICTY-REQUEST"); - dynamicProperties.put(VirtualFireAlarmConstants.MESSAGE_TYPE_PROPERTY_KEY, - VirtualFireAlarmConstants.CHAT_PROPERTY_KEY); - APIUtil.getOutputEventAdapterService().publish(VirtualFireAlarmConstants.XMPP_ADAPTER_NAME, - dynamicProperties, actualMessage); - return Response.ok().build(); - } catch (DeviceAccessAuthorizationException e) { - log.error(e.getErrorMessage(), e); - return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); - } - } - - @Path("device/stats/{deviceId}") @GET @Consumes("application/json") diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java index d302e7281..bbcf1acef 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java @@ -16,7 +16,6 @@ import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorization import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfigurationManagementService; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.dto.SensorRecord; -import org.wso2.carbon.event.output.adapter.core.OutputEventAdapterService; import org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService; import java.util.ArrayList; @@ -169,18 +168,6 @@ public class APIUtil { return deviceAccessAuthorizationService; } - public static OutputEventAdapterService getOutputEventAdapterService() { - PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); - OutputEventAdapterService outputEventAdapterService = - (OutputEventAdapterService) ctx.getOSGiService(OutputEventAdapterService.class, null); - if (outputEventAdapterService == null) { - String msg = "Device Authorization service has not initialized."; - log.error(msg); - throw new IllegalStateException(msg); - } - return outputEventAdapterService; - } - public static PlatformConfigurationManagementService getTenantConfigurationManagementService() { PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); PlatformConfigurationManagementService tenantConfigurationManagementService = From fd9dcdd34bff2497fe052cc3a48f5ce6f55f434c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 30 Jan 2017 18:07:24 +0530 Subject: [PATCH 066/856] [WSO2 Release] [Jenkins #2500] [Release 3.0.9] prepare release v3.0.9 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 890431608..bf10608a1 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.9-SNAPSHOT + 3.0.9 ../pom.xml From 33f1c6e46d6133eb83708f5dba2c924788fc5e3d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 30 Jan 2017 18:07:24 +0530 Subject: [PATCH 067/856] [WSO2 Release] [Jenkins #2500] [Release 3.0.9] prepare release v3.0.9 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dd0913181..d56cc1edc 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.9-SNAPSHOT + 3.0.9 ../pom.xml From e9cb15d9299da8dbd93cc84c669b1c533c852526 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 30 Jan 2017 18:07:35 +0530 Subject: [PATCH 068/856] [WSO2 Release] [Jenkins #2500] [Release 3.0.9] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bf10608a1..8a3beef41 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.9 + 3.0.10-SNAPSHOT ../pom.xml From f8a3becd5071452939d830c3a604e58e20ba3498 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 30 Jan 2017 18:07:35 +0530 Subject: [PATCH 069/856] [WSO2 Release] [Jenkins #2500] [Release 3.0.9] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d56cc1edc..5361c3ceb 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.9 + 3.0.10-SNAPSHOT ../pom.xml From 7cc846b125d68721db888329c3e14bd45a591f75 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 31 Jan 2017 12:58:45 +0530 Subject: [PATCH 070/856] [maven-release-plugin] prepare release v3.0.10 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8a3beef41..ee80a070c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.10-SNAPSHOT + 3.0.10 ../pom.xml From fe249ba6eab9b3492a34c030b7eb41f718fd97da Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 31 Jan 2017 12:58:45 +0530 Subject: [PATCH 071/856] [maven-release-plugin] prepare release v3.0.10 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5361c3ceb..cd3a56476 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.10-SNAPSHOT + 3.0.10 ../pom.xml From f66e3c775b7ae52fbd56099c1de3fc903ad8189b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 31 Jan 2017 12:58:56 +0530 Subject: [PATCH 072/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ee80a070c..57abd74f8 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.10 + 3.0.11-SNAPSHOT ../pom.xml From fa5f0a26c826a65856f63977a0f83336a65d627d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 31 Jan 2017 12:58:56 +0530 Subject: [PATCH 073/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cd3a56476..3e7328988 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.10 + 3.0.11-SNAPSHOT ../pom.xml From 73313d2bbce003eab28d5a0d6d907a54960367c9 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 2 Feb 2017 16:05:58 +0530 Subject: [PATCH 074/856] [WSO2 Release] [Jenkins #2510] [Release 3.0.11] prepare release v3.0.11 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 57abd74f8..c6aca5bf7 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.11-SNAPSHOT + 3.0.11 ../pom.xml From 68491b0f1171ff352f2c4678f0a9363042f4ad75 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 2 Feb 2017 16:05:58 +0530 Subject: [PATCH 075/856] [WSO2 Release] [Jenkins #2510] [Release 3.0.11] prepare release v3.0.11 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3e7328988..719a4e89e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.11-SNAPSHOT + 3.0.11 ../pom.xml From ad8aa806795c5c5842b08a12bf25d7c32f8fcc94 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 2 Feb 2017 16:06:06 +0530 Subject: [PATCH 076/856] [WSO2 Release] [Jenkins #2510] [Release 3.0.11] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c6aca5bf7..024ef6b57 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.11 + 3.0.12-SNAPSHOT ../pom.xml From b3f7d40881d3465966c8efdad4d83b4243876d7b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 2 Feb 2017 16:06:06 +0530 Subject: [PATCH 077/856] [WSO2 Release] [Jenkins #2510] [Release 3.0.11] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 719a4e89e..ec91a2e5d 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.11 + 3.0.12-SNAPSHOT ../pom.xml From 82de6712d66b2bef2e843c3de20a8aa6f7ec11f0 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Mon, 6 Feb 2017 03:47:54 +0530 Subject: [PATCH 078/856] fixed few multi tenant issues --- .../service/impl/VirtualFireAlarmServiceImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java index b283bcb3d..fbebe12f9 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java @@ -172,7 +172,9 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { public Response downloadSketch(@QueryParam("deviceName") String deviceName, @QueryParam("sketchType") String sketchType) { try { - ZipArchive zipFile = createDownloadFile(APIUtil.getAuthenticatedUser(), deviceName, sketchType); + String user = APIUtil.getAuthenticatedUser() + "@" + PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getTenantDomain(); + ZipArchive zipFile = createDownloadFile(user, deviceName, sketchType); Response.ResponseBuilder response = Response.ok(FileUtils.readFileToByteArray(zipFile.getZipFile())); response.status(Response.Status.OK); response.type("application/zip"); @@ -242,7 +244,8 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { if (apiApplicationKey == null) { String applicationUsername = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUserRealm().getRealmConfiguration() - .getAdminUserName(); + .getAdminUserName() + "@" + PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getTenantDomain(); APIManagementProviderService apiManagementProviderService = APIUtil.getAPIManagementProviderService(); String[] tags = {VirtualFireAlarmConstants.DEVICE_TYPE}; apiApplicationKey = apiManagementProviderService.generateAndRetrieveApplicationKeys( From ee0693e2aed7bbd9e072eded72109d9fb8a3b971 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Thu, 9 Feb 2017 09:59:24 +0530 Subject: [PATCH 079/856] added device management api to be default --- .../virtualfirealarm/service/impl/VirtualFireAlarmService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java index 6585280f0..2726948d2 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java @@ -45,7 +45,7 @@ import javax.ws.rs.core.Response; } ), tags = { - @Tag(name = "virtual_firealarm", description = "") + @Tag(name = "virtual_firealarm,device_management", description = "") } ) @Scopes( From d185b1a3314d81fcec51664008135ebf17ebfd01 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Thu, 2 Mar 2017 00:32:39 +0530 Subject: [PATCH 080/856] resolved device type download issue in windows OS and added log support for service clients. --- pom.xml | 12 - .../impl/VirtualFireAlarmServiceImpl.java | 10 +- .../service/impl/util/ZipArchive.java | 12 +- .../service/impl/util/ZipUtil.java | 207 +++++++----------- .../service/impl/util/util/Utils.java | 61 ------ 5 files changed, 90 insertions(+), 212 deletions(-) delete mode 100644 src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/util/Utils.java diff --git a/pom.xml b/pom.xml index 024ef6b57..9a894884d 100644 --- a/pom.xml +++ b/pom.xml @@ -51,18 +51,6 @@ - - org.wso2.carbon.devicemgt - org.wso2.carbon.device.mgt.analytics.data.publisher - provided - - - org.apache.axis2.wso2 - axis2-client - - - - org.wso2.carbon.devicemgt org.wso2.carbon.certificate.mgt.core diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java index fbebe12f9..faec317e0 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java @@ -58,15 +58,11 @@ import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Response; -import java.io.IOException; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; -import java.security.PrivateKey; import java.util.ArrayList; import java.util.Date; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Properties; import java.util.UUID; @@ -175,12 +171,11 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { String user = APIUtil.getAuthenticatedUser() + "@" + PrivilegedCarbonContext.getThreadLocalCarbonContext() .getTenantDomain(); ZipArchive zipFile = createDownloadFile(user, deviceName, sketchType); - Response.ResponseBuilder response = Response.ok(FileUtils.readFileToByteArray(zipFile.getZipFile())); + Response.ResponseBuilder response = Response.ok(zipFile.getZipFileContent()); response.status(Response.Status.OK); response.type("application/zip"); response.header("Content-Disposition", "attachment; filename=\"" + zipFile.getFileName() + "\""); Response resp = response.build(); - zipFile.getZipFile().delete(); return resp; } catch (IllegalArgumentException ex) { return Response.status(400).entity(ex.getMessage()).build();//bad request @@ -193,9 +188,6 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { } catch (APIManagerException ex) { log.error(ex.getMessage(), ex); return Response.status(500).entity(ex.getMessage()).build(); - } catch (IOException ex) { - log.error(ex.getMessage(), ex); - return Response.status(500).entity(ex.getMessage()).build(); } catch (UserStoreException ex) { log.error(ex.getMessage(), ex); return Response.status(500).entity(ex.getMessage()).build(); diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipArchive.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipArchive.java index 22fda92b3..2152a5e36 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipArchive.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipArchive.java @@ -18,23 +18,23 @@ package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util; -import java.io.File; +import java.util.zip.ZipOutputStream; /** * This is an utility class to hold zip files. */ public class ZipArchive { - private File zipFile = null; + private byte[] zipFileContent = null; private String fileName = null; - public ZipArchive(String fileName, File zipFile) { + public ZipArchive(String fileName, byte[] zipFile) { this.fileName = fileName; - this.zipFile = zipFile; + this.zipFileContent = zipFile; } - public File getZipFile() { - return zipFile; + public byte[] getZipFileContent() { + return zipFileContent; } public String getFileName() { diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java index e9bcb6c60..496d5eb5a 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java @@ -19,7 +19,6 @@ package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util; import org.apache.commons.codec.binary.Base64; -import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -33,14 +32,12 @@ import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.xmpp.XmppConfig; import org.wso2.carbon.utils.CarbonUtils; -import java.io.BufferedInputStream; import java.io.BufferedOutputStream; +import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; -import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; -import java.io.OutputStream; import java.net.SocketException; import java.nio.charset.StandardCharsets; import java.util.ArrayList; @@ -59,24 +56,18 @@ import java.util.zip.ZipOutputStream; public class ZipUtil { private static final Log log = LogFactory.getLog(ZipUtil.class); - private static final String HTTPS_PORT_PROPERTY = "httpsPort"; - private static final String HTTP_PORT_PROPERTY = "httpPort"; private static final String LOCALHOST = "localhost"; private static final String HTTPS_PROTOCOL_URL = "https://${iot.gateway.host}:${iot.gateway.https.port}"; private static final String HTTP_PROTOCOL_URL = "http://${iot.gateway.host}:${iot.gateway.http.port}"; private static final String CONFIG_TYPE = "general"; private static final String DEFAULT_MQTT_ENDPOINT = "tcp://${mqtt.broker.host}:${mqtt.broker.port}"; - public static final String HOST_NAME = "HostName"; public ZipArchive createZipFile(String owner, String deviceType, String deviceId, String deviceName, String apiApplicationKey, String token, String refreshToken) throws DeviceManagementException { String sketchFolder = "repository" + File.separator + "resources" + File.separator + "sketches"; - String archivesPath = - CarbonUtils.getCarbonHome() + File.separator + sketchFolder + File.separator + "archives" + - File.separator + deviceId; String templateSketchPath = sketchFolder + File.separator + deviceType; String iotServerIP; @@ -141,7 +132,7 @@ public class ZipUtil { ? "" : XmppConfig.getInstance().getJid()); ZipArchive zipFile; - zipFile = getSketchArchive(archivesPath, templateSketchPath, contextParams, deviceName); + zipFile = getSketchArchive(templateSketchPath, contextParams, deviceName); return zipFile; } catch (IOException e) { throw new DeviceManagementException("Zip File Creation Failed", e); @@ -159,7 +150,7 @@ public class ZipUtil { return Base64.encodeBase64String(stringToEncode.getBytes()); } - public static String getServerUrl() { + private static String getServerUrl() { try { return org.apache.axis2.util.Utils.getIpAddress(); } catch (SocketException e) { @@ -168,33 +159,27 @@ public class ZipUtil { } } - public static ZipArchive getSketchArchive(String archivesPath, String templateSketchPath, Map contextParams + private ZipArchive getSketchArchive(String templateSketchPath, Map contextParams , String zipFileName) throws DeviceManagementException, IOException { String sketchPath = CarbonUtils.getCarbonHome() + File.separator + templateSketchPath; - FileUtils.deleteDirectory(new File(archivesPath));//clear directory - FileUtils.deleteDirectory(new File(archivesPath + ".zip"));//clear zip - if (!new File(archivesPath).mkdirs()) { //new dir - String message = "Could not create directory at path: " + archivesPath; - log.error(message); - throw new DeviceManagementException(message); - } zipFileName = zipFileName + ".zip"; try { Map> properties = getProperties(sketchPath + File.separator + "sketch" + ".properties"); List templateFiles = properties.get("templates"); + List processTemplateFiles = new ArrayList<>(); for (String templateFile : templateFiles) { - parseTemplate(templateSketchPath + File.separator + templateFile, archivesPath + File.separator + templateFile, - contextParams); + TemplateFile tFile = new TemplateFile(); + tFile.setContent(parseTemplate(templateSketchPath + File.separator + templateFile, contextParams)); + tFile.setFileName(templateFile); + processTemplateFiles.add(tFile); } templateFiles.add("sketch.properties"); // ommit copying the props file - copyFolder(new File(sketchPath), new File(archivesPath), templateFiles); - createZipArchive(archivesPath); - FileUtils.deleteDirectory(new File(archivesPath)); - File zip = new File(archivesPath + ".zip"); - return new org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.ZipArchive(zipFileName, zip); + + byte[] zip = createZipArchive(templateSketchPath, processTemplateFiles); + return new ZipArchive(zipFileName, zip); } catch (IOException ex) { throw new DeviceManagementException( "Error occurred when trying to read property " + "file sketch.properties", ex); @@ -206,9 +191,7 @@ public class ZipUtil { InputStream input = null; try { - input = new FileInputStream(propertyFilePath); - // load a properties file prop.load(input); Map> properties = new HashMap>(); @@ -235,148 +218,124 @@ public class ZipUtil { } } - private static void parseTemplate(String srcFile, String dstFile, Map contextParams) throws IOException { + private static String parseTemplate(String srcFile, Map contextParams) throws IOException { //read from file FileInputStream inputStream = null; - FileOutputStream outputStream = null; try { inputStream = new FileInputStream(srcFile); - outputStream = new FileOutputStream(dstFile); String content = IOUtils.toString(inputStream, StandardCharsets.UTF_8.toString()); Iterator iterator = contextParams.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry mapEntry = (Map.Entry) iterator.next(); content = content.replaceAll("\\$\\{" + mapEntry.getKey() + "\\}", mapEntry.getValue().toString()); } - IOUtils.write(content, outputStream, StandardCharsets.UTF_8.toString()); + return content; } finally { if (inputStream != null) { inputStream.close(); } - if (outputStream != null) { - outputStream.close(); - } } } - private static void copyFolder(File src, File dest, List excludeFileNames) throws IOException { - - if (src.isDirectory()) { - //if directory not exists, create it - if (!dest.exists() && !dest.mkdirs()) { - String message = "Could not create directory at path: " + dest; - log.error(message); - throw new IOException(message); - } - //list all the directory contents - String files[] = src.list(); - - if (files == null) { - log.warn("There are no files insides the directory " + src.getAbsolutePath()); - return; - } - - for (String file : files) { - //construct the src and dest file structure - File srcFile = new File(src, file); - File destFile = new File(dest, file); - //recursive copy - copyFolder(srcFile, destFile, excludeFileNames); - } - - } else { - for (String fileName : excludeFileNames) { - if (src.getName().equals(fileName)) { - return; - } - } - //if file, then copy it - //Use bytes stream to support all file types - InputStream in = null; - OutputStream out = null; - - try { - in = new FileInputStream(src); - out = new FileOutputStream(dest); - - byte[] buffer = new byte[1024]; - - int length; - //copy the file content in bytes - while ((length = in.read(buffer)) > 0) { - out.write(buffer, 0, length); - } - } finally { - if (in != null) { - in.close(); - } - if (out != null) { - out.close(); - } - } - } - } - - private static boolean createZipArchive(String srcFolder) throws IOException { - BufferedInputStream origin = null; + private static byte[] createZipArchive(String srcFolder, List processTemplateFiles) throws IOException { ZipOutputStream out = null; - + ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { - final int BUFFER = 2048; - FileOutputStream dest = new FileOutputStream(new File(srcFolder + ".zip")); - out = new ZipOutputStream(new BufferedOutputStream(dest)); - byte data[] = new byte[BUFFER]; + out = new ZipOutputStream(new BufferedOutputStream(baos)); File subDir = new File(srcFolder); String subdirList[] = subDir.list(); if (subdirList == null) { log.warn("The sub directory " + subDir.getAbsolutePath() + " is empty"); - return false; + return null; } for (String sd : subdirList) { // get a list of files from current directory - File f = new File(srcFolder + "/" + sd); + File f = new File(srcFolder + File.separator + sd); if (f.isDirectory()) { String files[] = f.list(); if (files == null) { log.warn("The current directory " + f.getAbsolutePath() + " is empty. Has no files"); - return false; + return null; } for (int i = 0; i < files.length; i++) { - FileInputStream fi = new FileInputStream(srcFolder + "/" + sd + "/" + files[i]); - origin = new BufferedInputStream(fi, BUFFER); - ZipEntry entry = new ZipEntry(sd + "/" + files[i]); - out.putNextEntry(entry); - int count; - while ((count = origin.read(data, 0, BUFFER)) != -1) { - out.write(data, 0, count); - out.flush(); + boolean fileAdded = false; + for (TemplateFile templateFile : processTemplateFiles) { + if (files[i].equals(templateFile.getFileName())) { + ZipEntry entry = new ZipEntry(templateFile.getFileName()); + out.putNextEntry(entry); + out.write(templateFile.getContent().getBytes()); + out.closeEntry(); + fileAdded = true; + break; + } else if (f.getName().equals("sketch.properties")) { + fileAdded = true; + break; + } } + if (fileAdded) { + continue; + } + ZipEntry entry = new ZipEntry(sd + File.separator + files[i]); + out.putNextEntry(entry); + out.write(IOUtils.toByteArray(new FileInputStream(srcFolder + File.separator + sd + + File.separator + files[i]))); + out.closeEntry(); } } else //it is just a file { - FileInputStream fi = new FileInputStream(f); - origin = new BufferedInputStream(fi, BUFFER); + boolean fileAdded = false; + for (TemplateFile templateFile : processTemplateFiles) { + if (f.getName().equals(templateFile.getFileName())) { + ZipEntry entry = new ZipEntry(templateFile.getFileName()); + out.putNextEntry(entry); + out.write(templateFile.getContent().getBytes()); + out.closeEntry(); + fileAdded = true; + break; + } else if (f.getName().equals("sketch.properties")) { + fileAdded = true; + break; + } + } + if (fileAdded) { + continue; + } ZipEntry entry = new ZipEntry(sd); out.putNextEntry(entry); - int count; - while ((count = origin.read(data, 0, BUFFER)) != -1) { - out.write(data, 0, count); - out.flush(); - } + out.write(IOUtils.toByteArray(new FileInputStream(f))); + out.closeEntry(); } } - out.flush(); + out.finish(); } finally { - if (origin != null) { - origin.close(); - } if (out != null) { out.close(); } } - return true; + return baos.toByteArray(); + } + + public class TemplateFile { + private String content; + private String fileName; + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } } } diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/util/Utils.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/util/Utils.java deleted file mode 100644 index 586de223c..000000000 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/util/Utils.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.util; - -import org.apache.commons.io.FileUtils; -import org.apache.commons.io.IOUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.wso2.carbon.base.ServerConfiguration; -import org.wso2.carbon.device.mgt.common.DeviceManagementException; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.ZipArchive; -import org.wso2.carbon.utils.CarbonUtils; -import org.wso2.carbon.utils.NetworkUtils; - -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.SocketException; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.zip.ZipEntry; -import java.util.zip.ZipOutputStream; - -/** - * Provides utility methods required by the device type plugins. - */ -public class Utils { - - public static final String HOST_NAME = "HostName"; - private static final Log log = LogFactory.getLog(Utils.class); - - - -} From c75de573591c61357d114a7defac26f8bec5517c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 13 Mar 2017 17:43:10 +0530 Subject: [PATCH 081/856] [WSO2 Release] [Jenkins #2576] [Release 3.0.12] prepare release v3.0.12 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ec91a2e5d..600595328 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.12-SNAPSHOT + 3.0.12 ../pom.xml From 3b21c824bb4aa5933e7dfd867c7ff02d25bce5b1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 13 Mar 2017 17:43:10 +0530 Subject: [PATCH 082/856] [WSO2 Release] [Jenkins #2576] [Release 3.0.12] prepare release v3.0.12 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9a894884d..a5b837d77 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.12-SNAPSHOT + 3.0.12 ../pom.xml From 0bea39d8bac35f78953dd3f3bbb931e3e669812b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 13 Mar 2017 17:43:20 +0530 Subject: [PATCH 083/856] [WSO2 Release] [Jenkins #2576] [Release 3.0.12] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 600595328..9dd585954 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.12 + 3.0.13-SNAPSHOT ../pom.xml From 6f9915fda5862c09ce33cbf53c29d89628db4e3c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 13 Mar 2017 17:43:20 +0530 Subject: [PATCH 084/856] [WSO2 Release] [Jenkins #2576] [Release 3.0.12] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a5b837d77..95d70c990 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.12 + 3.0.13-SNAPSHOT ../pom.xml From c0b5d59a5e052bc92034e9a6f7cd04cc253d8bfb Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 14 Mar 2017 16:48:11 +0530 Subject: [PATCH 085/856] [WSO2 Release] [Jenkins #2581] [Release 3.0.13] prepare release v3.0.13 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9dd585954..b0ac79cc8 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.13-SNAPSHOT + 3.0.13 ../pom.xml From d36d01efacd1cea683a056f9347e671111ca2636 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 14 Mar 2017 16:48:11 +0530 Subject: [PATCH 086/856] [WSO2 Release] [Jenkins #2581] [Release 3.0.13] prepare release v3.0.13 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 95d70c990..5ee0e3ff2 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.13-SNAPSHOT + 3.0.13 ../pom.xml From 91f6718094edf03522890a75fa654e2f99d8f725 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 14 Mar 2017 16:48:21 +0530 Subject: [PATCH 087/856] [WSO2 Release] [Jenkins #2581] [Release 3.0.13] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b0ac79cc8..19f3c81b6 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.13 + 3.0.14-SNAPSHOT ../pom.xml From 3aa1ab70d2fa769e7571a97fa136a9228af4f857 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 14 Mar 2017 16:48:21 +0530 Subject: [PATCH 088/856] [WSO2 Release] [Jenkins #2581] [Release 3.0.13] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5ee0e3ff2..13fddc788 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.13 + 3.0.14-SNAPSHOT ../pom.xml From 5a3ddb96f1d2d921a1e6f99044d1de733de80a5a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 15 Mar 2017 18:08:26 +0530 Subject: [PATCH 089/856] [WSO2 Release] [Jenkins #2584] [Release 3.0.14] prepare release v3.0.14 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 19f3c81b6..e61dca3fd 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.14-SNAPSHOT + 3.0.14 ../pom.xml From e4fca8e029d643bc3bc1e20850dec4c468cb44ea Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 15 Mar 2017 18:08:26 +0530 Subject: [PATCH 090/856] [WSO2 Release] [Jenkins #2584] [Release 3.0.14] prepare release v3.0.14 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 13fddc788..a1ace21a8 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.14-SNAPSHOT + 3.0.14 ../pom.xml From 70da0e68fd6896f9d8b93974232f6c2166dbf936 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 15 Mar 2017 18:08:34 +0530 Subject: [PATCH 091/856] [WSO2 Release] [Jenkins #2584] [Release 3.0.14] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e61dca3fd..890d96bd3 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.14 + 3.0.15-SNAPSHOT ../pom.xml From ca181f9fba409dfc841441516ed2f441addbd71a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 15 Mar 2017 18:08:34 +0530 Subject: [PATCH 092/856] [WSO2 Release] [Jenkins #2584] [Release 3.0.14] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a1ace21a8..f9de24275 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.14 + 3.0.15-SNAPSHOT ../pom.xml From 44f621bdf7c3beea34dccac4f6bef49c109a471b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 21 Mar 2017 20:11:33 +0530 Subject: [PATCH 093/856] [WSO2 Release] [Jenkins #2593] [Release 3.0.15] prepare release v3.0.15 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 890d96bd3..1c04fc939 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.15-SNAPSHOT + 3.0.15 ../pom.xml From 3358d71311a828a7684dd0514aeba730a232a0fc Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 21 Mar 2017 20:11:33 +0530 Subject: [PATCH 094/856] [WSO2 Release] [Jenkins #2593] [Release 3.0.15] prepare release v3.0.15 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f9de24275..d6e77aeec 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.15-SNAPSHOT + 3.0.15 ../pom.xml From cea55e84a0f0186332b9766b72b1e4c86bf75b82 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 21 Mar 2017 20:11:47 +0530 Subject: [PATCH 095/856] [WSO2 Release] [Jenkins #2593] [Release 3.0.15] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1c04fc939..93ce78ff4 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.15 + 3.0.16-SNAPSHOT ../pom.xml From e0d11b14181416e67a15d22f3b2d2b67a8008a86 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 21 Mar 2017 20:11:47 +0530 Subject: [PATCH 096/856] [WSO2 Release] [Jenkins #2593] [Release 3.0.15] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d6e77aeec..30a03667f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.15 + 3.0.16-SNAPSHOT ../pom.xml From c8d29e07732cb6d92d0ead951be0b60ae0980a54 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 22 Mar 2017 15:53:34 +0530 Subject: [PATCH 097/856] [WSO2 Release] [Jenkins #2596] [Release 3.0.16] prepare release v3.0.16 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 93ce78ff4..5a65c340f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.16-SNAPSHOT + 3.0.16 ../pom.xml From 45c1ff8464f7e9b7bc9995b91507b2cbb1ff4ff5 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 22 Mar 2017 15:53:34 +0530 Subject: [PATCH 098/856] [WSO2 Release] [Jenkins #2596] [Release 3.0.16] prepare release v3.0.16 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 30a03667f..3932aa2f3 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.16-SNAPSHOT + 3.0.16 ../pom.xml From 8ed1662643bd50527984e06d3534aa1698a91399 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 22 Mar 2017 15:53:43 +0530 Subject: [PATCH 099/856] [WSO2 Release] [Jenkins #2596] [Release 3.0.16] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5a65c340f..29538c564 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.16 + 3.0.17-SNAPSHOT ../pom.xml From f8f5b0f6cff0235d271f5b7e5571d0fcf5f4c727 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 22 Mar 2017 15:53:43 +0530 Subject: [PATCH 100/856] [WSO2 Release] [Jenkins #2596] [Release 3.0.16] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3932aa2f3..a3d65d503 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.16 + 3.0.17-SNAPSHOT ../pom.xml From 746a554dd5e1d27159a34727ff484acfad3d2f33 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 23 Mar 2017 13:14:05 +0530 Subject: [PATCH 101/856] [WSO2 Release] [Jenkins #2602] [Release 3.0.17] prepare release v3.0.17 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 29538c564..7704a4180 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.17-SNAPSHOT + 3.0.17 ../pom.xml From fc1e878a733b9bc520014b6a7015a638cfcb5372 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 23 Mar 2017 13:14:05 +0530 Subject: [PATCH 102/856] [WSO2 Release] [Jenkins #2602] [Release 3.0.17] prepare release v3.0.17 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a3d65d503..0ce378427 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.17-SNAPSHOT + 3.0.17 ../pom.xml From c6e4569cfef0dc5989670acd9b0ed70d0008039c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 23 Mar 2017 13:14:16 +0530 Subject: [PATCH 103/856] [WSO2 Release] [Jenkins #2602] [Release 3.0.17] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7704a4180..582ff049b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.17 + 3.0.18-SNAPSHOT ../pom.xml From 0d02ecc30a441e757fe981568640abf05ad1a328 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 23 Mar 2017 13:14:16 +0530 Subject: [PATCH 104/856] [WSO2 Release] [Jenkins #2602] [Release 3.0.17] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0ce378427..1c2c5f679 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.17 + 3.0.18-SNAPSHOT ../pom.xml From 42466553415f24acc6558367317d24c1f9be0441 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 24 Mar 2017 15:45:32 +0530 Subject: [PATCH 105/856] [WSO2 Release] [Jenkins #2605] [Release 3.0.18] prepare release v3.0.18 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 582ff049b..15609762f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.18-SNAPSHOT + 3.0.18 ../pom.xml From a09009a62af9960f662422b4ea73a23ccd84a7a3 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 24 Mar 2017 15:45:32 +0530 Subject: [PATCH 106/856] [WSO2 Release] [Jenkins #2605] [Release 3.0.18] prepare release v3.0.18 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1c2c5f679..9261f00d8 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.18-SNAPSHOT + 3.0.18 ../pom.xml From eba7be6dc96d7bba8ee4f92b64cd7cd0882ac869 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 24 Mar 2017 15:45:48 +0530 Subject: [PATCH 107/856] [WSO2 Release] [Jenkins #2605] [Release 3.0.18] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 15609762f..711e2bf8d 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.18 + 3.0.19-SNAPSHOT ../pom.xml From 2f2a2743e8a4a5a34e4a1e97362c9c98597d0a85 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 24 Mar 2017 15:45:48 +0530 Subject: [PATCH 108/856] [WSO2 Release] [Jenkins #2605] [Release 3.0.18] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9261f00d8..423b3178b 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.18 + 3.0.19-SNAPSHOT ../pom.xml From 8a402586cf4dee298a227dc8598c38cde78cd352 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 29 Mar 2017 11:13:18 +0530 Subject: [PATCH 109/856] [WSO2 Release] [Jenkins #2612] [Release 3.0.19] prepare release v3.0.19 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 711e2bf8d..9abf43c39 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.19-SNAPSHOT + 3.0.19 ../pom.xml From 10304db26dce56153da246b3aa3441b58456819b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 29 Mar 2017 11:13:18 +0530 Subject: [PATCH 110/856] [WSO2 Release] [Jenkins #2612] [Release 3.0.19] prepare release v3.0.19 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 423b3178b..2ef29d7fe 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.19-SNAPSHOT + 3.0.19 ../pom.xml From 2931a18f6bc0af43183e360971738650d914f185 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 29 Mar 2017 11:13:40 +0530 Subject: [PATCH 111/856] [WSO2 Release] [Jenkins #2612] [Release 3.0.19] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9abf43c39..b4724309a 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.19 + 3.0.20-SNAPSHOT ../pom.xml From 678dc5fe940e6e760580b7f7cbe4083d0aa8a00c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 29 Mar 2017 11:13:40 +0530 Subject: [PATCH 112/856] [WSO2 Release] [Jenkins #2612] [Release 3.0.19] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2ef29d7fe..c7263ee23 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.19 + 3.0.20-SNAPSHOT ../pom.xml From f5d6cf91e08000690ee8231f6e7d89251ef4db5e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 29 Mar 2017 15:22:46 +0530 Subject: [PATCH 113/856] [WSO2 Release] [Jenkins #2614] [Release 3.0.20] prepare release v3.0.20 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b4724309a..7ffb9777b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.20-SNAPSHOT + 3.0.20 ../pom.xml From 256cbb00f600e553b5780789129b52ed26a9bcad Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 29 Mar 2017 15:22:46 +0530 Subject: [PATCH 114/856] [WSO2 Release] [Jenkins #2614] [Release 3.0.20] prepare release v3.0.20 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c7263ee23..71c9bc11a 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.20-SNAPSHOT + 3.0.20 ../pom.xml From e16cacce74390af4dcf602ccf044c8c2d3b3881e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 29 Mar 2017 15:23:01 +0530 Subject: [PATCH 115/856] [WSO2 Release] [Jenkins #2614] [Release 3.0.20] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7ffb9777b..5a5f5b384 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.20 + 3.0.21-SNAPSHOT ../pom.xml From 1f3e4623471c29953ea01529ddbc2d966c3fc235 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 29 Mar 2017 15:23:01 +0530 Subject: [PATCH 116/856] [WSO2 Release] [Jenkins #2614] [Release 3.0.20] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 71c9bc11a..821e40e9d 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.20 + 3.0.21-SNAPSHOT ../pom.xml From 29638b4940964d7ed00dcd66dc68484c3204966b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 30 Mar 2017 10:31:12 +0530 Subject: [PATCH 117/856] [WSO2 Release] [Jenkins #2617] [Release 3.0.21] prepare release v3.0.21 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5a5f5b384..3306d1984 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.21-SNAPSHOT + 3.0.21 ../pom.xml From 27f0596dc30639177fea44d288c2949382f56899 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 30 Mar 2017 10:31:12 +0530 Subject: [PATCH 118/856] [WSO2 Release] [Jenkins #2617] [Release 3.0.21] prepare release v3.0.21 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 821e40e9d..bb8ae8cfc 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.21-SNAPSHOT + 3.0.21 ../pom.xml From d9a4f9928f61d64b8cebb72e75ed5ca0e5ae73c9 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 30 Mar 2017 10:31:28 +0530 Subject: [PATCH 119/856] [WSO2 Release] [Jenkins #2617] [Release 3.0.21] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3306d1984..f2ca84048 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.21 + 3.0.22-SNAPSHOT ../pom.xml From ac7e363655a8254b6bab89aebf3974e03e5d77c6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 30 Mar 2017 10:31:28 +0530 Subject: [PATCH 120/856] [WSO2 Release] [Jenkins #2617] [Release 3.0.21] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bb8ae8cfc..749a69188 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.21 + 3.0.22-SNAPSHOT ../pom.xml From d95c794a167906d4566b31ace0655ffa42b34f07 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 7 Apr 2017 14:56:13 +0530 Subject: [PATCH 121/856] [WSO2 Release] [Jenkins #2627] [Release 3.0.22] prepare release v3.0.22 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f2ca84048..3f6078d21 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.22-SNAPSHOT + 3.0.22 ../pom.xml From 90c4265506196e61ccd761106d3ed2ed4f411673 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 7 Apr 2017 14:56:13 +0530 Subject: [PATCH 122/856] [WSO2 Release] [Jenkins #2627] [Release 3.0.22] prepare release v3.0.22 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 749a69188..8fe96fee1 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.22-SNAPSHOT + 3.0.22 ../pom.xml From a7a8c4573fbda95552e6f64e65f962b788268b96 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 7 Apr 2017 14:56:29 +0530 Subject: [PATCH 123/856] [WSO2 Release] [Jenkins #2627] [Release 3.0.22] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3f6078d21..6c826283d 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.22 + 3.0.23-SNAPSHOT ../pom.xml From 11c61bbea82f8307aec56fbded97cccb6f1ec095 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 7 Apr 2017 14:56:29 +0530 Subject: [PATCH 124/856] [WSO2 Release] [Jenkins #2627] [Release 3.0.22] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8fe96fee1..b71f2bfa1 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.22 + 3.0.23-SNAPSHOT ../pom.xml From a4adc6fc07ccb743f18377fba71bdfe787bdc565 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 18 Apr 2017 10:32:45 +0530 Subject: [PATCH 125/856] [WSO2 Release] [Jenkins #2640] [Release 3.0.23] prepare release v3.0.23 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6c826283d..4511e1966 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.23-SNAPSHOT + 3.0.23 ../pom.xml From 66dd62bf322bbf1cc582476bd26d31df3971ef84 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 18 Apr 2017 10:32:45 +0530 Subject: [PATCH 126/856] [WSO2 Release] [Jenkins #2640] [Release 3.0.23] prepare release v3.0.23 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b71f2bfa1..062f94457 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.23-SNAPSHOT + 3.0.23 ../pom.xml From b5d0a6d1ed6a30f11207605c76576bea134f9b48 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 18 Apr 2017 10:33:01 +0530 Subject: [PATCH 127/856] [WSO2 Release] [Jenkins #2640] [Release 3.0.23] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4511e1966..4e9f32f4f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.23 + 3.0.24-SNAPSHOT ../pom.xml From 311304994fd486716f0e41a4e11b08f0d1be9be8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 18 Apr 2017 10:33:01 +0530 Subject: [PATCH 128/856] [WSO2 Release] [Jenkins #2640] [Release 3.0.23] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 062f94457..a76fab561 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.23 + 3.0.24-SNAPSHOT ../pom.xml From 249dd838f8965aa446c7273ab7f2ddbf9a8c3377 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 21 Apr 2017 16:28:35 +0530 Subject: [PATCH 129/856] [WSO2 Release] [Jenkins #2645] [Release 3.0.24] prepare release v3.0.24 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4e9f32f4f..7600b8459 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.24-SNAPSHOT + 3.0.24 ../pom.xml From 68bea916a96b219a83b21b6d12df7d2ca1e67f58 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 21 Apr 2017 16:28:35 +0530 Subject: [PATCH 130/856] [WSO2 Release] [Jenkins #2645] [Release 3.0.24] prepare release v3.0.24 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a76fab561..674ed816a 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.24-SNAPSHOT + 3.0.24 ../pom.xml From 490ee4b02fc151a4e94539b50e4c742dc352ac71 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 21 Apr 2017 16:28:48 +0530 Subject: [PATCH 131/856] [WSO2 Release] [Jenkins #2645] [Release 3.0.24] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7600b8459..cf8abc471 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.24 + 3.0.25-SNAPSHOT ../pom.xml From 14e39a11f092c848246023d4245cc97906b27542 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 21 Apr 2017 16:28:48 +0530 Subject: [PATCH 132/856] [WSO2 Release] [Jenkins #2645] [Release 3.0.24] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 674ed816a..e5e5b54fa 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.24 + 3.0.25-SNAPSHOT ../pom.xml From 9ba1ba8b6f79b7afac1c6370ed20420c8c74dcb4 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 24 Apr 2017 17:57:03 +0530 Subject: [PATCH 133/856] [WSO2 Release] [Jenkins #2650] [Release 3.0.25] prepare release v3.0.25 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cf8abc471..5bbd077f1 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.25-SNAPSHOT + 3.0.25 ../pom.xml From ffb84fbb3be9f785ad3214d219e00d6d6b774c6e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 24 Apr 2017 17:57:03 +0530 Subject: [PATCH 134/856] [WSO2 Release] [Jenkins #2650] [Release 3.0.25] prepare release v3.0.25 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e5e5b54fa..26777df93 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.25-SNAPSHOT + 3.0.25 ../pom.xml From dfb25e4d85902a5adb629acf0407de7ae297b027 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 24 Apr 2017 17:57:19 +0530 Subject: [PATCH 135/856] [WSO2 Release] [Jenkins #2650] [Release 3.0.25] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5bbd077f1..c5d144825 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.25 + 3.0.26-SNAPSHOT ../pom.xml From b991c490f102bedc0b1166d65d24cdf08aae8313 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 24 Apr 2017 17:57:19 +0530 Subject: [PATCH 136/856] [WSO2 Release] [Jenkins #2650] [Release 3.0.25] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 26777df93..2d152c685 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.25 + 3.0.26-SNAPSHOT ../pom.xml From 1477d4067313fe686ec294635f1ba1f541b38aec Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 25 Apr 2017 11:47:01 +0530 Subject: [PATCH 137/856] [WSO2 Release] [Jenkins #2653] [Release 3.0.26] prepare release v3.0.26 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c5d144825..2262d8706 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.26-SNAPSHOT + 3.0.26 ../pom.xml From 22f6f915b50f5c38901e87253c3c0358412cb80b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 25 Apr 2017 11:47:01 +0530 Subject: [PATCH 138/856] [WSO2 Release] [Jenkins #2653] [Release 3.0.26] prepare release v3.0.26 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2d152c685..6f13179c7 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.26-SNAPSHOT + 3.0.26 ../pom.xml From 85881a92108a00c6e0eb2a6997e4317a4ed4f126 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 25 Apr 2017 11:47:30 +0530 Subject: [PATCH 139/856] [WSO2 Release] [Jenkins #2653] [Release 3.0.26] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2262d8706..118fde05f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.26 + 3.0.27-SNAPSHOT ../pom.xml From bb293467683861ccf7433c4ae6be7016cfa248b1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 25 Apr 2017 11:47:30 +0530 Subject: [PATCH 140/856] [WSO2 Release] [Jenkins #2653] [Release 3.0.26] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6f13179c7..4302c8dd7 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.26 + 3.0.27-SNAPSHOT ../pom.xml From 294a466d990814d476fc5617b06805f1a0da4703 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 25 Apr 2017 13:13:43 +0530 Subject: [PATCH 141/856] [WSO2 Release] [Jenkins #2654] [Release 3.0.27] prepare release v3.0.27 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 118fde05f..5e9a906d1 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.27-SNAPSHOT + 3.0.27 ../pom.xml From bb3dbee65490cc62266a03b7669d7831170ba16d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 25 Apr 2017 13:13:43 +0530 Subject: [PATCH 142/856] [WSO2 Release] [Jenkins #2654] [Release 3.0.27] prepare release v3.0.27 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4302c8dd7..4cc09020c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.27-SNAPSHOT + 3.0.27 ../pom.xml From f0adb22e553fe1e5054b742ed1a396a852d12ee3 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 25 Apr 2017 13:14:01 +0530 Subject: [PATCH 143/856] [WSO2 Release] [Jenkins #2654] [Release 3.0.27] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5e9a906d1..7439d9e51 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.27 + 3.0.28-SNAPSHOT ../pom.xml From d41a012e78622bfb63ec0f4fe010b68adc1635d1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 25 Apr 2017 13:14:01 +0530 Subject: [PATCH 144/856] [WSO2 Release] [Jenkins #2654] [Release 3.0.27] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4cc09020c..d43e83e7c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.27 + 3.0.28-SNAPSHOT ../pom.xml From 3948a9b11738f9f162d4064425cdac6d5c209c66 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 28 Apr 2017 08:38:35 +0530 Subject: [PATCH 145/856] [WSO2 Release] [Jenkins #2659] [Release 3.0.28] prepare release v3.0.28 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7439d9e51..0d34612c8 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.28-SNAPSHOT + 3.0.28 ../pom.xml From c4a7828b5bde42205c7f256f6721f01223b2577d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 28 Apr 2017 08:38:35 +0530 Subject: [PATCH 146/856] [WSO2 Release] [Jenkins #2659] [Release 3.0.28] prepare release v3.0.28 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d43e83e7c..b0bfc371b 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.28-SNAPSHOT + 3.0.28 ../pom.xml From 0489646f7a331549c9bce846afca776ff39c22f1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 28 Apr 2017 08:38:44 +0530 Subject: [PATCH 147/856] [WSO2 Release] [Jenkins #2659] [Release 3.0.28] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0d34612c8..116cb2c78 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.28 + 3.0.29-SNAPSHOT ../pom.xml From e4faa998c536e0f70cbd25eb260d5a1b51b14d4a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 28 Apr 2017 08:38:44 +0530 Subject: [PATCH 148/856] [WSO2 Release] [Jenkins #2659] [Release 3.0.28] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b0bfc371b..1f6215e9f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.28 + 3.0.29-SNAPSHOT ../pom.xml From 78631f0b825c62c2c0d5402774c583c84616cee2 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 28 Apr 2017 10:32:49 +0530 Subject: [PATCH 149/856] [WSO2 Release] [Jenkins #2661] [Release 3.0.29] prepare release v3.0.29 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 116cb2c78..86094e503 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.29-SNAPSHOT + 3.0.29 ../pom.xml From 659d511e482ac2fdc8044321fa7cc3c792da3724 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 28 Apr 2017 10:32:49 +0530 Subject: [PATCH 150/856] [WSO2 Release] [Jenkins #2661] [Release 3.0.29] prepare release v3.0.29 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1f6215e9f..c50d72bb3 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.29-SNAPSHOT + 3.0.29 ../pom.xml From 141c37739054334025dbc427d11dc50ea22a046d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 28 Apr 2017 10:33:09 +0530 Subject: [PATCH 151/856] [WSO2 Release] [Jenkins #2661] [Release 3.0.29] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 86094e503..2e5f1d9c5 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.29 + 3.0.30-SNAPSHOT ../pom.xml From 5b3fbdc20d1ed2fa5c0b870cdc7f14b3682ed6c7 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 28 Apr 2017 10:33:09 +0530 Subject: [PATCH 152/856] [WSO2 Release] [Jenkins #2661] [Release 3.0.29] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c50d72bb3..4eeabecbb 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.29 + 3.0.30-SNAPSHOT ../pom.xml From a5c3b866e1b18956890eb74254ba44c5d6e956d1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 1 May 2017 19:56:48 +0530 Subject: [PATCH 153/856] [WSO2 Release] [Jenkins #2666] [Release 3.0.30] prepare release v3.0.30 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2e5f1d9c5..5513cb747 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.30-SNAPSHOT + 3.0.30 ../pom.xml From dad263d2aedd4bc2a137c804db42ef275f836524 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 1 May 2017 19:56:48 +0530 Subject: [PATCH 154/856] [WSO2 Release] [Jenkins #2666] [Release 3.0.30] prepare release v3.0.30 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4eeabecbb..a6595332a 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.30-SNAPSHOT + 3.0.30 ../pom.xml From 1750555ac8bcc668e4c1e5b75edc7a624e12fc48 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 1 May 2017 19:57:06 +0530 Subject: [PATCH 155/856] [WSO2 Release] [Jenkins #2666] [Release 3.0.30] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5513cb747..2c0c81cd0 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.30 + 3.0.31-SNAPSHOT ../pom.xml From 1133a5b3d3ae30540830bae46a71b561de79572a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 1 May 2017 19:57:06 +0530 Subject: [PATCH 156/856] [WSO2 Release] [Jenkins #2666] [Release 3.0.30] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a6595332a..967524bb8 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.30 + 3.0.31-SNAPSHOT ../pom.xml From 0e1b3c556d8887cfc07f100af8021511f5b98f2e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 2 May 2017 20:47:39 +0530 Subject: [PATCH 157/856] [WSO2 Release] [Jenkins #2670] [Release 3.0.31] prepare release v3.0.31 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2c0c81cd0..8a6a98d91 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.31-SNAPSHOT + 3.0.31 ../pom.xml From afb67abcbbfa6f15aa067c59a5e061a2b9e01b06 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 2 May 2017 20:47:39 +0530 Subject: [PATCH 158/856] [WSO2 Release] [Jenkins #2670] [Release 3.0.31] prepare release v3.0.31 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 967524bb8..a7e69e10c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.31-SNAPSHOT + 3.0.31 ../pom.xml From a7158f81059d7aeb02859bede5e00f4d17cc4751 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 2 May 2017 20:47:53 +0530 Subject: [PATCH 159/856] [WSO2 Release] [Jenkins #2670] [Release 3.0.31] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8a6a98d91..f55d72dde 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.31 + 3.0.32-SNAPSHOT ../pom.xml From a3dd43dadfe72ac9950e3f8c7bd98660f70c53e6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 2 May 2017 20:47:53 +0530 Subject: [PATCH 160/856] [WSO2 Release] [Jenkins #2670] [Release 3.0.31] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a7e69e10c..222e7b4c1 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.31 + 3.0.32-SNAPSHOT ../pom.xml From 77d828fe4d8a5d1a7ff7f145b9ae2b5af5c955b2 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 8 May 2017 12:44:22 +0530 Subject: [PATCH 161/856] [maven-release-plugin] prepare release v3.0.32 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f55d72dde..485edc665 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.32-SNAPSHOT + 3.0.32 ../pom.xml From e0a389bace096cd126289d69fb77b7383f8c3a36 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 8 May 2017 12:44:22 +0530 Subject: [PATCH 162/856] [maven-release-plugin] prepare release v3.0.32 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 222e7b4c1..9fad36276 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.32-SNAPSHOT + 3.0.32 ../pom.xml From 2b19cd5a1b159bc21882265e9ea132cc04d43a0f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 8 May 2017 12:44:37 +0530 Subject: [PATCH 163/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 485edc665..dd6c4a746 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.32 + 3.0.33-SNAPSHOT ../pom.xml From 466fc301b2f68368def62e5408bc89c36efde1e6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 8 May 2017 12:44:37 +0530 Subject: [PATCH 164/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9fad36276..010abb6ca 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.32 + 3.0.33-SNAPSHOT ../pom.xml From c7a5a27838d4158781924b7febc7fc71352315aa Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 8 May 2017 18:04:39 +0530 Subject: [PATCH 165/856] [WSO2 Release] [Jenkins #2693] [Release 3.0.33] prepare release v3.0.33 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 010abb6ca..e3cde4d77 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.33-SNAPSHOT + 3.0.33 ../pom.xml From f9594529684ad8e32b6089cf2ec2d134e12906d6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 8 May 2017 18:04:39 +0530 Subject: [PATCH 166/856] [WSO2 Release] [Jenkins #2693] [Release 3.0.33] prepare release v3.0.33 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dd6c4a746..ade6b10e7 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.33-SNAPSHOT + 3.0.33 ../pom.xml From 3be64a651b8194f5319cc30d49093290f2560ad4 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 8 May 2017 18:04:55 +0530 Subject: [PATCH 167/856] [WSO2 Release] [Jenkins #2693] [Release 3.0.33] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e3cde4d77..26350cc0b 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.33 + 3.0.34-SNAPSHOT ../pom.xml From 05377d4f177e4795ddb872ce7e325580d628af18 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 8 May 2017 18:04:55 +0530 Subject: [PATCH 168/856] [WSO2 Release] [Jenkins #2693] [Release 3.0.33] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ade6b10e7..f55152f21 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.33 + 3.0.34-SNAPSHOT ../pom.xml From bb66da51e6f9cb827cf86059dedf4fb356a9131d Mon Sep 17 00:00:00 2001 From: sinthuja Date: Mon, 8 May 2017 18:08:47 +0530 Subject: [PATCH 169/856] Fixing the warning and mismatch version in the pom.xml. --- pom.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pom.xml b/pom.xml index 010abb6ca..5680ac699 100644 --- a/pom.xml +++ b/pom.xml @@ -188,11 +188,6 @@ commons-codec commons-codec - - org.wso2.carbon.devicemgt - org.wso2.carbon.apimgt.annotations - provided - org.igniterealtime.smack.wso2 smack From e90f8a851e140d8729caf9e9cb269b49ce3850c9 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Wed, 10 May 2017 13:51:04 +0530 Subject: [PATCH 170/856] fixed issues related to multi tenant analytics flow and operation flow for reference device types --- src/main/webapp/WEB-INF/web.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 6f59c5a7c..ff13bc494 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -20,6 +20,10 @@ doAuthentication true + + isSharedWithAllTenants + true + From d1b031fdebb5ec29c7a9e4e5271da85b5f9a0046 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 11 May 2017 13:04:42 +0530 Subject: [PATCH 171/856] [WSO2 Release] [Jenkins #2700] [Release 3.0.34] prepare release v3.0.34 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f55152f21..8b16e69cf 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.34-SNAPSHOT + 3.0.34 ../pom.xml From b0dd9f559753e4f50584188b8a98f86d2349835c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 11 May 2017 13:04:42 +0530 Subject: [PATCH 172/856] [WSO2 Release] [Jenkins #2700] [Release 3.0.34] prepare release v3.0.34 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 26350cc0b..c904a3f46 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.34-SNAPSHOT + 3.0.34 ../pom.xml From 839d26da0124ed91f509eacd223b8586882b1c51 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 11 May 2017 13:04:58 +0530 Subject: [PATCH 173/856] [WSO2 Release] [Jenkins #2700] [Release 3.0.34] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8b16e69cf..243ea2568 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.34 + 3.0.35-SNAPSHOT ../pom.xml From 1f935ce7ca7b76e8967111d0b3661da409335f90 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 11 May 2017 13:04:58 +0530 Subject: [PATCH 174/856] [WSO2 Release] [Jenkins #2700] [Release 3.0.34] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c904a3f46..d61ee7026 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.34 + 3.0.35-SNAPSHOT ../pom.xml From 9144781e194a20126d3e421386e45d9b628a208f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 16 May 2017 14:24:33 +0530 Subject: [PATCH 175/856] [WSO2 Release] [Jenkins #2720] [Release 3.0.35] prepare release v3.0.35 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 243ea2568..813372a06 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.35-SNAPSHOT + 3.0.35 ../pom.xml From 77e56892f7ad62fcde9541be9583dbbcd9b3418f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 16 May 2017 14:24:33 +0530 Subject: [PATCH 176/856] [WSO2 Release] [Jenkins #2720] [Release 3.0.35] prepare release v3.0.35 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d61ee7026..2a1efde43 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.35-SNAPSHOT + 3.0.35 ../pom.xml From 41289d18de157f5225cef43cc39ce63f022fed25 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 16 May 2017 14:24:47 +0530 Subject: [PATCH 177/856] [WSO2 Release] [Jenkins #2720] [Release 3.0.35] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 813372a06..837f1b8e4 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.35 + 3.0.36-SNAPSHOT ../pom.xml From aafa1bbd8115c45b66d6ca7bce37c02af9d744e0 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 16 May 2017 14:24:47 +0530 Subject: [PATCH 178/856] [WSO2 Release] [Jenkins #2720] [Release 3.0.35] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2a1efde43..1c4d56ec7 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.35 + 3.0.36-SNAPSHOT ../pom.xml From ee94742aa1cf052eff5c00c0166d886a26c524f9 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 17 May 2017 16:51:01 +0530 Subject: [PATCH 179/856] [WSO2 Release] [Jenkins #2723] [Release 3.0.36] prepare release v3.0.36 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 837f1b8e4..bb95d0310 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.36-SNAPSHOT + 3.0.36 ../pom.xml From 1bc83d306f621f66e5c711a4b81c898a16819691 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 17 May 2017 16:51:01 +0530 Subject: [PATCH 180/856] [WSO2 Release] [Jenkins #2723] [Release 3.0.36] prepare release v3.0.36 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1c4d56ec7..791507792 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.36-SNAPSHOT + 3.0.36 ../pom.xml From 7f6b97b5c71229da6fe5e9bc61d068dc8c2215fa Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 17 May 2017 16:51:16 +0530 Subject: [PATCH 181/856] [WSO2 Release] [Jenkins #2723] [Release 3.0.36] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bb95d0310..1486ccd49 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.36 + 3.0.37-SNAPSHOT ../pom.xml From 0d4fe0ccdb180a8cb8b80137980d3668d8f38eec Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 17 May 2017 16:51:16 +0530 Subject: [PATCH 182/856] [WSO2 Release] [Jenkins #2723] [Release 3.0.36] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 791507792..6cbab4c7d 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.36 + 3.0.37-SNAPSHOT ../pom.xml From 0d06a0746823e4fad69e2083932d1cc2800cb042 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 30 May 2017 11:07:36 +0530 Subject: [PATCH 183/856] [WSO2 Release] [Jenkins #2741] [Release 3.0.37] prepare release v3.0.37 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1486ccd49..665151c38 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.37-SNAPSHOT + 3.0.37 ../pom.xml From 46de2139a7da55ddee2010f836ce8d9d1adee889 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 30 May 2017 11:07:36 +0530 Subject: [PATCH 184/856] [WSO2 Release] [Jenkins #2741] [Release 3.0.37] prepare release v3.0.37 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6cbab4c7d..a8d201634 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.37-SNAPSHOT + 3.0.37 ../pom.xml From f46ab1b38e4137a84d243df9ab59c143a2a62566 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 30 May 2017 11:07:50 +0530 Subject: [PATCH 185/856] [WSO2 Release] [Jenkins #2741] [Release 3.0.37] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 665151c38..e4fddc179 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.37 + 3.0.38-SNAPSHOT ../pom.xml From f06183751d19e2a16f4a0838d42ed7d8b13ae376 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 30 May 2017 11:07:50 +0530 Subject: [PATCH 186/856] [WSO2 Release] [Jenkins #2741] [Release 3.0.37] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a8d201634..b4254bedc 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.37 + 3.0.38-SNAPSHOT ../pom.xml From 72c11bc06bc882e48c16aae86feb9d38719e65ba Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 2 Jun 2017 21:21:27 +0530 Subject: [PATCH 187/856] [WSO2 Release] [Jenkins #2747] [Release 3.0.38] prepare release v3.0.38 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e4fddc179..31fec852b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.38-SNAPSHOT + 3.0.38 ../pom.xml From 67c0464baf10ff31740e7564a15e404d8422de26 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 2 Jun 2017 21:21:27 +0530 Subject: [PATCH 188/856] [WSO2 Release] [Jenkins #2747] [Release 3.0.38] prepare release v3.0.38 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b4254bedc..62c600112 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.38-SNAPSHOT + 3.0.38 ../pom.xml From b2acc44a6b3d0d09e2a26cdc295ce5fff0b06137 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 2 Jun 2017 21:21:42 +0530 Subject: [PATCH 189/856] [WSO2 Release] [Jenkins #2747] [Release 3.0.38] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 31fec852b..fed06089d 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.38 + 3.0.39-SNAPSHOT ../pom.xml From 7585e58cae187f1343454537bcd63d3ceba806c8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 2 Jun 2017 21:21:42 +0530 Subject: [PATCH 190/856] [WSO2 Release] [Jenkins #2747] [Release 3.0.38] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 62c600112..aa5ff8a48 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.38 + 3.0.39-SNAPSHOT ../pom.xml From 9d0513975d31abe510696a440103e2d089cdce20 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 6 Jun 2017 12:16:26 +0530 Subject: [PATCH 191/856] [WSO2 Release] [Jenkins #2753] [Release 3.0.39] prepare release v3.0.39 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fed06089d..28d857ebe 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.39-SNAPSHOT + 3.0.39 ../pom.xml From 0e0c3efaf14b55e9635db5f61ece22123ec60b46 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 6 Jun 2017 12:16:26 +0530 Subject: [PATCH 192/856] [WSO2 Release] [Jenkins #2753] [Release 3.0.39] prepare release v3.0.39 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index aa5ff8a48..c48abb85b 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.39-SNAPSHOT + 3.0.39 ../pom.xml From f5e823301c889a373e21ef5bc23ded7a655168e8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 6 Jun 2017 12:16:40 +0530 Subject: [PATCH 193/856] [WSO2 Release] [Jenkins #2753] [Release 3.0.39] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 28d857ebe..803f11173 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.39 + 3.0.40-SNAPSHOT ../pom.xml From 18ac76eab992d346d30216c6d21254ebfa6181a8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 6 Jun 2017 12:16:40 +0530 Subject: [PATCH 194/856] [WSO2 Release] [Jenkins #2753] [Release 3.0.39] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c48abb85b..128fecf93 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.39 + 3.0.40-SNAPSHOT ../pom.xml From c0b85b914bc78163cf8389153a433e1656647fa2 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 7 Jun 2017 22:49:26 +0530 Subject: [PATCH 195/856] [WSO2 Release] [Jenkins #2756] [Release 3.0.40] prepare release v3.0.40 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 803f11173..cd2022c10 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.40-SNAPSHOT + 3.0.40 ../pom.xml From f0602148800457c87885aa3b8fc5b539eb7ac9ca Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 7 Jun 2017 22:49:26 +0530 Subject: [PATCH 196/856] [WSO2 Release] [Jenkins #2756] [Release 3.0.40] prepare release v3.0.40 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 128fecf93..80a6e9a7e 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.40-SNAPSHOT + 3.0.40 ../pom.xml From addf3029e1f64af347cafa6acb66521a0d222f24 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 7 Jun 2017 22:49:40 +0530 Subject: [PATCH 197/856] [WSO2 Release] [Jenkins #2756] [Release 3.0.40] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cd2022c10..057056629 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.40 + 3.0.41-SNAPSHOT ../pom.xml From cee608cb4a16d46063652337bfa4d451e54970fd Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 7 Jun 2017 22:49:40 +0530 Subject: [PATCH 198/856] [WSO2 Release] [Jenkins #2756] [Release 3.0.40] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 80a6e9a7e..dc51e9aa8 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.40 + 3.0.41-SNAPSHOT ../pom.xml From f862ee4c9886580d6d0247a7d6a2ff7b41d7c372 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 9 Jun 2017 13:55:28 +0530 Subject: [PATCH 199/856] [WSO2 Release] [Jenkins #2760] [Release 3.0.41] prepare release v3.0.41 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 057056629..201140f79 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.41-SNAPSHOT + 3.0.41 ../pom.xml From 3ec5daef92a6c640b5bfd460e21b94f2bba224ee Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 9 Jun 2017 13:55:28 +0530 Subject: [PATCH 200/856] [WSO2 Release] [Jenkins #2760] [Release 3.0.41] prepare release v3.0.41 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dc51e9aa8..b166e83d9 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.41-SNAPSHOT + 3.0.41 ../pom.xml From 030b623c1609d0aa340b914092fcb7e841ad07e6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 9 Jun 2017 13:55:42 +0530 Subject: [PATCH 201/856] [WSO2 Release] [Jenkins #2760] [Release 3.0.41] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 201140f79..957c95736 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.41 + 3.0.42-SNAPSHOT ../pom.xml From fa874cec3f7872c5ca43080fe6abf323212f3759 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 9 Jun 2017 13:55:42 +0530 Subject: [PATCH 202/856] [WSO2 Release] [Jenkins #2760] [Release 3.0.41] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b166e83d9..4b52041f9 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.41 + 3.0.42-SNAPSHOT ../pom.xml From c1ee9f2263cbc84e1e278b1d1a7d0174173c2c79 Mon Sep 17 00:00:00 2001 From: GDLMadushanka Date: Mon, 12 Jun 2017 08:05:54 +0530 Subject: [PATCH 203/856] Virtual Firealarm - broken pipe issue fixed and removed unwanted buttons --- .../agent/core/AgentConfiguration.java | 30 +------------- .../agent/core/AgentConstants.java | 3 -- .../agent/core/AgentManager.java | 3 -- .../agent/core/AgentUtilOperations.java | 19 +++------ src/main/ui/nbproject/build-impl.xml | 35 +++++++++------- src/main/ui/nbproject/genfiles.properties | 4 +- .../ui/nbproject/private/private.properties | 2 +- src/main/ui/nbproject/private/private.xml | 3 +- .../mgt/iot/agent/virtual/ui/AgentUI.form | 30 ++------------ .../mgt/iot/agent/virtual/ui/AgentUI.java | 41 ++----------------- 10 files changed, 40 insertions(+), 130 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java index d5db8993c..5cdedb5a6 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java @@ -28,15 +28,12 @@ public class AgentConfiguration { private String deviceOwner; private String deviceId; private String deviceName; - private String controllerContext; - private String scepContext; private String HTTPS_ServerEndpoint; private String HTTP_ServerEndpoint; private String apimGatewayEndpoint; private String mqttBrokerEndpoint; private String xmppServerEndpoint; private String apiApplicationKey; - private String authMethod; private String authToken; private String refreshToken; private int dataPushInterval; @@ -83,14 +80,6 @@ public class AgentConfiguration { this.deviceName = deviceName; } - public String getControllerContext() { - return controllerContext; - } - - public void setControllerContext(String controllerContext) { - this.controllerContext = controllerContext; - } - public String getHTTPS_ServerEndpoint() { return HTTPS_ServerEndpoint; } @@ -139,14 +128,6 @@ public class AgentConfiguration { this.apiApplicationKey = apiApplicationKey; } - public String getAuthMethod() { - return authMethod; - } - - public void setAuthMethod(String authMethod) { - this.authMethod = authMethod; - } - public String getAuthToken() { return authToken; } @@ -170,15 +151,7 @@ public class AgentConfiguration { public void setDataPushInterval(int dataPushInterval) { this.dataPushInterval = dataPushInterval; } - - public String getScepContext() { - return scepContext; - } - - public void setScepContext(String scepContext) { - this.scepContext = scepContext; - } - + public String getXmppServerName() { return xmppServerName; } @@ -186,6 +159,7 @@ public class AgentConfiguration { public void setXmppServerName(String xmppServerName) { this.xmppServerName = xmppServerName; } + } diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java index f1372b25a..cdf0d52a0 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java @@ -73,8 +73,6 @@ public class AgentConstants { public static final String DEVICE_ID_PROPERTY = "deviceId"; public static final String SERVER_JID_PROPERTY = "server-jid"; public static final String DEVICE_NAME_PROPERTY = "device-name"; - public static final String DEVICE_CONTROLLER_CONTEXT_PROPERTY = "controller-context"; - public static final String DEVICE_SCEP_CONTEXT_PROPERTY = "scep-context"; public static final String SERVER_HTTPS_EP_PROPERTY = "https-ep"; public static final String SERVER_HTTP_EP_PROPERTY = "http-ep"; public static final String APIM_GATEWAY_EP_PROPERTY = "apim-ep"; @@ -82,7 +80,6 @@ public class AgentConstants { public static final String XMPP_SERVER_EP_PROPERTY = "xmpp-ep"; public static final String XMPP_SERVER_NAME_PROPERTY = "xmpp-server-name"; public static final String API_APPLICATION_KEY = "application-key"; - public static final String AUTH_METHOD_PROPERTY = "auth-method"; public static final String AUTH_TOKEN_PROPERTY = "auth-token"; public static final String REFRESH_TOKEN_PROPERTY = "refresh-token"; public static final String NETWORK_INTERFACE_PROPERTY = "network-interface"; diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java index 6ee95dceb..69348b195 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java @@ -96,9 +96,6 @@ public class AgentManager { AgentConstants.DEVICE_TYPE, agentConfigs.getDeviceId()); - this.deviceMgtAnalyticUrl = agentConfigs.getHTTPS_ServerEndpoint() + analyticsPageContext; - this.deviceMgtControlUrl = agentConfigs.getHTTPS_ServerEndpoint() + controlPageContext; - this.agentStatus = AgentConstants.NOT_REGISTERED; this.deviceName = this.agentConfigs.getDeviceName(); diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java index 8f6fe409b..26bec9e50 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java @@ -108,10 +108,6 @@ public class AgentUtilOperations { AgentConstants.SERVER_JID_PROPERTY)); iotServerConfigs.setDeviceName(properties.getProperty( AgentConstants.DEVICE_NAME_PROPERTY)); - iotServerConfigs.setControllerContext(properties.getProperty( - AgentConstants.DEVICE_CONTROLLER_CONTEXT_PROPERTY)); - iotServerConfigs.setScepContext(properties.getProperty( - AgentConstants.DEVICE_SCEP_CONTEXT_PROPERTY)); iotServerConfigs.setHTTPS_ServerEndpoint(properties.getProperty( AgentConstants.SERVER_HTTPS_EP_PROPERTY)); iotServerConfigs.setHTTP_ServerEndpoint(properties.getProperty( @@ -126,8 +122,6 @@ public class AgentUtilOperations { AgentConstants.XMPP_SERVER_NAME_PROPERTY)); iotServerConfigs.setApiApplicationKey(properties.getProperty( AgentConstants.API_APPLICATION_KEY)); - iotServerConfigs.setAuthMethod(properties.getProperty( - AgentConstants.AUTH_METHOD_PROPERTY)); iotServerConfigs.setAuthToken(properties.getProperty( AgentConstants.AUTH_TOKEN_PROPERTY)); iotServerConfigs.setRefreshToken(properties.getProperty( @@ -139,11 +133,10 @@ public class AgentUtilOperations { iotServerConfigs.getTenantDomain()); log.info(AgentConstants.LOG_APPENDER + "Device Owner: " + iotServerConfigs.getDeviceOwner()); - log.info(AgentConstants.LOG_APPENDER + "Device ID: " + iotServerConfigs.getDeviceId()); + log.info(AgentConstants.LOG_APPENDER + "Device ID: " + + iotServerConfigs.getDeviceId()); log.info(AgentConstants.LOG_APPENDER + "Device Name: " + iotServerConfigs.getDeviceName()); - log.info(AgentConstants.LOG_APPENDER + "Device Controller Context: " + - iotServerConfigs.getControllerContext()); log.info(AgentConstants.LOG_APPENDER + "IoT Server HTTPS EndPoint: " + iotServerConfigs.getHTTPS_ServerEndpoint()); log.info(AgentConstants.LOG_APPENDER + "IoT Server HTTP EndPoint: " + @@ -154,8 +147,6 @@ public class AgentUtilOperations { iotServerConfigs.getMqttBrokerEndpoint()); log.info(AgentConstants.LOG_APPENDER + "XMPP Server EndPoint: " + iotServerConfigs.getXmppServerEndpoint()); - log.info(AgentConstants.LOG_APPENDER + "Authentication Method: " + - iotServerConfigs.getAuthMethod()); log.info(AgentConstants.LOG_APPENDER + "Base64Encoded API Application Key: " + iotServerConfigs.getApiApplicationKey()); log.info(AgentConstants.LOG_APPENDER + "Authentication Token: " + @@ -202,8 +193,8 @@ public class AgentUtilOperations { AgentManager agentManager = AgentManager.getInstance(); String serverSecureEndpoint = agentManager.getAgentConfigs().getHTTPS_ServerEndpoint(); String serverUnSecureEndpoint = agentManager.getAgentConfigs().getHTTP_ServerEndpoint(); - String backEndContext = agentManager.getAgentConfigs().getControllerContext(); - String scepBackEndContext = agentManager.getAgentConfigs().getScepContext(); + String backEndContext = "/virtual_firealarm/device"; + String scepBackEndContext = "/virtual_firealarm_scep"; String deviceControllerAPIEndpoint = serverSecureEndpoint + backEndContext; @@ -312,7 +303,7 @@ public class AgentUtilOperations { } public static String getAuthenticationMethod() { - String authMethod = AgentManager.getInstance().getAgentConfigs().getAuthMethod(); + String authMethod = "token"; switch (authMethod) { case AgentConstants.TOKEN_AUTHENTICATION_METHOD: return AgentConstants.TOKEN_AUTHENTICATION_METHOD; diff --git a/src/main/ui/nbproject/build-impl.xml b/src/main/ui/nbproject/build-impl.xml index 112454207..67a63a7f4 100644 --- a/src/main/ui/nbproject/build-impl.xml +++ b/src/main/ui/nbproject/build-impl.xml @@ -46,8 +46,8 @@ is divided into following sections: - - + + @@ -76,7 +76,7 @@ is divided into following sections: - + @@ -156,6 +156,7 @@ is divided into following sections: + @@ -191,7 +192,12 @@ is divided into following sections: - + + + + + + @@ -217,6 +223,7 @@ is divided into following sections: + @@ -693,7 +700,7 @@ is divided into following sections: - + @@ -768,7 +775,7 @@ is divided into following sections: - + @@ -795,7 +802,7 @@ is divided into following sections: - + @@ -834,7 +841,7 @@ is divided into following sections: - + @@ -846,7 +853,7 @@ is divided into following sections: - + @@ -969,15 +976,15 @@ is divided into following sections: - + - + - + @@ -985,7 +992,7 @@ is divided into following sections: - + @@ -1180,7 +1187,7 @@ is divided into following sections: Must select one file in the IDE or set run.class - + Must select one file in the IDE or set applet.url diff --git a/src/main/ui/nbproject/genfiles.properties b/src/main/ui/nbproject/genfiles.properties index a6df38fd8..1a7c9fdef 100644 --- a/src/main/ui/nbproject/genfiles.properties +++ b/src/main/ui/nbproject/genfiles.properties @@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=8064a381@1.75.2.48 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. nbproject/build-impl.xml.data.CRC32=e60df945 -nbproject/build-impl.xml.script.CRC32=4fa004f7 -nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 +nbproject/build-impl.xml.script.CRC32=18800575 +nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 diff --git a/src/main/ui/nbproject/private/private.properties b/src/main/ui/nbproject/private/private.properties index e59ac1df6..eda34e66d 100644 --- a/src/main/ui/nbproject/private/private.properties +++ b/src/main/ui/nbproject/private/private.properties @@ -1,2 +1,2 @@ compile.on.save=true -user.properties.file=/home/charitha/.netbeans/8.0.2/build.properties +user.properties.file=/home/lahiru/.netbeans/8.2/build.properties diff --git a/src/main/ui/nbproject/private/private.xml b/src/main/ui/nbproject/private/private.xml index 2f9a6910b..89be386cc 100644 --- a/src/main/ui/nbproject/private/private.xml +++ b/src/main/ui/nbproject/private/private.xml @@ -3,7 +3,8 @@ - file:/home/charitha/git/IoT/iot-server-agents/FireAlarmVirtualAgent/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java + file:/home/lahiru/WSO2IOT/carbon-device-mgt-plugins/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/VirtualAgentUI.java + file:/home/lahiru/WSO2IOT/carbon-device-mgt-plugins/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java diff --git a/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.form b/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.form index 23b70e036..43bc3e62e 100644 --- a/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.form +++ b/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.form @@ -364,11 +364,7 @@ - - - - - + @@ -377,12 +373,8 @@ - - - - - - + + @@ -396,22 +388,6 @@ - - - - - - - - - - - - - - - - diff --git a/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java b/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java index 470a7d8fe..e3b4e89f6 100644 --- a/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java +++ b/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java @@ -47,8 +47,6 @@ public class AgentUI extends javax.swing.JFrame { chkbxTemperatureSmooth = new javax.swing.JCheckBox(); jPanel6 = new javax.swing.JPanel(); jLabel20 = new javax.swing.JLabel(); - btnView = new javax.swing.JButton(); - btnControl = new javax.swing.JButton(); lblStatus = new javax.swing.JLabel(); jPanel8 = new javax.swing.JPanel(); jLabel23 = new javax.swing.JLabel(); @@ -272,20 +270,6 @@ public class AgentUI extends javax.swing.JFrame { jLabel20.setText("Connection Status:"); jLabel20.setVerticalTextPosition(javax.swing.SwingConstants.TOP); - btnView.setText("View Device Data"); - btnView.addMouseListener(new java.awt.event.MouseAdapter() { - public void mouseClicked(java.awt.event.MouseEvent evt) { - btnViewMouseClicked(evt); - } - }); - - btnControl.setText("Control Device"); - btnControl.addMouseListener(new java.awt.event.MouseAdapter() { - public void mouseClicked(java.awt.event.MouseEvent evt) { - btnControlMouseClicked(evt); - } - }); - lblStatus.setFont(new java.awt.Font("Cantarell", 1, 15)); // NOI18N lblStatus.setText("Not Connected"); @@ -298,22 +282,15 @@ public class AgentUI extends javax.swing.JFrame { .addComponent(jLabel20) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblStatus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(btnControl) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(btnView) - .addContainerGap()) + .addGap(273, 273, 273)) ); jPanel6Layout.setVerticalGroup( jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(jLabel20, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(btnView, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(btnControl) - .addComponent(lblStatus))) + .addComponent(jLabel20, javax.swing.GroupLayout.DEFAULT_SIZE, 27, Short.MAX_VALUE) + .addComponent(lblStatus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); @@ -463,7 +440,7 @@ public class AgentUI extends javax.swing.JFrame { jLabel7.setText("Data Push Interval:"); - spinnerInterval.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(5), Integer.valueOf(1), null, Integer.valueOf(1))); + spinnerInterval.setModel(new javax.swing.SpinnerNumberModel(5, 1, null, 1)); spinnerInterval.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { spinnerIntervalStateChanged(evt); @@ -615,14 +592,6 @@ public class AgentUI extends javax.swing.JFrame { pack(); }// //GEN-END:initComponents - private void btnControlMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnControlMouseClicked - // TODO add your handling code here: - }//GEN-LAST:event_btnControlMouseClicked - - private void btnViewMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnViewMouseClicked - // TODO add your handling code here: - }//GEN-LAST:event_btnViewMouseClicked - private void chkbxTemperatureRandomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkbxTemperatureRandomActionPerformed // TODO add your handling code here: }//GEN-LAST:event_chkbxTemperatureRandomActionPerformed @@ -692,8 +661,6 @@ public class AgentUI extends javax.swing.JFrame { }//GEN-LAST:event_chkbxEmulateActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JButton btnControl; - private javax.swing.JButton btnView; private javax.swing.JCheckBox chkbxEmulate; private javax.swing.JCheckBox chkbxHumidityRandom; private javax.swing.JCheckBox chkbxHumiditySmooth; From ebe19b959dc2c43c08f5aa68e303a6e958567fcb Mon Sep 17 00:00:00 2001 From: GDLMadushanka Date: Mon, 12 Jun 2017 11:42:48 +0530 Subject: [PATCH 204/856] button removed --- .../agent/core/AgentConfiguration.java | 1 - .../agent/core/AgentManager.java | 9 ---- .../agent/virtual/ui/AgentUI.java | 46 ------------------- src/main/ui/nbproject/private/private.xml | 1 - 4 files changed, 57 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java index 5cdedb5a6..7d8f1dc57 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java @@ -159,7 +159,6 @@ public class AgentConfiguration { public void setXmppServerName(String xmppServerName) { this.xmppServerName = xmppServerName; } - } diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java index 69348b195..4ad7f0037 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java @@ -44,7 +44,6 @@ public class AgentManager { private boolean deviceReady = false; private boolean isAlarmOn = false; - private String deviceMgtControlUrl, deviceMgtAnalyticUrl; private String deviceName, agentStatus; private int pushInterval; // seconds @@ -231,14 +230,6 @@ public class AgentManager { this.deviceReady = deviceReady; } - public String getDeviceMgtControlUrl() { - return deviceMgtControlUrl; - } - - public String getDeviceMgtAnalyticUrl() { - return deviceMgtAnalyticUrl; - } - public AgentConfiguration getAgentConfigs() { return agentConfigs; } diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java index 4a9b76c86..4a8e3dda9 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java @@ -37,8 +37,6 @@ public class AgentUI extends JFrame { private JLabel picLabelBulbOn, picLabelBulbOff; // Variables declaration - do not modify - private JButton btnControl; - private JButton btnView; private JCheckBox chkbxEmulate; private JCheckBox chkbxHumidityRandom; private JCheckBox chkbxHumiditySmooth; @@ -158,8 +156,6 @@ public class AgentUI extends JFrame { chkbxTemperatureSmooth = new JCheckBox(); jPanel6 = new JPanel(); jLabel20 = new JLabel(); - btnView = new JButton(); - btnControl = new JButton(); lblStatus = new JLabel(); jPanel8 = new JPanel(); jLabel23 = new JLabel(); @@ -387,20 +383,6 @@ public class AgentUI extends JFrame { jLabel20.setText("Connection Status:"); jLabel20.setVerticalTextPosition(SwingConstants.TOP); - btnView.setText("View Device Data"); - btnView.addMouseListener(new java.awt.event.MouseAdapter() { - public void mouseClicked(java.awt.event.MouseEvent evt) { - btnViewMouseClicked(evt); - } - }); - - btnControl.setText("Control Device"); - btnControl.addMouseListener(new java.awt.event.MouseAdapter() { - public void mouseClicked(java.awt.event.MouseEvent evt) { - btnControlMouseClicked(evt); - } - }); - lblStatus.setFont(new Font("Cantarell", 1, 15)); // NOI18N lblStatus.setText("Not Connected"); @@ -414,9 +396,6 @@ public class AgentUI extends JFrame { .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblStatus, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) - .addComponent(btnControl) - .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) - .addComponent(btnView) .addContainerGap()) ); jPanel6Layout.setVerticalGroup( @@ -426,8 +405,6 @@ public class AgentUI extends JFrame { .addGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false) .addComponent(jLabel20, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) - .addComponent(btnView, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(btnControl) .addComponent(lblStatus))) .addContainerGap()) ); @@ -763,29 +740,6 @@ public class AgentUI extends JFrame { AgentManager.getInstance().setDeviceReady(true); } - private void btnControlMouseClicked(java.awt.event.MouseEvent evt) { - Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null; - if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) { - try { - URI uri = new URI(AgentManager.getInstance().getDeviceMgtControlUrl()); - desktop.browse(uri); - } catch (Exception e) { - e.printStackTrace(); - } - } - } - - private void btnViewMouseClicked(java.awt.event.MouseEvent evt) { - Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null; - if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) { - try { - URI uri = new URI(AgentManager.getInstance().getDeviceMgtAnalyticUrl()); - desktop.browse(uri); - } catch (Exception e) { - e.printStackTrace(); - } - } - } private void chkbxTemperatureRandomActionPerformed(java.awt.event.ActionEvent evt) { isTemperatureRandomized = chkbxTemperatureRandom.isSelected(); diff --git a/src/main/ui/nbproject/private/private.xml b/src/main/ui/nbproject/private/private.xml index 89be386cc..9009411f0 100644 --- a/src/main/ui/nbproject/private/private.xml +++ b/src/main/ui/nbproject/private/private.xml @@ -4,7 +4,6 @@ file:/home/lahiru/WSO2IOT/carbon-device-mgt-plugins/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/VirtualAgentUI.java - file:/home/lahiru/WSO2IOT/carbon-device-mgt-plugins/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java From 2f4390334ae9e8f801be4c68715c1ef26f6bbd6f Mon Sep 17 00:00:00 2001 From: GDLMadushanka Date: Mon, 12 Jun 2017 12:23:27 +0530 Subject: [PATCH 205/856] Removing hardcoded values --- .../mgt/iot/virtualfirealarm/agent/core/AgentConstants.java | 2 ++ .../iot/virtualfirealarm/agent/core/AgentUtilOperations.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java index cdf0d52a0..bfa29ca58 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java @@ -27,6 +27,8 @@ public class AgentConstants { /* --------------------------------------------------------------------------------------- IoT-Server specific information --------------------------------------------------------------------------------------- */ + public static final String DEVICE_CONTROLLER_API_EP = "/virtual_firealarm/device"; + public static final String DEVICE_SCEP_API_EP = "/virtual_firealarm_scep"; public static final String DEVICE_ENROLLMENT_API_EP = "/scep"; public static final String DEVICE_REGISTER_API_EP = "/register"; public static final String DEVICE_PUSH_TEMPERATURE_API_EP = "/temperature"; diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java index 26bec9e50..fa2a59275 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java @@ -193,8 +193,8 @@ public class AgentUtilOperations { AgentManager agentManager = AgentManager.getInstance(); String serverSecureEndpoint = agentManager.getAgentConfigs().getHTTPS_ServerEndpoint(); String serverUnSecureEndpoint = agentManager.getAgentConfigs().getHTTP_ServerEndpoint(); - String backEndContext = "/virtual_firealarm/device"; - String scepBackEndContext = "/virtual_firealarm_scep"; + String backEndContext =AgentConstants.DEVICE_CONTROLLER_API_EP; + String scepBackEndContext = AgentConstants.DEVICE_SCEP_API_EP; String deviceControllerAPIEndpoint = serverSecureEndpoint + backEndContext; From 77597e0930485942100bba4bfd01a3d6f9819917 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 12 Jun 2017 16:20:03 +0530 Subject: [PATCH 206/856] [WSO2 Release] [Jenkins #2766] [Release 3.0.42] prepare release v3.0.42 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4b52041f9..99a6cee6c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.42-SNAPSHOT + 3.0.42 ../pom.xml From 8a7f30941734829bcab7dbc6e6d2ab149ec6187c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 12 Jun 2017 16:20:03 +0530 Subject: [PATCH 207/856] [WSO2 Release] [Jenkins #2766] [Release 3.0.42] prepare release v3.0.42 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 957c95736..764c97453 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.42-SNAPSHOT + 3.0.42 ../pom.xml From 87cd3b9e9086b3ea0d66c271a79304f4946ea070 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 12 Jun 2017 16:20:24 +0530 Subject: [PATCH 208/856] [WSO2 Release] [Jenkins #2766] [Release 3.0.42] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 99a6cee6c..50ca81dd7 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.42 + 3.0.43-SNAPSHOT ../pom.xml From 2c037cd5c57628d703501c2c70663e54b8830db1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 12 Jun 2017 16:20:24 +0530 Subject: [PATCH 209/856] [WSO2 Release] [Jenkins #2766] [Release 3.0.42] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 764c97453..bec339c88 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.42 + 3.0.43-SNAPSHOT ../pom.xml From 8f5e417e9f798bf803ebd7320d5dd0194563f576 Mon Sep 17 00:00:00 2001 From: GDLMadushanka Date: Thu, 15 Jun 2017 11:49:53 +0530 Subject: [PATCH 210/856] Virtual fire alarm streams changed --- .../service/impl/VirtualFireAlarmServiceImpl.java | 10 +++++----- .../impl/constants/VirtualFireAlarmConstants.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java index faec317e0..f04922d58 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java @@ -136,10 +136,10 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { @Produces("application/json") public Response getVirtualFirealarmStats(@PathParam("deviceId") String deviceId, @QueryParam("from") long from, @QueryParam("to") long to) { - String fromDate = String.valueOf(from); - String toDate = String.valueOf(to); - String query = "deviceId:" + deviceId + " AND deviceType:" + - VirtualFireAlarmConstants.DEVICE_TYPE + " AND time : [" + fromDate + " TO " + toDate + "]"; + String fromDate = String.valueOf(from*1000); // converting time to ms + String toDate = String.valueOf(to*1000); // converting time to ms + String query = "meta_deviceId:" + deviceId + " AND meta_deviceType:" + + VirtualFireAlarmConstants.DEVICE_TYPE + " AND meta_time : [" + fromDate + " TO " + toDate + "]"; String sensorTableName = VirtualFireAlarmConstants.TEMPERATURE_EVENT_TABLE; try { if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized( @@ -148,7 +148,7 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build(); } List sortByFields = new ArrayList<>(); - SortByField sortByField = new SortByField("time", SortType.ASC); + SortByField sortByField = new SortByField("meta_time", SortType.ASC); sortByFields.add(sortByField); List sensorRecords = APIUtil.getAllEventsForDevice(sensorTableName, query, sortByFields); return Response.status(Response.Status.OK.getStatusCode()).entity(sensorRecords).build(); diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java index 31a140efe..6c3186104 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java @@ -30,7 +30,7 @@ public class VirtualFireAlarmConstants { public static final String POLICY_CONTEXT = "POLICY"; //sensor events sumerized table name for temperature - public static final String TEMPERATURE_EVENT_TABLE = "DEVICE_TEMPERATURE_SUMMARY"; + public static final String TEMPERATURE_EVENT_TABLE = "IOT_PER_DEVICE_STREAM_VIRTUALFIREALARM_TEMPERATURE"; public final static String DEVICE_TYPE_PROVIDER_DOMAIN = "carbon.super"; //mqtt tranport related constants From fabaae7f05499093a08679ccfa0e9907d9f1b5ac Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 15 Jun 2017 15:32:32 +0530 Subject: [PATCH 211/856] [WSO2 Release] [Jenkins #2773] [Release 4.0.0] prepare release v4.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 50ca81dd7..e71a0f394 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.43-SNAPSHOT + 4.0.0 ../pom.xml From a5c0ff736aff83adabbc55a6adb7ed4beca61959 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 15 Jun 2017 15:32:32 +0530 Subject: [PATCH 212/856] [WSO2 Release] [Jenkins #2773] [Release 4.0.0] prepare release v4.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bec339c88..8ed96611e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 3.0.43-SNAPSHOT + 4.0.0 ../pom.xml From ecca5f9ecc156e7c0756342e4fd94346b180b2cf Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 15 Jun 2017 15:32:45 +0530 Subject: [PATCH 213/856] [WSO2 Release] [Jenkins #2773] [Release 4.0.0] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e71a0f394..a33f78653 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.0 + 4.0.1-SNAPSHOT ../pom.xml From 6354b09ba1931f8063e7d326441a53701ffcfad9 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 15 Jun 2017 15:32:45 +0530 Subject: [PATCH 214/856] [WSO2 Release] [Jenkins #2773] [Release 4.0.0] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8ed96611e..ba10b5df4 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.0 + 4.0.1-SNAPSHOT ../pom.xml From b9c730bbc6978c4749765d94360fe9491c075249 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 15 Jun 2017 16:37:06 +0530 Subject: [PATCH 215/856] [WSO2 Release] [Jenkins #2774] [Release 4.0.1] prepare release v4.0.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ba10b5df4..b5077772f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.1-SNAPSHOT + 4.0.1 ../pom.xml From b48962f4cc82c167bdeb3370eaedfde3b2fb2571 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 15 Jun 2017 16:37:06 +0530 Subject: [PATCH 216/856] [WSO2 Release] [Jenkins #2774] [Release 4.0.1] prepare release v4.0.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a33f78653..2b2b3064d 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.1-SNAPSHOT + 4.0.1 ../pom.xml From d92c3783ba5b43c53c8c7c46c4aba15c3fd1c77e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 15 Jun 2017 16:37:19 +0530 Subject: [PATCH 217/856] [WSO2 Release] [Jenkins #2774] [Release 4.0.1] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b5077772f..90f210c33 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.1 + 4.0.2-SNAPSHOT ../pom.xml From 0d9095dcbf6b66ddc21964bb4e0e3372c3afe3c0 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 15 Jun 2017 16:37:19 +0530 Subject: [PATCH 218/856] [WSO2 Release] [Jenkins #2774] [Release 4.0.1] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2b2b3064d..7291afef7 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.1 + 4.0.2-SNAPSHOT ../pom.xml From 2ff8d427e0aa5f1249c0826bb906dfd2fe42f270 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 19 Jun 2017 16:39:28 +0530 Subject: [PATCH 219/856] [WSO2 Release] [Jenkins #2781] [Release 4.0.2] prepare release v4.0.2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 90f210c33..4b1b6c200 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.2-SNAPSHOT + 4.0.2 ../pom.xml From 10bfd054927cf0f0635d6538377054937958f8d5 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 19 Jun 2017 16:39:28 +0530 Subject: [PATCH 220/856] [WSO2 Release] [Jenkins #2781] [Release 4.0.2] prepare release v4.0.2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7291afef7..63999ad4e 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.2-SNAPSHOT + 4.0.2 ../pom.xml From e52a166a8c263ecb94f8a844a4f2ba17f9287f49 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 19 Jun 2017 16:39:43 +0530 Subject: [PATCH 221/856] [WSO2 Release] [Jenkins #2781] [Release 4.0.2] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4b1b6c200..163820bb5 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.2 + 4.0.3-SNAPSHOT ../pom.xml From af698f0d823bfd2f485e425d478f472e5c4684a4 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 19 Jun 2017 16:39:43 +0530 Subject: [PATCH 222/856] [WSO2 Release] [Jenkins #2781] [Release 4.0.2] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 63999ad4e..3b6016a9b 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.2 + 4.0.3-SNAPSHOT ../pom.xml From 19b153cf043958703560833ca3077728f663d42e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 20 Jun 2017 15:49:25 +0530 Subject: [PATCH 223/856] [WSO2 Release] [Jenkins #2784] [Release 4.0.3] prepare release v4.0.3 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 163820bb5..6cfa2a8fd 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.3-SNAPSHOT + 4.0.3 ../pom.xml From e509b6daa7c7e888305a7755cf2abacf14835980 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 20 Jun 2017 15:49:25 +0530 Subject: [PATCH 224/856] [WSO2 Release] [Jenkins #2784] [Release 4.0.3] prepare release v4.0.3 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3b6016a9b..1e589da6c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.3-SNAPSHOT + 4.0.3 ../pom.xml From ad70d3ac040fc80fc5144f49a192ab579937c0cf Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 20 Jun 2017 15:49:39 +0530 Subject: [PATCH 225/856] [WSO2 Release] [Jenkins #2784] [Release 4.0.3] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6cfa2a8fd..62c56569e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.3 + 4.0.4-SNAPSHOT ../pom.xml From cd463456067921db5305c89ffdb3d196f6526498 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 20 Jun 2017 15:49:39 +0530 Subject: [PATCH 226/856] [WSO2 Release] [Jenkins #2784] [Release 4.0.3] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1e589da6c..029a44cfa 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.3 + 4.0.4-SNAPSHOT ../pom.xml From e485712a037938c49c224c61c26e578701334a29 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 20 Jun 2017 18:18:59 +0530 Subject: [PATCH 227/856] [WSO2 Release] [Jenkins #2785] [Release 4.0.4] prepare release v4.0.4 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 62c56569e..0d3de3b1b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.4-SNAPSHOT + 4.0.4 ../pom.xml From bb356811f882996cd3ff5e9e0d90ff4cfcde8f61 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 20 Jun 2017 18:18:59 +0530 Subject: [PATCH 228/856] [WSO2 Release] [Jenkins #2785] [Release 4.0.4] prepare release v4.0.4 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 029a44cfa..82a9687f8 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.4-SNAPSHOT + 4.0.4 ../pom.xml From 38dee76883288a74a3d629c31c1b16153f267679 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 20 Jun 2017 18:19:13 +0530 Subject: [PATCH 229/856] [WSO2 Release] [Jenkins #2785] [Release 4.0.4] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0d3de3b1b..0ac8859bb 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.4 + 4.0.5-SNAPSHOT ../pom.xml From 2aa2bed442ec3ed1e2f463aaa4096b5f72c49ae3 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 20 Jun 2017 18:19:13 +0530 Subject: [PATCH 230/856] [WSO2 Release] [Jenkins #2785] [Release 4.0.4] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 82a9687f8..ff8f2492c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.4 + 4.0.5-SNAPSHOT ../pom.xml From 46bbe496dc491b6ce0d94f17c7cb79d4b137fe43 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 22 Jun 2017 21:03:24 +0530 Subject: [PATCH 231/856] [WSO2 Release] [Jenkins #2792] [Release 4.0.5] prepare release v4.0.5 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0ac8859bb..d5e87551e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml From d2110a1bd90344a27b18888a78501b7290b79375 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 22 Jun 2017 21:03:24 +0530 Subject: [PATCH 232/856] [WSO2 Release] [Jenkins #2792] [Release 4.0.5] prepare release v4.0.5 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ff8f2492c..5b85b0728 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5-SNAPSHOT + 4.0.5 ../pom.xml From 651759df820f91905d40d3e18143e3e82c8e1d97 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 22 Jun 2017 21:03:37 +0530 Subject: [PATCH 233/856] [WSO2 Release] [Jenkins #2792] [Release 4.0.5] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d5e87551e..ebf41cf45 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml From db4be0de4f18d4087bdea66c160369c039b9c321 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 22 Jun 2017 21:03:37 +0530 Subject: [PATCH 234/856] [WSO2 Release] [Jenkins #2792] [Release 4.0.5] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5b85b0728..3d676f0ff 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.5 + 4.0.6-SNAPSHOT ../pom.xml From c3587327905b70fe1a7c4952afdf890c444b8092 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 23 Jun 2017 08:14:07 +0530 Subject: [PATCH 235/856] [WSO2 Release] [Jenkins #2794] [Release 4.0.6] prepare release v4.0.6 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ebf41cf45..cb29777e4 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.6-SNAPSHOT + 4.0.6 ../pom.xml From c4d145a6965e88d67c42bdff3d89578bd991100d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 23 Jun 2017 08:14:07 +0530 Subject: [PATCH 236/856] [WSO2 Release] [Jenkins #2794] [Release 4.0.6] prepare release v4.0.6 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3d676f0ff..611ff1369 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.6-SNAPSHOT + 4.0.6 ../pom.xml From 30c955670f9c1ca10ec740057f7fff7e94d62c20 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 23 Jun 2017 08:14:21 +0530 Subject: [PATCH 237/856] [WSO2 Release] [Jenkins #2794] [Release 4.0.6] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cb29777e4..d0c722fed 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.6 + 4.0.7-SNAPSHOT ../pom.xml From 90d384d0d9779c63b02bfd0f9b47badc00c357eb Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 23 Jun 2017 08:14:21 +0530 Subject: [PATCH 238/856] [WSO2 Release] [Jenkins #2794] [Release 4.0.6] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 611ff1369..c8d5d6a08 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.6 + 4.0.7-SNAPSHOT ../pom.xml From 7c0bdfbaf37868d4e729e5982aa68a3346cec68a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 23 Jun 2017 17:54:43 +0530 Subject: [PATCH 239/856] [WSO2 Release] [Jenkins #2796] [Release 4.0.7] prepare release v4.0.7 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d0c722fed..e6dfb9df7 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.7-SNAPSHOT + 4.0.7 ../pom.xml From f7ced72d9f6bff2007cf76e48fe22f3630b2101d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 23 Jun 2017 17:54:43 +0530 Subject: [PATCH 240/856] [WSO2 Release] [Jenkins #2796] [Release 4.0.7] prepare release v4.0.7 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c8d5d6a08..d3529e54e 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.7-SNAPSHOT + 4.0.7 ../pom.xml From f80710c202e7b6a4eba236ab0fc695ee878dedc9 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 23 Jun 2017 17:54:56 +0530 Subject: [PATCH 241/856] [WSO2 Release] [Jenkins #2796] [Release 4.0.7] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e6dfb9df7..ca0d45b49 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.7 + 4.0.8-SNAPSHOT ../pom.xml From 730bb7af3d589eabe1c2d9dcf712c092473b593d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 23 Jun 2017 17:54:56 +0530 Subject: [PATCH 242/856] [WSO2 Release] [Jenkins #2796] [Release 4.0.7] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d3529e54e..db332837c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.7 + 4.0.8-SNAPSHOT ../pom.xml From 2be85090c7cebed5f3c6fc429af98f96a579a873 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 23 Jun 2017 21:01:42 +0530 Subject: [PATCH 243/856] [maven-release-plugin]prepare release v4.0.8 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ca0d45b49..1615154b6 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.8-SNAPSHOT + 4.0.8 ../pom.xml From b42e067377328112544a32b4e51f716bd6a2cf1e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 23 Jun 2017 21:01:42 +0530 Subject: [PATCH 244/856] [maven-release-plugin]prepare release v4.0.8 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index db332837c..74b25d97e 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.8-SNAPSHOT + 4.0.8 ../pom.xml From 7fe759b4cc28fb7dd164858b0e8d36766462b12d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 23 Jun 2017 21:01:55 +0530 Subject: [PATCH 245/856] [maven-release-plugin]prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1615154b6..7c237f59e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.8 + 4.0.9-SNAPSHOT ../pom.xml From fbf91211c0e4089edf5d2e7d2be337b571a56077 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 23 Jun 2017 21:01:55 +0530 Subject: [PATCH 246/856] [maven-release-plugin]prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 74b25d97e..78a1598d2 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.8 + 4.0.9-SNAPSHOT ../pom.xml From 38ec035d0f35d5f66271f3dcf7af1faade4e3243 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Tue, 27 Jun 2017 13:04:58 +0530 Subject: [PATCH 247/856] adding POLICY_REVOKE constant --- .../mgt/iot/virtualfirealarm/agent/core/AgentConstants.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java index bfa29ca58..57fbc4ec4 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java @@ -63,7 +63,7 @@ public class AgentConstants { --------------------------------------------------------------------------------------- */ public static final int DEFAULT_MQTT_RECONNECTION_INTERVAL = 2; // time in seconds public static final int DEFAULT_MQTT_QUALITY_OF_SERVICE = 0; - public static final String MQTT_SUBSCRIBE_TOPIC = "%s/" + DEVICE_TYPE + "/%s"; + public static final String MQTT_SUBSCRIBE_TOPIC = "%s/" + DEVICE_TYPE + "/%s/operation/#"; public static final String MQTT_PUBLISH_TOPIC = "%s/" + DEVICE_TYPE + "/%s/temperature"; /* --------------------------------------------------------------------------------------- From e69ede507d139ef81ca01b6373f21609becae57f Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Tue, 27 Jun 2017 13:04:58 +0530 Subject: [PATCH 248/856] adding POLICY_REVOKE constant --- .../service/impl/VirtualFireAlarmServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java index f04922d58..69cee6588 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java @@ -34,6 +34,7 @@ import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroupConstants; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation; +import org.wso2.carbon.device.mgt.core.operation.mgt.ConfigOperation; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.constants.VirtualFireAlarmConstants; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.dto.SensorRecord; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.APIUtil; @@ -96,9 +97,8 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { String publishTopic = APIUtil.getTenantDomainOftheUser() + "/" + VirtualFireAlarmConstants.DEVICE_TYPE + "/" + deviceId; - Operation commandOp = new CommandOperation(); + ConfigOperation commandOp = new ConfigOperation(); commandOp.setCode("buzz"); - commandOp.setType(Operation.Type.COMMAND); commandOp.setEnabled(true); commandOp.setPayLoad(actualMessage); From bb0904a39a666635f41423bb0af4c3932bd7295b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 27 Jun 2017 16:11:35 +0530 Subject: [PATCH 249/856] [WSO2 Release] [Jenkins #2805] [Release 4.0.9] prepare release v4.0.9 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 78a1598d2..f76e95ef7 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.9-SNAPSHOT + 4.0.9 ../pom.xml From bcdb03138fb8cf52fa1d1b8ade58710dd10e40ae Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 27 Jun 2017 16:11:35 +0530 Subject: [PATCH 250/856] [WSO2 Release] [Jenkins #2805] [Release 4.0.9] prepare release v4.0.9 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7c237f59e..5ecc4df49 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.9-SNAPSHOT + 4.0.9 ../pom.xml From 472966676db4132e54f7b7c3914e5bfbdc122221 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 27 Jun 2017 16:11:49 +0530 Subject: [PATCH 251/856] [WSO2 Release] [Jenkins #2805] [Release 4.0.9] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f76e95ef7..4aa7b4b59 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.9 + 4.0.10-SNAPSHOT ../pom.xml From 9e65ec464017f612d56c1c49cabbc4a18e5de27c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 27 Jun 2017 16:11:49 +0530 Subject: [PATCH 252/856] [WSO2 Release] [Jenkins #2805] [Release 4.0.9] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5ecc4df49..c1fa86097 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.9 + 4.0.10-SNAPSHOT ../pom.xml From 9410242156c38937ed729db5a3d0019205061cfc Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Tue, 27 Jun 2017 17:21:48 +0530 Subject: [PATCH 253/856] adding VirtualFireAlarmConstants.CLIENT_JID_PROPERTY_KEY --- .../service/impl/VirtualFireAlarmServiceImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java index 69cee6588..0e540978b 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java @@ -103,7 +103,6 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { commandOp.setPayLoad(actualMessage); Properties props = new Properties(); - props.setProperty(VirtualFireAlarmConstants.MQTT_ADAPTER_TOPIC_PROPERTY_NAME, publishTopic); props.setProperty(VirtualFireAlarmConstants.CLIENT_JID_PROPERTY_KEY, deviceId + "@" + XmppConfig .getInstance().getServerName()); props.setProperty(VirtualFireAlarmConstants.SUBJECT_PROPERTY_KEY, "CONTROL-REQUEST"); From 1252482a49328f76fdd831c70e6374fffe60cbdb Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 27 Jun 2017 18:27:54 +0530 Subject: [PATCH 254/856] [WSO2 Release] [Jenkins #2807] [Release 4.0.10] prepare release v4.0.10 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4aa7b4b59..5ef11cb73 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.10-SNAPSHOT + 4.0.10 ../pom.xml From e8b11f152c8a7396d7f0c877144e8455db64c702 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 27 Jun 2017 18:27:54 +0530 Subject: [PATCH 255/856] [WSO2 Release] [Jenkins #2807] [Release 4.0.10] prepare release v4.0.10 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c1fa86097..49808bb4b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.10-SNAPSHOT + 4.0.10 ../pom.xml From 1b1cd9b3bba407750a0f4886b33a01d5448fb77f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 27 Jun 2017 18:28:08 +0530 Subject: [PATCH 256/856] [WSO2 Release] [Jenkins #2807] [Release 4.0.10] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5ef11cb73..9eb415973 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.10 + 4.0.11-SNAPSHOT ../pom.xml From 31bed839ee9fb8e8d6ffc704bc1d9ab2a6ddd701 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 27 Jun 2017 18:28:08 +0530 Subject: [PATCH 257/856] [WSO2 Release] [Jenkins #2807] [Release 4.0.10] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 49808bb4b..5b0d03b0a 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.10 + 4.0.11-SNAPSHOT ../pom.xml From 16df6fd4ac7476950707e976f801d1784e864f3c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 28 Jun 2017 14:24:40 +0530 Subject: [PATCH 258/856] [WSO2 Release] [Jenkins #2810] [Release 4.0.11] prepare release v4.0.11 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5b0d03b0a..eb893f73e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.11-SNAPSHOT + 4.0.11 ../pom.xml From dc2a4ed5a87f244b82413cb5e57a710de0676372 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 28 Jun 2017 14:24:40 +0530 Subject: [PATCH 259/856] [WSO2 Release] [Jenkins #2810] [Release 4.0.11] prepare release v4.0.11 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9eb415973..3ed9713e7 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.11-SNAPSHOT + 4.0.11 ../pom.xml From d3bcd0208ae0da470ed2105e0db9c4a15d5bc48b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 28 Jun 2017 14:24:55 +0530 Subject: [PATCH 260/856] [WSO2 Release] [Jenkins #2810] [Release 4.0.11] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index eb893f73e..1bb8e507f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.11 + 4.0.12-SNAPSHOT ../pom.xml From 0e1419050e0c722351e943aae39cd70eb2ca65b8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 28 Jun 2017 14:24:55 +0530 Subject: [PATCH 261/856] [WSO2 Release] [Jenkins #2810] [Release 4.0.11] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3ed9713e7..50e01c534 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.11 + 4.0.12-SNAPSHOT ../pom.xml From d9bf01e59c4e1502e595c86b8860e0dd85ccdc88 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Wed, 28 Jun 2017 15:10:22 +0530 Subject: [PATCH 262/856] Fix for default policy updates in virtual fire alarm --- .../mgt/iot/virtualfirealarm/agent/core/AgentManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java index 4ad7f0037..df3435c27 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java @@ -114,8 +114,8 @@ public class AgentManager { agentCommunicator.put(AgentConstants.XMPP_PROTOCOL, xmppCommunicator); } catch (TransportHandlerException e) { - log.error("XMPP Endpoint String - " + agentConfigs.getXmppServerEndpoint() + - ", provided in the configuration file is invalid."); + log.info("XMPP Endpoint String - " + agentConfigs.getXmppServerEndpoint() + + ", provided in the configuration file is invalid. XMPP is not configured."); } String mqttTopic = String.format(AgentConstants.MQTT_SUBSCRIBE_TOPIC, agentConfigs.getTenantDomain(), agentConfigs.getDeviceId()); From e76d454b5eac1b039fa879808d2623755cc76fa5 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 28 Jun 2017 15:45:56 +0530 Subject: [PATCH 263/856] [WSO2 Release] [Jenkins #2812] [Release 4.0.12] prepare release v4.0.12 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1bb8e507f..eca800b25 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.12-SNAPSHOT + 4.0.12 ../pom.xml From 03c32c976c9c4308657600a38cc53b1071663523 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 28 Jun 2017 15:45:56 +0530 Subject: [PATCH 264/856] [WSO2 Release] [Jenkins #2812] [Release 4.0.12] prepare release v4.0.12 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 50e01c534..3e3f9e326 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.12-SNAPSHOT + 4.0.12 ../pom.xml From adc52e23c074c9bf7750aeab0637fc4efe7d455c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 28 Jun 2017 15:46:09 +0530 Subject: [PATCH 265/856] [WSO2 Release] [Jenkins #2812] [Release 4.0.12] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index eca800b25..c49b39637 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.12 + 4.0.13-SNAPSHOT ../pom.xml From 476bca01eb4f9db6fa8211e1039f4c92c612b2c2 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 28 Jun 2017 15:46:09 +0530 Subject: [PATCH 266/856] [WSO2 Release] [Jenkins #2812] [Release 4.0.12] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3e3f9e326..76bf9f9ce 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.12 + 4.0.13-SNAPSHOT ../pom.xml From bab7a3a9be1cc97e925b0c7afe296b2432fd037f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 29 Jun 2017 09:50:39 +0530 Subject: [PATCH 267/856] [WSO2 Release] [Jenkins #2814] [Release 4.0.13] prepare release v4.0.13 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c49b39637..7c05589f1 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.13-SNAPSHOT + 4.0.13 ../pom.xml From d3e4230a344b09f06f17f3b445041a229b689f21 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 29 Jun 2017 09:50:39 +0530 Subject: [PATCH 268/856] [WSO2 Release] [Jenkins #2814] [Release 4.0.13] prepare release v4.0.13 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 76bf9f9ce..c9f51dd66 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.13-SNAPSHOT + 4.0.13 ../pom.xml From aba57755ddd785845150b790de516d39b7890728 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 29 Jun 2017 09:50:53 +0530 Subject: [PATCH 269/856] [WSO2 Release] [Jenkins #2814] [Release 4.0.13] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7c05589f1..528f22d50 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.13 + 4.0.14-SNAPSHOT ../pom.xml From 2d72b7a11d36b615fa5e35a737dfd73cac4906e1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 29 Jun 2017 09:50:53 +0530 Subject: [PATCH 270/856] [WSO2 Release] [Jenkins #2814] [Release 4.0.13] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c9f51dd66..537d07d4f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.13 + 4.0.14-SNAPSHOT ../pom.xml From 2fb77c1d319e86cbda3f0f3c036e028b96db2363 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 30 Jun 2017 14:35:26 +0530 Subject: [PATCH 271/856] [WSO2 Release] [Jenkins #2817] [Release 4.0.14] prepare release v4.0.14 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 537d07d4f..defd32bbc 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.14-SNAPSHOT + 4.0.14 ../pom.xml From cf75cd110f820907aad118470403ddc7eac0f752 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 30 Jun 2017 14:35:26 +0530 Subject: [PATCH 272/856] [WSO2 Release] [Jenkins #2817] [Release 4.0.14] prepare release v4.0.14 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 528f22d50..4fd7f1dcb 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.14-SNAPSHOT + 4.0.14 ../pom.xml From 48f8a2040b8e92a8fad4530d1ad2d772f3a8d362 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 30 Jun 2017 14:35:40 +0530 Subject: [PATCH 273/856] [WSO2 Release] [Jenkins #2817] [Release 4.0.14] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index defd32bbc..541d20d1f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.14 + 4.0.15-SNAPSHOT ../pom.xml From e6780fcc3c1ab87346f1ab8a2c3e4d85544a3f55 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 30 Jun 2017 14:35:40 +0530 Subject: [PATCH 274/856] [WSO2 Release] [Jenkins #2817] [Release 4.0.14] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4fd7f1dcb..2d4d3dd7a 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.14 + 4.0.15-SNAPSHOT ../pom.xml From fe7e6011eb615cf529982da460038c62ab5b9248 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 30 Jun 2017 20:40:12 +0530 Subject: [PATCH 275/856] [WSO2 Release] [Jenkins #2819] [Release 4.0.15] prepare release v4.0.15 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 541d20d1f..946adbc1a 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.15-SNAPSHOT + 4.0.15 ../pom.xml From eb4cf09080f152d889da3c07f1f6843c83a77325 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 30 Jun 2017 20:40:12 +0530 Subject: [PATCH 276/856] [WSO2 Release] [Jenkins #2819] [Release 4.0.15] prepare release v4.0.15 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2d4d3dd7a..02271dbec 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.15-SNAPSHOT + 4.0.15 ../pom.xml From 3462e4b67b8dd1f32ea26854ae0b09603311095d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 30 Jun 2017 20:40:26 +0530 Subject: [PATCH 277/856] [WSO2 Release] [Jenkins #2819] [Release 4.0.15] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 946adbc1a..90d0c2e38 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.15 + 4.0.16-SNAPSHOT ../pom.xml From e43e9a95505d99c05641f9daadec09fa75821b44 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 30 Jun 2017 20:40:26 +0530 Subject: [PATCH 278/856] [WSO2 Release] [Jenkins #2819] [Release 4.0.15] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 02271dbec..7ae997e35 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.15 + 4.0.16-SNAPSHOT ../pom.xml From e822ca407b98dae829a8e1adcbd411c2c3b32c3d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 1 Jul 2017 11:59:26 +0530 Subject: [PATCH 279/856] [WSO2 Release] [Jenkins #2821] [Release 4.0.16] prepare release v4.0.16 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 90d0c2e38..6bb3f1f56 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.16-SNAPSHOT + 4.0.16 ../pom.xml From 8a499e673faa4f76b9d17a112b0b04dd5786dc90 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 1 Jul 2017 11:59:26 +0530 Subject: [PATCH 280/856] [WSO2 Release] [Jenkins #2821] [Release 4.0.16] prepare release v4.0.16 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7ae997e35..527d72fd2 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.16-SNAPSHOT + 4.0.16 ../pom.xml From d5ef107a1cf4442bafeaecdcedca88c640247597 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 1 Jul 2017 11:59:40 +0530 Subject: [PATCH 281/856] [WSO2 Release] [Jenkins #2821] [Release 4.0.16] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6bb3f1f56..ae7517cda 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.16 + 4.0.17-SNAPSHOT ../pom.xml From 503860d8eb94a9e8bcfd068acd82ac849155feff Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 1 Jul 2017 11:59:40 +0530 Subject: [PATCH 282/856] [WSO2 Release] [Jenkins #2821] [Release 4.0.16] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 527d72fd2..4d73bea45 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.16 + 4.0.17-SNAPSHOT ../pom.xml From e1fffd962eafabd23357cef045843725e920968c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 4 Jul 2017 16:36:57 +0530 Subject: [PATCH 283/856] [WSO2 Release] [Jenkins #2827] [Release 4.0.17] prepare release v4.0.17 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ae7517cda..25e1cd19a 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.17-SNAPSHOT + 4.0.17 ../pom.xml From a4611830e081a137aca5d1b625abdfd280130d9b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 4 Jul 2017 16:36:57 +0530 Subject: [PATCH 284/856] [WSO2 Release] [Jenkins #2827] [Release 4.0.17] prepare release v4.0.17 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4d73bea45..fe1108d40 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.17-SNAPSHOT + 4.0.17 ../pom.xml From 272a3fb5feade3f5c7752152ba53e1478398c06f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 4 Jul 2017 16:37:12 +0530 Subject: [PATCH 285/856] [WSO2 Release] [Jenkins #2827] [Release 4.0.17] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 25e1cd19a..92d9451c6 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.17 + 4.0.18-SNAPSHOT ../pom.xml From 83df0632c019ef8118a086b88c3237b5591e2309 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 4 Jul 2017 16:37:12 +0530 Subject: [PATCH 286/856] [WSO2 Release] [Jenkins #2827] [Release 4.0.17] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fe1108d40..1f500e0be 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.17 + 4.0.18-SNAPSHOT ../pom.xml From 939ac7e060d13a0d5bbe531d2dcd0800a6bbb8d6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 5 Jul 2017 15:33:09 +0530 Subject: [PATCH 287/856] [WSO2 Release] [Jenkins #2830] [Release 4.0.18] prepare release v4.0.18 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 92d9451c6..f264adcfd 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.18-SNAPSHOT + 4.0.18 ../pom.xml From 9276f266b71b69420f6f7378bcb652a32e12ce8b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 5 Jul 2017 15:33:09 +0530 Subject: [PATCH 288/856] [WSO2 Release] [Jenkins #2830] [Release 4.0.18] prepare release v4.0.18 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1f500e0be..bb8f64035 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.18-SNAPSHOT + 4.0.18 ../pom.xml From 9433c70c02401979a9a8f1d560a2e2f2a1696bba Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 5 Jul 2017 15:33:23 +0530 Subject: [PATCH 289/856] [WSO2 Release] [Jenkins #2830] [Release 4.0.18] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f264adcfd..c6907f641 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.18 + 4.0.19-SNAPSHOT ../pom.xml From fd885f81cafc71a37ed914313431bb96175e6662 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 5 Jul 2017 15:33:23 +0530 Subject: [PATCH 290/856] [WSO2 Release] [Jenkins #2830] [Release 4.0.18] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bb8f64035..10ce124d3 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.18 + 4.0.19-SNAPSHOT ../pom.xml From 7924272bca4ff08da9fb29d7db2d1534fdb71c89 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 5 Jul 2017 23:48:12 +0530 Subject: [PATCH 291/856] [WSO2 Release] [Jenkins #2832] [Release 4.0.19] prepare release v4.0.19 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c6907f641..158b08015 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.19-SNAPSHOT + 4.0.19 ../pom.xml From 058377466c3f8f8b55fbdd83d4a3e5203c74b9ed Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 5 Jul 2017 23:48:12 +0530 Subject: [PATCH 292/856] [WSO2 Release] [Jenkins #2832] [Release 4.0.19] prepare release v4.0.19 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 10ce124d3..9971dcb7e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.19-SNAPSHOT + 4.0.19 ../pom.xml From 166bbddd8be435c0f500cb3356cf01dd09f97d2a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 5 Jul 2017 23:48:26 +0530 Subject: [PATCH 293/856] [WSO2 Release] [Jenkins #2832] [Release 4.0.19] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 158b08015..114aaae95 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.19 + 4.0.20-SNAPSHOT ../pom.xml From 849e1986ebd6411a1c496781ae1e97d476d911d1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 5 Jul 2017 23:48:26 +0530 Subject: [PATCH 294/856] [WSO2 Release] [Jenkins #2832] [Release 4.0.19] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9971dcb7e..e19e9bfd4 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.19 + 4.0.20-SNAPSHOT ../pom.xml From 09e29380413c9b5dec7ba74259df030ee3ab962d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 6 Jul 2017 15:27:41 +0530 Subject: [PATCH 295/856] [WSO2 Release] [Jenkins #2835] [Release 4.0.20] prepare release v4.0.20 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 114aaae95..d54049e31 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.20-SNAPSHOT + 4.0.20 ../pom.xml From 5fa3a11d7e2cc369b7507891101b1a8172f90d6b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 6 Jul 2017 15:27:41 +0530 Subject: [PATCH 296/856] [WSO2 Release] [Jenkins #2835] [Release 4.0.20] prepare release v4.0.20 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e19e9bfd4..cce004eef 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.20-SNAPSHOT + 4.0.20 ../pom.xml From e4a7fedf9a8b227c054415ab7fbe8b51cc8de785 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 6 Jul 2017 15:27:54 +0530 Subject: [PATCH 297/856] [WSO2 Release] [Jenkins #2835] [Release 4.0.20] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d54049e31..ccd76e783 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.20 + 4.0.21-SNAPSHOT ../pom.xml From 7f9ee5061156adcf10a625d6c71f5c276d8d07a7 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 6 Jul 2017 15:27:54 +0530 Subject: [PATCH 298/856] [WSO2 Release] [Jenkins #2835] [Release 4.0.20] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cce004eef..7ce0e6172 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.20 + 4.0.21-SNAPSHOT ../pom.xml From 45db5e56a38b5f35cb8be27ceb71df47a29c29e2 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 6 Jul 2017 16:55:07 +0530 Subject: [PATCH 299/856] [WSO2 Release] [Jenkins #2836] [Release 4.0.21] prepare release v4.0.21 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ccd76e783..cff899583 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.21-SNAPSHOT + 4.0.21 ../pom.xml From e188f6b2c49cc181160c4340057b3e97fbf53252 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 6 Jul 2017 16:55:07 +0530 Subject: [PATCH 300/856] [WSO2 Release] [Jenkins #2836] [Release 4.0.21] prepare release v4.0.21 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7ce0e6172..b69a0038a 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.21-SNAPSHOT + 4.0.21 ../pom.xml From 5a85cef5df94bf3fbb0088949570bfd6f74fab03 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 6 Jul 2017 16:55:21 +0530 Subject: [PATCH 301/856] [WSO2 Release] [Jenkins #2836] [Release 4.0.21] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cff899583..ef98e093e 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.21 + 4.0.22-SNAPSHOT ../pom.xml From affa0e7781da62b3866efc4e0569098b009d2425 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 6 Jul 2017 16:55:21 +0530 Subject: [PATCH 302/856] [WSO2 Release] [Jenkins #2836] [Release 4.0.21] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b69a0038a..0f1cb9787 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.21 + 4.0.22-SNAPSHOT ../pom.xml From c6b81ad09f7d5deeab7dd54f71ec2757bd225176 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 7 Jul 2017 00:11:59 +0530 Subject: [PATCH 303/856] [WSO2 Release] [Jenkins #2838] [Release 4.0.22] prepare release v4.0.22 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ef98e093e..5b627ac13 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.22-SNAPSHOT + 4.0.22 ../pom.xml From 46570728b950d3c5f8d6f6fbfd41cb63e581411f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 7 Jul 2017 00:11:59 +0530 Subject: [PATCH 304/856] [WSO2 Release] [Jenkins #2838] [Release 4.0.22] prepare release v4.0.22 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0f1cb9787..6501b90d2 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.22-SNAPSHOT + 4.0.22 ../pom.xml From 0623fc22a737099fe9fe3bf18fe9ebeaeb427f1a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 7 Jul 2017 00:12:14 +0530 Subject: [PATCH 305/856] [WSO2 Release] [Jenkins #2838] [Release 4.0.22] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5b627ac13..4ead8449e 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.22 + 4.0.23-SNAPSHOT ../pom.xml From 0319b583dce201727ffe2608f0e50d9fcd805a75 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 7 Jul 2017 00:12:14 +0530 Subject: [PATCH 306/856] [WSO2 Release] [Jenkins #2838] [Release 4.0.22] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6501b90d2..2bad6e140 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.22 + 4.0.23-SNAPSHOT ../pom.xml From 3001056fc82798408ad2966829eec8fe7413c7c2 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 7 Jul 2017 19:04:36 +0530 Subject: [PATCH 307/856] [WSO2 Release] [Jenkins #2840] [Release 4.0.23] prepare release v4.0.23 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4ead8449e..b8d481c42 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.23-SNAPSHOT + 4.0.23 ../pom.xml From 60c3169ad0f55d6e267bb7ab24546adb4027b516 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 7 Jul 2017 19:04:36 +0530 Subject: [PATCH 308/856] [WSO2 Release] [Jenkins #2840] [Release 4.0.23] prepare release v4.0.23 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2bad6e140..ca6befb43 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.23-SNAPSHOT + 4.0.23 ../pom.xml From 0febd89faa38375075ac4b4600e8caf21a5e9ca9 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 7 Jul 2017 19:04:50 +0530 Subject: [PATCH 309/856] [WSO2 Release] [Jenkins #2840] [Release 4.0.23] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b8d481c42..9249d4e64 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.23 + 4.0.24-SNAPSHOT ../pom.xml From 09c35bea89d011d6e810f516cd346ba4e12b2e77 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 7 Jul 2017 19:04:50 +0530 Subject: [PATCH 310/856] [WSO2 Release] [Jenkins #2840] [Release 4.0.23] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ca6befb43..5b8665595 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.23 + 4.0.24-SNAPSHOT ../pom.xml From 299b3e2d5343295dd21541e721dead8b0150ce18 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 8 Jul 2017 05:45:47 +0530 Subject: [PATCH 311/856] [maven-release-plugin]prepare release v4.0.24 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9249d4e64..7cf0e6367 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.24-SNAPSHOT + 4.0.24 ../pom.xml From 229845727ce7807c7aa7cf26fd2ae448d6e837dc Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 8 Jul 2017 05:45:47 +0530 Subject: [PATCH 312/856] [maven-release-plugin]prepare release v4.0.24 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5b8665595..e24dc0eec 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.24-SNAPSHOT + 4.0.24 ../pom.xml From 10a29884a78f942e5ab52d2f10d501afa68bd1b2 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 8 Jul 2017 05:46:01 +0530 Subject: [PATCH 313/856] [maven-release-plugin]prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7cf0e6367..5efd80e2f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.24 + 4.0.25-SNAPSHOT ../pom.xml From c03d6d15069e6626855f6cd4a6377d5beaf085bd Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 8 Jul 2017 05:46:01 +0530 Subject: [PATCH 314/856] [maven-release-plugin]prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e24dc0eec..1bdcb904d 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.24 + 4.0.25-SNAPSHOT ../pom.xml From 6b0d78765a51a3bdf6f4970145f337685f4c8876 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 9 Jul 2017 09:19:11 +0530 Subject: [PATCH 315/856] [WSO2 Release] [Jenkins #2845] [Release 4.0.25] prepare release v4.0.25 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5efd80e2f..65499995c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.25-SNAPSHOT + 4.0.25 ../pom.xml From fa9c8b53ddf82ff34cde23c09e270e82a9561542 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 9 Jul 2017 09:19:11 +0530 Subject: [PATCH 316/856] [WSO2 Release] [Jenkins #2845] [Release 4.0.25] prepare release v4.0.25 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1bdcb904d..0dd72976d 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.25-SNAPSHOT + 4.0.25 ../pom.xml From 974abfe8cd813ce55ec02039a6d1e7b73fab1764 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 9 Jul 2017 09:19:25 +0530 Subject: [PATCH 317/856] [WSO2 Release] [Jenkins #2845] [Release 4.0.25] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 65499995c..678f3711a 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.25 + 4.0.26-SNAPSHOT ../pom.xml From cb00426cbee04a5acd5525519d43398dc13e1571 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 9 Jul 2017 09:19:25 +0530 Subject: [PATCH 318/856] [WSO2 Release] [Jenkins #2845] [Release 4.0.25] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0dd72976d..2c84b7b23 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.25 + 4.0.26-SNAPSHOT ../pom.xml From 4a7119941aec32dba77500ba8a34a2093b607ac5 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 10 Jul 2017 18:00:32 +0530 Subject: [PATCH 319/856] [WSO2 Release] [Jenkins #2848] [Release 4.0.26] prepare release v4.0.26 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 678f3711a..457be1b59 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.26-SNAPSHOT + 4.0.26 ../pom.xml From c4833480c874eb58ab5d3a9d1f3406fd6aa07d25 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 10 Jul 2017 18:00:32 +0530 Subject: [PATCH 320/856] [WSO2 Release] [Jenkins #2848] [Release 4.0.26] prepare release v4.0.26 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2c84b7b23..bf055e68f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.26-SNAPSHOT + 4.0.26 ../pom.xml From 31747d7e3858bc1d2dac124f3702e5f1aaf5b28e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 10 Jul 2017 18:00:45 +0530 Subject: [PATCH 321/856] [WSO2 Release] [Jenkins #2848] [Release 4.0.26] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 457be1b59..44f330239 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.26 + 4.0.27-SNAPSHOT ../pom.xml From 6d8a1205a0a2c1255217fcebe8afe826e09530f4 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 10 Jul 2017 18:00:45 +0530 Subject: [PATCH 322/856] [WSO2 Release] [Jenkins #2848] [Release 4.0.26] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bf055e68f..a0a1aafdf 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.26 + 4.0.27-SNAPSHOT ../pom.xml From fde6ded56e0cfdd5b184fab09699b9df27baa6e9 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 11 Jul 2017 14:42:36 +0530 Subject: [PATCH 323/856] [WSO2 Release] [Jenkins #2851] [Release 4.0.27] prepare release v4.0.27 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 44f330239..6d2948530 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.27-SNAPSHOT + 4.0.27 ../pom.xml From 81d635302e4e9d74b0474e4eaf6886d5a7c2eac9 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 11 Jul 2017 14:42:36 +0530 Subject: [PATCH 324/856] [WSO2 Release] [Jenkins #2851] [Release 4.0.27] prepare release v4.0.27 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a0a1aafdf..d666caf36 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.27-SNAPSHOT + 4.0.27 ../pom.xml From 80682d19e8ec03db900e934defcbdfa2a5ab34c1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 11 Jul 2017 14:42:52 +0530 Subject: [PATCH 325/856] [WSO2 Release] [Jenkins #2851] [Release 4.0.27] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6d2948530..693304f32 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.27 + 4.0.28-SNAPSHOT ../pom.xml From df87f4ad305dcb4e72e63a5700b6d7813168a0df Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 11 Jul 2017 14:42:52 +0530 Subject: [PATCH 326/856] [WSO2 Release] [Jenkins #2851] [Release 4.0.27] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d666caf36..002bbbbe7 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.27 + 4.0.28-SNAPSHOT ../pom.xml From 7f135d5e6c01fd4e1e75ecc0b68763071ff41fcc Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 11 Jul 2017 18:39:18 +0530 Subject: [PATCH 327/856] [WSO2 Release] [Jenkins #2853] [Release 4.0.28] prepare release v4.0.28 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 693304f32..6c79dc098 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.28-SNAPSHOT + 4.0.28 ../pom.xml From 28617b374ec27947663ffc6967cdda1a65215bd7 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 11 Jul 2017 18:39:18 +0530 Subject: [PATCH 328/856] [WSO2 Release] [Jenkins #2853] [Release 4.0.28] prepare release v4.0.28 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 002bbbbe7..1d5123210 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.28-SNAPSHOT + 4.0.28 ../pom.xml From a7da29dd283715209dc55eca11ae09f0ad90a661 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 11 Jul 2017 18:39:32 +0530 Subject: [PATCH 329/856] [WSO2 Release] [Jenkins #2853] [Release 4.0.28] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6c79dc098..651d600c2 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.28 + 4.0.29-SNAPSHOT ../pom.xml From 48e86d59e494f476a6af1d401ecebe917bb9e289 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 11 Jul 2017 18:39:32 +0530 Subject: [PATCH 330/856] [WSO2 Release] [Jenkins #2853] [Release 4.0.28] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1d5123210..01b52ac94 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.28 + 4.0.29-SNAPSHOT ../pom.xml From b4857be241a520cf5298ce225457d843a0681c21 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 13 Jul 2017 16:26:00 +0530 Subject: [PATCH 331/856] [WSO2 Release] [Jenkins #2857] [Release 4.0.29] prepare release v4.0.29 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 651d600c2..7e771d98c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.29-SNAPSHOT + 4.0.29 ../pom.xml From f6284a523cd7daacd05c0892ef0876fa544b54b7 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 13 Jul 2017 16:26:00 +0530 Subject: [PATCH 332/856] [WSO2 Release] [Jenkins #2857] [Release 4.0.29] prepare release v4.0.29 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 01b52ac94..e1ed7b783 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.29-SNAPSHOT + 4.0.29 ../pom.xml From 65937b8327dc4aea68b26e1d1a5dc743abf37136 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 13 Jul 2017 16:26:14 +0530 Subject: [PATCH 333/856] [WSO2 Release] [Jenkins #2857] [Release 4.0.29] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7e771d98c..f622b8608 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.29 + 4.0.30-SNAPSHOT ../pom.xml From 4ee03b781c67450ac7519b007e52fb6d1ce0ab88 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 13 Jul 2017 16:26:14 +0530 Subject: [PATCH 334/856] [WSO2 Release] [Jenkins #2857] [Release 4.0.29] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e1ed7b783..932a430c5 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.29 + 4.0.30-SNAPSHOT ../pom.xml From b363f346a4d166bc2f3499b042156c66429b4c6c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 14 Jul 2017 13:10:02 +0530 Subject: [PATCH 335/856] [WSO2 Release] [Jenkins #2860] [Release 4.0.30] prepare release v4.0.30 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f622b8608..8b92be764 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.30-SNAPSHOT + 4.0.30 ../pom.xml From 49799a36c7d33b35ab4c0734d201aa32cdc69e71 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 14 Jul 2017 13:10:02 +0530 Subject: [PATCH 336/856] [WSO2 Release] [Jenkins #2860] [Release 4.0.30] prepare release v4.0.30 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 932a430c5..f81cc7b73 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.30-SNAPSHOT + 4.0.30 ../pom.xml From a561081984f1a3b8e43a19bc89b8a28ddb937ce9 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 14 Jul 2017 13:10:16 +0530 Subject: [PATCH 337/856] [WSO2 Release] [Jenkins #2860] [Release 4.0.30] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8b92be764..8500ba73b 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.30 + 4.0.31-SNAPSHOT ../pom.xml From 017783b6f4349260c2894413d82810f4df9e2dfb Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 14 Jul 2017 13:10:16 +0530 Subject: [PATCH 338/856] [WSO2 Release] [Jenkins #2860] [Release 4.0.30] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f81cc7b73..455f3e165 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.30 + 4.0.31-SNAPSHOT ../pom.xml From b5258850bed4b21216d6e18c9ca8176ff8251eb7 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 15 Jul 2017 13:12:21 +0530 Subject: [PATCH 339/856] [WSO2 Release] [Jenkins #2862] [Release 4.0.31] prepare release v4.0.31 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8500ba73b..4e0952ad8 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.31-SNAPSHOT + 4.0.31 ../pom.xml From 2d72af7681f2571b295b8bd895623697dd7cba46 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 15 Jul 2017 13:12:21 +0530 Subject: [PATCH 340/856] [WSO2 Release] [Jenkins #2862] [Release 4.0.31] prepare release v4.0.31 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 455f3e165..68e8d4533 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.31-SNAPSHOT + 4.0.31 ../pom.xml From abf005aae4468e71a888aaf85c5afd997b217198 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 15 Jul 2017 13:12:35 +0530 Subject: [PATCH 341/856] [WSO2 Release] [Jenkins #2862] [Release 4.0.31] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4e0952ad8..793b3bdf6 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.31 + 4.0.32-SNAPSHOT ../pom.xml From 3ce61cfe2724c9d80a581e9cd0d7cc3313b53a07 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 15 Jul 2017 13:12:35 +0530 Subject: [PATCH 342/856] [WSO2 Release] [Jenkins #2862] [Release 4.0.31] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 68e8d4533..f7f55db94 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.31 + 4.0.32-SNAPSHOT ../pom.xml From d7fd247ef91984b2953535f8ac17c7260819276c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 16 Jul 2017 11:36:25 +0530 Subject: [PATCH 343/856] [WSO2 Release] [Jenkins #2864] [Release 4.0.32] prepare release v4.0.32 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 793b3bdf6..e964e01ce 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.32-SNAPSHOT + 4.0.32 ../pom.xml From e1177c91fbbf1331bdc750cb82a2d2ca19e34eaa Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 16 Jul 2017 11:36:25 +0530 Subject: [PATCH 344/856] [WSO2 Release] [Jenkins #2864] [Release 4.0.32] prepare release v4.0.32 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f7f55db94..5b136771b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.32-SNAPSHOT + 4.0.32 ../pom.xml From 57d323711b5d1c4e43311e31ca0887558dab909f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 16 Jul 2017 11:36:38 +0530 Subject: [PATCH 345/856] [WSO2 Release] [Jenkins #2864] [Release 4.0.32] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e964e01ce..6c5731ca8 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.32 + 4.0.33-SNAPSHOT ../pom.xml From 104114e2604b39ad10e594b79c275a1f886ceafb Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 16 Jul 2017 11:36:38 +0530 Subject: [PATCH 346/856] [WSO2 Release] [Jenkins #2864] [Release 4.0.32] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5b136771b..a07d3730e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.32 + 4.0.33-SNAPSHOT ../pom.xml From 3df1bdd8a19e747189e4475eec38950fd9d7b6cb Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 16 Jul 2017 22:01:31 +0530 Subject: [PATCH 347/856] [WSO2 Release] [Jenkins #2866] [Release 4.0.33] prepare release v4.0.33 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6c5731ca8..82b477389 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.33-SNAPSHOT + 4.0.33 ../pom.xml From 7a49a2161b785e2ef2be6f939eb5a417efe909bc Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 16 Jul 2017 22:01:31 +0530 Subject: [PATCH 348/856] [WSO2 Release] [Jenkins #2866] [Release 4.0.33] prepare release v4.0.33 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a07d3730e..02314cf76 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.33-SNAPSHOT + 4.0.33 ../pom.xml From 0b5defc12e4f4f9f70003f9de07dd5dfa8ba5301 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 16 Jul 2017 22:01:45 +0530 Subject: [PATCH 349/856] [WSO2 Release] [Jenkins #2866] [Release 4.0.33] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 82b477389..76b3f735c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.33 + 4.0.34-SNAPSHOT ../pom.xml From 57a4779d2cc64ade25fe4da53109bc09ff0b88b0 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 16 Jul 2017 22:01:45 +0530 Subject: [PATCH 350/856] [WSO2 Release] [Jenkins #2866] [Release 4.0.33] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 02314cf76..b673b3025 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.33 + 4.0.34-SNAPSHOT ../pom.xml From 27c8736a81333ff753508bc055aa5afa6b2bd55a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 17 Jul 2017 00:02:15 +0530 Subject: [PATCH 351/856] [WSO2 Release] [Jenkins #2868] [Release 4.0.34] prepare release v4.0.34 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 76b3f735c..5ab3a85f4 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.34-SNAPSHOT + 4.0.34 ../pom.xml From 03c0c3799d3ffb20a1fd47a967c049b8983cb8e4 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 17 Jul 2017 00:02:15 +0530 Subject: [PATCH 352/856] [WSO2 Release] [Jenkins #2868] [Release 4.0.34] prepare release v4.0.34 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b673b3025..c6331ad02 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.34-SNAPSHOT + 4.0.34 ../pom.xml From a1a76bcd535d10b937a2b75373c8ac841669e0ac Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 17 Jul 2017 00:02:28 +0530 Subject: [PATCH 353/856] [WSO2 Release] [Jenkins #2868] [Release 4.0.34] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5ab3a85f4..1a8d0818a 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.34 + 4.0.35-SNAPSHOT ../pom.xml From feea817f23139078d29b212542deb5f07fa7e2b6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 17 Jul 2017 00:02:28 +0530 Subject: [PATCH 354/856] [WSO2 Release] [Jenkins #2868] [Release 4.0.34] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c6331ad02..e8ae8e44c 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.34 + 4.0.35-SNAPSHOT ../pom.xml From f6ede45046c206c595e29a9c47422e6d8144f8bb Mon Sep 17 00:00:00 2001 From: geethkokila Date: Mon, 17 Jul 2017 15:59:18 +0530 Subject: [PATCH 355/856] Fixing the download agent issue for virtual fire alarm --- .../impl/VirtualFireAlarmServiceImpl.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java index 0e540978b..367cd248b 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java @@ -233,15 +233,27 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { throw new DeviceManagementException(msg); } if (apiApplicationKey == null) { + String adminUsername = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUserRealm() + .getRealmConfiguration().getAdminUserName(); + String tenantAdminDomainName = PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getTenantDomain(); String applicationUsername = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUserRealm().getRealmConfiguration() .getAdminUserName() + "@" + PrivilegedCarbonContext.getThreadLocalCarbonContext() .getTenantDomain(); APIManagementProviderService apiManagementProviderService = APIUtil.getAPIManagementProviderService(); String[] tags = {VirtualFireAlarmConstants.DEVICE_TYPE}; - apiApplicationKey = apiManagementProviderService.generateAndRetrieveApplicationKeys( - VirtualFireAlarmConstants.DEVICE_TYPE, tags, KEY_TYPE, applicationUsername, true, - VirtualFireAlarmConstants.APIM_APPLICATION_TOKEN_VALIDITY_PERIOD); + try { + PrivilegedCarbonContext.startTenantFlow(); + PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantAdminDomainName); + PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(adminUsername); + + apiApplicationKey = apiManagementProviderService.generateAndRetrieveApplicationKeys( + VirtualFireAlarmConstants.DEVICE_TYPE, tags, KEY_TYPE, applicationUsername, true, + VirtualFireAlarmConstants.APIM_APPLICATION_TOKEN_VALIDITY_PERIOD); + } finally { + PrivilegedCarbonContext.endTenantFlow(); + } } JWTClient jwtClient = APIUtil.getJWTClientManagerService().getJWTClient(); String scopes = " device_" + deviceId; From 1066f3d13dcb00919fba8f1f901b3468b81c51fe Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 19 Jul 2017 14:02:04 +0000 Subject: [PATCH 356/856] [WSO2 Release] [Jenkins #2875] [Release 4.0.35] prepare release v4.0.35 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1a8d0818a..c7401b8db 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.35-SNAPSHOT + 4.0.35 ../pom.xml From 0315585a70dc6893e260234546ffc76c0aabf4fc Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 19 Jul 2017 14:02:04 +0000 Subject: [PATCH 357/856] [WSO2 Release] [Jenkins #2875] [Release 4.0.35] prepare release v4.0.35 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e8ae8e44c..9a0fc5043 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.35-SNAPSHOT + 4.0.35 ../pom.xml From 0a574c969ee78c85c1825674e107e60b2ddd9ca1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 19 Jul 2017 14:02:17 +0000 Subject: [PATCH 358/856] [WSO2 Release] [Jenkins #2875] [Release 4.0.35] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c7401b8db..620a50b46 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.35 + 4.0.36-SNAPSHOT ../pom.xml From d9a737956da61af4d7249a36bd68c925d50b3279 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 19 Jul 2017 14:02:17 +0000 Subject: [PATCH 359/856] [WSO2 Release] [Jenkins #2875] [Release 4.0.35] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9a0fc5043..b5e57e527 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.35 + 4.0.36-SNAPSHOT ../pom.xml From c4fe27a7b16870c080426f097e882c143275df01 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 20 Jul 2017 18:54:51 +0530 Subject: [PATCH 360/856] [WSO2 Release] [Jenkins #2879] [Release 4.0.36] prepare release v4.0.36 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 620a50b46..01e8398da 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.36-SNAPSHOT + 4.0.36 ../pom.xml From 8c78ace59d530d91e6997cd8038f4df0a791e1b0 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 20 Jul 2017 18:54:51 +0530 Subject: [PATCH 361/856] [WSO2 Release] [Jenkins #2879] [Release 4.0.36] prepare release v4.0.36 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b5e57e527..641575111 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.36-SNAPSHOT + 4.0.36 ../pom.xml From b8afbdb4bd65d10763e5c606acfee510b08190ba Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 20 Jul 2017 18:55:02 +0530 Subject: [PATCH 362/856] [WSO2 Release] [Jenkins #2879] [Release 4.0.36] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 01e8398da..4f94d4b99 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.36 + 4.0.37-SNAPSHOT ../pom.xml From 8205d17782860c333d5498393e6d0e81c3afc462 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 20 Jul 2017 18:55:02 +0530 Subject: [PATCH 363/856] [WSO2 Release] [Jenkins #2879] [Release 4.0.36] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 641575111..a49b53542 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.36 + 4.0.37-SNAPSHOT ../pom.xml From cd5173dffd5d5cf0d20bc2429149b9662cb3d2f7 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 20 Jul 2017 20:42:11 +0530 Subject: [PATCH 364/856] [WSO2 Release] [Jenkins #2880] [Release 4.0.37] prepare release v4.0.37 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a49b53542..4f8d09078 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.37-SNAPSHOT + 4.0.37 ../pom.xml From ed4cdd4fe03a3b2ac5d764ed506b799715e87b74 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 20 Jul 2017 20:42:11 +0530 Subject: [PATCH 365/856] [WSO2 Release] [Jenkins #2880] [Release 4.0.37] prepare release v4.0.37 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4f94d4b99..7e28a3947 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.37-SNAPSHOT + 4.0.37 ../pom.xml From 24c07cc660ae4c13d85186a9e621b526a8f655bd Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 20 Jul 2017 20:42:25 +0530 Subject: [PATCH 366/856] [WSO2 Release] [Jenkins #2880] [Release 4.0.37] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4f8d09078..22e62843f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.37 + 4.0.38-SNAPSHOT ../pom.xml From 34d7c818b8abe439ba194d39b030ea83754b439e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 20 Jul 2017 20:42:25 +0530 Subject: [PATCH 367/856] [WSO2 Release] [Jenkins #2880] [Release 4.0.37] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7e28a3947..6af685aec 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.37 + 4.0.38-SNAPSHOT ../pom.xml From f88c7ea47f96c5a11cdfdfd07f90056d19296737 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 21 Jul 2017 14:27:57 +0530 Subject: [PATCH 368/856] [WSO2 Release] [Jenkins #2883] [Release 4.0.38] prepare release v4.0.38 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 22e62843f..2174b469e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.38-SNAPSHOT + 4.0.38 ../pom.xml From 9985c403efb28d01b2201dc2a6a7916e3fb78fd9 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 21 Jul 2017 14:27:57 +0530 Subject: [PATCH 369/856] [WSO2 Release] [Jenkins #2883] [Release 4.0.38] prepare release v4.0.38 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6af685aec..33cd6f3e4 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.38-SNAPSHOT + 4.0.38 ../pom.xml From 81d5101372b0cd30a5c5ab6f411158ce8072ef3c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 21 Jul 2017 14:28:06 +0530 Subject: [PATCH 370/856] [WSO2 Release] [Jenkins #2883] [Release 4.0.38] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2174b469e..19e41aabf 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.38 + 4.0.39-SNAPSHOT ../pom.xml From 2cac948397de381b12a242c1308d0b52eced5799 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 21 Jul 2017 14:28:06 +0530 Subject: [PATCH 371/856] [WSO2 Release] [Jenkins #2883] [Release 4.0.38] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 33cd6f3e4..57bd625ad 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.38 + 4.0.39-SNAPSHOT ../pom.xml From 7b06e36dd7b022ca350d9bde67c47a8e61fa23a1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 23 Jul 2017 21:18:37 +0530 Subject: [PATCH 372/856] [WSO2 Release] [Jenkins #2887] [Release 4.0.39] prepare release v4.0.39 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 19e41aabf..d9fdd3fd0 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.39-SNAPSHOT + 4.0.39 ../pom.xml From a69dfff3ac6919b60a05d6d2e1a7ed71d79b9691 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 23 Jul 2017 21:18:37 +0530 Subject: [PATCH 373/856] [WSO2 Release] [Jenkins #2887] [Release 4.0.39] prepare release v4.0.39 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 57bd625ad..328f0ae62 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.39-SNAPSHOT + 4.0.39 ../pom.xml From 994fa7a4440c246244032fe64374ee31324feb89 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 23 Jul 2017 21:18:50 +0530 Subject: [PATCH 374/856] [WSO2 Release] [Jenkins #2887] [Release 4.0.39] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d9fdd3fd0..22c53e47d 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.39 + 4.0.40-SNAPSHOT ../pom.xml From 57564f7e6caf5c629365acde492a84d2a82f4bec Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 23 Jul 2017 21:18:50 +0530 Subject: [PATCH 375/856] [WSO2 Release] [Jenkins #2887] [Release 4.0.39] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 328f0ae62..816b026ab 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.39 + 4.0.40-SNAPSHOT ../pom.xml From 47ae0aec0b80ec865788b4af1c2b4d12c1e9d415 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 25 Jul 2017 21:12:16 +0530 Subject: [PATCH 376/856] [WSO2 Release] [Jenkins #2891] [Release 4.0.40] prepare release v4.0.40 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 816b026ab..4057bceb1 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.40-SNAPSHOT + 4.0.40 ../pom.xml From 0d4aca6d5cfa4787b12b7833020e3b97d6c03320 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 25 Jul 2017 21:12:16 +0530 Subject: [PATCH 377/856] [WSO2 Release] [Jenkins #2891] [Release 4.0.40] prepare release v4.0.40 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 22c53e47d..fb6b36f96 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.40-SNAPSHOT + 4.0.40 ../pom.xml From 594a36e1281d9643a6edf6f743a78258d4b3ea14 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 25 Jul 2017 21:12:31 +0530 Subject: [PATCH 378/856] [WSO2 Release] [Jenkins #2891] [Release 4.0.40] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4057bceb1..ca9ca91af 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.40 + 4.0.41-SNAPSHOT ../pom.xml From 65b53ea7caefbf26ad87d916fc67badb59d298d8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 25 Jul 2017 21:12:31 +0530 Subject: [PATCH 379/856] [WSO2 Release] [Jenkins #2891] [Release 4.0.40] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fb6b36f96..7ae23d5bd 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.40 + 4.0.41-SNAPSHOT ../pom.xml From 899384e0a5d8ca2f39ab1a10a0c07007f9bcc30e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 26 Jul 2017 21:10:47 +0530 Subject: [PATCH 380/856] [maven-release-plugin]prepare release v4.0.41 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ca9ca91af..d6c204677 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.41-SNAPSHOT + 4.0.41 ../pom.xml From fde28bf039d260db7bdee75598d5cb505c8ac723 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 26 Jul 2017 21:10:47 +0530 Subject: [PATCH 381/856] [maven-release-plugin]prepare release v4.0.41 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7ae23d5bd..f6bd82f01 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.41-SNAPSHOT + 4.0.41 ../pom.xml From e580fe2ee7e93a5d70bf7d88bad8987c882b4975 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 26 Jul 2017 21:11:04 +0530 Subject: [PATCH 382/856] [maven-release-plugin]prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d6c204677..d45f4bb6e 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.41 + 4.0.42-SNAPSHOT ../pom.xml From 16437c47ef407860df7ee45373febfa2666959cc Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 26 Jul 2017 21:11:04 +0530 Subject: [PATCH 383/856] [maven-release-plugin]prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f6bd82f01..0d9499683 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.41 + 4.0.42-SNAPSHOT ../pom.xml From 2366517f97f8eed09d754efdae6460a0d772b571 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 31 Jul 2017 08:50:39 +0000 Subject: [PATCH 384/856] [WSO2 Release] [Jenkins #2903] [Release 4.0.42] prepare release v4.0.42 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d45f4bb6e..9375fef87 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.42-SNAPSHOT + 4.0.42 ../pom.xml From 65590678c612396afc97c56a0165a33515b43fea Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 31 Jul 2017 08:50:39 +0000 Subject: [PATCH 385/856] [WSO2 Release] [Jenkins #2903] [Release 4.0.42] prepare release v4.0.42 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0d9499683..00c00bbd1 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.42-SNAPSHOT + 4.0.42 ../pom.xml From 0cf084176c3d50edc66924de7644f3a1a4fdada8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 31 Jul 2017 08:50:53 +0000 Subject: [PATCH 386/856] [WSO2 Release] [Jenkins #2903] [Release 4.0.42] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9375fef87..dfe7e5d6d 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.42 + 4.0.43-SNAPSHOT ../pom.xml From 17b7cd4b8169603d7409114635397e501b6a8917 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 31 Jul 2017 08:50:53 +0000 Subject: [PATCH 387/856] [WSO2 Release] [Jenkins #2903] [Release 4.0.42] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 00c00bbd1..08cfe9d9a 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.42 + 4.0.43-SNAPSHOT ../pom.xml From 1b5e13f44d71371461d11c8587aa36d7e295e74f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 31 Jul 2017 15:07:35 +0000 Subject: [PATCH 388/856] [WSO2 Release] [Jenkins #2906] [Release 4.0.43] prepare release v4.0.43 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dfe7e5d6d..33eeca370 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.43-SNAPSHOT + 4.0.43 ../pom.xml From 80bea254c78003cb00e16a8e191c47b83460d400 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 31 Jul 2017 15:07:35 +0000 Subject: [PATCH 389/856] [WSO2 Release] [Jenkins #2906] [Release 4.0.43] prepare release v4.0.43 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 08cfe9d9a..0ec4434cc 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.43-SNAPSHOT + 4.0.43 ../pom.xml From a2dcbd6938538f64d31c8343d5cbfef77041514e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 31 Jul 2017 15:07:49 +0000 Subject: [PATCH 390/856] [WSO2 Release] [Jenkins #2906] [Release 4.0.43] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 33eeca370..c20875bed 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.43 + 4.0.44-SNAPSHOT ../pom.xml From cf565d819f35f3b2f0c1a9482d66977b9c8ccd7c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 31 Jul 2017 15:07:49 +0000 Subject: [PATCH 391/856] [WSO2 Release] [Jenkins #2906] [Release 4.0.43] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0ec4434cc..c57873a82 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.43 + 4.0.44-SNAPSHOT ../pom.xml From 62b2810de7e23df19fd7a2d1e109bd76f1ebfe8a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 1 Aug 2017 17:30:44 +0530 Subject: [PATCH 392/856] [WSO2 Release] [Jenkins #2909] [Release 4.0.44] prepare release v4.0.44 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c20875bed..c0b7a915b 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.44-SNAPSHOT + 4.0.44 ../pom.xml From 3cf2237676c7b763e9289dd4a675ca5480af1990 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 1 Aug 2017 17:30:44 +0530 Subject: [PATCH 393/856] [WSO2 Release] [Jenkins #2909] [Release 4.0.44] prepare release v4.0.44 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c57873a82..c4a3070ec 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.44-SNAPSHOT + 4.0.44 ../pom.xml From d54c7d649768a013acaec2428d2af8d6e3ba343a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 1 Aug 2017 17:30:59 +0530 Subject: [PATCH 394/856] [WSO2 Release] [Jenkins #2909] [Release 4.0.44] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c0b7a915b..04f8a5e9f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.44 + 4.0.45-SNAPSHOT ../pom.xml From 42ed554ad25aad4981edda5949026aea9f227597 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 1 Aug 2017 17:30:59 +0530 Subject: [PATCH 395/856] [WSO2 Release] [Jenkins #2909] [Release 4.0.44] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c4a3070ec..e45663913 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.44 + 4.0.45-SNAPSHOT ../pom.xml From 354cb234634f9feb41e4af7ebc6e13baa58e92f4 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 2 Aug 2017 13:30:46 +0530 Subject: [PATCH 396/856] [WSO2 Release] [Jenkins #2912] [Release 4.0.45] prepare release v4.0.45 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 04f8a5e9f..2637e5187 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.45-SNAPSHOT + 4.0.45 ../pom.xml From db1d9564d0a87d893136f1b81a199b203c3f993d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 2 Aug 2017 13:30:46 +0530 Subject: [PATCH 397/856] [WSO2 Release] [Jenkins #2912] [Release 4.0.45] prepare release v4.0.45 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e45663913..e3737aeb8 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.45-SNAPSHOT + 4.0.45 ../pom.xml From 69312aa3444a212aca4b380b2a7835bf5f2db775 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 2 Aug 2017 13:30:56 +0530 Subject: [PATCH 398/856] [WSO2 Release] [Jenkins #2912] [Release 4.0.45] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2637e5187..5e5408843 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.45 + 4.0.46-SNAPSHOT ../pom.xml From 1ffa509fc95a70d27542e8837c1ccb91da6b8975 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 2 Aug 2017 13:30:56 +0530 Subject: [PATCH 399/856] [WSO2 Release] [Jenkins #2912] [Release 4.0.45] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e3737aeb8..72e6dec7a 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.45 + 4.0.46-SNAPSHOT ../pom.xml From 4bee59965e9b2967b904f63bb5fe122bcb85b007 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 2 Aug 2017 15:26:25 +0530 Subject: [PATCH 400/856] [WSO2 Release] [Jenkins #2913] [Release 4.0.46] prepare release v4.0.46 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5e5408843..710804239 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.46-SNAPSHOT + 4.0.46 ../pom.xml From 25f761dc5230317b642251a2df851498512a3f3d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 2 Aug 2017 15:26:25 +0530 Subject: [PATCH 401/856] [WSO2 Release] [Jenkins #2913] [Release 4.0.46] prepare release v4.0.46 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 72e6dec7a..a455cdcd1 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.46-SNAPSHOT + 4.0.46 ../pom.xml From 75f9423d4ed56447863c4d55ad9831a6c14c19a3 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 2 Aug 2017 15:26:35 +0530 Subject: [PATCH 402/856] [WSO2 Release] [Jenkins #2913] [Release 4.0.46] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 710804239..47c8e16b0 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.46 + 4.0.47-SNAPSHOT ../pom.xml From 674a680863a128b96f256d5054f12626c2ddf32f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 2 Aug 2017 15:26:35 +0530 Subject: [PATCH 403/856] [WSO2 Release] [Jenkins #2913] [Release 4.0.46] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a455cdcd1..b8b7df549 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.46 + 4.0.47-SNAPSHOT ../pom.xml From 16204941a2b324ed52994b0aad69b22450c4ce48 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 2 Aug 2017 17:48:43 +0000 Subject: [PATCH 404/856] [WSO2 Release] [Jenkins #2915] [Release 4.0.47] prepare release v4.0.47 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 47c8e16b0..771d47990 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.47-SNAPSHOT + 4.0.47 ../pom.xml From 98b56e4110cd0404b089b061167a9a1a44e61616 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 2 Aug 2017 17:48:43 +0000 Subject: [PATCH 405/856] [WSO2 Release] [Jenkins #2915] [Release 4.0.47] prepare release v4.0.47 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b8b7df549..3f6eefc58 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.47-SNAPSHOT + 4.0.47 ../pom.xml From 104a51e1ab0020ea42ae827b4851c2190f9f6096 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 2 Aug 2017 17:50:09 +0000 Subject: [PATCH 406/856] [WSO2 Release] [Jenkins #2915] [Release 4.0.47] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 771d47990..284ce1f6d 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.47 + 4.0.48-SNAPSHOT ../pom.xml From 890386b72026e84966fc6a396ee67b7c73ee2e89 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 2 Aug 2017 17:50:09 +0000 Subject: [PATCH 407/856] [WSO2 Release] [Jenkins #2915] [Release 4.0.47] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3f6eefc58..20899f5df 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.47 + 4.0.48-SNAPSHOT ../pom.xml From 405c4549aade08281bfeabd17316d7747a1873fb Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 3 Aug 2017 15:36:36 +0000 Subject: [PATCH 408/856] [WSO2 Release] [Jenkins #2918] [Release 4.0.48] prepare release v4.0.48 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 284ce1f6d..32e2c3df5 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.48-SNAPSHOT + 4.0.48 ../pom.xml From 89cbe38687921a1dc068f2c449c877caf58f679a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 3 Aug 2017 15:36:36 +0000 Subject: [PATCH 409/856] [WSO2 Release] [Jenkins #2918] [Release 4.0.48] prepare release v4.0.48 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 20899f5df..88e601543 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.48-SNAPSHOT + 4.0.48 ../pom.xml From 446105a233dd3f4e5a4ca30bb4d22e6a016ff24c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 3 Aug 2017 15:36:55 +0000 Subject: [PATCH 410/856] [WSO2 Release] [Jenkins #2918] [Release 4.0.48] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 32e2c3df5..94e0c18af 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.48 + 4.0.49-SNAPSHOT ../pom.xml From 59a287e1f235fda959f948ce2d70a00f8e4cb839 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 3 Aug 2017 15:36:55 +0000 Subject: [PATCH 411/856] [WSO2 Release] [Jenkins #2918] [Release 4.0.48] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 88e601543..8d0ea2e83 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.48 + 4.0.49-SNAPSHOT ../pom.xml From a9af84966b8122eb82370874e7fc4d76fcc9058f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 5 Aug 2017 09:31:35 +0000 Subject: [PATCH 412/856] [WSO2 Release] [Jenkins #2922] [Release 4.0.49] prepare release v4.0.49 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 94e0c18af..3fe545f02 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.49-SNAPSHOT + 4.0.49 ../pom.xml From d3714bf52919ee34e3d29bb751dbe7b9c0a76309 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 5 Aug 2017 09:31:35 +0000 Subject: [PATCH 413/856] [WSO2 Release] [Jenkins #2922] [Release 4.0.49] prepare release v4.0.49 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8d0ea2e83..85b5aa549 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.49-SNAPSHOT + 4.0.49 ../pom.xml From 60360b5f38b8d9e796edc31c1d85d59583564992 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 5 Aug 2017 09:31:52 +0000 Subject: [PATCH 414/856] [WSO2 Release] [Jenkins #2922] [Release 4.0.49] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3fe545f02..3819d9dcd 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.49 + 4.0.50-SNAPSHOT ../pom.xml From a7e7ce8084c6bb9eb38b07f8e984ea8dbac7bfc2 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 5 Aug 2017 09:31:52 +0000 Subject: [PATCH 415/856] [WSO2 Release] [Jenkins #2922] [Release 4.0.49] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 85b5aa549..87f58f7f5 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.49 + 4.0.50-SNAPSHOT ../pom.xml From 6411e7cdb6545b8546fef48d31daee9e5a3f66c0 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 7 Aug 2017 17:33:47 +0000 Subject: [PATCH 416/856] [WSO2 Release] [Jenkins #2926] [Release 4.0.50] prepare release v4.0.50 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3819d9dcd..5c127fc51 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.50-SNAPSHOT + 4.0.50 ../pom.xml From 57fbc962a7c6bbdcdb52e1de97ed793fa7fe58a5 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 7 Aug 2017 17:33:47 +0000 Subject: [PATCH 417/856] [WSO2 Release] [Jenkins #2926] [Release 4.0.50] prepare release v4.0.50 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 87f58f7f5..7fdfd774f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.50-SNAPSHOT + 4.0.50 ../pom.xml From d1c5d46131394b687d65f209abb7ea22237d7992 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 7 Aug 2017 17:35:11 +0000 Subject: [PATCH 418/856] [WSO2 Release] [Jenkins #2926] [Release 4.0.50] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5c127fc51..ff35c1404 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.50 + 4.0.51-SNAPSHOT ../pom.xml From de205604fea9485de969e63a0c9465b294827309 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 7 Aug 2017 17:35:11 +0000 Subject: [PATCH 419/856] [WSO2 Release] [Jenkins #2926] [Release 4.0.50] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7fdfd774f..007bba693 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.50 + 4.0.51-SNAPSHOT ../pom.xml From b11dbf431167ca957ca138118089926090ea25d1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 8 Aug 2017 00:28:17 +0530 Subject: [PATCH 420/856] [WSO2 Release] [Jenkins #2927] [Release 4.0.51] prepare release v4.0.51 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ff35c1404..c380fb5b8 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.51-SNAPSHOT + 4.0.51 ../pom.xml From c34cdfe8d8bddee4823fba8939a7229ac1248181 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 8 Aug 2017 00:28:17 +0530 Subject: [PATCH 421/856] [WSO2 Release] [Jenkins #2927] [Release 4.0.51] prepare release v4.0.51 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 007bba693..6ecf68346 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.51-SNAPSHOT + 4.0.51 ../pom.xml From 2de0d8a6eeaa59f8f9ff78007e25c0c100dce48d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 8 Aug 2017 00:28:33 +0530 Subject: [PATCH 422/856] [WSO2 Release] [Jenkins #2927] [Release 4.0.51] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c380fb5b8..2ca1e2afc 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.51 + 4.0.52-SNAPSHOT ../pom.xml From 484fe1b4b59d860d6d40c6bad035c9e3cce8196c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 8 Aug 2017 00:28:33 +0530 Subject: [PATCH 423/856] [WSO2 Release] [Jenkins #2927] [Release 4.0.51] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6ecf68346..99ef1dd3e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.51 + 4.0.52-SNAPSHOT ../pom.xml From 31dea577c25945fe68243d1387b96c60c7df2efe Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 8 Aug 2017 04:00:46 +0530 Subject: [PATCH 424/856] [WSO2 Release] [Jenkins #2928] [Release 4.0.52] prepare release v4.0.52 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2ca1e2afc..f3da22ba2 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.52-SNAPSHOT + 4.0.52 ../pom.xml From 1e5b5818f30d53fe8bb1527f9e32958f503c5ee5 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 8 Aug 2017 04:00:46 +0530 Subject: [PATCH 425/856] [WSO2 Release] [Jenkins #2928] [Release 4.0.52] prepare release v4.0.52 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 99ef1dd3e..cd4577ebe 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.52-SNAPSHOT + 4.0.52 ../pom.xml From c07c944c3b9c01cbe827d2467ec7e3b574f1c2fc Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 8 Aug 2017 04:00:56 +0530 Subject: [PATCH 426/856] [WSO2 Release] [Jenkins #2928] [Release 4.0.52] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f3da22ba2..29eb9f894 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.52 + 4.0.53-SNAPSHOT ../pom.xml From b7a2596859599be1aa1c3f12f8abbd8d3bbd5688 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 8 Aug 2017 04:00:56 +0530 Subject: [PATCH 427/856] [WSO2 Release] [Jenkins #2928] [Release 4.0.52] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cd4577ebe..ae3476441 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.52 + 4.0.53-SNAPSHOT ../pom.xml From 7b7d0d90c68abe0f6bc3760ff0e5f17d5620c9d9 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 9 Aug 2017 11:45:00 +0530 Subject: [PATCH 428/856] [WSO2 Release] [Jenkins #2935] [Release 4.0.53] prepare release v4.0.53 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 29eb9f894..66616e5db 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.53-SNAPSHOT + 4.0.53 ../pom.xml From 5a142b2fdfb54337bf1f3f7b82ad8721b331730b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 9 Aug 2017 11:45:00 +0530 Subject: [PATCH 429/856] [WSO2 Release] [Jenkins #2935] [Release 4.0.53] prepare release v4.0.53 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ae3476441..6997c779b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.53-SNAPSHOT + 4.0.53 ../pom.xml From 5bd618121efcdd63a8b0bd7ebe11619f0a5cc3a3 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 9 Aug 2017 11:45:11 +0530 Subject: [PATCH 430/856] [WSO2 Release] [Jenkins #2935] [Release 4.0.53] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 66616e5db..7fac9d7d7 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.53 + 4.0.54-SNAPSHOT ../pom.xml From 45ee680b810c0402311b32f12e0455d0ae7cc27d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 9 Aug 2017 11:45:11 +0530 Subject: [PATCH 431/856] [WSO2 Release] [Jenkins #2935] [Release 4.0.53] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6997c779b..a0deed564 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.53 + 4.0.54-SNAPSHOT ../pom.xml From b887752babcb0dc6f06d05ca296647e3a0132b32 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 10 Aug 2017 14:14:47 +0000 Subject: [PATCH 432/856] [maven-release-plugin]prepare release v4.0.54 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7fac9d7d7..ef6028c6d 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.54-SNAPSHOT + 4.0.54 ../pom.xml From e4f8246f226e6c5f3818f4d80ef09ae70040d419 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 10 Aug 2017 14:14:47 +0000 Subject: [PATCH 433/856] [maven-release-plugin]prepare release v4.0.54 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a0deed564..28400a6b8 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.54-SNAPSHOT + 4.0.54 ../pom.xml From 58fb813675622d23fa4f85a2f310c7786eac47f1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 10 Aug 2017 14:15:04 +0000 Subject: [PATCH 434/856] [maven-release-plugin]prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ef6028c6d..8d10f54e2 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.54 + 4.0.55-SNAPSHOT ../pom.xml From fd393be8897b76fe12707a205e5632c105a74cb1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 10 Aug 2017 14:15:04 +0000 Subject: [PATCH 435/856] [maven-release-plugin]prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 28400a6b8..97bd951fe 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.54 + 4.0.55-SNAPSHOT ../pom.xml From 1c6d6fc4c26188f433810a7d0f2790c3340ff2cc Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 11 Aug 2017 07:51:08 +0000 Subject: [PATCH 436/856] [WSO2 Release] [Jenkins #2943] [Release 4.0.55] prepare release v4.0.55 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8d10f54e2..937fd9941 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.55-SNAPSHOT + 4.0.55 ../pom.xml From 3ff4b01f5ef53c78b586c541a2434b2142c0f5f4 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 11 Aug 2017 07:51:08 +0000 Subject: [PATCH 437/856] [WSO2 Release] [Jenkins #2943] [Release 4.0.55] prepare release v4.0.55 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 97bd951fe..d196c91de 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.55-SNAPSHOT + 4.0.55 ../pom.xml From 6d8e6acbd25f4f53d69d4e12d87159e513dbafe8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 11 Aug 2017 07:51:22 +0000 Subject: [PATCH 438/856] [WSO2 Release] [Jenkins #2943] [Release 4.0.55] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 937fd9941..eccd7affd 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.55 + 4.0.56-SNAPSHOT ../pom.xml From 9c76c484a3c014fd4487e112103028f2ce83ca24 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 11 Aug 2017 07:51:22 +0000 Subject: [PATCH 439/856] [WSO2 Release] [Jenkins #2943] [Release 4.0.55] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d196c91de..38329c5a7 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.55 + 4.0.56-SNAPSHOT ../pom.xml From a897a5491e39914c73dc7d3a9002a85581db60b1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 22 Aug 2017 05:35:35 +0000 Subject: [PATCH 440/856] [WSO2 Release] [Jenkins #2956] [Release 4.0.56] prepare release v4.0.56 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 38329c5a7..cdbc698a5 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.56-SNAPSHOT + 4.0.56 ../pom.xml From dd8912fe91d5810821c718da46582c5d3cbff25b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 22 Aug 2017 05:35:35 +0000 Subject: [PATCH 441/856] [WSO2 Release] [Jenkins #2956] [Release 4.0.56] prepare release v4.0.56 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index eccd7affd..d5651daa3 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.56-SNAPSHOT + 4.0.56 ../pom.xml From d891a43d103885e0b3b80a75ad0f4396bc962c3b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 22 Aug 2017 05:35:49 +0000 Subject: [PATCH 442/856] [WSO2 Release] [Jenkins #2956] [Release 4.0.56] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cdbc698a5..d356339e8 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.56 + 4.0.57-SNAPSHOT ../pom.xml From 24a608d48ccd1ead5ff9df38f07eaa0947962754 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 22 Aug 2017 05:35:49 +0000 Subject: [PATCH 443/856] [WSO2 Release] [Jenkins #2956] [Release 4.0.56] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d5651daa3..a332b7c32 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.56 + 4.0.57-SNAPSHOT ../pom.xml From d9f6951a61e66384c57037109ad79d031ccb34ca Mon Sep 17 00:00:00 2001 From: Ace Date: Tue, 22 Aug 2017 16:25:24 +0530 Subject: [PATCH 444/856] Fixing stats display issue for virtual fire-alarm in MT mode --- .../agent/virtual/VirtualHardwareManager.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java index 61135c58a..fdb271e79 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java @@ -199,8 +199,11 @@ public class VirtualHardwareManager { try { sequence = MidiSystem.getSequence(audioSrc); sequencer = MidiSystem.getSequencer(); - sequencer.open(); - sequencer.setSequence(sequence); + if(sequencer != null) { + sequencer.open(); + sequencer.setSequence(sequence); + sequencer.setLoopCount(Clip.LOOP_CONTINUOUSLY); + } } catch (InvalidMidiDataException e) { log.error("AudioReader: Error whilst setting MIDI Audio reader sequence"); } catch (IOException e) { @@ -208,8 +211,6 @@ public class VirtualHardwareManager { } catch (MidiUnavailableException e) { log.error("AudioReader: Error whilst openning MIDI Audio reader sequencer"); } - - sequencer.setLoopCount(Clip.LOOP_CONTINUOUSLY); } } From 6bf943a5912600a0aba22031e200ddd24d6dfa45 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 22 Aug 2017 11:32:54 +0000 Subject: [PATCH 445/856] [WSO2 Release] [Jenkins #2958] [Release 4.0.57] prepare release v4.0.57 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a332b7c32..5550b31ea 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.57-SNAPSHOT + 4.0.57 ../pom.xml From 8f3fa6bc6c55b34ba1a1f15e84bea4650dd61646 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 22 Aug 2017 11:32:54 +0000 Subject: [PATCH 446/856] [WSO2 Release] [Jenkins #2958] [Release 4.0.57] prepare release v4.0.57 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d356339e8..f35dbb7fc 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.57-SNAPSHOT + 4.0.57 ../pom.xml From 8a899691949bb6a0a8ab7be6e3aa8460c6964318 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 22 Aug 2017 11:33:09 +0000 Subject: [PATCH 447/856] [WSO2 Release] [Jenkins #2958] [Release 4.0.57] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5550b31ea..610ee14c3 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.57 + 4.0.58-SNAPSHOT ../pom.xml From 7bb29aa7055bc5cf29b33ab63f65424139679e56 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 22 Aug 2017 11:33:09 +0000 Subject: [PATCH 448/856] [WSO2 Release] [Jenkins #2958] [Release 4.0.57] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f35dbb7fc..ca81a7606 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.57 + 4.0.58-SNAPSHOT ../pom.xml From 3d1981dbd3213bc45bd9c0476235f2c8845b7ca2 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 22 Aug 2017 18:38:19 +0000 Subject: [PATCH 449/856] [WSO2 Release] [Jenkins #2960] [Release 4.0.58] prepare release v4.0.58 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 610ee14c3..a00d2a374 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.58-SNAPSHOT + 4.0.58 ../pom.xml From 0976d03d6b7bf887b6667ae1a9b2d41bdc99e8fb Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 22 Aug 2017 18:38:19 +0000 Subject: [PATCH 450/856] [WSO2 Release] [Jenkins #2960] [Release 4.0.58] prepare release v4.0.58 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ca81a7606..4bdeb4b73 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.58-SNAPSHOT + 4.0.58 ../pom.xml From 1f5283b0679cd8143267097da865135ee7134258 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 22 Aug 2017 18:38:33 +0000 Subject: [PATCH 451/856] [WSO2 Release] [Jenkins #2960] [Release 4.0.58] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a00d2a374..efe051715 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.58 + 4.0.59-SNAPSHOT ../pom.xml From d92e256542c75a54acc8477891bc50354c09a2a6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 22 Aug 2017 18:38:33 +0000 Subject: [PATCH 452/856] [WSO2 Release] [Jenkins #2960] [Release 4.0.58] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4bdeb4b73..f157243ba 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.58 + 4.0.59-SNAPSHOT ../pom.xml From e9d148445fbda18cf411c64e5cdf7df7b6622758 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 23 Aug 2017 12:12:47 +0000 Subject: [PATCH 453/856] [WSO2 Release] [Jenkins #2963] [Release 4.0.59] prepare release v4.0.59 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index efe051715..93848f5cf 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.59-SNAPSHOT + 4.0.59 ../pom.xml From 57776e87a481cd8dc617f5a4aec6cf2fcb6816db Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 23 Aug 2017 12:12:47 +0000 Subject: [PATCH 454/856] [WSO2 Release] [Jenkins #2963] [Release 4.0.59] prepare release v4.0.59 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f157243ba..d00cfd0c2 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.59-SNAPSHOT + 4.0.59 ../pom.xml From ff6e442992f2b792bdf7111a9afcbc407319b5fb Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 23 Aug 2017 12:13:02 +0000 Subject: [PATCH 455/856] [WSO2 Release] [Jenkins #2963] [Release 4.0.59] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 93848f5cf..16dd4d425 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.59 + 4.0.60-SNAPSHOT ../pom.xml From 61d935bd93968ca1c37d5dab395322a08182cd1e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 23 Aug 2017 12:13:02 +0000 Subject: [PATCH 456/856] [WSO2 Release] [Jenkins #2963] [Release 4.0.59] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d00cfd0c2..8df9fbe44 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.59 + 4.0.60-SNAPSHOT ../pom.xml From a1ef705b282fb3906f91a5593cd804b5185942bb Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 24 Aug 2017 10:04:52 +0000 Subject: [PATCH 457/856] [WSO2 Release] [Jenkins #2966] [Release 4.0.60] prepare release v4.0.60 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 16dd4d425..ea049c500 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.60-SNAPSHOT + 4.0.60 ../pom.xml From 7435d017d57b8281414013ba3a093cfb898a1834 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 24 Aug 2017 10:04:52 +0000 Subject: [PATCH 458/856] [WSO2 Release] [Jenkins #2966] [Release 4.0.60] prepare release v4.0.60 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8df9fbe44..e0c572186 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.60-SNAPSHOT + 4.0.60 ../pom.xml From 329d623e29af51174b4517afa5060bbca4e416b7 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 24 Aug 2017 10:05:06 +0000 Subject: [PATCH 459/856] [WSO2 Release] [Jenkins #2966] [Release 4.0.60] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ea049c500..317fc52fa 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.60 + 4.0.61-SNAPSHOT ../pom.xml From a359a4069f8bf77541535d662d1997dd1b99e70a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 24 Aug 2017 10:05:06 +0000 Subject: [PATCH 460/856] [WSO2 Release] [Jenkins #2966] [Release 4.0.60] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e0c572186..9173691b5 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.60 + 4.0.61-SNAPSHOT ../pom.xml From 7ab2c53433bbd32f4e9d718a6c5c33412d01d61a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 28 Aug 2017 08:56:42 +0000 Subject: [PATCH 461/856] [WSO2 Release] [Jenkins #2972] [Release 4.0.61] prepare release v4.0.61 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 317fc52fa..18429b5a1 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.61-SNAPSHOT + 4.0.61 ../pom.xml From d9035924359912daaf2198431f53f65244d4fa5d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 28 Aug 2017 08:56:42 +0000 Subject: [PATCH 462/856] [WSO2 Release] [Jenkins #2972] [Release 4.0.61] prepare release v4.0.61 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9173691b5..bec184a7c 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.61-SNAPSHOT + 4.0.61 ../pom.xml From 3cae4a86437b1e2c6992cc1a162154ef7fdfdbfc Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 28 Aug 2017 08:56:56 +0000 Subject: [PATCH 463/856] [WSO2 Release] [Jenkins #2972] [Release 4.0.61] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 18429b5a1..ac72197c4 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.61 + 4.0.62-SNAPSHOT ../pom.xml From 3678e094ecb5ec3dec061da668947592234005ab Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 28 Aug 2017 08:56:56 +0000 Subject: [PATCH 464/856] [WSO2 Release] [Jenkins #2972] [Release 4.0.61] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bec184a7c..186e40e8c 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.61 + 4.0.62-SNAPSHOT ../pom.xml From 9a9f6fcb3dba181134bc971d45824e7518c6add0 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 29 Aug 2017 07:17:03 +0000 Subject: [PATCH 465/856] [WSO2 Release] [Jenkins #2975] [Release 4.0.62] prepare release v4.0.62 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ac72197c4..8fb764f4d 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.62-SNAPSHOT + 4.0.62 ../pom.xml From 842150c83906633d9a3a3668d417f32f974d6f3b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 29 Aug 2017 07:17:03 +0000 Subject: [PATCH 466/856] [WSO2 Release] [Jenkins #2975] [Release 4.0.62] prepare release v4.0.62 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 186e40e8c..d55a8aeb7 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.62-SNAPSHOT + 4.0.62 ../pom.xml From 7047c161e0e204028246518829dd1c6edf5a3dca Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 29 Aug 2017 07:17:18 +0000 Subject: [PATCH 467/856] [WSO2 Release] [Jenkins #2975] [Release 4.0.62] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8fb764f4d..3d4fb8109 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.62 + 4.0.63-SNAPSHOT ../pom.xml From 2b09dde055d6e6be4f9d305e8a85da7df5fd4609 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 29 Aug 2017 07:17:18 +0000 Subject: [PATCH 468/856] [WSO2 Release] [Jenkins #2975] [Release 4.0.62] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d55a8aeb7..2237ceebd 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.62 + 4.0.63-SNAPSHOT ../pom.xml From 3d175f73087b7e4ac3e30eac13dde6c49befe652 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 29 Aug 2017 09:22:17 +0000 Subject: [PATCH 469/856] [WSO2 Release] [Jenkins #2977] [Release 4.0.63] prepare release v4.0.63 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3d4fb8109..8ef2a7680 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.63-SNAPSHOT + 4.0.63 ../pom.xml From 3247f05c09e80ad674d6402917e65b002cd27ac1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 29 Aug 2017 09:22:17 +0000 Subject: [PATCH 470/856] [WSO2 Release] [Jenkins #2977] [Release 4.0.63] prepare release v4.0.63 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2237ceebd..7efc68ab9 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.63-SNAPSHOT + 4.0.63 ../pom.xml From b35dbdcd922cf16b706d10efe9a7c167090ac56a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 29 Aug 2017 09:22:33 +0000 Subject: [PATCH 471/856] [WSO2 Release] [Jenkins #2977] [Release 4.0.63] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8ef2a7680..49737273a 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.63 + 4.0.64-SNAPSHOT ../pom.xml From 9591441952205f5bb6f25fa7d3047ae6891be357 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 29 Aug 2017 09:22:33 +0000 Subject: [PATCH 472/856] [WSO2 Release] [Jenkins #2977] [Release 4.0.63] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7efc68ab9..9ae848b7f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.63 + 4.0.64-SNAPSHOT ../pom.xml From 3ec1c5bcd37b1273248e0dc07ecfa73cf0fbaebc Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 29 Aug 2017 10:42:31 +0000 Subject: [PATCH 473/856] [WSO2 Release] [Jenkins #2979] [Release 4.0.64] prepare release v4.0.64 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 49737273a..ac56fbc7f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.64-SNAPSHOT + 4.0.64 ../pom.xml From d7065799ac706c26faefb0f5a2b1c22bb69ea4f3 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 29 Aug 2017 10:42:31 +0000 Subject: [PATCH 474/856] [WSO2 Release] [Jenkins #2979] [Release 4.0.64] prepare release v4.0.64 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9ae848b7f..859432b4e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.64-SNAPSHOT + 4.0.64 ../pom.xml From 7e8b33c72ac8c630b340a3a3b45c3c5d187dfc65 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 29 Aug 2017 10:42:45 +0000 Subject: [PATCH 475/856] [WSO2 Release] [Jenkins #2979] [Release 4.0.64] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ac56fbc7f..e7f4e92c9 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.64 + 4.0.65-SNAPSHOT ../pom.xml From 8965e9d836e16064a21fe89b2c070c7f7d45c67c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 29 Aug 2017 10:42:45 +0000 Subject: [PATCH 476/856] [WSO2 Release] [Jenkins #2979] [Release 4.0.64] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 859432b4e..4bfc304c6 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.64 + 4.0.65-SNAPSHOT ../pom.xml From e5fb58d434e4aaa814721dcc79c4515641a86945 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 30 Aug 2017 06:07:01 +0000 Subject: [PATCH 477/856] [WSO2 Release] [Jenkins #2982] [Release 4.0.65] prepare release v4.0.65 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 089c16234..99760ab75 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.65-SNAPSHOT + 4.0.65 ../pom.xml From f14b41b8baaf422521881135587cd0f4787a042e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 30 Aug 2017 06:07:01 +0000 Subject: [PATCH 478/856] [WSO2 Release] [Jenkins #2982] [Release 4.0.65] prepare release v4.0.65 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4bfc304c6..12b2f3870 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.65-SNAPSHOT + 4.0.65 ../pom.xml From 91aa1bc32fe8d78c338f9f7b4c33251ad274d933 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 30 Aug 2017 06:07:16 +0000 Subject: [PATCH 479/856] [WSO2 Release] [Jenkins #2982] [Release 4.0.65] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 99760ab75..dffaa4891 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.65 + 4.0.66-SNAPSHOT ../pom.xml From bcb401d5eddb13ef48ab6a6544e9ae2120b6672c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 30 Aug 2017 06:07:16 +0000 Subject: [PATCH 480/856] [WSO2 Release] [Jenkins #2982] [Release 4.0.65] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 12b2f3870..c26cf7bd8 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.65 + 4.0.66-SNAPSHOT ../pom.xml From 2c8c82f7d3603d6e1c1f4978c1cbf36cf8137431 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 08:49:32 +0000 Subject: [PATCH 481/856] [WSO2 Release] [Jenkins #2985] [Release 4.0.66] prepare release v4.0.66 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dffaa4891..0a6705f6f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.66-SNAPSHOT + 4.0.66 ../pom.xml From 46804005d394ae1264624e6ab0b5501f0d9d8a61 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 08:49:32 +0000 Subject: [PATCH 482/856] [WSO2 Release] [Jenkins #2985] [Release 4.0.66] prepare release v4.0.66 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c26cf7bd8..0dfcf14de 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.66-SNAPSHOT + 4.0.66 ../pom.xml From c8828bdeec53f550aad03808e041e682aa4286dd Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 08:49:50 +0000 Subject: [PATCH 483/856] [WSO2 Release] [Jenkins #2985] [Release 4.0.66] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0a6705f6f..137d2910f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.66 + 4.0.67-SNAPSHOT ../pom.xml From 154e130340e1af575237dbca5e31b039e9df6986 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 08:49:50 +0000 Subject: [PATCH 484/856] [WSO2 Release] [Jenkins #2985] [Release 4.0.66] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0dfcf14de..9701b8ba0 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.66 + 4.0.67-SNAPSHOT ../pom.xml From 62f0966436e2f6f07e20b5b4ac0450ac1226fb28 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 10:06:54 +0000 Subject: [PATCH 485/856] [WSO2 Release] [Jenkins #2986] [Release 4.0.67] prepare release v4.0.67 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 137d2910f..8ccebf4d5 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.67-SNAPSHOT + 4.0.67 ../pom.xml From 298d4f701da3dd4533835becabd2965218b88250 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 10:06:54 +0000 Subject: [PATCH 486/856] [WSO2 Release] [Jenkins #2986] [Release 4.0.67] prepare release v4.0.67 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9701b8ba0..27a9b7723 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.67-SNAPSHOT + 4.0.67 ../pom.xml From 1a1c15846d54ca4665111f27c613fa15c09052a8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 10:07:07 +0000 Subject: [PATCH 487/856] [WSO2 Release] [Jenkins #2986] [Release 4.0.67] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8ccebf4d5..720134a24 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.67 + 4.0.68-SNAPSHOT ../pom.xml From 366656665068cf0b641bc6d414ff752e6f94e5db Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 10:07:07 +0000 Subject: [PATCH 488/856] [WSO2 Release] [Jenkins #2986] [Release 4.0.67] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 27a9b7723..54c30ff63 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.67 + 4.0.68-SNAPSHOT ../pom.xml From 9be8a7c998f61f4c47ab5f8b0f39c3bc011e15e8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 10:44:11 +0000 Subject: [PATCH 489/856] [WSO2 Release] [Jenkins #2987] [Release 4.0.68] prepare release v4.0.68 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 720134a24..e2e51c498 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.68-SNAPSHOT + 4.0.68 ../pom.xml From 573cedba60e8e9eb589f4f16ce0d1ea4ae677243 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 10:44:11 +0000 Subject: [PATCH 490/856] [WSO2 Release] [Jenkins #2987] [Release 4.0.68] prepare release v4.0.68 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 54c30ff63..ee6d15006 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.68-SNAPSHOT + 4.0.68 ../pom.xml From 6488d29e4d063d8a6b48f878e89896ecbb8adb67 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 10:44:25 +0000 Subject: [PATCH 491/856] [WSO2 Release] [Jenkins #2987] [Release 4.0.68] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e2e51c498..5c2a362e7 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.68 + 4.0.69-SNAPSHOT ../pom.xml From 975e94841caab6ef83b6b5c5a4ffe9a8a070e8c5 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 10:44:25 +0000 Subject: [PATCH 492/856] [WSO2 Release] [Jenkins #2987] [Release 4.0.68] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ee6d15006..3ca81db3d 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.68 + 4.0.69-SNAPSHOT ../pom.xml From dcac4181bb66c7ba4f5565a0ec4ad7ffe08a60ff Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 11:28:36 +0000 Subject: [PATCH 493/856] [WSO2 Release] [Jenkins #2988] [Release 4.0.69] prepare release v4.0.69 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5c2a362e7..7075360d6 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.69-SNAPSHOT + 4.0.69 ../pom.xml From 8631a96785813531ada1cd0f74042d2dd1cead5a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 11:28:36 +0000 Subject: [PATCH 494/856] [WSO2 Release] [Jenkins #2988] [Release 4.0.69] prepare release v4.0.69 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3ca81db3d..0657829cb 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.69-SNAPSHOT + 4.0.69 ../pom.xml From 8b10a1b74282b0e479d8f9ba2ba8c5b769b55e41 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 11:28:49 +0000 Subject: [PATCH 495/856] [WSO2 Release] [Jenkins #2988] [Release 4.0.69] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7075360d6..7c9ea94e9 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.69 + 4.0.70-SNAPSHOT ../pom.xml From bb66579f8a9ba8ccc4240ec4df5bdb4c31ce9030 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 11:28:49 +0000 Subject: [PATCH 496/856] [WSO2 Release] [Jenkins #2988] [Release 4.0.69] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0657829cb..2c025dd8b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.69 + 4.0.70-SNAPSHOT ../pom.xml From e58d6f9cce112ee93b26b4058ebe8950d9413532 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 13:01:02 +0000 Subject: [PATCH 497/856] [WSO2 Release] [Jenkins #2989] [Release 4.0.70] prepare release v4.0.70 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7c9ea94e9..6d79b5999 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.70-SNAPSHOT + 4.0.70 ../pom.xml From 7aed1b7ee4c62b87427f0401da1ffe097cddb119 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 13:01:02 +0000 Subject: [PATCH 498/856] [WSO2 Release] [Jenkins #2989] [Release 4.0.70] prepare release v4.0.70 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2c025dd8b..bdbe3d678 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.70-SNAPSHOT + 4.0.70 ../pom.xml From 54fe9e497ac56d354b0cc716470b57a902b86ec4 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 13:01:15 +0000 Subject: [PATCH 499/856] [WSO2 Release] [Jenkins #2989] [Release 4.0.70] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6d79b5999..0bc8aec66 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.70 + 4.0.71-SNAPSHOT ../pom.xml From ac51f65f7971245a2204cc4c3d156c9ef3923395 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 13:01:15 +0000 Subject: [PATCH 500/856] [WSO2 Release] [Jenkins #2989] [Release 4.0.70] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bdbe3d678..4e73d3f3a 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.70 + 4.0.71-SNAPSHOT ../pom.xml From 3cc79fbac358e18fefeb32e02625eab4581c393e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 13:38:10 +0000 Subject: [PATCH 501/856] [WSO2 Release] [Jenkins #2990] [Release 4.0.71] prepare release v4.0.71 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0bc8aec66..3b1c4cfc0 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.71-SNAPSHOT + 4.0.71 ../pom.xml From da1f5590ab5396e90f0c4c21a5995a6d59e250cb Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 13:38:10 +0000 Subject: [PATCH 502/856] [WSO2 Release] [Jenkins #2990] [Release 4.0.71] prepare release v4.0.71 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4e73d3f3a..c0049a616 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.71-SNAPSHOT + 4.0.71 ../pom.xml From e1189de9f57d573d4e7f36a64e39a3d2406e04b2 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 13:38:23 +0000 Subject: [PATCH 503/856] [WSO2 Release] [Jenkins #2990] [Release 4.0.71] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3b1c4cfc0..8ab236ecb 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.71 + 4.0.72-SNAPSHOT ../pom.xml From ace18880e0d350539ed0327d0b1ff9ff0c155ca8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 31 Aug 2017 13:38:23 +0000 Subject: [PATCH 504/856] [WSO2 Release] [Jenkins #2990] [Release 4.0.71] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c0049a616..8846dbbcf 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.71 + 4.0.72-SNAPSHOT ../pom.xml From 5462aa9cac5e9a45e5f842c9c51cbc587abbc3c1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 1 Sep 2017 08:00:57 +0000 Subject: [PATCH 505/856] [WSO2 Release] [Jenkins #2993] [Release 4.0.72] prepare release v4.0.72 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8ab236ecb..a5b83e8ea 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.72-SNAPSHOT + 4.0.72 ../pom.xml From aebdb960ddeb37b621360cee51339b680c3aaa48 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 1 Sep 2017 08:00:57 +0000 Subject: [PATCH 506/856] [WSO2 Release] [Jenkins #2993] [Release 4.0.72] prepare release v4.0.72 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8846dbbcf..1fe22a750 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.72-SNAPSHOT + 4.0.72 ../pom.xml From 877c00bfa15806dd73529e64b523f998d11cee32 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 1 Sep 2017 08:01:13 +0000 Subject: [PATCH 507/856] [WSO2 Release] [Jenkins #2993] [Release 4.0.72] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a5b83e8ea..af54731c4 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.72 + 4.0.73-SNAPSHOT ../pom.xml From d1804d6db81523c2791ebfb0bd031f2523cbcbba Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 1 Sep 2017 08:01:13 +0000 Subject: [PATCH 508/856] [WSO2 Release] [Jenkins #2993] [Release 4.0.72] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1fe22a750..d8b7bc12b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.72 + 4.0.73-SNAPSHOT ../pom.xml From 9f7254ff78f59a275721e0c6223db2d77912bb5b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 7 Sep 2017 12:21:19 +0000 Subject: [PATCH 509/856] [WSO2 Release] [Jenkins #3001] [Release 4.0.73] prepare release v4.0.73 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index af54731c4..458fbcd6c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.73-SNAPSHOT + 4.0.73 ../pom.xml From 9b2ce581d1775c83af16764f4282ebc70a139b83 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 7 Sep 2017 12:21:19 +0000 Subject: [PATCH 510/856] [WSO2 Release] [Jenkins #3001] [Release 4.0.73] prepare release v4.0.73 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d8b7bc12b..956a6d5b9 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.73-SNAPSHOT + 4.0.73 ../pom.xml From 0b680c6e3ca6066fff6b0d5182d0b07a78ccbdab Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 7 Sep 2017 12:21:32 +0000 Subject: [PATCH 511/856] [WSO2 Release] [Jenkins #3001] [Release 4.0.73] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 458fbcd6c..a5048f00c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.73 + 4.0.74-SNAPSHOT ../pom.xml From 751ed29c9e504e21fdeb87b1916f3a989f0c8853 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 7 Sep 2017 12:21:32 +0000 Subject: [PATCH 512/856] [WSO2 Release] [Jenkins #3001] [Release 4.0.73] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 956a6d5b9..bd0f162f3 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.73 + 4.0.74-SNAPSHOT ../pom.xml From 87a60753c175a10b08e4eeebbaebc060b55dedd5 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 7 Sep 2017 13:01:27 +0000 Subject: [PATCH 513/856] [WSO2 Release] [Jenkins #3002] [Release 4.0.74] prepare release v4.0.74 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a5048f00c..dc7671d4b 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.74-SNAPSHOT + 4.0.74 ../pom.xml From ba8eb68febf2c68848b488ac9ce9f47a2dd84182 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 7 Sep 2017 13:01:27 +0000 Subject: [PATCH 514/856] [WSO2 Release] [Jenkins #3002] [Release 4.0.74] prepare release v4.0.74 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bd0f162f3..7e078d3b5 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.74-SNAPSHOT + 4.0.74 ../pom.xml From ce2f916dbae7d845698101d76fe0be0317bb98e2 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 7 Sep 2017 13:01:41 +0000 Subject: [PATCH 515/856] [WSO2 Release] [Jenkins #3002] [Release 4.0.74] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dc7671d4b..5d570523f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.74 + 4.0.75-SNAPSHOT ../pom.xml From 78c6d730f8dc4ff2ff8fe8e8dce09aca019d20be Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 7 Sep 2017 13:01:41 +0000 Subject: [PATCH 516/856] [WSO2 Release] [Jenkins #3002] [Release 4.0.74] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7e078d3b5..ac0a527a1 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.74 + 4.0.75-SNAPSHOT ../pom.xml From 44277016f24d616ec00372444ce875b07049e709 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 8 Sep 2017 11:01:36 +0000 Subject: [PATCH 517/856] [WSO2 Release] [Jenkins #3005] [Release 4.0.75] prepare release v4.0.75 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5d570523f..a7317666d 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.75-SNAPSHOT + 4.0.75 ../pom.xml From 77aa905e7acd627baf2afa0c5a26d653ff15b3c7 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 8 Sep 2017 11:01:36 +0000 Subject: [PATCH 518/856] [WSO2 Release] [Jenkins #3005] [Release 4.0.75] prepare release v4.0.75 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ac0a527a1..2dfe5f50b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.75-SNAPSHOT + 4.0.75 ../pom.xml From 456b5e9ec089388e2367d9af6fe299622f6d4483 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 8 Sep 2017 11:01:50 +0000 Subject: [PATCH 519/856] [WSO2 Release] [Jenkins #3005] [Release 4.0.75] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a7317666d..3463ecbb8 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.75 + 4.0.76-SNAPSHOT ../pom.xml From 8e1b5810cc0d11ebdd378bddf998eb5acafda040 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 8 Sep 2017 11:01:50 +0000 Subject: [PATCH 520/856] [WSO2 Release] [Jenkins #3005] [Release 4.0.75] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2dfe5f50b..d13edce99 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.75 + 4.0.76-SNAPSHOT ../pom.xml From 80a361d80230cebffe987fdc859d54f5a2961175 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 8 Sep 2017 12:38:16 +0000 Subject: [PATCH 521/856] [WSO2 Release] [Jenkins #3007] [Release 4.0.76] prepare release v4.0.76 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3463ecbb8..37f1f84e7 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.76-SNAPSHOT + 4.0.76 ../pom.xml From df0477e51166a1aab83f1129120a1ef1c14dbf2c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 8 Sep 2017 12:38:16 +0000 Subject: [PATCH 522/856] [WSO2 Release] [Jenkins #3007] [Release 4.0.76] prepare release v4.0.76 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d13edce99..cb4a2cd94 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.76-SNAPSHOT + 4.0.76 ../pom.xml From 084313a5de3a3d7fdec7fbfe1e68d09dbd31b2cd Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 8 Sep 2017 12:38:30 +0000 Subject: [PATCH 523/856] [WSO2 Release] [Jenkins #3007] [Release 4.0.76] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 37f1f84e7..e290e8d21 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.76 + 4.0.77-SNAPSHOT ../pom.xml From 06d3fb6ffdaabe880dfde748a83a68fd2170ddb6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 8 Sep 2017 12:38:30 +0000 Subject: [PATCH 524/856] [WSO2 Release] [Jenkins #3007] [Release 4.0.76] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cb4a2cd94..5706c38c1 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.76 + 4.0.77-SNAPSHOT ../pom.xml From dc64de0b8f78ac47b2673c53901d5b3451b33311 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 11 Sep 2017 09:16:54 +0000 Subject: [PATCH 525/856] [WSO2 Release] [Jenkins #3009] [Release 4.0.77] prepare release v4.0.77 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e290e8d21..ad0b5c020 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.77-SNAPSHOT + 4.0.77 ../pom.xml From d63600fd906c4cfb441361b9af2bf1c961635915 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 11 Sep 2017 09:16:54 +0000 Subject: [PATCH 526/856] [WSO2 Release] [Jenkins #3009] [Release 4.0.77] prepare release v4.0.77 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5706c38c1..d17cff6bc 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.77-SNAPSHOT + 4.0.77 ../pom.xml From 7f3c0ddf84ffcb142dd87c6e0daf3ff06e01e575 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 11 Sep 2017 09:17:08 +0000 Subject: [PATCH 527/856] [WSO2 Release] [Jenkins #3009] [Release 4.0.77] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ad0b5c020..b16a0c534 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.77 + 4.0.78-SNAPSHOT ../pom.xml From 53d6d18d9bbf658c17e16e472969a17a33f80c8c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 11 Sep 2017 09:17:08 +0000 Subject: [PATCH 528/856] [WSO2 Release] [Jenkins #3009] [Release 4.0.77] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d17cff6bc..006dd177d 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.77 + 4.0.78-SNAPSHOT ../pom.xml From ce6d2744798e2ae2a20def2cdfcc0306b9dc67a7 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 14 Sep 2017 07:20:51 +0000 Subject: [PATCH 529/856] [WSO2 Release] [Jenkins #3011] [Release 4.0.78] prepare release v4.0.78 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b16a0c534..ac191b4eb 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.78-SNAPSHOT + 4.0.78 ../pom.xml From afeedeb31c15ecfe51631916503654b6e9642bbc Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 14 Sep 2017 07:20:51 +0000 Subject: [PATCH 530/856] [WSO2 Release] [Jenkins #3011] [Release 4.0.78] prepare release v4.0.78 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 006dd177d..736f297db 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.78-SNAPSHOT + 4.0.78 ../pom.xml From c54213f72a29b022f7afdfc83169e94f1a674786 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 14 Sep 2017 07:21:05 +0000 Subject: [PATCH 531/856] [WSO2 Release] [Jenkins #3011] [Release 4.0.78] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ac191b4eb..1ec7dcb4f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.78 + 4.0.79-SNAPSHOT ../pom.xml From 9a601c8ec175aed2dfb3f092f18027fe0f59a9f7 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 14 Sep 2017 07:21:05 +0000 Subject: [PATCH 532/856] [WSO2 Release] [Jenkins #3011] [Release 4.0.78] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 736f297db..d8355f7a7 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.78 + 4.0.79-SNAPSHOT ../pom.xml From f79986f6fabc018d597ab379d71cf43870e8839c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 14 Sep 2017 10:24:29 +0000 Subject: [PATCH 533/856] [WSO2 Release] [Jenkins #3013] [Release 4.0.79] prepare release v4.0.79 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1ec7dcb4f..173920e29 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.79-SNAPSHOT + 4.0.79 ../pom.xml From 5101444a8c5fcd39681aad8432b6ad4ad0edee88 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 14 Sep 2017 10:24:29 +0000 Subject: [PATCH 534/856] [WSO2 Release] [Jenkins #3013] [Release 4.0.79] prepare release v4.0.79 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d8355f7a7..1c307592b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.79-SNAPSHOT + 4.0.79 ../pom.xml From 8e406b5f98fea729cd8138c4064dd2f2689516f7 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 14 Sep 2017 10:24:44 +0000 Subject: [PATCH 535/856] [WSO2 Release] [Jenkins #3013] [Release 4.0.79] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 173920e29..27f1978f5 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.79 + 4.0.80-SNAPSHOT ../pom.xml From 3c51ccaf8fbbd6dcefa191fa10454b720b5746d9 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 14 Sep 2017 10:24:44 +0000 Subject: [PATCH 536/856] [WSO2 Release] [Jenkins #3013] [Release 4.0.79] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1c307592b..fbe6e34b7 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.79 + 4.0.80-SNAPSHOT ../pom.xml From f6e9c35613527dd79b4a0ab7f40e1ff9ba85926c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 15 Sep 2017 12:19:50 +0000 Subject: [PATCH 537/856] [WSO2 Release] [Jenkins #3015] [Release 4.0.80] prepare release v4.0.80 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 27f1978f5..7b4eac57d 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.80-SNAPSHOT + 4.0.80 ../pom.xml From 5fd84bb8b1011f47bccc497cf03e4d97e24d469b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 15 Sep 2017 12:19:50 +0000 Subject: [PATCH 538/856] [WSO2 Release] [Jenkins #3015] [Release 4.0.80] prepare release v4.0.80 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fbe6e34b7..1ffab63ef 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.80-SNAPSHOT + 4.0.80 ../pom.xml From 3944ce712be685c04d872c377ee63e7e0c444c7b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 15 Sep 2017 12:20:04 +0000 Subject: [PATCH 539/856] [WSO2 Release] [Jenkins #3015] [Release 4.0.80] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7b4eac57d..8d4ab5718 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.80 + 4.0.81-SNAPSHOT ../pom.xml From 39fc1431b704b35fac66aabc996ff1b1aeb943dc Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 15 Sep 2017 12:20:04 +0000 Subject: [PATCH 540/856] [WSO2 Release] [Jenkins #3015] [Release 4.0.80] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1ffab63ef..e83c9ec1a 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.80 + 4.0.81-SNAPSHOT ../pom.xml From a11e80b8d9c99c841cfdfa229809f66493f0a08b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 19 Sep 2017 09:00:19 +0000 Subject: [PATCH 541/856] [WSO2 Release] [Jenkins #3017] [Release 4.0.81] prepare release v4.0.81 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8d4ab5718..c29b05e63 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.81-SNAPSHOT + 4.0.81 ../pom.xml From ff2f735a97bcf0a44c42ab72a21ec8acd0bd23d6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 19 Sep 2017 09:00:19 +0000 Subject: [PATCH 542/856] [WSO2 Release] [Jenkins #3017] [Release 4.0.81] prepare release v4.0.81 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e83c9ec1a..a3ba447da 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.81-SNAPSHOT + 4.0.81 ../pom.xml From d1df2e2caf412b15647d948a89f6a54fc15a15cd Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 19 Sep 2017 09:00:33 +0000 Subject: [PATCH 543/856] [WSO2 Release] [Jenkins #3017] [Release 4.0.81] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c29b05e63..7565fcf30 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.81 + 4.0.82-SNAPSHOT ../pom.xml From 6267b9509d1f371d09b1cd5da5beddaa035110ae Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 19 Sep 2017 09:00:33 +0000 Subject: [PATCH 544/856] [WSO2 Release] [Jenkins #3017] [Release 4.0.81] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a3ba447da..bcd4193b6 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.81 + 4.0.82-SNAPSHOT ../pom.xml From 2dc37fe447d2a537560188c020f41ddf54404ff9 Mon Sep 17 00:00:00 2001 From: Ace Date: Thu, 21 Sep 2017 12:00:26 +0530 Subject: [PATCH 545/856] correcting pom versions and bumping APIM dependency --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8d4ab5718..7565fcf30 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.81-SNAPSHOT + 4.0.82-SNAPSHOT ../pom.xml From 8c98e5eb42b76cbcad08b263d30549a69bf08043 Mon Sep 17 00:00:00 2001 From: Ace Date: Thu, 21 Sep 2017 12:00:26 +0530 Subject: [PATCH 546/856] correcting pom versions and bumping APIM dependency --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e83c9ec1a..bcd4193b6 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.81-SNAPSHOT + 4.0.82-SNAPSHOT ../pom.xml From 258c0696b02f00b14a5a08fe4f95e27f74e0a673 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 21 Sep 2017 10:51:08 +0000 Subject: [PATCH 547/856] [WSO2 Release] [Jenkins #3019] [Release 4.0.82] prepare release v4.0.82 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7565fcf30..3716625e7 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.82-SNAPSHOT + 4.0.82 ../pom.xml From 2f7f206a846e7ba566d7dff4c075590dcc2a5042 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 21 Sep 2017 10:51:08 +0000 Subject: [PATCH 548/856] [WSO2 Release] [Jenkins #3019] [Release 4.0.82] prepare release v4.0.82 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bcd4193b6..6e3e5aa65 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.82-SNAPSHOT + 4.0.82 ../pom.xml From 116bb9915245a16a96f154ff6e8b128a7cfc3487 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 21 Sep 2017 10:51:23 +0000 Subject: [PATCH 549/856] [WSO2 Release] [Jenkins #3019] [Release 4.0.82] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3716625e7..a853bee85 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.82 + 4.0.83-SNAPSHOT ../pom.xml From 186d148da731afafaf548e0f636819baec12a876 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 21 Sep 2017 10:51:23 +0000 Subject: [PATCH 550/856] [WSO2 Release] [Jenkins #3019] [Release 4.0.82] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6e3e5aa65..48bf10f88 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.82 + 4.0.83-SNAPSHOT ../pom.xml From 7c900f29356dd8980317a5cdf9df9891b5c97020 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 22 Sep 2017 06:11:46 +0000 Subject: [PATCH 551/856] [WSO2 Release] [Jenkins #3021] [Release 4.0.83] prepare release v4.0.83 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a853bee85..cdd734934 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.83-SNAPSHOT + 4.0.83 ../pom.xml From 7dc8e7b9122f882d1a0af921092f367b1f4a8139 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 22 Sep 2017 06:11:46 +0000 Subject: [PATCH 552/856] [WSO2 Release] [Jenkins #3021] [Release 4.0.83] prepare release v4.0.83 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 48bf10f88..c7958ad17 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.83-SNAPSHOT + 4.0.83 ../pom.xml From 4c6cc3c525c42dcafb7dd637573372c0fc328775 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 22 Sep 2017 06:11:59 +0000 Subject: [PATCH 553/856] [WSO2 Release] [Jenkins #3021] [Release 4.0.83] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cdd734934..b15bff139 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.83 + 4.0.84-SNAPSHOT ../pom.xml From 37d4aeaf3d8aa101cee38c4d5fb48726e38a938b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 22 Sep 2017 06:11:59 +0000 Subject: [PATCH 554/856] [WSO2 Release] [Jenkins #3021] [Release 4.0.83] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c7958ad17..b1df28398 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.83 + 4.0.84-SNAPSHOT ../pom.xml From 298b35436febdcb233b97c392d781808d46ca366 Mon Sep 17 00:00:00 2001 From: megala21 Date: Mon, 25 Sep 2017 00:41:01 +0530 Subject: [PATCH 555/856] Adding jacoco plugins for unit coverage --- pom.xml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/pom.xml b/pom.xml index b15bff139..c63c032a8 100644 --- a/pom.xml +++ b/pom.xml @@ -240,6 +240,32 @@ virtual_firealarm + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + From cc2dcf2c8bab6b1de4310917a5ccaec51ea61134 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 25 Sep 2017 04:01:32 +0000 Subject: [PATCH 556/856] [WSO2 Release] [Jenkins #3023] [Release 4.0.84] prepare release v4.0.84 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c63c032a8..30df1996b 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.84-SNAPSHOT + 4.0.84 ../pom.xml From d539ec0e60a9830ce47f457e292e226ab8f2bea8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 25 Sep 2017 04:01:32 +0000 Subject: [PATCH 557/856] [WSO2 Release] [Jenkins #3023] [Release 4.0.84] prepare release v4.0.84 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b1df28398..1f100d5ee 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.84-SNAPSHOT + 4.0.84 ../pom.xml From 7044b14a7dc1db79a80a6ed155d045e7e13f6bd9 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 25 Sep 2017 04:01:48 +0000 Subject: [PATCH 558/856] [WSO2 Release] [Jenkins #3023] [Release 4.0.84] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 30df1996b..7f975f0f8 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.84 + 4.0.85-SNAPSHOT ../pom.xml From d80f34b4beed3ddd3890db3419ea1a0c43f6b7c4 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 25 Sep 2017 04:01:48 +0000 Subject: [PATCH 559/856] [WSO2 Release] [Jenkins #3023] [Release 4.0.84] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1f100d5ee..479ded0d0 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.84 + 4.0.85-SNAPSHOT ../pom.xml From 29940900b0843eacb87b9768519792e77fc151aa Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 26 Sep 2017 05:11:14 +0000 Subject: [PATCH 560/856] [WSO2 Release] [Jenkins #3025] [Release 4.0.85] prepare release v4.0.85 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7f975f0f8..b9716af65 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.85-SNAPSHOT + 4.0.85 ../pom.xml From de46e0b54033845b8c633857aa5f91c4054c51ee Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 26 Sep 2017 05:11:14 +0000 Subject: [PATCH 561/856] [WSO2 Release] [Jenkins #3025] [Release 4.0.85] prepare release v4.0.85 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 479ded0d0..19a256e06 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.85-SNAPSHOT + 4.0.85 ../pom.xml From bd17eddfeb9d229f52281cfe5c7270b7a6548a27 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 26 Sep 2017 05:11:29 +0000 Subject: [PATCH 562/856] [WSO2 Release] [Jenkins #3025] [Release 4.0.85] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b9716af65..8c0343cb3 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.85 + 4.0.86-SNAPSHOT ../pom.xml From 56546d2f6e5085eacc8f3b503e959af66c5a7e7c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 26 Sep 2017 05:11:29 +0000 Subject: [PATCH 563/856] [WSO2 Release] [Jenkins #3025] [Release 4.0.85] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 19a256e06..213496a44 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.85 + 4.0.86-SNAPSHOT ../pom.xml From 6e22ba418a7cb388c540d8e597ff84c94cff5c0d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 29 Sep 2017 12:53:25 +0000 Subject: [PATCH 564/856] [WSO2 Release] [Jenkins #3028] [Release 4.0.86] prepare release v4.0.86 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8c0343cb3..a27f80e07 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.86-SNAPSHOT + 4.0.86 ../pom.xml From f57feeba5d49bdb7a2986d4259cc0d2ad1191fd7 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 29 Sep 2017 12:53:25 +0000 Subject: [PATCH 565/856] [WSO2 Release] [Jenkins #3028] [Release 4.0.86] prepare release v4.0.86 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 213496a44..fc07573b6 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.86-SNAPSHOT + 4.0.86 ../pom.xml From 58d1fedd9b10432a9614ebf63f1c18a84e416f68 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 29 Sep 2017 12:53:39 +0000 Subject: [PATCH 566/856] [WSO2 Release] [Jenkins #3028] [Release 4.0.86] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a27f80e07..8ae713f84 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.86 + 4.0.87-SNAPSHOT ../pom.xml From b4415d7608770b8ebc5d722073e7cf33f3eccbb8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 29 Sep 2017 12:53:39 +0000 Subject: [PATCH 567/856] [WSO2 Release] [Jenkins #3028] [Release 4.0.86] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fc07573b6..d8fa43317 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.86 + 4.0.87-SNAPSHOT ../pom.xml From a4e41b2cfe1d6bc1664fd1eb5dc73edddc18a90f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 4 Oct 2017 13:14:58 +0530 Subject: [PATCH 568/856] [WSO2 Release] [Jenkins #3032] [Release 4.0.87] prepare release v4.0.87 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8ae713f84..44caaee52 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.87-SNAPSHOT + 4.0.87 ../pom.xml From 21254e91b2c21fd4d2425fd357380d1ac87fb3f6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 4 Oct 2017 13:14:58 +0530 Subject: [PATCH 569/856] [WSO2 Release] [Jenkins #3032] [Release 4.0.87] prepare release v4.0.87 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d8fa43317..ec74e4df6 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.87-SNAPSHOT + 4.0.87 ../pom.xml From bb3df870cb2e447ccf3c22d5f72795685cbce10e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 4 Oct 2017 13:15:15 +0530 Subject: [PATCH 570/856] [WSO2 Release] [Jenkins #3032] [Release 4.0.87] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 44caaee52..6fbc3ed11 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.87 + 4.0.88-SNAPSHOT ../pom.xml From b2b2bee9c723ef6094944b8302233f7b468c4b00 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 4 Oct 2017 13:15:15 +0530 Subject: [PATCH 571/856] [WSO2 Release] [Jenkins #3032] [Release 4.0.87] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ec74e4df6..b61ad64ec 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.87 + 4.0.88-SNAPSHOT ../pom.xml From 98fa693fc742b72c807107466ad428ed23bb8663 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 13 Oct 2017 15:54:28 +0000 Subject: [PATCH 572/856] [WSO2 Release] [Jenkins #3035] [Release 4.0.88] prepare release v4.0.88 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6fbc3ed11..18054e731 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.88-SNAPSHOT + 4.0.88 ../pom.xml From 80b6e946d12e791c3cb4a0573151dde992402daf Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 13 Oct 2017 15:54:28 +0000 Subject: [PATCH 573/856] [WSO2 Release] [Jenkins #3035] [Release 4.0.88] prepare release v4.0.88 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b61ad64ec..b109f86bf 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.88-SNAPSHOT + 4.0.88 ../pom.xml From 92d55c89a046596d6102ebdb70e2c84f250ef49c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 13 Oct 2017 15:54:42 +0000 Subject: [PATCH 574/856] [WSO2 Release] [Jenkins #3035] [Release 4.0.88] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 18054e731..d758ac398 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.88 + 4.0.89-SNAPSHOT ../pom.xml From 8c4d82a0f16becc688da4fad21225b52b8c6d5d1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 13 Oct 2017 15:54:42 +0000 Subject: [PATCH 575/856] [WSO2 Release] [Jenkins #3035] [Release 4.0.88] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b109f86bf..01da310c0 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.88 + 4.0.89-SNAPSHOT ../pom.xml From 40acade488a7d9193a719bbf678147716af0badc Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 18 Oct 2017 09:34:54 +0000 Subject: [PATCH 576/856] [WSO2 Release] [Jenkins #3037] [Release 4.0.89] prepare release v4.0.89 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d758ac398..ff68ea615 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.89-SNAPSHOT + 4.0.89 ../pom.xml From e5a410b9d363dc27fda5e5ad9ff9e50c30c959ef Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 18 Oct 2017 09:34:54 +0000 Subject: [PATCH 577/856] [WSO2 Release] [Jenkins #3037] [Release 4.0.89] prepare release v4.0.89 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 01da310c0..6cfa590fa 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.89-SNAPSHOT + 4.0.89 ../pom.xml From c03e0d9f76e74996dbbf3b44ffa79b651d9839ed Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 18 Oct 2017 09:35:08 +0000 Subject: [PATCH 578/856] [WSO2 Release] [Jenkins #3037] [Release 4.0.89] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ff68ea615..acb9e29d6 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.89 + 4.0.90-SNAPSHOT ../pom.xml From d3c8708895b9e949a5f2aa5b116e05dfe63db6f2 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 18 Oct 2017 09:35:08 +0000 Subject: [PATCH 579/856] [WSO2 Release] [Jenkins #3037] [Release 4.0.89] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6cfa590fa..44f7d2e32 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.89 + 4.0.90-SNAPSHOT ../pom.xml From 0d27797c27e8f3b1a93c127610ffacbd5349db60 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 18 Oct 2017 11:36:51 +0000 Subject: [PATCH 580/856] [WSO2 Release] [Jenkins #3039] [Release 4.0.90] prepare release v4.0.90 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index acb9e29d6..d3469607c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.90-SNAPSHOT + 4.0.90 ../pom.xml From afc03cb215c64c2bdde4f056af42311758ed5439 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 18 Oct 2017 11:36:51 +0000 Subject: [PATCH 581/856] [WSO2 Release] [Jenkins #3039] [Release 4.0.90] prepare release v4.0.90 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 44f7d2e32..000139349 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.90-SNAPSHOT + 4.0.90 ../pom.xml From d70ded82bf5e832d8db5e094ad29da3867201816 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 18 Oct 2017 11:37:05 +0000 Subject: [PATCH 582/856] [WSO2 Release] [Jenkins #3039] [Release 4.0.90] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d3469607c..449eb69bd 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.90 + 4.0.91-SNAPSHOT ../pom.xml From 15c8ee531534af6e3df880f324fe104fa1a0db5e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 18 Oct 2017 11:37:05 +0000 Subject: [PATCH 583/856] [WSO2 Release] [Jenkins #3039] [Release 4.0.90] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 000139349..9dcee7845 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.90 + 4.0.91-SNAPSHOT ../pom.xml From 3be4aaabc7657282c72b4ccb2742b3443c6cb3fc Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Mon, 23 Oct 2017 09:57:31 +0530 Subject: [PATCH 584/856] Fixing code formatting issues. --- ...VirtualFireAlarmPermissionUpdateListener.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/listener/VirtualFireAlarmPermissionUpdateListener.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/listener/VirtualFireAlarmPermissionUpdateListener.java index 829868010..92000ad00 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/listener/VirtualFireAlarmPermissionUpdateListener.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/listener/VirtualFireAlarmPermissionUpdateListener.java @@ -35,7 +35,6 @@ public class VirtualFireAlarmPermissionUpdateListener implements ServletContextL @Override public void contextInitialized(ServletContextEvent servletContextEvent) { - UserStoreManager userStoreManager = getUserStoreManager(); try { if (userStoreManager != null) { @@ -47,7 +46,8 @@ public class VirtualFireAlarmPermissionUpdateListener implements ServletContextL getAuthorizationManager().authorizeRole(VirtualFireAlarmConstants.ROLE_NAME, VirtualFireAlarmConstants.PERM_OWNING_DEVICE_VIEW, CarbonConstants.UI_PERMISSION_ACTION); } - } } catch (UserStoreException e) { + } + } catch (UserStoreException e) { log.error("Error while creating a role and adding a user for Raspberry PI.", e); } } @@ -101,13 +101,11 @@ public class VirtualFireAlarmPermissionUpdateListener implements ServletContextL } private Permission[] getPermissions() { - - Permission androidSense = new Permission(VirtualFireAlarmConstants.PERM_ENROLL_FIRE_ALARM, - CarbonConstants.UI_PERMISSION_ACTION); - Permission view = new Permission(VirtualFireAlarmConstants.PERM_OWNING_DEVICE_VIEW, CarbonConstants - .UI_PERMISSION_ACTION); - - return new Permission[]{androidSense, view}; + Permission androidSense = new Permission(VirtualFireAlarmConstants.PERM_ENROLL_FIRE_ALARM, + CarbonConstants.UI_PERMISSION_ACTION); + Permission view = new Permission(VirtualFireAlarmConstants.PERM_OWNING_DEVICE_VIEW, CarbonConstants + .UI_PERMISSION_ACTION); + return new Permission[]{androidSense, view}; } } From a7f270bae8ed7cba7c18f739844be1a6ebb3c6dc Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Thu, 26 Oct 2017 00:18:56 +0530 Subject: [PATCH 585/856] Code formatting and refactoring for Permission Update Listeners of device types. --- ...tualFireAlarmPermissionUpdateListener.java | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/listener/VirtualFireAlarmPermissionUpdateListener.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/listener/VirtualFireAlarmPermissionUpdateListener.java index 92000ad00..16a6897b3 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/listener/VirtualFireAlarmPermissionUpdateListener.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/listener/VirtualFireAlarmPermissionUpdateListener.java @@ -32,9 +32,13 @@ import javax.servlet.ServletContextListener; public class VirtualFireAlarmPermissionUpdateListener implements ServletContextListener { private static Log log = LogFactory.getLog(VirtualFireAlarmPermissionUpdateListener.class); + private static PrivilegedCarbonContext threadLocalCarbonContext; + private static RealmService realmService; @Override public void contextInitialized(ServletContextEvent servletContextEvent) { + threadLocalCarbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + realmService = (RealmService) threadLocalCarbonContext.getOSGiService(RealmService.class, null); UserStoreManager userStoreManager = getUserStoreManager(); try { if (userStoreManager != null) { @@ -57,44 +61,34 @@ public class VirtualFireAlarmPermissionUpdateListener implements ServletContextL } - public static UserStoreManager getUserStoreManager() { - RealmService realmService; + private UserStoreManager getUserStoreManager() { UserStoreManager userStoreManager; try { - PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); - realmService = (RealmService) ctx.getOSGiService(RealmService.class, null); if (realmService == null) { String msg = "Realm service has not initialized."; - log.error(msg); throw new IllegalStateException(msg); } - int tenantId = ctx.getTenantId(); + int tenantId = threadLocalCarbonContext.getTenantId(); userStoreManager = realmService.getTenantUserRealm(tenantId).getUserStoreManager(); realmService.getTenantUserRealm(tenantId).getAuthorizationManager(); } catch (UserStoreException e) { String msg = "Error occurred while retrieving current user store manager"; - log.error(msg, e); throw new IllegalStateException(msg); } return userStoreManager; } - public static AuthorizationManager getAuthorizationManager() { - RealmService realmService; + private AuthorizationManager getAuthorizationManager() { AuthorizationManager authorizationManager; try { - PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); - realmService = (RealmService) ctx.getOSGiService(RealmService.class, null); if (realmService == null) { String msg = "Realm service has not initialized."; - log.error(msg); throw new IllegalStateException(msg); } - int tenantId = ctx.getTenantId(); + int tenantId = threadLocalCarbonContext.getTenantId(); authorizationManager = realmService.getTenantUserRealm(tenantId).getAuthorizationManager(); } catch (UserStoreException e) { String msg = "Error occurred while retrieving current user store manager"; - log.error(msg, e); throw new IllegalStateException(msg); } return authorizationManager; @@ -103,9 +97,8 @@ public class VirtualFireAlarmPermissionUpdateListener implements ServletContextL private Permission[] getPermissions() { Permission androidSense = new Permission(VirtualFireAlarmConstants.PERM_ENROLL_FIRE_ALARM, CarbonConstants.UI_PERMISSION_ACTION); - Permission view = new Permission(VirtualFireAlarmConstants.PERM_OWNING_DEVICE_VIEW, CarbonConstants - .UI_PERMISSION_ACTION); + Permission view = new Permission(VirtualFireAlarmConstants.PERM_OWNING_DEVICE_VIEW, + CarbonConstants.UI_PERMISSION_ACTION); return new Permission[]{androidSense, view}; } - -} +} \ No newline at end of file From f0b363000bf6ab429d78af1fc1d440d6c9d655fc Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 31 Oct 2017 07:46:26 +0000 Subject: [PATCH 586/856] [WSO2 Release] [Jenkins #3049] [Release 4.0.91] prepare release v4.0.91 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 449eb69bd..2afa9dcdc 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.91-SNAPSHOT + 4.0.91 ../pom.xml From 0febb3a538a99ce3a4cef42ff411e892f02f1b24 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 31 Oct 2017 07:46:26 +0000 Subject: [PATCH 587/856] [WSO2 Release] [Jenkins #3049] [Release 4.0.91] prepare release v4.0.91 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9dcee7845..013a3dfc2 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.91-SNAPSHOT + 4.0.91 ../pom.xml From e00bd6df9b10266992b1c0e47f0a0a82be74bebe Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 31 Oct 2017 07:46:40 +0000 Subject: [PATCH 588/856] [WSO2 Release] [Jenkins #3049] [Release 4.0.91] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2afa9dcdc..021836f51 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.91 + 4.0.92-SNAPSHOT ../pom.xml From eab2247ad706ad10afa4b3f28180bfe3dee94b1d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 31 Oct 2017 07:46:40 +0000 Subject: [PATCH 589/856] [WSO2 Release] [Jenkins #3049] [Release 4.0.91] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 013a3dfc2..eb879e94b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.91 + 4.0.92-SNAPSHOT ../pom.xml From a7bd77d30e8b7c810ad20b0670bb142a21e7d937 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 2 Nov 2017 11:56:35 +0000 Subject: [PATCH 590/856] [WSO2 Release] [Jenkins #3051] [Release 4.0.92] prepare release v4.0.92 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 021836f51..79da1cef2 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.92-SNAPSHOT + 4.0.92 ../pom.xml From 7b49931746960a3f8ac7499af50c7967cfbfe5d4 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 2 Nov 2017 11:56:35 +0000 Subject: [PATCH 591/856] [WSO2 Release] [Jenkins #3051] [Release 4.0.92] prepare release v4.0.92 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index eb879e94b..8be6ec154 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.92-SNAPSHOT + 4.0.92 ../pom.xml From b6f1f2f36f369c2a8a910a4b4c03d644913f088c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 2 Nov 2017 11:56:51 +0000 Subject: [PATCH 592/856] [WSO2 Release] [Jenkins #3051] [Release 4.0.92] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 79da1cef2..11751f378 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.92 + 4.0.93-SNAPSHOT ../pom.xml From 5b58031903b5a7698a37ae57138350bdeabc3969 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 2 Nov 2017 11:56:51 +0000 Subject: [PATCH 593/856] [WSO2 Release] [Jenkins #3051] [Release 4.0.92] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8be6ec154..b7e92235a 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.92 + 4.0.93-SNAPSHOT ../pom.xml From caf8e668334a581d0075fcd52207a513bc251ffa Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 16 Nov 2017 15:59:00 +0000 Subject: [PATCH 594/856] [WSO2 Release] [Jenkins #3053] [Release 4.0.93] prepare release v4.0.93 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 11751f378..61508fcae 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.93-SNAPSHOT + 4.0.93 ../pom.xml From da4fe6c341ecc2c7fdd7d5d5c7d2951aff78f35d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 16 Nov 2017 15:59:00 +0000 Subject: [PATCH 595/856] [WSO2 Release] [Jenkins #3053] [Release 4.0.93] prepare release v4.0.93 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b7e92235a..ffbf125d7 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.93-SNAPSHOT + 4.0.93 ../pom.xml From 4bd315fff1a93fe8473f3ea06bdbec5ec4fe4c15 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 16 Nov 2017 15:59:16 +0000 Subject: [PATCH 596/856] [WSO2 Release] [Jenkins #3053] [Release 4.0.93] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 61508fcae..1767be784 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.93 + 4.0.94-SNAPSHOT ../pom.xml From ce95364b90e78e3178edc17bcff0f3e0823ee637 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 16 Nov 2017 15:59:16 +0000 Subject: [PATCH 597/856] [WSO2 Release] [Jenkins #3053] [Release 4.0.93] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ffbf125d7..60ec24487 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.93 + 4.0.94-SNAPSHOT ../pom.xml From 725e2e3c5c28108c67b3cfd9e0157d20416f7aa4 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 17 Nov 2017 09:07:04 +0000 Subject: [PATCH 598/856] [WSO2 Release] [Jenkins #3055] [Release 4.0.94] prepare release v4.0.94 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1767be784..119f1135c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.94-SNAPSHOT + 4.0.94 ../pom.xml From 7ea23e88c82c83b192102ca5f6efbac2dd120585 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 17 Nov 2017 09:07:04 +0000 Subject: [PATCH 599/856] [WSO2 Release] [Jenkins #3055] [Release 4.0.94] prepare release v4.0.94 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 60ec24487..2f7093001 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.94-SNAPSHOT + 4.0.94 ../pom.xml From 85b5f0b3546cf84974d94821079ef40d6dcf4065 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 17 Nov 2017 09:07:21 +0000 Subject: [PATCH 600/856] [WSO2 Release] [Jenkins #3055] [Release 4.0.94] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 119f1135c..75931d16b 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.94 + 4.0.95-SNAPSHOT ../pom.xml From 540ec95f71ae859c753bc9fd6800799f762d6585 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 17 Nov 2017 09:07:21 +0000 Subject: [PATCH 601/856] [WSO2 Release] [Jenkins #3055] [Release 4.0.94] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2f7093001..f4d7e6ef9 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.94 + 4.0.95-SNAPSHOT ../pom.xml From 6a8202941b34d3d1787de0e7e6f32f5219ce7489 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 17 Nov 2017 09:43:56 +0000 Subject: [PATCH 602/856] [WSO2 Release] [Jenkins #3056] [Release 4.0.95] prepare release v4.0.95 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f4d7e6ef9..dae595023 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.95-SNAPSHOT + 4.0.95 ../pom.xml From 2620a221b82b237ca608bd154bcf12672c89d065 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 17 Nov 2017 09:43:56 +0000 Subject: [PATCH 603/856] [WSO2 Release] [Jenkins #3056] [Release 4.0.95] prepare release v4.0.95 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 75931d16b..00f598621 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.95-SNAPSHOT + 4.0.95 ../pom.xml From cdd37739c81b4c0d84f218c4210de50e468dfbb2 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 17 Nov 2017 09:44:11 +0000 Subject: [PATCH 604/856] [WSO2 Release] [Jenkins #3056] [Release 4.0.95] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dae595023..a89957375 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.95 + 4.0.96-SNAPSHOT ../pom.xml From 2c90906de050a2b162916ebe3f15bc5af3ea52a5 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 17 Nov 2017 09:44:11 +0000 Subject: [PATCH 605/856] [WSO2 Release] [Jenkins #3056] [Release 4.0.95] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 00f598621..bfde4d988 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.95 + 4.0.96-SNAPSHOT ../pom.xml From ce1a2af51b1706893e9331f1994a6b04112fb892 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 17 Nov 2017 10:55:43 +0000 Subject: [PATCH 606/856] [WSO2 Release] [Jenkins #3058] [Release 4.0.96] prepare release v4.0.96 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a89957375..5602785d4 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.96-SNAPSHOT + 4.0.96 ../pom.xml From 56c4e3466c1d12aeac67797d61ac91f3ac89743a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 17 Nov 2017 10:55:43 +0000 Subject: [PATCH 607/856] [WSO2 Release] [Jenkins #3058] [Release 4.0.96] prepare release v4.0.96 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bfde4d988..5863998c8 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.96-SNAPSHOT + 4.0.96 ../pom.xml From ec2709b8330018b2f35ff2e931efa4292bc075c7 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 17 Nov 2017 10:55:56 +0000 Subject: [PATCH 608/856] [WSO2 Release] [Jenkins #3058] [Release 4.0.96] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5602785d4..3153751cc 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.96 + 4.0.97-SNAPSHOT ../pom.xml From 068545685d841ef7bcd76787248d86032025c344 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 17 Nov 2017 10:55:56 +0000 Subject: [PATCH 609/856] [WSO2 Release] [Jenkins #3058] [Release 4.0.96] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5863998c8..19b2267e9 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.96 + 4.0.97-SNAPSHOT ../pom.xml From ce6c9d56a634eca85d7d58aaeb64a9e9684b9253 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 17 Nov 2017 13:02:44 +0000 Subject: [PATCH 610/856] [WSO2 Release] [Jenkins #3060] [Release 4.0.97] prepare release v4.0.97 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3153751cc..2bd8cc5f1 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.97-SNAPSHOT + 4.0.97 ../pom.xml From 7da12044fe93c43d51a470a185af18af00be6eef Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 17 Nov 2017 13:02:44 +0000 Subject: [PATCH 611/856] [WSO2 Release] [Jenkins #3060] [Release 4.0.97] prepare release v4.0.97 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 19b2267e9..40d90d81a 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.97-SNAPSHOT + 4.0.97 ../pom.xml From 80ec268b5685dd3f357bc2020dbaab9aa6612484 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 17 Nov 2017 13:02:58 +0000 Subject: [PATCH 612/856] [WSO2 Release] [Jenkins #3060] [Release 4.0.97] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2bd8cc5f1..27afee4e2 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.97 + 4.0.98-SNAPSHOT ../pom.xml From 518781e1a6905b26f2975cb689d2d579e458089a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 17 Nov 2017 13:02:58 +0000 Subject: [PATCH 613/856] [WSO2 Release] [Jenkins #3060] [Release 4.0.97] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 40d90d81a..12628c6e6 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.97 + 4.0.98-SNAPSHOT ../pom.xml From 12a9ad89273ab6434c9ee50902d752a630ccfd98 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 23 Nov 2017 12:30:02 +0000 Subject: [PATCH 614/856] [WSO2 Release] [Jenkins #3064] [Release 4.0.98] prepare release v4.0.98 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 27afee4e2..080003e9b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.98-SNAPSHOT + 4.0.98 ../pom.xml From 51a8e6539a699867898cede2824c648fe5dcb008 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 23 Nov 2017 12:30:02 +0000 Subject: [PATCH 615/856] [WSO2 Release] [Jenkins #3064] [Release 4.0.98] prepare release v4.0.98 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 12628c6e6..8b72a0afd 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.98-SNAPSHOT + 4.0.98 ../pom.xml From cc1f17e689a0a877bd39baf1dc8a18689317cc82 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 23 Nov 2017 12:30:19 +0000 Subject: [PATCH 616/856] [WSO2 Release] [Jenkins #3064] [Release 4.0.98] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 080003e9b..60bc8c84a 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.98 + 4.0.99-SNAPSHOT ../pom.xml From 0b4b28ef524f3bf4cc392abe2ecfbf71fb0d71e4 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 23 Nov 2017 12:30:19 +0000 Subject: [PATCH 617/856] [WSO2 Release] [Jenkins #3064] [Release 4.0.98] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8b72a0afd..34a065d56 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.98 + 4.0.99-SNAPSHOT ../pom.xml From cebbb369bee2a82d4a1c5e9226051c6422657e84 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 23 Nov 2017 14:37:32 +0000 Subject: [PATCH 618/856] [WSO2 Release] [Jenkins #3066] [Release 4.0.99] prepare release v4.0.99 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 60bc8c84a..bfd93d478 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.99-SNAPSHOT + 4.0.99 ../pom.xml From 54867c0f8f6bd6f8f6aadfdfad622f19b630dead Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 23 Nov 2017 14:37:32 +0000 Subject: [PATCH 619/856] [WSO2 Release] [Jenkins #3066] [Release 4.0.99] prepare release v4.0.99 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 34a065d56..b0fed9136 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.99-SNAPSHOT + 4.0.99 ../pom.xml From 485e910cf31ef538961c50a81dd0f010b6a2cbce Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 23 Nov 2017 14:37:47 +0000 Subject: [PATCH 620/856] [WSO2 Release] [Jenkins #3066] [Release 4.0.99] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bfd93d478..29da38464 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.99 + 4.0.100-SNAPSHOT ../pom.xml From 0b9c3c629a16785f3575c9512e8b020b3e7e0a25 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 23 Nov 2017 14:37:47 +0000 Subject: [PATCH 621/856] [WSO2 Release] [Jenkins #3066] [Release 4.0.99] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b0fed9136..f9b65595c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.99 + 4.0.100-SNAPSHOT ../pom.xml From 54d21cc7fce10044079e9edfc6da4423ba4bfe65 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 29 Nov 2017 16:30:29 +0000 Subject: [PATCH 622/856] [WSO2 Release] [Jenkins #3068] [Release 4.0.100] prepare release v4.0.100 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 29da38464..f007d8f08 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.100-SNAPSHOT + 4.0.100 ../pom.xml From 3de57c720289abb79cb3ccdbe9d5d60de1c28e55 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 29 Nov 2017 16:30:29 +0000 Subject: [PATCH 623/856] [WSO2 Release] [Jenkins #3068] [Release 4.0.100] prepare release v4.0.100 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f9b65595c..6fc6d0879 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.100-SNAPSHOT + 4.0.100 ../pom.xml From 808436e160df85529c38caab984019acd6f918e8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 29 Nov 2017 16:30:44 +0000 Subject: [PATCH 624/856] [WSO2 Release] [Jenkins #3068] [Release 4.0.100] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f007d8f08..d3441be9b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.100 + 4.0.101-SNAPSHOT ../pom.xml From 638ed16ac0137890071e66bbb7f5356739bfad66 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 29 Nov 2017 16:30:44 +0000 Subject: [PATCH 625/856] [WSO2 Release] [Jenkins #3068] [Release 4.0.100] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6fc6d0879..adceaf167 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.100 + 4.0.101-SNAPSHOT ../pom.xml From 73f44dd0aeae4f2cf11dc7d535a103038f6c6c00 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 30 Nov 2017 06:01:18 +0000 Subject: [PATCH 626/856] [WSO2 Release] [Jenkins #3070] [Release 4.0.101] prepare release v4.0.101 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d3441be9b..0286f92fc 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.101-SNAPSHOT + 4.0.101 ../pom.xml From fc584ebe9bcd61bf5a37e69a1a88103451f87d61 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 30 Nov 2017 06:01:18 +0000 Subject: [PATCH 627/856] [WSO2 Release] [Jenkins #3070] [Release 4.0.101] prepare release v4.0.101 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index adceaf167..4a83754b3 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.101-SNAPSHOT + 4.0.101 ../pom.xml From 0b545f1229b4b5df504cb99ce432a3e43eb7bb63 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 30 Nov 2017 06:01:33 +0000 Subject: [PATCH 628/856] [WSO2 Release] [Jenkins #3070] [Release 4.0.101] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0286f92fc..a779fc3f0 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.101 + 4.0.102-SNAPSHOT ../pom.xml From f36b119cde6a22c918180471ff2e7b5349d3fa7b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 30 Nov 2017 06:01:33 +0000 Subject: [PATCH 629/856] [WSO2 Release] [Jenkins #3070] [Release 4.0.101] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4a83754b3..1fd3d81e7 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.101 + 4.0.102-SNAPSHOT ../pom.xml From 69c29419acf777adfe689fa1127fb826ac5a10d6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 13 Dec 2017 03:58:06 +0000 Subject: [PATCH 630/856] [WSO2 Release] [Jenkins #3072] [Release 4.0.102] prepare release v4.0.102 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a779fc3f0..73602054e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.102-SNAPSHOT + 4.0.102 ../pom.xml From 88687671be69b7c04e8f87528eb38ab428641ee8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 13 Dec 2017 03:58:06 +0000 Subject: [PATCH 631/856] [WSO2 Release] [Jenkins #3072] [Release 4.0.102] prepare release v4.0.102 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1fd3d81e7..838f59d01 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.102-SNAPSHOT + 4.0.102 ../pom.xml From f374925792ff04d3b106335feaad869c10c1b4b4 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 13 Dec 2017 03:58:20 +0000 Subject: [PATCH 632/856] [WSO2 Release] [Jenkins #3072] [Release 4.0.102] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 73602054e..cb9f6f0b0 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.102 + 4.0.103-SNAPSHOT ../pom.xml From ce109abeac53f1fb4bb281739a6d40ab2a140188 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 13 Dec 2017 03:58:20 +0000 Subject: [PATCH 633/856] [WSO2 Release] [Jenkins #3072] [Release 4.0.102] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 838f59d01..09efa2e1e 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.102 + 4.0.103-SNAPSHOT ../pom.xml From 9d636e8fc4253bf13fb35dca7e11f1e941c5575e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 13 Dec 2017 07:06:19 +0000 Subject: [PATCH 634/856] [WSO2 Release] [Jenkins #3074] [Release 4.0.103] prepare release v4.0.103 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cb9f6f0b0..7b97231be 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.103-SNAPSHOT + 4.0.103 ../pom.xml From a3e7f224010e61e07fbd71deb9b37696e0e5e848 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 13 Dec 2017 07:06:19 +0000 Subject: [PATCH 635/856] [WSO2 Release] [Jenkins #3074] [Release 4.0.103] prepare release v4.0.103 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 09efa2e1e..681552b32 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.103-SNAPSHOT + 4.0.103 ../pom.xml From c56b9e355e74c9d4df620abe810e5f172df6fd21 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 13 Dec 2017 07:06:33 +0000 Subject: [PATCH 636/856] [WSO2 Release] [Jenkins #3074] [Release 4.0.103] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7b97231be..a8bebd2b9 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.103 + 4.0.104-SNAPSHOT ../pom.xml From f47189624296f32486dd0aa1de911f4afd17a47e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 13 Dec 2017 07:06:33 +0000 Subject: [PATCH 637/856] [WSO2 Release] [Jenkins #3074] [Release 4.0.103] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 681552b32..42c1dda17 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.103 + 4.0.104-SNAPSHOT ../pom.xml From db66fa1627ea33c408f59b24d3e2c8615ed8d689 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 14 Dec 2017 09:24:58 +0000 Subject: [PATCH 638/856] [WSO2 Release] [Jenkins #3076] [Release 4.0.104] prepare release v4.0.104 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a8bebd2b9..d91828204 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.104-SNAPSHOT + 4.0.104 ../pom.xml From ec9fce18a36a4129d45bd86b3fa777b1dc250cc8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 14 Dec 2017 09:24:58 +0000 Subject: [PATCH 639/856] [WSO2 Release] [Jenkins #3076] [Release 4.0.104] prepare release v4.0.104 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 42c1dda17..55f09db5e 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.104-SNAPSHOT + 4.0.104 ../pom.xml From 6c54bc030d20d694187eaa68035bb3e49a90413e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 14 Dec 2017 09:25:13 +0000 Subject: [PATCH 640/856] [WSO2 Release] [Jenkins #3076] [Release 4.0.104] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d91828204..2b5369a30 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.104 + 4.0.105-SNAPSHOT ../pom.xml From 4e26aae32cfc7df398940b6c28d41f185185ae5f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 14 Dec 2017 09:25:13 +0000 Subject: [PATCH 641/856] [WSO2 Release] [Jenkins #3076] [Release 4.0.104] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 55f09db5e..d9d8f0862 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.104 + 4.0.105-SNAPSHOT ../pom.xml From 5d758c55bfb7d4fa077d6cce495a6719fd012c8d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 15 Dec 2017 13:48:13 +0000 Subject: [PATCH 642/856] [WSO2 Release] [Jenkins #3079] [Release 4.0.105] prepare release v4.0.105 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2b5369a30..743a775ad 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.105-SNAPSHOT + 4.0.105 ../pom.xml From 482ae2adf3f2684845904c01de692d42475814e5 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 15 Dec 2017 13:48:13 +0000 Subject: [PATCH 643/856] [WSO2 Release] [Jenkins #3079] [Release 4.0.105] prepare release v4.0.105 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d9d8f0862..c0dc2b148 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.105-SNAPSHOT + 4.0.105 ../pom.xml From 23f1f87087a6615d5c72d8e74c325043a17466af Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 15 Dec 2017 13:48:28 +0000 Subject: [PATCH 644/856] [WSO2 Release] [Jenkins #3079] [Release 4.0.105] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 743a775ad..099ecbb7f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.105 + 4.0.106-SNAPSHOT ../pom.xml From bdbddd9de0cc202c76773c7ad57c48215c17886d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 15 Dec 2017 13:48:28 +0000 Subject: [PATCH 645/856] [WSO2 Release] [Jenkins #3079] [Release 4.0.105] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c0dc2b148..849896621 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.105 + 4.0.106-SNAPSHOT ../pom.xml From 93d2fce7f6dd8abf3548bb7b8098f3d6ec0642a8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 15 Dec 2017 16:06:38 +0000 Subject: [PATCH 646/856] [WSO2 Release] [Jenkins #3081] [Release 4.0.106] prepare release v4.0.106 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 099ecbb7f..ff1276158 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.106-SNAPSHOT + 4.0.106 ../pom.xml From bb232420a7529e5e617e249d8c7427ab6668d3af Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 15 Dec 2017 16:06:38 +0000 Subject: [PATCH 647/856] [WSO2 Release] [Jenkins #3081] [Release 4.0.106] prepare release v4.0.106 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 849896621..192aa8317 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.106-SNAPSHOT + 4.0.106 ../pom.xml From ab94c2112906706dd6c7338228f91cb19da57aab Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 15 Dec 2017 16:06:54 +0000 Subject: [PATCH 648/856] [WSO2 Release] [Jenkins #3081] [Release 4.0.106] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ff1276158..89216edef 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.106 + 4.0.107-SNAPSHOT ../pom.xml From 95b7009c4b59b0fbd918ffa4c868625c4945b4b0 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 15 Dec 2017 16:06:54 +0000 Subject: [PATCH 649/856] [WSO2 Release] [Jenkins #3081] [Release 4.0.106] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 192aa8317..8cd69fc76 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.106 + 4.0.107-SNAPSHOT ../pom.xml From eb241e6fdb440986507d7080c037ac6ffdae4d4b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 24 Dec 2017 17:28:12 +0000 Subject: [PATCH 650/856] [WSO2 Release] [Jenkins #3084] [Release 4.0.107] prepare release v4.0.107 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 89216edef..566b0f543 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.107-SNAPSHOT + 4.0.107 ../pom.xml From c8e2a95c75f660d982eb0f391bffea33e10e389a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 24 Dec 2017 17:28:12 +0000 Subject: [PATCH 651/856] [WSO2 Release] [Jenkins #3084] [Release 4.0.107] prepare release v4.0.107 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8cd69fc76..1a51f546f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.107-SNAPSHOT + 4.0.107 ../pom.xml From 8778654570db7ba4b2e2a3a65be31c6095333f50 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 24 Dec 2017 17:28:29 +0000 Subject: [PATCH 652/856] [WSO2 Release] [Jenkins #3084] [Release 4.0.107] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 566b0f543..06226b734 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.107 + 4.0.108-SNAPSHOT ../pom.xml From 006472a90ce7078116cb0dea3c6ea8a61595a277 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 24 Dec 2017 17:28:29 +0000 Subject: [PATCH 653/856] [WSO2 Release] [Jenkins #3084] [Release 4.0.107] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1a51f546f..3ef2e391e 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.107 + 4.0.108-SNAPSHOT ../pom.xml From c6a055ccdafd1ad355d5e8a8e5f108b540343ff6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 10 Jan 2018 02:17:00 +0000 Subject: [PATCH 654/856] [WSO2 Release] [Jenkins #3086] [Release 4.0.108] prepare release v4.0.108 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 06226b734..010bd449c 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.108-SNAPSHOT + 4.0.108 ../pom.xml From 014a0b2ba86759ad56452332be22b1ee576ac2ae Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 10 Jan 2018 02:17:00 +0000 Subject: [PATCH 655/856] [WSO2 Release] [Jenkins #3086] [Release 4.0.108] prepare release v4.0.108 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3ef2e391e..397c43ccb 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.108-SNAPSHOT + 4.0.108 ../pom.xml From c1338125decbd411dac9b1e68fbe573c3c16bf19 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 10 Jan 2018 02:17:15 +0000 Subject: [PATCH 656/856] [WSO2 Release] [Jenkins #3086] [Release 4.0.108] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 010bd449c..964db3595 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.108 + 4.0.109-SNAPSHOT ../pom.xml From 287c9db2d3e9f861ac07471f8ac070b69640e519 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 10 Jan 2018 02:17:15 +0000 Subject: [PATCH 657/856] [WSO2 Release] [Jenkins #3086] [Release 4.0.108] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 397c43ccb..1292b495b 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.108 + 4.0.109-SNAPSHOT ../pom.xml From c31bbb319f2a7b31190f6c61196bac905e3b8636 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 10 Jan 2018 05:58:20 +0000 Subject: [PATCH 658/856] [WSO2 Release] [Jenkins #3088] [Release 4.0.109] prepare release v4.0.109 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 964db3595..f4d1c2f2d 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.109-SNAPSHOT + 4.0.109 ../pom.xml From 7e8714a3480714cc0b3097ae6110fc79a4e3bf92 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 10 Jan 2018 05:58:20 +0000 Subject: [PATCH 659/856] [WSO2 Release] [Jenkins #3088] [Release 4.0.109] prepare release v4.0.109 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1292b495b..95c3594ea 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.109-SNAPSHOT + 4.0.109 ../pom.xml From 5d5094a9f5e0303b2436b0521b22243a3f9de47f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 10 Jan 2018 05:58:33 +0000 Subject: [PATCH 660/856] [WSO2 Release] [Jenkins #3088] [Release 4.0.109] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f4d1c2f2d..467493897 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.109 + 4.0.110-SNAPSHOT ../pom.xml From f691f06c9bfe18287be64becbe186e523d573206 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 10 Jan 2018 05:58:33 +0000 Subject: [PATCH 661/856] [WSO2 Release] [Jenkins #3088] [Release 4.0.109] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 95c3594ea..5fd8f3af3 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.109 + 4.0.110-SNAPSHOT ../pom.xml From a0db1bc32fccb92e9da60cc50c38aa7475f8860a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 11 Jan 2018 04:58:23 +0000 Subject: [PATCH 662/856] [WSO2 Release] [Jenkins #3090] [Release 4.0.110] prepare release v4.0.110 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 467493897..8cba0aef0 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.110-SNAPSHOT + 4.0.110 ../pom.xml From 1d4d815a2f16ffac685996f724d9e8f573419120 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 11 Jan 2018 04:58:23 +0000 Subject: [PATCH 663/856] [WSO2 Release] [Jenkins #3090] [Release 4.0.110] prepare release v4.0.110 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5fd8f3af3..b2ab4a137 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.110-SNAPSHOT + 4.0.110 ../pom.xml From 393d31b14676ca60cd791018784b8abe0641595d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 11 Jan 2018 04:58:39 +0000 Subject: [PATCH 664/856] [WSO2 Release] [Jenkins #3090] [Release 4.0.110] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8cba0aef0..74966fffe 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.110 + 4.0.111-SNAPSHOT ../pom.xml From 940f2ef7b8732ca418f36a9de64e8eb294d6b452 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 11 Jan 2018 04:58:39 +0000 Subject: [PATCH 665/856] [WSO2 Release] [Jenkins #3090] [Release 4.0.110] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b2ab4a137..9352b9e74 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.110 + 4.0.111-SNAPSHOT ../pom.xml From d1fc1d185aafaa99145d2d3b0eca0b38f275328e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 11 Jan 2018 07:41:36 +0000 Subject: [PATCH 666/856] [WSO2 Release] [Jenkins #3092] [Release 4.0.111] prepare release v4.0.111 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 74966fffe..8329a326e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.111-SNAPSHOT + 4.0.111 ../pom.xml From 6a99a058f2d48305703e94f3ba066520e8bc3b24 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 11 Jan 2018 07:41:36 +0000 Subject: [PATCH 667/856] [WSO2 Release] [Jenkins #3092] [Release 4.0.111] prepare release v4.0.111 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9352b9e74..646ff3d1b 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.111-SNAPSHOT + 4.0.111 ../pom.xml From 0befe5b6d2adc01f0caaf46ba97272ae0320dd9d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 11 Jan 2018 07:41:52 +0000 Subject: [PATCH 668/856] [WSO2 Release] [Jenkins #3092] [Release 4.0.111] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8329a326e..2abb94c10 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.111 + 4.0.112-SNAPSHOT ../pom.xml From d19adef2e545327e76d26afa95a7b9195b477f6e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 11 Jan 2018 07:41:52 +0000 Subject: [PATCH 669/856] [WSO2 Release] [Jenkins #3092] [Release 4.0.111] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 646ff3d1b..344ed2d47 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.111 + 4.0.112-SNAPSHOT ../pom.xml From b68aa8b1b4d45ca5ae81e4ab0a24d7bd68245d7f Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Wed, 17 Jan 2018 13:51:18 +0530 Subject: [PATCH 670/856] Fixing https://github.com/wso2/product-iots/issues/1142 --- .../mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java index 4a8e3dda9..291f541d1 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java @@ -194,7 +194,7 @@ public class AgentUI extends JFrame { lblAgentName.setText("Device Name: " + AgentManager.getInstance().getDeviceName()); jLabel2.setHorizontalAlignment(SwingConstants.CENTER); - jLabel2.setText("Copyright (c) 2015, WSO2 Inc."); + jLabel2.setText("Copyright (c) 2018, WSO2 Inc."); jPanel1.setBackground(new Color(220, 220, 220)); From ab8e4eac58c98972778c250ea402a8bbf5d707ea Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Wed, 17 Jan 2018 14:20:58 +0530 Subject: [PATCH 671/856] Retrieving current year for the copyright notice --- .../iot/virtualfirealarm/agent/virtual/ui/AgentUI.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java index 291f541d1..15b544389 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java @@ -22,10 +22,10 @@ import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentConstants import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentManager; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.virtual.VirtualHardwareManager; -import javax.swing.*; import java.awt.*; -import java.net.URI; import java.net.URL; +import java.util.Calendar; +import javax.swing.*; public class AgentUI extends JFrame { @@ -193,8 +193,10 @@ public class AgentUI extends JFrame { lblAgentName.setHorizontalAlignment(SwingConstants.LEFT); lblAgentName.setText("Device Name: " + AgentManager.getInstance().getDeviceName()); + Calendar now = Calendar.getInstance(); + int currentYear = now.get(Calendar.YEAR); jLabel2.setHorizontalAlignment(SwingConstants.CENTER); - jLabel2.setText("Copyright (c) 2018, WSO2 Inc."); + jLabel2.setText("Copyright (c) " + currentYear + ", WSO2 Inc."); jPanel1.setBackground(new Color(220, 220, 220)); From 13b2be6b817b3e0976232ec0ee8f60521f7572f9 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 19 Jan 2018 09:02:58 +0000 Subject: [PATCH 672/856] [WSO2 Release] [Jenkins #3094] [Release 4.0.112] prepare release v4.0.112 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2abb94c10..db4e04b2e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.112-SNAPSHOT + 4.0.112 ../pom.xml From 8e41256d5c25e6b710af88d13d06f01d88e3b2de Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 19 Jan 2018 09:02:58 +0000 Subject: [PATCH 673/856] [WSO2 Release] [Jenkins #3094] [Release 4.0.112] prepare release v4.0.112 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 344ed2d47..7664ff8c6 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.112-SNAPSHOT + 4.0.112 ../pom.xml From 53649a47959738f230e3c339771f03c2c19f1bec Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 19 Jan 2018 09:03:13 +0000 Subject: [PATCH 674/856] [WSO2 Release] [Jenkins #3094] [Release 4.0.112] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index db4e04b2e..bd71dd3ce 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.112 + 4.0.113-SNAPSHOT ../pom.xml From 2f3d22ca8442e53b9d8fdd7cf997c69f00cd483e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 19 Jan 2018 09:03:13 +0000 Subject: [PATCH 675/856] [WSO2 Release] [Jenkins #3094] [Release 4.0.112] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7664ff8c6..8f1dd490e 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.112 + 4.0.113-SNAPSHOT ../pom.xml From cc83730d254351f31419a74ead89dcc0429995c5 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 19 Jan 2018 14:20:44 +0000 Subject: [PATCH 676/856] [WSO2 Release] [Jenkins #3096] [Release 4.0.113] prepare release v4.0.113 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bd71dd3ce..eadf1d916 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.113-SNAPSHOT + 4.0.113 ../pom.xml From fb34afa971863731efb42dfc77f85bd7f390da85 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 19 Jan 2018 14:20:44 +0000 Subject: [PATCH 677/856] [WSO2 Release] [Jenkins #3096] [Release 4.0.113] prepare release v4.0.113 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8f1dd490e..efe56e470 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.113-SNAPSHOT + 4.0.113 ../pom.xml From d3bf036acb73c6fba33a77623aaa2b22ec9a87b8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 19 Jan 2018 14:21:00 +0000 Subject: [PATCH 678/856] [WSO2 Release] [Jenkins #3096] [Release 4.0.113] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index eadf1d916..a3c6cd4cd 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.113 + 4.0.114-SNAPSHOT ../pom.xml From 8e2efd628410c6451d7caf54e0cd0a5ab45e533c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 19 Jan 2018 14:21:00 +0000 Subject: [PATCH 679/856] [WSO2 Release] [Jenkins #3096] [Release 4.0.113] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index efe56e470..92ebda02f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.113 + 4.0.114-SNAPSHOT ../pom.xml From 4fd3b13692f44bd60986ec7b7be1ae67d9b171fe Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 23 Jan 2018 03:03:34 +0000 Subject: [PATCH 680/856] [WSO2 Release] [Jenkins #3098] [Release 4.0.114] prepare release v4.0.114 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a3c6cd4cd..d53611139 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.114-SNAPSHOT + 4.0.114 ../pom.xml From 6af906d579e1fea1f68dc3d5e1bf1728c37a20fd Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 23 Jan 2018 03:03:34 +0000 Subject: [PATCH 681/856] [WSO2 Release] [Jenkins #3098] [Release 4.0.114] prepare release v4.0.114 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 92ebda02f..7f557ec01 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.114-SNAPSHOT + 4.0.114 ../pom.xml From ff3150af1d03c434efe0d343186558a5db636399 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 23 Jan 2018 03:03:47 +0000 Subject: [PATCH 682/856] [WSO2 Release] [Jenkins #3098] [Release 4.0.114] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d53611139..6de368211 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.114 + 4.0.115-SNAPSHOT ../pom.xml From 71f5bea37a85e321154ee23501d219f92264c89e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 23 Jan 2018 03:03:47 +0000 Subject: [PATCH 683/856] [WSO2 Release] [Jenkins #3098] [Release 4.0.114] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7f557ec01..fb47911c2 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.114 + 4.0.115-SNAPSHOT ../pom.xml From 8580e9b57e04d61ecb1755aaf60ff074a95001bb Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 23 Jan 2018 12:42:41 +0000 Subject: [PATCH 684/856] [WSO2 Release] [Jenkins #3100] [Release 4.0.115] prepare release v4.0.115 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6de368211..fed49b6d9 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.115-SNAPSHOT + 4.0.115 ../pom.xml From fad46765e9f5cde97cc57c4ba4b9ffae1ac28147 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 23 Jan 2018 12:42:41 +0000 Subject: [PATCH 685/856] [WSO2 Release] [Jenkins #3100] [Release 4.0.115] prepare release v4.0.115 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fb47911c2..22c0d3366 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.115-SNAPSHOT + 4.0.115 ../pom.xml From b5845f46e7b8b1897f844911c22699f189a3cf9d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 23 Jan 2018 12:42:55 +0000 Subject: [PATCH 686/856] [WSO2 Release] [Jenkins #3100] [Release 4.0.115] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fed49b6d9..bf1ad7272 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.115 + 4.0.116-SNAPSHOT ../pom.xml From f5a09b150e6e0c126a2f65eefd379bb6a0a06261 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 23 Jan 2018 12:42:55 +0000 Subject: [PATCH 687/856] [WSO2 Release] [Jenkins #3100] [Release 4.0.115] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 22c0d3366..ef5c0560f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.115 + 4.0.116-SNAPSHOT ../pom.xml From 511cf7302dd16eff0d46af6e6e3c1bd590ae43ed Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 23 Jan 2018 13:23:47 +0000 Subject: [PATCH 688/856] [WSO2 Release] [Jenkins #3102] [Release 4.0.116] prepare release v4.0.116 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ef5c0560f..1d717bddb 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.116-SNAPSHOT + 4.0.116 ../pom.xml From 9eb5bdfd25c4820e1e101f9a9ab75581a59978de Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 23 Jan 2018 13:23:47 +0000 Subject: [PATCH 689/856] [WSO2 Release] [Jenkins #3102] [Release 4.0.116] prepare release v4.0.116 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bf1ad7272..b0a694b2f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.116-SNAPSHOT + 4.0.116 ../pom.xml From 31a73f406e5e1ba5131fc588dde97280e3c306db Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 23 Jan 2018 13:24:02 +0000 Subject: [PATCH 690/856] [WSO2 Release] [Jenkins #3102] [Release 4.0.116] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1d717bddb..8e1554313 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.116 + 4.0.117-SNAPSHOT ../pom.xml From b46bfc1cdfd50db68119551aa961c890670e2940 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 23 Jan 2018 13:24:02 +0000 Subject: [PATCH 691/856] [WSO2 Release] [Jenkins #3102] [Release 4.0.116] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b0a694b2f..d09561133 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.116 + 4.0.117-SNAPSHOT ../pom.xml From 6a56be64eea2cead6e871ff12e4a5f4b9bcae69e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 24 Jan 2018 05:49:01 +0000 Subject: [PATCH 692/856] [WSO2 Release] [Jenkins #3104] [Release 4.0.117] prepare release v4.0.117 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8e1554313..68f2731e6 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.117-SNAPSHOT + 4.0.117 ../pom.xml From 69c32ae9f983d00768e1a4f80bb019de815c9154 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 24 Jan 2018 05:49:01 +0000 Subject: [PATCH 693/856] [WSO2 Release] [Jenkins #3104] [Release 4.0.117] prepare release v4.0.117 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d09561133..61bf5f479 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.117-SNAPSHOT + 4.0.117 ../pom.xml From 1fca4a24cf415532f017515eaa58ceaf5958e700 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 24 Jan 2018 05:49:15 +0000 Subject: [PATCH 694/856] [WSO2 Release] [Jenkins #3104] [Release 4.0.117] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 68f2731e6..c90e67b69 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.117 + 4.0.118-SNAPSHOT ../pom.xml From 63fdcc5afa2c4669b1b2e50a559a96ef150e242b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 24 Jan 2018 05:49:15 +0000 Subject: [PATCH 695/856] [WSO2 Release] [Jenkins #3104] [Release 4.0.117] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 61bf5f479..24ef4b719 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.117 + 4.0.118-SNAPSHOT ../pom.xml From ad94e361ac67eaeaf0ec4a966494b9d2df30dcdd Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 26 Jan 2018 08:59:09 +0000 Subject: [PATCH 696/856] [WSO2 Release] [Jenkins #3106] [Release 4.0.118] prepare release v4.0.118 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c90e67b69..7353ab580 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.118-SNAPSHOT + 4.0.118 ../pom.xml From 9a888ddd2fbbc18a38f8b4366d053addc3b887e7 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 26 Jan 2018 08:59:09 +0000 Subject: [PATCH 697/856] [WSO2 Release] [Jenkins #3106] [Release 4.0.118] prepare release v4.0.118 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 24ef4b719..bf64f5aca 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.118-SNAPSHOT + 4.0.118 ../pom.xml From 117c40a6b063eb77d0d9db33b90ce780eed7b53f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 26 Jan 2018 08:59:23 +0000 Subject: [PATCH 698/856] [WSO2 Release] [Jenkins #3106] [Release 4.0.118] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7353ab580..5cd7c9cc8 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.118 + 4.0.119-SNAPSHOT ../pom.xml From 3533c00427699799a988e27f3863a4102600d3e4 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 26 Jan 2018 08:59:23 +0000 Subject: [PATCH 699/856] [WSO2 Release] [Jenkins #3106] [Release 4.0.118] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bf64f5aca..3160ae1a3 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.118 + 4.0.119-SNAPSHOT ../pom.xml From 1a8f0a183b02c9f3b715cd5142f4adc589572c14 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 27 Jan 2018 04:33:26 +0000 Subject: [PATCH 700/856] [WSO2 Release] [Jenkins #3108] [Release 4.0.119] prepare release v4.0.119 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5cd7c9cc8..5c1a025ca 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.119-SNAPSHOT + 4.0.119 ../pom.xml From 1253c781550c4cc7071a673142662b88d38476f1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 27 Jan 2018 04:33:26 +0000 Subject: [PATCH 701/856] [WSO2 Release] [Jenkins #3108] [Release 4.0.119] prepare release v4.0.119 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3160ae1a3..80c86a787 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.119-SNAPSHOT + 4.0.119 ../pom.xml From 66a3b4ff273967751c49971b1bd8efc88b2a0ef4 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 27 Jan 2018 04:33:41 +0000 Subject: [PATCH 702/856] [WSO2 Release] [Jenkins #3108] [Release 4.0.119] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5c1a025ca..193e02cd5 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.119 + 4.0.120-SNAPSHOT ../pom.xml From 69760472b8fd8c8418a21776f801b6e8c6e7a00b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 27 Jan 2018 04:33:41 +0000 Subject: [PATCH 703/856] [WSO2 Release] [Jenkins #3108] [Release 4.0.119] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 80c86a787..1dad5fd6d 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.119 + 4.0.120-SNAPSHOT ../pom.xml From 117b5352f259c9fcae640d6c0d77aa5b41193bef Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 28 Jan 2018 15:29:10 +0000 Subject: [PATCH 704/856] [WSO2 Release] [Jenkins #3110] [Release 4.0.120] prepare release v4.0.120 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 193e02cd5..c25483ec7 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.120-SNAPSHOT + 4.0.120 ../pom.xml From ee60963a7a47381cc419bb7a941beaa68f642d04 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 28 Jan 2018 15:29:10 +0000 Subject: [PATCH 705/856] [WSO2 Release] [Jenkins #3110] [Release 4.0.120] prepare release v4.0.120 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1dad5fd6d..4b7c4f68c 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.120-SNAPSHOT + 4.0.120 ../pom.xml From 09862c4ee93d619523aec58f6655405dc19fc052 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 28 Jan 2018 15:29:25 +0000 Subject: [PATCH 706/856] [WSO2 Release] [Jenkins #3110] [Release 4.0.120] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c25483ec7..1d6f06fe8 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.120 + 4.0.121-SNAPSHOT ../pom.xml From aa44b8d35975a66f085d063bebf08d3fef206a1e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 28 Jan 2018 15:29:25 +0000 Subject: [PATCH 707/856] [WSO2 Release] [Jenkins #3110] [Release 4.0.120] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4b7c4f68c..7b4849f95 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.120 + 4.0.121-SNAPSHOT ../pom.xml From 73ae1394ba0b8bbfac847c8f5681c3ea1ee5bb7c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 29 Jan 2018 05:35:54 +0000 Subject: [PATCH 708/856] [WSO2 Release] [Jenkins #3112] [Release 4.0.121] prepare release v4.0.121 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1d6f06fe8..af8d221b7 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.121-SNAPSHOT + 4.0.121 ../pom.xml From e03f28ed2e3b2d44424a79789ef8225a62657c4c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 29 Jan 2018 05:35:54 +0000 Subject: [PATCH 709/856] [WSO2 Release] [Jenkins #3112] [Release 4.0.121] prepare release v4.0.121 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7b4849f95..e28d2a9a1 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.121-SNAPSHOT + 4.0.121 ../pom.xml From 3df61fb26b34b95ab2b27fbe44db02603438022a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 29 Jan 2018 05:36:09 +0000 Subject: [PATCH 710/856] [WSO2 Release] [Jenkins #3112] [Release 4.0.121] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index af8d221b7..5d33e33f1 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.121 + 4.0.122-SNAPSHOT ../pom.xml From d804e7281dd98d4812cda18be2315d87948ae061 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 29 Jan 2018 05:36:09 +0000 Subject: [PATCH 711/856] [WSO2 Release] [Jenkins #3112] [Release 4.0.121] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e28d2a9a1..d95085da2 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.121 + 4.0.122-SNAPSHOT ../pom.xml From 1f1e225dbba6c5b1a9b624a16ad6f40709b4b07f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 29 Jan 2018 11:24:07 +0000 Subject: [PATCH 712/856] [WSO2 Release] [Jenkins #3114] [Release 4.0.122] prepare release v4.0.122 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5d33e33f1..8a1df0b73 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.122-SNAPSHOT + 4.0.122 ../pom.xml From f84fbd1da345ba1bceec19fb9a554d69c09d4bd3 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 29 Jan 2018 11:24:07 +0000 Subject: [PATCH 713/856] [WSO2 Release] [Jenkins #3114] [Release 4.0.122] prepare release v4.0.122 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d95085da2..7028f98cb 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.122-SNAPSHOT + 4.0.122 ../pom.xml From e86626a985ee282df37eb375267da185795810b4 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 29 Jan 2018 11:24:22 +0000 Subject: [PATCH 714/856] [WSO2 Release] [Jenkins #3114] [Release 4.0.122] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8a1df0b73..2f2672349 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.122 + 4.0.123-SNAPSHOT ../pom.xml From 191060731473aa83b46643e96bffeeec90b3d1c2 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 29 Jan 2018 11:24:22 +0000 Subject: [PATCH 715/856] [WSO2 Release] [Jenkins #3114] [Release 4.0.122] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7028f98cb..c936c1250 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.122 + 4.0.123-SNAPSHOT ../pom.xml From 40345c664e23fb9b669fb9acd4c0261390187621 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 29 Jan 2018 11:53:19 +0000 Subject: [PATCH 716/856] [WSO2 Release] [Jenkins #3116] [Release 4.0.123] prepare release v4.0.123 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2f2672349..d60d213f5 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.123-SNAPSHOT + 4.0.123 ../pom.xml From dba96e4706cd5df5f01920960d90a8b1d48bee26 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 29 Jan 2018 11:53:19 +0000 Subject: [PATCH 717/856] [WSO2 Release] [Jenkins #3116] [Release 4.0.123] prepare release v4.0.123 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c936c1250..a6294d344 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.123-SNAPSHOT + 4.0.123 ../pom.xml From a1799159c62e62a9cce8c3e7bc7c7191e1c2c4f8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 29 Jan 2018 11:53:35 +0000 Subject: [PATCH 718/856] [WSO2 Release] [Jenkins #3116] [Release 4.0.123] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d60d213f5..e7ffca017 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.123 + 4.0.124-SNAPSHOT ../pom.xml From e1ef06b39015bf73ad2a86fc1a8db547a180a47f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 29 Jan 2018 11:53:35 +0000 Subject: [PATCH 719/856] [WSO2 Release] [Jenkins #3116] [Release 4.0.123] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a6294d344..7e9c0db84 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.123 + 4.0.124-SNAPSHOT ../pom.xml From 494c5abecc6ba00f78f7f79a9d155d4f720bee7b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 29 Jan 2018 12:43:38 +0000 Subject: [PATCH 720/856] [WSO2 Release] [Jenkins #3118] [Release 4.0.124] prepare release v4.0.124 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e7ffca017..1002fb6b2 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.124-SNAPSHOT + 4.0.124 ../pom.xml From 563ef0cd7c8f4d87cd10d70ae14ba6b4ffbc4176 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 29 Jan 2018 12:43:38 +0000 Subject: [PATCH 721/856] [WSO2 Release] [Jenkins #3118] [Release 4.0.124] prepare release v4.0.124 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7e9c0db84..748c56142 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.124-SNAPSHOT + 4.0.124 ../pom.xml From dcc91f0a48ca4f50a7322172fb8c8d79a8b55309 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 29 Jan 2018 12:43:53 +0000 Subject: [PATCH 722/856] [WSO2 Release] [Jenkins #3118] [Release 4.0.124] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1002fb6b2..efbb02922 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.124 + 4.0.125-SNAPSHOT ../pom.xml From c8ddcb83cca36f6480269c2299587c02ccca3ba2 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 29 Jan 2018 12:43:53 +0000 Subject: [PATCH 723/856] [WSO2 Release] [Jenkins #3118] [Release 4.0.124] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 748c56142..f6c61b233 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.124 + 4.0.125-SNAPSHOT ../pom.xml From 28dba6bcb189e591e7a6392d9b6eb229a2da0349 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 1 Feb 2018 06:16:37 +0000 Subject: [PATCH 724/856] [WSO2 Release] [Jenkins #3120] [Release 4.0.125] prepare release v4.0.125 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index efbb02922..e9eda7f14 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.125-SNAPSHOT + 4.0.125 ../pom.xml From 36ab742a56ac7a4ebf89b521361b8ed4b08869cf Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 1 Feb 2018 06:16:37 +0000 Subject: [PATCH 725/856] [WSO2 Release] [Jenkins #3120] [Release 4.0.125] prepare release v4.0.125 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f6c61b233..635dfa98b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.125-SNAPSHOT + 4.0.125 ../pom.xml From 3d976d1a31269f011b41bd3ed73d2e3b57ab564f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 1 Feb 2018 06:16:51 +0000 Subject: [PATCH 726/856] [WSO2 Release] [Jenkins #3120] [Release 4.0.125] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e9eda7f14..9a13e7c4f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.125 + 4.0.126-SNAPSHOT ../pom.xml From 46e80a7843075096e674cc9d076293465117263f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 1 Feb 2018 06:16:51 +0000 Subject: [PATCH 727/856] [WSO2 Release] [Jenkins #3120] [Release 4.0.125] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 635dfa98b..786b66fe0 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.125 + 4.0.126-SNAPSHOT ../pom.xml From fe336174906158b25d022876b0069357cf1b46eb Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 6 Feb 2018 15:10:14 +0000 Subject: [PATCH 728/856] [WSO2 Release] [Jenkins #3122] [Release 4.0.126] prepare release v4.0.126 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9a13e7c4f..468582d3f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.126-SNAPSHOT + 4.0.126 ../pom.xml From 67f64e214234321d570dea860af4a0d0a8b0e8b3 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 6 Feb 2018 15:10:14 +0000 Subject: [PATCH 729/856] [WSO2 Release] [Jenkins #3122] [Release 4.0.126] prepare release v4.0.126 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 786b66fe0..420f05bce 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.126-SNAPSHOT + 4.0.126 ../pom.xml From 5626005a0077b5525775beb73afbd23c538b1861 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 6 Feb 2018 15:10:29 +0000 Subject: [PATCH 730/856] [WSO2 Release] [Jenkins #3122] [Release 4.0.126] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 468582d3f..e4fdf4087 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.126 + 4.0.127-SNAPSHOT ../pom.xml From 6b0663cf07649652dc4c684ba4b0bb2a7fd6d2fc Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 6 Feb 2018 15:10:29 +0000 Subject: [PATCH 731/856] [WSO2 Release] [Jenkins #3122] [Release 4.0.126] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 420f05bce..0087fce2f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.126 + 4.0.127-SNAPSHOT ../pom.xml From 60f74077f2c498f5fd6f18e25fb0e236361278df Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 12 Feb 2018 04:00:36 +0000 Subject: [PATCH 732/856] [WSO2 Release] [Jenkins #3124] [Release 4.0.127] prepare release v4.0.127 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e4fdf4087..fb68ad41d 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.127-SNAPSHOT + 4.0.127 ../pom.xml From b5b7e5b800987d5cadf80cd4f3c8906c06dfb61c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 12 Feb 2018 04:00:36 +0000 Subject: [PATCH 733/856] [WSO2 Release] [Jenkins #3124] [Release 4.0.127] prepare release v4.0.127 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0087fce2f..3128fd9b9 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.127-SNAPSHOT + 4.0.127 ../pom.xml From f10d5789735b1195e22a6ab6387287717ec0b36f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 12 Feb 2018 04:00:51 +0000 Subject: [PATCH 734/856] [WSO2 Release] [Jenkins #3124] [Release 4.0.127] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fb68ad41d..37b444602 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.127 + 4.0.128-SNAPSHOT ../pom.xml From 133cbb78a54fc8666ee77c0b062f7bc54e738bc4 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 12 Feb 2018 04:00:51 +0000 Subject: [PATCH 735/856] [WSO2 Release] [Jenkins #3124] [Release 4.0.127] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3128fd9b9..d07e95a95 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.127 + 4.0.128-SNAPSHOT ../pom.xml From 18619c7e15087063de12cb84c7c289907eeac271 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 18 Feb 2018 07:19:52 +0000 Subject: [PATCH 736/856] [WSO2 Release] [Jenkins #3126] [Release 4.0.128] prepare release v4.0.128 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 37b444602..3ecac1d8f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.128-SNAPSHOT + 4.0.128 ../pom.xml From c0ebd0606b0a7cda5b69605f28165c707540022c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 18 Feb 2018 07:19:52 +0000 Subject: [PATCH 737/856] [WSO2 Release] [Jenkins #3126] [Release 4.0.128] prepare release v4.0.128 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d07e95a95..dee88bdb5 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.128-SNAPSHOT + 4.0.128 ../pom.xml From d75c76320bdfaafe13e837a769a7008a235e544f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 18 Feb 2018 07:20:07 +0000 Subject: [PATCH 738/856] [WSO2 Release] [Jenkins #3126] [Release 4.0.128] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3ecac1d8f..de076c88d 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.128 + 4.0.129-SNAPSHOT ../pom.xml From 140d31ffe11cb8df67e951d645ec14c53a9236df Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 18 Feb 2018 07:20:07 +0000 Subject: [PATCH 739/856] [WSO2 Release] [Jenkins #3126] [Release 4.0.128] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dee88bdb5..0415bcf76 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.128 + 4.0.129-SNAPSHOT ../pom.xml From d8efecd1d38daba6e4506ef413333cfc34a02f3a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 22 Feb 2018 10:24:10 +0000 Subject: [PATCH 740/856] [WSO2 Release] [Jenkins #3128] [Release 4.0.129] prepare release v4.0.129 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index de076c88d..4b5edfc79 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.129-SNAPSHOT + 4.0.129 ../pom.xml From bed1db79f3811169a6a7741d085a8f90708d8378 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 22 Feb 2018 10:24:10 +0000 Subject: [PATCH 741/856] [WSO2 Release] [Jenkins #3128] [Release 4.0.129] prepare release v4.0.129 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0415bcf76..b68be6fb5 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.129-SNAPSHOT + 4.0.129 ../pom.xml From ff762e51d47514ddecbe843e760ccbc79f96d179 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 22 Feb 2018 10:24:20 +0000 Subject: [PATCH 742/856] [WSO2 Release] [Jenkins #3128] [Release 4.0.129] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4b5edfc79..b87691074 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.129 + 4.0.130-SNAPSHOT ../pom.xml From ee0a0e80a16390d9d1a9ba1dddac5cf0218905e9 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 22 Feb 2018 10:24:20 +0000 Subject: [PATCH 743/856] [WSO2 Release] [Jenkins #3128] [Release 4.0.129] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b68be6fb5..a15ed531d 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.129 + 4.0.130-SNAPSHOT ../pom.xml From 488e3d960b7aa5e8b7a99bdb247da02224ad2241 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 24 Feb 2018 03:44:11 +0000 Subject: [PATCH 744/856] [WSO2 Release] [Jenkins #3130] [Release 4.0.130] prepare release v4.0.130 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b87691074..f5f729650 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.130-SNAPSHOT + 4.0.130 ../pom.xml From 786bca677b40c91ff1202563685c6d722e698de7 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 24 Feb 2018 03:44:11 +0000 Subject: [PATCH 745/856] [WSO2 Release] [Jenkins #3130] [Release 4.0.130] prepare release v4.0.130 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a15ed531d..694e2d9fe 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.130-SNAPSHOT + 4.0.130 ../pom.xml From fef8be5cb607775d2551780c1889ec380971e419 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 24 Feb 2018 03:44:21 +0000 Subject: [PATCH 746/856] [WSO2 Release] [Jenkins #3130] [Release 4.0.130] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f5f729650..5533c25d1 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.130 + 4.0.131-SNAPSHOT ../pom.xml From 588961bf09c16e76bca38aa121ab886d3bd023cb Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 24 Feb 2018 03:44:21 +0000 Subject: [PATCH 747/856] [WSO2 Release] [Jenkins #3130] [Release 4.0.130] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 694e2d9fe..b2b35b5db 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.130 + 4.0.131-SNAPSHOT ../pom.xml From 7598b6e4a1e9894a3c49c7b3c3a915aace6bb4b8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 25 Feb 2018 11:03:00 +0000 Subject: [PATCH 748/856] [WSO2 Release] [Jenkins #3132] [Release 4.0.131] prepare release v4.0.131 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5533c25d1..6c5affd26 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.131-SNAPSHOT + 4.0.131 ../pom.xml From ace6b2d02354468a27629cabb0acb1bf55285911 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 25 Feb 2018 11:03:00 +0000 Subject: [PATCH 749/856] [WSO2 Release] [Jenkins #3132] [Release 4.0.131] prepare release v4.0.131 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b2b35b5db..5c60b592f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.131-SNAPSHOT + 4.0.131 ../pom.xml From bfb8f81a1f9c4bb99db015f898c82d6a32371625 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 25 Feb 2018 11:03:12 +0000 Subject: [PATCH 750/856] [WSO2 Release] [Jenkins #3132] [Release 4.0.131] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6c5affd26..ff47f3822 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.131 + 4.0.132-SNAPSHOT ../pom.xml From ff3c5026f00a64814528e626a58ee4aa7c129f18 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sun, 25 Feb 2018 11:03:12 +0000 Subject: [PATCH 751/856] [WSO2 Release] [Jenkins #3132] [Release 4.0.131] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5c60b592f..e64b9ec4b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.131 + 4.0.132-SNAPSHOT ../pom.xml From 577fcfd59685e4006cac8e4b165f309e40ec9501 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 28 Feb 2018 14:30:43 +0000 Subject: [PATCH 752/856] [WSO2 Release] [Jenkins #3134] [Release 4.0.132] prepare release v4.0.132 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ff47f3822..2cb0b7355 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.132-SNAPSHOT + 4.0.132 ../pom.xml From ad3e5bf3fb78f1fc8e3afe1d6a3e376a4ceabc6a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 28 Feb 2018 14:30:43 +0000 Subject: [PATCH 753/856] [WSO2 Release] [Jenkins #3134] [Release 4.0.132] prepare release v4.0.132 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e64b9ec4b..8882239f8 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.132-SNAPSHOT + 4.0.132 ../pom.xml From 2db09db15f4f74c4c2e9d24032b774e18b0be22a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 28 Feb 2018 14:30:53 +0000 Subject: [PATCH 754/856] [WSO2 Release] [Jenkins #3134] [Release 4.0.132] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2cb0b7355..79c8729ea 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.132 + 4.0.133-SNAPSHOT ../pom.xml From e58b377a8decac15571d23a72e36565966369649 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 28 Feb 2018 14:30:53 +0000 Subject: [PATCH 755/856] [WSO2 Release] [Jenkins #3134] [Release 4.0.132] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8882239f8..63f0feceb 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.132 + 4.0.133-SNAPSHOT ../pom.xml From c2740b928c32dff7fde82471fedf639553b4dd8b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 28 Feb 2018 17:49:43 +0000 Subject: [PATCH 756/856] [WSO2 Release] [Jenkins #3136] [Release 4.0.133] prepare release v4.0.133 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 79c8729ea..c2a2e37f3 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.133-SNAPSHOT + 4.0.133 ../pom.xml From 90a4769c5a541f9b29ca145f13ad504b84d88daf Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 28 Feb 2018 17:49:43 +0000 Subject: [PATCH 757/856] [WSO2 Release] [Jenkins #3136] [Release 4.0.133] prepare release v4.0.133 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 63f0feceb..d96be9314 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.133-SNAPSHOT + 4.0.133 ../pom.xml From f1c13a9c3c377a706017795d9cd2440f1b486979 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 28 Feb 2018 17:49:53 +0000 Subject: [PATCH 758/856] [WSO2 Release] [Jenkins #3136] [Release 4.0.133] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c2a2e37f3..b0ca62505 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.133 + 4.0.134-SNAPSHOT ../pom.xml From a9b7afcb6efcb45f153d64aa4dcf0cbf38060cba Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 28 Feb 2018 17:49:53 +0000 Subject: [PATCH 759/856] [WSO2 Release] [Jenkins #3136] [Release 4.0.133] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d96be9314..61f79f730 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.133 + 4.0.134-SNAPSHOT ../pom.xml From 9c97a624eda12f0ea7b095ec8a7689aeeef1ecb0 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 1 Mar 2018 18:27:51 +0000 Subject: [PATCH 760/856] [WSO2 Release] [Jenkins #3138] [Release 4.0.134] prepare release v4.0.134 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b0ca62505..5bccca332 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.134-SNAPSHOT + 4.0.134 ../pom.xml From 3f8266f8685f51f77e80ae747824f9270bad709f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 1 Mar 2018 18:27:51 +0000 Subject: [PATCH 761/856] [WSO2 Release] [Jenkins #3138] [Release 4.0.134] prepare release v4.0.134 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 61f79f730..b503d9d46 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.134-SNAPSHOT + 4.0.134 ../pom.xml From 468f4f777073480a5c4f267df6b0286a80ca7d2e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 1 Mar 2018 18:28:02 +0000 Subject: [PATCH 762/856] [WSO2 Release] [Jenkins #3138] [Release 4.0.134] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5bccca332..83340de53 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.134 + 4.0.135-SNAPSHOT ../pom.xml From 52ca738b757481370807923e331700a525795d83 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 1 Mar 2018 18:28:02 +0000 Subject: [PATCH 763/856] [WSO2 Release] [Jenkins #3138] [Release 4.0.134] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b503d9d46..1d4369203 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.134 + 4.0.135-SNAPSHOT ../pom.xml From db8bfaaf146ded57486b98b0fa48a79261baa4d9 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 3 Mar 2018 16:48:22 +0000 Subject: [PATCH 764/856] [WSO2 Release] [Jenkins #3140] [Release 4.0.135] prepare release v4.0.135 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 83340de53..0e906f8ee 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.135-SNAPSHOT + 4.0.135 ../pom.xml From 14f887c74844c468fe80149d97d66b334bdf4bc8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 3 Mar 2018 16:48:22 +0000 Subject: [PATCH 765/856] [WSO2 Release] [Jenkins #3140] [Release 4.0.135] prepare release v4.0.135 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1d4369203..d6502e4ea 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.135-SNAPSHOT + 4.0.135 ../pom.xml From ee77e59256f499f724d5c02520d93b4c13fa1eea Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 3 Mar 2018 16:48:32 +0000 Subject: [PATCH 766/856] [WSO2 Release] [Jenkins #3140] [Release 4.0.135] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0e906f8ee..000bb0ec3 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.135 + 4.0.136-SNAPSHOT ../pom.xml From d794665d1b29c4c5a9f0af78a43f6b2d0edd2318 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 3 Mar 2018 16:48:32 +0000 Subject: [PATCH 767/856] [WSO2 Release] [Jenkins #3140] [Release 4.0.135] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d6502e4ea..5f919cae4 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.135 + 4.0.136-SNAPSHOT ../pom.xml From a75bb56ad65e1dcbf65e46c66cc85ece93970c93 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 3 Mar 2018 20:26:23 +0000 Subject: [PATCH 768/856] [WSO2 Release] [Jenkins #3142] [Release 4.0.136] prepare release v4.0.136 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 000bb0ec3..66148011a 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.136-SNAPSHOT + 4.0.136 ../pom.xml From f9d2d99c951ffb8e91a9202120ded46f8e9deb43 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 3 Mar 2018 20:26:23 +0000 Subject: [PATCH 769/856] [WSO2 Release] [Jenkins #3142] [Release 4.0.136] prepare release v4.0.136 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5f919cae4..13b8abff7 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.136-SNAPSHOT + 4.0.136 ../pom.xml From 2619e73c1206a1a7e43832e22e2172c4c1e80490 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 3 Mar 2018 20:26:33 +0000 Subject: [PATCH 770/856] [WSO2 Release] [Jenkins #3142] [Release 4.0.136] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 66148011a..f7ae20faa 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.136 + 4.0.137-SNAPSHOT ../pom.xml From 1a8014fc6e3cc5a918af79ef9581afc58c5cbf8f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Sat, 3 Mar 2018 20:26:33 +0000 Subject: [PATCH 771/856] [WSO2 Release] [Jenkins #3142] [Release 4.0.136] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 13b8abff7..a690d7a34 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.136 + 4.0.137-SNAPSHOT ../pom.xml From 3adfc70a45c14b302d851c626f028282e475fb70 Mon Sep 17 00:00:00 2001 From: geethkokila Date: Mon, 12 Mar 2018 16:28:28 +0530 Subject: [PATCH 772/856] Updating the version to 4.1.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f7ae20faa..5f9c18e81 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.137-SNAPSHOT + 4.1.0-SNAPSHOT ../pom.xml From 8f104d4062ba346a8af2f75a131e90c9806a0275 Mon Sep 17 00:00:00 2001 From: geethkokila Date: Mon, 12 Mar 2018 16:28:28 +0530 Subject: [PATCH 773/856] Updating the version to 4.1.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a690d7a34..26977982b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.0.137-SNAPSHOT + 4.1.0-SNAPSHOT ../pom.xml From 34f2e1e96e475160cb020b287528cfd19072fd45 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 12 Mar 2018 11:34:53 +0000 Subject: [PATCH 774/856] [WSO2 Release] [Jenkins #3144] [Release 4.1.0] prepare release v4.1.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5f9c18e81..b30476cbe 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.0-SNAPSHOT + 4.1.0 ../pom.xml From e900460f4371217610fbabc9b2137a98ad339ebe Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 12 Mar 2018 11:34:53 +0000 Subject: [PATCH 775/856] [WSO2 Release] [Jenkins #3144] [Release 4.1.0] prepare release v4.1.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 26977982b..5437946e7 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.0-SNAPSHOT + 4.1.0 ../pom.xml From 54e478d900dc87117adc47dc086be48857cccd35 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 12 Mar 2018 11:35:05 +0000 Subject: [PATCH 776/856] [WSO2 Release] [Jenkins #3144] [Release 4.1.0] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b30476cbe..fe19589da 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.0 + 4.1.1-SNAPSHOT ../pom.xml From d0db8b8a77bdff8efcf983be79819e4fc22ce5e0 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 12 Mar 2018 11:35:05 +0000 Subject: [PATCH 777/856] [WSO2 Release] [Jenkins #3144] [Release 4.1.0] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5437946e7..edcfcaa3c 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.0 + 4.1.1-SNAPSHOT ../pom.xml From 141f9b45431c5c47bca50cd4b18dca10fafbf75a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 13 Mar 2018 05:46:38 +0000 Subject: [PATCH 778/856] [WSO2 Release] [Jenkins #3146] [Release 4.1.1] prepare release v4.1.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fe19589da..7fdd50398 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.1-SNAPSHOT + 4.1.1 ../pom.xml From 9d5c5705225c34f2c420042104bcd5aba516622b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 13 Mar 2018 05:46:38 +0000 Subject: [PATCH 779/856] [WSO2 Release] [Jenkins #3146] [Release 4.1.1] prepare release v4.1.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index edcfcaa3c..069dba68d 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.1-SNAPSHOT + 4.1.1 ../pom.xml From 9172d6f9465306df4dec8ea147de70e5c7be75c2 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 13 Mar 2018 05:46:49 +0000 Subject: [PATCH 780/856] [WSO2 Release] [Jenkins #3146] [Release 4.1.1] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7fdd50398..078771863 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.1 + 4.1.2-SNAPSHOT ../pom.xml From eea3e87b662edd6343c9868d9265b1d1d5adbde6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 13 Mar 2018 05:46:49 +0000 Subject: [PATCH 781/856] [WSO2 Release] [Jenkins #3146] [Release 4.1.1] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 069dba68d..2bdf88de5 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.1 + 4.1.2-SNAPSHOT ../pom.xml From e5a21a2d4cc0345c222618cd6a0ee4f3a3ce4c4f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 14 Mar 2018 07:59:38 +0000 Subject: [PATCH 782/856] [WSO2 Release] [Jenkins #3148] [Release 4.1.2] prepare release v4.1.2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 078771863..403eb731c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.2-SNAPSHOT + 4.1.2 ../pom.xml From 3aecf50495833e30dbc883ac4d97016a4c054fd6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 14 Mar 2018 07:59:38 +0000 Subject: [PATCH 783/856] [WSO2 Release] [Jenkins #3148] [Release 4.1.2] prepare release v4.1.2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2bdf88de5..657d935ad 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.2-SNAPSHOT + 4.1.2 ../pom.xml From 4a774f034e757c7371de2dd14721c39ceec2ab7f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 14 Mar 2018 07:59:49 +0000 Subject: [PATCH 784/856] [WSO2 Release] [Jenkins #3148] [Release 4.1.2] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 403eb731c..73bf7b499 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.2 + 4.1.3-SNAPSHOT ../pom.xml From ab6f8bba22aaad4feb2763e594a5b3aa0585e653 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 14 Mar 2018 07:59:49 +0000 Subject: [PATCH 785/856] [WSO2 Release] [Jenkins #3148] [Release 4.1.2] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 657d935ad..742e837c7 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.2 + 4.1.3-SNAPSHOT ../pom.xml From c22f34e98f0555fd57a2493dc51a83690c903c79 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 15 Mar 2018 09:05:24 +0000 Subject: [PATCH 786/856] [WSO2 Release] [Jenkins #3150] [Release 4.1.3] prepare release v4.1.3 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 73bf7b499..4b0960444 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.3-SNAPSHOT + 4.1.3 ../pom.xml From 45961086385d9ddfdf38aa07311bdd298810f02d Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 15 Mar 2018 09:05:24 +0000 Subject: [PATCH 787/856] [WSO2 Release] [Jenkins #3150] [Release 4.1.3] prepare release v4.1.3 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 742e837c7..7aa82266e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.3-SNAPSHOT + 4.1.3 ../pom.xml From 58fb8c00c78ac0d1b9b885b220bc5e82c941e57b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 15 Mar 2018 09:05:34 +0000 Subject: [PATCH 788/856] [WSO2 Release] [Jenkins #3150] [Release 4.1.3] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4b0960444..53d2019ab 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.3 + 4.1.4-SNAPSHOT ../pom.xml From 23b03a8f41995d8fd4fc73553bad0ff0545724ee Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 15 Mar 2018 09:05:34 +0000 Subject: [PATCH 789/856] [WSO2 Release] [Jenkins #3150] [Release 4.1.3] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7aa82266e..0dd7db4f9 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.3 + 4.1.4-SNAPSHOT ../pom.xml From 6188e3e7256c73a2efc55c1aeb36cc6b2f1389c8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 16 Mar 2018 12:06:49 +0000 Subject: [PATCH 790/856] [WSO2 Release] [Jenkins #3152] [Release 4.1.4] prepare release v4.1.4 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 53d2019ab..7890a067b 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.4-SNAPSHOT + 4.1.4 ../pom.xml From 6026b42db3333e89ad25d07fe2d5af21d5107054 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 16 Mar 2018 12:06:49 +0000 Subject: [PATCH 791/856] [WSO2 Release] [Jenkins #3152] [Release 4.1.4] prepare release v4.1.4 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0dd7db4f9..705c699aa 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.4-SNAPSHOT + 4.1.4 ../pom.xml From 6afa957aac8e0bb80afec5bca0d375927532d65c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 16 Mar 2018 12:06:59 +0000 Subject: [PATCH 792/856] [WSO2 Release] [Jenkins #3152] [Release 4.1.4] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7890a067b..f0a6759df 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.4 + 4.1.5-SNAPSHOT ../pom.xml From 85e39d52ac54dbe2941050a604188b94e0313ddf Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 16 Mar 2018 12:06:59 +0000 Subject: [PATCH 793/856] [WSO2 Release] [Jenkins #3152] [Release 4.1.4] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 705c699aa..6bb469503 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.4 + 4.1.5-SNAPSHOT ../pom.xml From e7e517aba01fed87e87f3c2de8b4a53514c54871 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 21 Mar 2018 04:31:01 +0000 Subject: [PATCH 794/856] [WSO2 Release] [Jenkins #3154] [Release 4.1.5] prepare release v4.1.5 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f0a6759df..e50ce6980 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.5-SNAPSHOT + 4.1.5 ../pom.xml From 05a8bd14e276e0602df92422052ce77bbfb3077c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 21 Mar 2018 04:31:01 +0000 Subject: [PATCH 795/856] [WSO2 Release] [Jenkins #3154] [Release 4.1.5] prepare release v4.1.5 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6bb469503..da1c38538 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.5-SNAPSHOT + 4.1.5 ../pom.xml From cbbb6faca5e3e57727b41964b024c431046a1b5c Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 21 Mar 2018 04:31:13 +0000 Subject: [PATCH 796/856] [WSO2 Release] [Jenkins #3154] [Release 4.1.5] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e50ce6980..104453f7d 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.5 + 4.1.6-SNAPSHOT ../pom.xml From 260571ef6bbc048b45b9fc4b6c1ff4a2980fe7c3 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 21 Mar 2018 04:31:13 +0000 Subject: [PATCH 797/856] [WSO2 Release] [Jenkins #3154] [Release 4.1.5] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index da1c38538..ca91c5399 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.5 + 4.1.6-SNAPSHOT ../pom.xml From 928826e9629feaa4f758d9360d6a072f44f5f624 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 5 Apr 2018 13:49:53 +0000 Subject: [PATCH 798/856] [WSO2 Release] [Jenkins #3159] [Release 4.1.6] prepare release v4.1.6 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 104453f7d..c1f815ac9 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.6-SNAPSHOT + 4.1.6 ../pom.xml From f6b6bf0661da002d39e0355f6d236951fe248fbb Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 5 Apr 2018 13:49:53 +0000 Subject: [PATCH 799/856] [WSO2 Release] [Jenkins #3159] [Release 4.1.6] prepare release v4.1.6 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ca91c5399..0830521ee 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.6-SNAPSHOT + 4.1.6 ../pom.xml From 82789474048daf1778528cfa2eee1c2f1ab91ff9 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 5 Apr 2018 13:50:04 +0000 Subject: [PATCH 800/856] [WSO2 Release] [Jenkins #3159] [Release 4.1.6] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c1f815ac9..0dbb747ee 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.6 + 4.1.7-SNAPSHOT ../pom.xml From 60a3dbf04194ef6325f88fc210927e70fdc44463 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 5 Apr 2018 13:50:04 +0000 Subject: [PATCH 801/856] [WSO2 Release] [Jenkins #3159] [Release 4.1.6] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0830521ee..bc7cf900e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.6 + 4.1.7-SNAPSHOT ../pom.xml From ce3bc11237b31a6ad07ed78dcfa8ff57882bd259 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 13 Aug 2018 08:48:16 +0000 Subject: [PATCH 802/856] [maven-release-plugin] prepare release v4.1.7 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0dbb747ee..a83de91f5 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.7-SNAPSHOT + 4.1.7 ../pom.xml From 3273797d4944e63c22bf961d33158198937855da Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 13 Aug 2018 08:48:16 +0000 Subject: [PATCH 803/856] [maven-release-plugin] prepare release v4.1.7 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bc7cf900e..c56e77716 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.7-SNAPSHOT + 4.1.7 ../pom.xml From fc47c6949c950e13dcbf1b16c122e77003413881 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 13 Aug 2018 08:48:27 +0000 Subject: [PATCH 804/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a83de91f5..8dd69e0d0 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.7 + 4.1.8-SNAPSHOT ../pom.xml From db425908f8aa08d852ab423b54b1f0bf436b4455 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 13 Aug 2018 08:48:27 +0000 Subject: [PATCH 805/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c56e77716..85afd583d 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.7 + 4.1.8-SNAPSHOT ../pom.xml From 3251ebbe259a18f8c5cd0dd192d550df4dabe026 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 22 Aug 2018 15:06:51 +0000 Subject: [PATCH 806/856] [maven-release-plugin] prepare release v4.1.8 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8dd69e0d0..dd794eb26 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.8-SNAPSHOT + 4.1.8 ../pom.xml From f0da6a6fb0e594caae1d5c06978cc5effca234d6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 22 Aug 2018 15:06:51 +0000 Subject: [PATCH 807/856] [maven-release-plugin] prepare release v4.1.8 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 85afd583d..d49912005 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.8-SNAPSHOT + 4.1.8 ../pom.xml From 6c6cd16cc4239d1a5b743a6dab890687ccddec7e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 22 Aug 2018 15:07:02 +0000 Subject: [PATCH 808/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dd794eb26..c3af62fa6 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.8 + 4.1.9-SNAPSHOT ../pom.xml From 7b9a264265a8116756dc0f9165bee6a1be1b05b6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 22 Aug 2018 15:07:02 +0000 Subject: [PATCH 809/856] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d49912005..4cda937d7 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.8 + 4.1.9-SNAPSHOT ../pom.xml From 81cd27eebb9187cc20ca8e96cb10d36503504d32 Mon Sep 17 00:00:00 2001 From: Madhawa Perera Date: Tue, 18 Sep 2018 14:23:04 +0530 Subject: [PATCH 810/856] version bump from 4.1.9 to 4.1.11 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c3af62fa6..5c18c0a7f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.9-SNAPSHOT + 4.1.11-SNAPSHOT ../pom.xml From c6aa8ac14308e9ffc4eafa6c5c4ae01ce85bd186 Mon Sep 17 00:00:00 2001 From: Madhawa Perera Date: Tue, 18 Sep 2018 14:23:04 +0530 Subject: [PATCH 811/856] version bump from 4.1.9 to 4.1.11 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4cda937d7..58636e346 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.9-SNAPSHOT + 4.1.11-SNAPSHOT ../pom.xml From 0814d7468a8db45d3484aa7a1860d3d3fc5e44c7 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 18 Sep 2018 09:24:03 +0000 Subject: [PATCH 812/856] [WSO2 Release] [Jenkins #3178] [Release 4.1.11] prepare release v4.1.11 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5c18c0a7f..78ad3dae8 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.11-SNAPSHOT + 4.1.11 ../pom.xml From 4ed3cd865a4e93903384a956151115d704b793a1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 18 Sep 2018 09:24:03 +0000 Subject: [PATCH 813/856] [WSO2 Release] [Jenkins #3178] [Release 4.1.11] prepare release v4.1.11 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 58636e346..19048aa0a 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.11-SNAPSHOT + 4.1.11 ../pom.xml From 011dc162f509aba371dac6d7f2906484c6ff4e13 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 18 Sep 2018 09:24:16 +0000 Subject: [PATCH 814/856] [WSO2 Release] [Jenkins #3178] [Release 4.1.11] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 78ad3dae8..bb003f222 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.11 + 4.1.12-SNAPSHOT ../pom.xml From bd2fa86371c01ee624ad69665b874e04bd291463 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 18 Sep 2018 09:24:16 +0000 Subject: [PATCH 815/856] [WSO2 Release] [Jenkins #3178] [Release 4.1.11] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 19048aa0a..8cab5fab8 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.11 + 4.1.12-SNAPSHOT ../pom.xml From 1ec7244433925c3fb5ed55b4d40b2bcf225e6144 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 8 Oct 2018 05:27:27 +0000 Subject: [PATCH 816/856] [WSO2 Release] [Jenkins #3180] [Release 4.1.12] prepare release v4.1.12 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bb003f222..6970f9dcd 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.12-SNAPSHOT + 4.1.12 ../pom.xml From 4f6c73c698b89815aec0f6d4dba169fdccb28995 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 8 Oct 2018 05:27:27 +0000 Subject: [PATCH 817/856] [WSO2 Release] [Jenkins #3180] [Release 4.1.12] prepare release v4.1.12 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8cab5fab8..b14de8c75 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.12-SNAPSHOT + 4.1.12 ../pom.xml From 0a9e7c8aba7df64b85ead573f154ed8a965096ed Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 8 Oct 2018 05:27:38 +0000 Subject: [PATCH 818/856] [WSO2 Release] [Jenkins #3180] [Release 4.1.12] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6970f9dcd..8e1f99afb 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.12 + 4.1.13-SNAPSHOT ../pom.xml From 801e38314855b3171bf5cd624f9badd023c5046f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Mon, 8 Oct 2018 05:27:38 +0000 Subject: [PATCH 819/856] [WSO2 Release] [Jenkins #3180] [Release 4.1.12] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b14de8c75..c8dc1ecaa 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.12 + 4.1.13-SNAPSHOT ../pom.xml From bba60c7cbf848fa800ff240e8a54423010bf40e3 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 10 Oct 2018 13:04:41 +0000 Subject: [PATCH 820/856] [WSO2 Release] [Jenkins #3182] [Release 4.1.13] prepare release v4.1.13 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8e1f99afb..f612eb3b5 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.13-SNAPSHOT + 4.1.13 ../pom.xml From 5819def79a672515ad9f27a860169bd915d2cd56 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 10 Oct 2018 13:04:41 +0000 Subject: [PATCH 821/856] [WSO2 Release] [Jenkins #3182] [Release 4.1.13] prepare release v4.1.13 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c8dc1ecaa..8ff84055f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.13-SNAPSHOT + 4.1.13 ../pom.xml From 76211f2f58f0f9a450d546bc7bd838200c4d6ad4 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 10 Oct 2018 13:04:53 +0000 Subject: [PATCH 822/856] [WSO2 Release] [Jenkins #3182] [Release 4.1.13] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f612eb3b5..b29094ddd 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.13 + 4.1.14-SNAPSHOT ../pom.xml From 00315cefbf71505c5c03501c396fff708d2fe6a2 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 10 Oct 2018 13:04:53 +0000 Subject: [PATCH 823/856] [WSO2 Release] [Jenkins #3182] [Release 4.1.13] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8ff84055f..5e0a585d2 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.13 + 4.1.14-SNAPSHOT ../pom.xml From 81dcc2dba60b061fb9d3d044b95153d7487d700b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 19 Oct 2018 17:58:14 +0000 Subject: [PATCH 824/856] [WSO2 Release] [Jenkins #3184] [Release 4.1.14] prepare release v4.1.14 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b29094ddd..3393a2bff 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.14-SNAPSHOT + 4.1.14 ../pom.xml From 9547ddeba3508b4200a6fcdf0168f2fb6a92e6b8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 19 Oct 2018 17:58:14 +0000 Subject: [PATCH 825/856] [WSO2 Release] [Jenkins #3184] [Release 4.1.14] prepare release v4.1.14 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5e0a585d2..4203d57aa 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.14-SNAPSHOT + 4.1.14 ../pom.xml From 07c5addc96abd307db8e60a58948221a45476772 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 19 Oct 2018 17:58:26 +0000 Subject: [PATCH 826/856] [WSO2 Release] [Jenkins #3184] [Release 4.1.14] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3393a2bff..4b14bc8ba 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.14 + 4.1.15-SNAPSHOT ../pom.xml From 6db274c614bf5d4e48a31c0458581ab6915e859a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 19 Oct 2018 17:58:26 +0000 Subject: [PATCH 827/856] [WSO2 Release] [Jenkins #3184] [Release 4.1.14] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4203d57aa..f391fb3e7 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.14 + 4.1.15-SNAPSHOT ../pom.xml From 2d3f2f25c49e1fcb3afdafa93867d1a1ee499ed7 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 23 Oct 2018 06:40:17 +0000 Subject: [PATCH 828/856] [WSO2 Release] [Jenkins #3186] [Release 4.1.15] prepare release v4.1.15 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4b14bc8ba..f91ef5841 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.15-SNAPSHOT + 4.1.15 ../pom.xml From 3d8dc568e4d32aa097e35c7ce312984f2764951b Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 23 Oct 2018 06:40:17 +0000 Subject: [PATCH 829/856] [WSO2 Release] [Jenkins #3186] [Release 4.1.15] prepare release v4.1.15 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f391fb3e7..19bb7001b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.15-SNAPSHOT + 4.1.15 ../pom.xml From 981650776e2beba0a8efcb4a44445ad2236128b1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 23 Oct 2018 06:40:28 +0000 Subject: [PATCH 830/856] [WSO2 Release] [Jenkins #3186] [Release 4.1.15] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f91ef5841..47b846628 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.15 + 4.1.16-SNAPSHOT ../pom.xml From a1dffbade28e8ab7dc68ce915e70a7da0432bb1f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Tue, 23 Oct 2018 06:40:28 +0000 Subject: [PATCH 831/856] [WSO2 Release] [Jenkins #3186] [Release 4.1.15] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 19bb7001b..9c99ffad1 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.15 + 4.1.16-SNAPSHOT ../pom.xml From 3e0eee697144eadc5ef76897fd3277fbfe3dd17f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 24 Oct 2018 05:47:15 +0000 Subject: [PATCH 832/856] [WSO2 Release] [Jenkins #3190] [Release 4.1.16] prepare release v4.1.16 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 47b846628..37da67af4 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.16-SNAPSHOT + 4.1.16 ../pom.xml From 5a479ccd089adfa381a15924ad5bdaedb79c32d7 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 24 Oct 2018 05:47:15 +0000 Subject: [PATCH 833/856] [WSO2 Release] [Jenkins #3190] [Release 4.1.16] prepare release v4.1.16 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9c99ffad1..218f80b4d 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.16-SNAPSHOT + 4.1.16 ../pom.xml From 52a4c1e58f48d547cce94aa08d06ca45adfbac06 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 24 Oct 2018 05:47:27 +0000 Subject: [PATCH 834/856] [WSO2 Release] [Jenkins #3190] [Release 4.1.16] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 37da67af4..5b4915378 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.16 + 4.1.17-SNAPSHOT ../pom.xml From 60111130bda09c15677743c1995ae31ee469bd99 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 24 Oct 2018 05:47:27 +0000 Subject: [PATCH 835/856] [WSO2 Release] [Jenkins #3190] [Release 4.1.16] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 218f80b4d..6d897ae82 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.16 + 4.1.17-SNAPSHOT ../pom.xml From 8a42a025ab91a4aa48cfa5f2ddc084381fda17ea Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 24 Oct 2018 16:30:51 +0000 Subject: [PATCH 836/856] [WSO2 Release] [Jenkins #3192] [Release 4.1.17] prepare release v4.1.17 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5b4915378..3607c3ed3 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.17-SNAPSHOT + 4.1.17 ../pom.xml From 54d061b7d4e7be2fcf3a7cfdda5d14c4559c818f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 24 Oct 2018 16:30:51 +0000 Subject: [PATCH 837/856] [WSO2 Release] [Jenkins #3192] [Release 4.1.17] prepare release v4.1.17 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6d897ae82..1d2af64cb 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.17-SNAPSHOT + 4.1.17 ../pom.xml From 160a4d8dd14a730aa490870ca720917ba192ceb8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 24 Oct 2018 16:31:03 +0000 Subject: [PATCH 838/856] [WSO2 Release] [Jenkins #3192] [Release 4.1.17] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3607c3ed3..097cf6a81 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.17 + 4.1.18-SNAPSHOT ../pom.xml From 82a1af1df4094b08072397bbe51f772dddd5f648 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 24 Oct 2018 16:31:03 +0000 Subject: [PATCH 839/856] [WSO2 Release] [Jenkins #3192] [Release 4.1.17] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1d2af64cb..39ba2af46 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.17 + 4.1.18-SNAPSHOT ../pom.xml From 4786462f096e0ddfa90c895deb716ea350ad3840 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 24 Oct 2018 19:46:29 +0000 Subject: [PATCH 840/856] [WSO2 Release] [Jenkins #3194] [Release 4.1.18] prepare release v4.1.18 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 097cf6a81..9740ab5e0 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.18-SNAPSHOT + 4.1.18 ../pom.xml From 18aedc8fad5b9913046490b9ea43118e2ca102b5 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 24 Oct 2018 19:46:29 +0000 Subject: [PATCH 841/856] [WSO2 Release] [Jenkins #3194] [Release 4.1.18] prepare release v4.1.18 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 39ba2af46..08721c687 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.18-SNAPSHOT + 4.1.18 ../pom.xml From e704511d015a6d3b0b81646464edc91cd157ead6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 24 Oct 2018 19:46:42 +0000 Subject: [PATCH 842/856] [WSO2 Release] [Jenkins #3194] [Release 4.1.18] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9740ab5e0..335baf732 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.18 + 4.1.19-SNAPSHOT ../pom.xml From 176d58d82ee7b031b1a26638bb9578ce67478b57 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 24 Oct 2018 19:46:42 +0000 Subject: [PATCH 843/856] [WSO2 Release] [Jenkins #3194] [Release 4.1.18] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 08721c687..a10f5815b 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.18 + 4.1.19-SNAPSHOT ../pom.xml From 94f53768585f553c04e1a81e1745920bbcd334bd Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 25 Oct 2018 09:10:34 +0000 Subject: [PATCH 844/856] [WSO2 Release] [Jenkins #3196] [Release 4.1.19] prepare release v4.1.19 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 335baf732..c8265b338 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.19-SNAPSHOT + 4.1.19 ../pom.xml From 66dd0d7746b2a82a6cdc69cd5af4908c9082c31f Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 25 Oct 2018 09:10:34 +0000 Subject: [PATCH 845/856] [WSO2 Release] [Jenkins #3196] [Release 4.1.19] prepare release v4.1.19 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a10f5815b..b3d5ac0f1 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.19-SNAPSHOT + 4.1.19 ../pom.xml From f2238404d5f0161c9db590a4ce7cf1a7f5a1c987 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 25 Oct 2018 09:10:46 +0000 Subject: [PATCH 846/856] [WSO2 Release] [Jenkins #3196] [Release 4.1.19] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c8265b338..2a33e2d8a 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.19 + 4.1.20-SNAPSHOT ../pom.xml From cc778819d3a4741ee4659e12492f19ba1492709e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 25 Oct 2018 09:10:46 +0000 Subject: [PATCH 847/856] [WSO2 Release] [Jenkins #3196] [Release 4.1.19] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b3d5ac0f1..70f9c6984 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.19 + 4.1.20-SNAPSHOT ../pom.xml From ca1a24525799f2e0128bc53b67429fa95a386a8a Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 31 Oct 2018 06:09:58 +0000 Subject: [PATCH 848/856] [WSO2 Release] [Jenkins #3198] [Release 4.1.20] prepare release v4.1.20 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2a33e2d8a..cb9205156 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.20-SNAPSHOT + 4.1.20 ../pom.xml From 51c2897e8b56ddb6d6daf83bff1678a8941c1db6 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 31 Oct 2018 06:09:58 +0000 Subject: [PATCH 849/856] [WSO2 Release] [Jenkins #3198] [Release 4.1.20] prepare release v4.1.20 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 70f9c6984..ae5b2085e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.20-SNAPSHOT + 4.1.20 ../pom.xml From decedf05dccf436b85d399145a0de3a4f673097e Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 31 Oct 2018 06:10:10 +0000 Subject: [PATCH 850/856] [WSO2 Release] [Jenkins #3198] [Release 4.1.20] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cb9205156..f84043397 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.20 + 4.1.21-SNAPSHOT ../pom.xml From 7a8ceeaf30c7f9ee59401677e51e6d93d7efcbb2 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Wed, 31 Oct 2018 06:10:10 +0000 Subject: [PATCH 851/856] [WSO2 Release] [Jenkins #3198] [Release 4.1.20] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ae5b2085e..e9d51564c 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.20 + 4.1.21-SNAPSHOT ../pom.xml From 01967c6a1b73d43517e756031f560b266ca70bfd Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Fri, 21 Apr 2023 22:44:43 +0530 Subject: [PATCH 852/856] bug fix is extracting payload --- .../device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java index 5ae262b9a..ad1c149b7 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java @@ -199,7 +199,7 @@ public class MQTTAdapterListener implements MqttCallback, Runnable { public void messageArrived(String topic, MqttMessage mqttMessage) throws Exception { try { String mqttMsgString = mqttMessage.toString(); - String msgText = mqttMsgString.substring(mqttMsgString.indexOf("{"), mqttMsgString.indexOf("}") +1); + String msgText = mqttMsgString.substring(mqttMsgString.indexOf("{"), mqttMsgString.lastIndexOf("}") + 1); if (log.isDebugEnabled()) { log.debug(msgText); } From 914fecd9b17cb1a73e71925043950b9aadb278c6 Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Fri, 21 Apr 2023 22:45:07 +0530 Subject: [PATCH 853/856] updated extracting deviceid from scope --- .../io/entgra/device/mgt/plugins/emqx/exhook/ExServer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/extensions/emqx-extensions/io.entgra.device.mgt.plugins.emqx.exhook/src/main/java/io/entgra/device/mgt/plugins/emqx/exhook/ExServer.java b/components/extensions/emqx-extensions/io.entgra.device.mgt.plugins.emqx.exhook/src/main/java/io/entgra/device/mgt/plugins/emqx/exhook/ExServer.java index 51da55a64..1951a7bfa 100644 --- a/components/extensions/emqx-extensions/io.entgra.device.mgt.plugins.emqx.exhook/src/main/java/io/entgra/device/mgt/plugins/emqx/exhook/ExServer.java +++ b/components/extensions/emqx-extensions/io.entgra.device.mgt.plugins.emqx.exhook/src/main/java/io/entgra/device/mgt/plugins/emqx/exhook/ExServer.java @@ -467,8 +467,8 @@ public class ExServer { String deviceType = null; String deviceId = null; for (String scope : scopeArray) { - if (scope.startsWith("device_")) { - String[] scopeParts = scope.split("_"); + if (scope.startsWith("device:")) { + String[] scopeParts = scope.split(":"); deviceType = scopeParts[1]; deviceId = scopeParts[2]; break; From 3b69fc61aafeeb490470529ca478a0a26180ad40 Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Mon, 24 Apr 2023 11:30:30 +0530 Subject: [PATCH 854/856] adding virtual fire alaram api implementation --- .../org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml | 0 .../virtualfirealarm/service/impl/VirtualFireAlarmService.java | 0 .../service/impl/VirtualFireAlarmServiceImpl.java | 0 .../service/impl/constants/VirtualFireAlarmConstants.java | 0 .../mgt/iot/virtualfirealarm/service/impl/dto/SensorRecord.java | 0 .../service/impl/exception/VirtualFireAlarmException.java | 0 .../impl/listener/VirtualFireAlarmPermissionUpdateListener.java | 0 .../mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java | 0 .../service/impl/util/VirtualFireAlarmUtilConstants.java | 0 .../mgt/iot/virtualfirealarm/service/impl/util/ZipArchive.java | 0 .../mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java | 0 .../service/impl/xmpp/VirtualFirealarmXMPPException.java | 0 .../mgt/iot/virtualfirealarm/service/impl/xmpp/XmppAccount.java | 0 .../mgt/iot/virtualfirealarm/service/impl/xmpp/XmppConfig.java | 0 .../iot/virtualfirealarm/service/impl/xmpp/XmppServerClient.java | 0 .../src}/main/webapp/META-INF/permissions.xml | 0 .../src}/main/webapp/META-INF/webapp-classloading.xml | 0 .../src}/main/webapp/WEB-INF/cxf-servlet.xml | 0 .../src}/main/webapp/WEB-INF/web.xml | 0 .../src}/main/webapp/WEB-INF/xmpp.properties | 0 20 files changed, 0 insertions(+), 0 deletions(-) rename pom.xml => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dto/SensorRecord.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/exception/VirtualFireAlarmException.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/listener/VirtualFireAlarmPermissionUpdateListener.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmUtilConstants.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipArchive.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/VirtualFirealarmXMPPException.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppAccount.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppConfig.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppServerClient.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src}/main/webapp/META-INF/permissions.xml (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src}/main/webapp/META-INF/webapp-classloading.xml (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src}/main/webapp/WEB-INF/cxf-servlet.xml (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src}/main/webapp/WEB-INF/web.xml (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src}/main/webapp/WEB-INF/xmpp.properties (100%) diff --git a/pom.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml similarity index 100% rename from pom.xml rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dto/SensorRecord.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dto/SensorRecord.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dto/SensorRecord.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dto/SensorRecord.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/exception/VirtualFireAlarmException.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/exception/VirtualFireAlarmException.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/exception/VirtualFireAlarmException.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/exception/VirtualFireAlarmException.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/listener/VirtualFireAlarmPermissionUpdateListener.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/listener/VirtualFireAlarmPermissionUpdateListener.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/listener/VirtualFireAlarmPermissionUpdateListener.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/listener/VirtualFireAlarmPermissionUpdateListener.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmUtilConstants.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmUtilConstants.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmUtilConstants.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/VirtualFireAlarmUtilConstants.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipArchive.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipArchive.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipArchive.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipArchive.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/VirtualFirealarmXMPPException.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/VirtualFirealarmXMPPException.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/VirtualFirealarmXMPPException.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/VirtualFirealarmXMPPException.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppAccount.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppAccount.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppAccount.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppAccount.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppConfig.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppConfig.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppConfig.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppConfig.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppServerClient.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppServerClient.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppServerClient.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/xmpp/XmppServerClient.java diff --git a/src/main/webapp/META-INF/permissions.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/webapp/META-INF/permissions.xml similarity index 100% rename from src/main/webapp/META-INF/permissions.xml rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/webapp/META-INF/permissions.xml diff --git a/src/main/webapp/META-INF/webapp-classloading.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/webapp/META-INF/webapp-classloading.xml similarity index 100% rename from src/main/webapp/META-INF/webapp-classloading.xml rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/webapp/META-INF/webapp-classloading.xml diff --git a/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/webapp/WEB-INF/cxf-servlet.xml similarity index 100% rename from src/main/webapp/WEB-INF/cxf-servlet.xml rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/webapp/WEB-INF/cxf-servlet.xml diff --git a/src/main/webapp/WEB-INF/web.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from src/main/webapp/WEB-INF/web.xml rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/webapp/WEB-INF/web.xml diff --git a/src/main/webapp/WEB-INF/xmpp.properties b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/webapp/WEB-INF/xmpp.properties similarity index 100% rename from src/main/webapp/WEB-INF/xmpp.properties rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/webapp/WEB-INF/xmpp.properties From 01315bece0bc4e897b9c8926905e56758624ba90 Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Mon, 24 Apr 2023 11:39:06 +0530 Subject: [PATCH 855/856] adding virtual fire alam agent code --- .../pom.xml | 0 .../mgt/iot/virtualfirealarm/agent/Bootstrap.java | 0 .../http/FireAlarmHTTPCommunicator.java | 0 .../mqtt/FireAlarmMQTTCommunicator.java | 0 .../xmpp/FireAlarmXMPPCommunicator.java | 0 .../agent/core/AgentConfiguration.java | 0 .../virtualfirealarm/agent/core/AgentConstants.java | 0 .../virtualfirealarm/agent/core/AgentManager.java | 0 .../agent/core/AgentUtilOperations.java | 0 .../agent/enrollment/EnrollmentManager.java | 0 .../exception/AgentCoreOperationException.java | 0 .../agent/transport/CommunicationUtils.java | 0 .../agent/transport/TransportHandler.java | 0 .../agent/transport/TransportHandlerException.java | 0 .../agent/transport/TransportUtils.java | 0 .../agent/transport/http/HTTPTransportHandler.java | 0 .../agent/transport/mqtt/MQTTTransportHandler.java | 0 .../agent/transport/xmpp/XMPPTransportHandler.java | 0 .../agent/virtual/VirtualHardwareManager.java | 0 .../virtualfirealarm/agent/virtual/ui/AgentUI.java | 0 .../src}/main/resources/alarm-off.gif | Bin .../src}/main/resources/alarm-on.gif | Bin .../src}/main/resources/deviceConfig.properties | 0 .../src}/main/resources/fireAlarmSound.mid | Bin .../src}/main/ui/build.xml | 0 .../src}/main/ui/manifest.mf | 0 .../src}/main/ui/nbproject/build-impl.xml | 0 .../src}/main/ui/nbproject/genfiles.properties | 0 .../main/ui/nbproject/private/private.properties | 0 .../src}/main/ui/nbproject/private/private.xml | 0 .../src}/main/ui/nbproject/project.properties | 0 .../src}/main/ui/nbproject/project.xml | 0 .../src}/main/ui/src/bulb-on.jpg | Bin .../mgt/iot/agent/virtual/VirtualAgentUI.java | 0 .../device/mgt/iot/agent/virtual/ui/AgentUI.form | 0 .../device/mgt/iot/agent/virtual/ui/AgentUI.java | 0 36 files changed, 0 insertions(+), 0 deletions(-) rename pom.xml => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/pom.xml (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/Bootstrap.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/http/FireAlarmHTTPCommunicator.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/xmpp/FireAlarmXMPPCommunicator.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/exception/AgentCoreOperationException.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandler.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandlerException.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/http/HTTPTransportHandler.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/mqtt/MQTTTransportHandler.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/xmpp/XMPPTransportHandler.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/resources/alarm-off.gif (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/resources/alarm-on.gif (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/resources/deviceConfig.properties (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/resources/fireAlarmSound.mid (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/ui/build.xml (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/ui/manifest.mf (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/ui/nbproject/build-impl.xml (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/ui/nbproject/genfiles.properties (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/ui/nbproject/private/private.properties (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/ui/nbproject/private/private.xml (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/ui/nbproject/project.properties (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/ui/nbproject/project.xml (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/ui/src/bulb-on.jpg (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/VirtualAgentUI.java (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.form (100%) rename {src => components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src}/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java (100%) diff --git a/pom.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/pom.xml similarity index 100% rename from pom.xml rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/pom.xml diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/Bootstrap.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/Bootstrap.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/Bootstrap.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/Bootstrap.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/http/FireAlarmHTTPCommunicator.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/http/FireAlarmHTTPCommunicator.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/http/FireAlarmHTTPCommunicator.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/http/FireAlarmHTTPCommunicator.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/xmpp/FireAlarmXMPPCommunicator.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/xmpp/FireAlarmXMPPCommunicator.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/xmpp/FireAlarmXMPPCommunicator.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/xmpp/FireAlarmXMPPCommunicator.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConfiguration.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentManager.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentUtilOperations.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/enrollment/EnrollmentManager.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/exception/AgentCoreOperationException.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/exception/AgentCoreOperationException.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/exception/AgentCoreOperationException.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/exception/AgentCoreOperationException.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/CommunicationUtils.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandler.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandler.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandler.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandler.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandlerException.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandlerException.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandlerException.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportHandlerException.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/TransportUtils.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/http/HTTPTransportHandler.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/http/HTTPTransportHandler.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/http/HTTPTransportHandler.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/http/HTTPTransportHandler.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/mqtt/MQTTTransportHandler.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/mqtt/MQTTTransportHandler.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/mqtt/MQTTTransportHandler.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/mqtt/MQTTTransportHandler.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/xmpp/XMPPTransportHandler.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/xmpp/XMPPTransportHandler.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/xmpp/XMPPTransportHandler.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/transport/xmpp/XMPPTransportHandler.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/VirtualHardwareManager.java diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java similarity index 100% rename from src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java diff --git a/src/main/resources/alarm-off.gif b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/resources/alarm-off.gif similarity index 100% rename from src/main/resources/alarm-off.gif rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/resources/alarm-off.gif diff --git a/src/main/resources/alarm-on.gif b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/resources/alarm-on.gif similarity index 100% rename from src/main/resources/alarm-on.gif rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/resources/alarm-on.gif diff --git a/src/main/resources/deviceConfig.properties b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/resources/deviceConfig.properties similarity index 100% rename from src/main/resources/deviceConfig.properties rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/resources/deviceConfig.properties diff --git a/src/main/resources/fireAlarmSound.mid b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/resources/fireAlarmSound.mid similarity index 100% rename from src/main/resources/fireAlarmSound.mid rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/resources/fireAlarmSound.mid diff --git a/src/main/ui/build.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/build.xml similarity index 100% rename from src/main/ui/build.xml rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/build.xml diff --git a/src/main/ui/manifest.mf b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/manifest.mf similarity index 100% rename from src/main/ui/manifest.mf rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/manifest.mf diff --git a/src/main/ui/nbproject/build-impl.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/nbproject/build-impl.xml similarity index 100% rename from src/main/ui/nbproject/build-impl.xml rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/nbproject/build-impl.xml diff --git a/src/main/ui/nbproject/genfiles.properties b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/nbproject/genfiles.properties similarity index 100% rename from src/main/ui/nbproject/genfiles.properties rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/nbproject/genfiles.properties diff --git a/src/main/ui/nbproject/private/private.properties b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/nbproject/private/private.properties similarity index 100% rename from src/main/ui/nbproject/private/private.properties rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/nbproject/private/private.properties diff --git a/src/main/ui/nbproject/private/private.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/nbproject/private/private.xml similarity index 100% rename from src/main/ui/nbproject/private/private.xml rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/nbproject/private/private.xml diff --git a/src/main/ui/nbproject/project.properties b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/nbproject/project.properties similarity index 100% rename from src/main/ui/nbproject/project.properties rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/nbproject/project.properties diff --git a/src/main/ui/nbproject/project.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/nbproject/project.xml similarity index 100% rename from src/main/ui/nbproject/project.xml rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/nbproject/project.xml diff --git a/src/main/ui/src/bulb-on.jpg b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/src/bulb-on.jpg similarity index 100% rename from src/main/ui/src/bulb-on.jpg rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/src/bulb-on.jpg diff --git a/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/VirtualAgentUI.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/VirtualAgentUI.java similarity index 100% rename from src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/VirtualAgentUI.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/VirtualAgentUI.java diff --git a/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.form b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.form similarity index 100% rename from src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.form rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.form diff --git a/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java similarity index 100% rename from src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java rename to components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/ui/src/org/wso2/carbon/device/mgt/iot/agent/virtual/ui/AgentUI.java From 99337539e6d6449e70294dfb4114533665269572 Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Mon, 24 Apr 2023 12:40:48 +0530 Subject: [PATCH 856/856] added changes to virtual fire alaram sample --- components/device-types/pom.xml | 59 ++++++ .../pom.xml | 3 +- .../mqtt/FireAlarmMQTTCommunicator.java | 21 +- .../pom.xml | 90 ++++++++- .../service/impl/VirtualFireAlarmService.java | 3 +- .../impl/VirtualFireAlarmServiceImpl.java | 67 +++--- .../constants/VirtualFireAlarmConstants.java | 2 +- .../service/impl/dao/DeviceEventsDAO.java | 27 +++ .../impl/dao/DeviceEventsDAOFactory.java | 120 +++++++++++ .../service/impl/dao/DeviceEventsDAOImpl.java | 77 +++++++ .../service/impl/dto/SensorRecord.java | 53 +---- .../service/impl/util/APIUtil.java | 89 -------- .../service/impl/util/ZipUtil.java | 4 +- .../webapp/META-INF/webapp-classloading.xml | 2 +- .../virtual-fire-alarm-plugin/pom.xml | 59 ++++++ features/device-types-feature/pom.xml | 39 ++++ .../pom.xml | 157 +++++++++++++++ .../resources/agent/deviceConfig.properties | 34 ++++ .../main/resources/agent/sketch.properties | 2 + .../src/main/resources/agent/start-device.bat | 7 + .../src/main/resources/agent/start-device.sh | 190 ++++++++++++++++++ .../resources/agent/virtual_firealarm.jks | Bin 0 -> 635 bytes .../src/main/resources/build.properties | 1 + .../devicetypes/virtual_firealarm.xml | 58 ++++++ .../src/main/resources/p2.inf | 16 ++ ..._firealam_rdbms_publisher-carbon.super.xml | 13 ++ .../receiver/virtualfirealarm_receiver.xml | 29 +++ ....device.stream.virtualfirealarm_1.0.0.json | 16 ++ .../virtual-fire-alarm-plugin-feature/pom.xml | 39 ++++ pom.xml | 12 ++ 30 files changed, 1101 insertions(+), 188 deletions(-) create mode 100644 components/device-types/pom.xml create mode 100644 components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dao/DeviceEventsDAO.java create mode 100644 components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dao/DeviceEventsDAOFactory.java create mode 100644 components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dao/DeviceEventsDAOImpl.java create mode 100644 components/device-types/virtual-fire-alarm-plugin/pom.xml create mode 100644 features/device-types-feature/pom.xml create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/deviceConfig.properties create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/sketch.properties create mode 100755 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/start-device.bat create mode 100755 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/start-device.sh create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/virtual_firealarm.jks create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/build.properties create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/devicetypes/virtual_firealarm.xml create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/p2.inf create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/publisher/virtual_firealam_rdbms_publisher-carbon.super.xml create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/receiver/virtualfirealarm_receiver.xml create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/streams/iot.per.device.stream.virtualfirealarm_1.0.0.json create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/pom.xml diff --git a/components/device-types/pom.xml b/components/device-types/pom.xml new file mode 100644 index 000000000..499c62ac6 --- /dev/null +++ b/components/device-types/pom.xml @@ -0,0 +1,59 @@ + + + + + + + org.wso2.carbon.devicemgt-plugins + carbon-device-mgt-plugins-parent + 6.0.16-SNAPSHOT + ../../pom.xml + + + 4.0.0 + device-types + pom + WSO2 Carbon - IoT Plugins + http://wso2.org + + + virtual-fire-alarm-plugin + + + + + + + org.apache.felix + maven-scr-plugin + 1.7.2 + + + generate-scr-scrdescriptor + + scr + + + + + + + + + diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/pom.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/pom.xml index e9d51564c..c2160bfcc 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/pom.xml +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/pom.xml @@ -23,8 +23,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.21-SNAPSHOT - ../pom.xml + 6.0.16-SNAPSHOT org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java index 8f89750fd..777671038 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/communication/mqtt/FireAlarmMQTTCommunicator.java @@ -69,8 +69,9 @@ public class FireAlarmMQTTCommunicator extends MQTTTransportHandler { Runnable connector = new Runnable() { public void run() { while (!isConnected()) { - try { - connectToQueue(agentManager.getAgentConfigs().getAuthToken(), DEFAULT_PASSWORD); + try { // uudi formay 8-4-4-4-12 + connectToQueue(agentManager.getAgentConfigs().getAuthToken().substring(0, 18), + agentManager.getAgentConfigs().getAuthToken().substring(19)); agentManager.updateAgentStatus("Connected to MQTT Queue"); } catch (TransportHandlerException e) { log.warn(AgentConstants.LOG_APPENDER + "Connection to MQTT Broker at: " + mqttBrokerEndPoint + @@ -138,6 +139,18 @@ public class FireAlarmMQTTCommunicator extends MQTTTransportHandler { String replyMessage; String securePayLoad; + if (message.toString().contains("BULB:ON")) { + boolean stateToSwitch = true; + agentManager.changeAlarmStatus(stateToSwitch); + log.info(AgentConstants.LOG_APPENDER + "Bulb was switched to state: 'ON'"); + return; + } else if (message.toString().contains("BULB:OFF")) { + boolean stateToSwitch = false; + agentManager.changeAlarmStatus(stateToSwitch); + log.info(AgentConstants.LOG_APPENDER + "Bulb was switched to state: 'OFF'"); + return; + } + try { receivedMessage = AgentUtilOperations.extractMessageFromPayload(message.toString()); log.info(AgentConstants.LOG_APPENDER + "Message [" + receivedMessage + "] was received"); @@ -210,8 +223,8 @@ public class FireAlarmMQTTCommunicator extends MQTTTransportHandler { int currentTemperature = agentManager.getTemperature(); String message = "{\"event\": {\"metaData\": {\"owner\": \"" + AgentManager .getInstance().getAgentConfigs().getDeviceOwner() + "\",\"deviceId\": \"" + AgentManager - .getInstance().getAgentConfigs().getDeviceId() + "\",\"time\": " + - "0},\"payloadData\": { \"temperature\": " + currentTemperature + "} }}"; + .getInstance().getAgentConfigs().getDeviceId() + "\",\"time\": \"" + + System.currentTimeMillis() + "\"},\"payloadData\": { \"temperature\": " + currentTemperature + "} }}"; try { String payLoad = AgentUtilOperations.prepareSecurePayLoad(message); diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml index f84043397..5e0eafc03 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml @@ -21,7 +21,7 @@ virtual-fire-alarm-plugin org.wso2.carbon.devicemgt-plugins - 4.1.21-SNAPSHOT + 6.0.16-SNAPSHOT ../pom.xml @@ -32,6 +32,10 @@ WSO2 Carbon - Virtual FireAlarm Service Management API Implementation http://wso2.org + + 2.7.18 + + @@ -208,11 +212,11 @@ org.wso2.carbon.apimgt.application.extension provided - - org.wso2.carbon.analytics - org.wso2.carbon.analytics.api - provided - + + + + + org.wso2.carbon.devicemgt org.wso2.carbon.device.mgt.extensions @@ -223,6 +227,80 @@ org.wso2.carbon.apimgt.annotations provided + + org.springframework + spring-web + provided + + + org.apache.cxf + cxf-bundle + 3.0.0-milestone2 + test + + + org.apache.cxf + cxf-bundle-jaxrs + provided + ${cxf-bundle-package.version} + + + + + io.swagger + swagger-annotations + + + io.swagger + swagger-core + + + com.fasterxml.jackson.module + jackson-module-jaxb-annotations + + + org.slf4j + slf4j-api + + + org.wso2.orbit.com.fasterxml.jackson.core + jackson-core + + + + + io.swagger + swagger-jaxrs + + + com.fasterxml.jackson.module + jackson-module-jaxb-annotations + + + org.slf4j + slf4j-api + + + org.wso2.orbit.com.fasterxml.jackson.core + jackson-core + + + + + + org.json.wso2 + json + + + javax.ws.rs + javax.ws.rs-api + provided + + + javax.ws.rs + jsr311-api + provided + diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java index 2726948d2..e9a080abe 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java @@ -54,7 +54,8 @@ import javax.ws.rs.core.Response; name = "Enroll device", description = "", key = "perm:firealarm:enroll", - permissions = {"/device-mgt/devices/enroll/firealarm"} + permissions = {"/device-mgt/devices/enroll/firealarm"}, + roles = {"Internal/devicemgt-user"} ) } ) diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java index 367cd248b..d8f298eaf 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java @@ -18,24 +18,24 @@ package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl; -import org.apache.commons.io.FileUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.wso2.carbon.analytics.dataservice.commons.SortByField; -import org.wso2.carbon.analytics.dataservice.commons.SortType; -import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException; import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService; import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey; import org.wso2.carbon.apimgt.application.extension.exception.APIManagerException; import org.wso2.carbon.context.PrivilegedCarbonContext; -import org.wso2.carbon.device.mgt.common.*; +import org.wso2.carbon.device.mgt.common.Device; +import org.wso2.carbon.device.mgt.common.DeviceIdentifier; +import org.wso2.carbon.device.mgt.common.EnrolmentInfo; import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationException; +import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException; +import org.wso2.carbon.device.mgt.common.exceptions.InvalidDeviceException; import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroupConstants; -import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; -import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation; import org.wso2.carbon.device.mgt.core.operation.mgt.ConfigOperation; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.constants.VirtualFireAlarmConstants; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.dao.DeviceEventsDAO; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.dao.DeviceEventsDAOImpl; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.dto.SensorRecord; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.APIUtil; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.ZipArchive; @@ -49,23 +49,11 @@ import org.wso2.carbon.identity.jwt.client.extension.dto.AccessTokenInfo; import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException; import org.wso2.carbon.user.api.UserStoreException; -import javax.ws.rs.Consumes; -import javax.ws.rs.FormParam; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; +import javax.ws.rs.*; import javax.ws.rs.core.Response; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Properties; -import java.util.UUID; +import java.util.*; public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { @@ -135,26 +123,16 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { @Produces("application/json") public Response getVirtualFirealarmStats(@PathParam("deviceId") String deviceId, @QueryParam("from") long from, @QueryParam("to") long to) { - String fromDate = String.valueOf(from*1000); // converting time to ms - String toDate = String.valueOf(to*1000); // converting time to ms - String query = "meta_deviceId:" + deviceId + " AND meta_deviceType:" + - VirtualFireAlarmConstants.DEVICE_TYPE + " AND meta_time : [" + fromDate + " TO " + toDate + "]"; - String sensorTableName = VirtualFireAlarmConstants.TEMPERATURE_EVENT_TABLE; try { if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized( new DeviceIdentifier(deviceId, VirtualFireAlarmConstants.DEVICE_TYPE), DeviceGroupConstants.Permissions.DEFAULT_STATS_MONITOR_PERMISSIONS)) { return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build(); } - List sortByFields = new ArrayList<>(); - SortByField sortByField = new SortByField("meta_time", SortType.ASC); - sortByFields.add(sortByField); - List sensorRecords = APIUtil.getAllEventsForDevice(sensorTableName, query, sortByFields); - return Response.status(Response.Status.OK.getStatusCode()).entity(sensorRecords).build(); - } catch (AnalyticsException e) { - String errorMsg = "Error on retrieving stats on table " + sensorTableName + " with query " + query; - log.error(errorMsg); - return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).entity(errorMsg).build(); + DeviceEventsDAO eventsDAO = new DeviceEventsDAOImpl(); + SensorRecord sensorRecord = eventsDAO.getStats(deviceId, from, to); + return Response.status(Response.Status.OK.getStatusCode()).entity(sensorRecord).build(); + } catch (DeviceAccessAuthorizationException e) { log.error(e.getErrorMessage(), e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); @@ -247,6 +225,8 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { PrivilegedCarbonContext.startTenantFlow(); PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantAdminDomainName); PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(adminUsername); + PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true); + apiApplicationKey = apiManagementProviderService.generateAndRetrieveApplicationKeys( VirtualFireAlarmConstants.DEVICE_TYPE, tags, KEY_TYPE, applicationUsername, true, @@ -256,10 +236,21 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { } } JWTClient jwtClient = APIUtil.getJWTClientManagerService().getJWTClient(); - String scopes = " device_" + deviceId; + + String deviceType = sketchType.replace(" ", ""); + String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(); + StringBuilder scopes = new StringBuilder("device:" + deviceType + ":" + deviceId); + + // add scopes for event publishing + scopes.append(" perm:topic:pub:" + tenantDomain + ":" + deviceType + ":" + deviceId + ":temperature"); + + // add scopes for retrieve operation topic /tenantDomain/deviceType/deviceId/operation/# + scopes.append(" perm:topic:sub:" + tenantDomain + ":" + deviceType + ":" + deviceId + ":operation"); + AccessTokenInfo accessTokenInfo = jwtClient.getAccessToken(apiApplicationKey.getConsumerKey(), - apiApplicationKey.getConsumerSecret(), owner, - scopes); + apiApplicationKey.getConsumerSecret(), owner, + scopes.toString()); + String accessToken = accessTokenInfo.getAccessToken(); String refreshToken = accessTokenInfo.getRefreshToken(); XmppAccount newXmppAccount = new XmppAccount(); diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java index 6c3186104..16a1bccbc 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/constants/VirtualFireAlarmConstants.java @@ -30,7 +30,7 @@ public class VirtualFireAlarmConstants { public static final String POLICY_CONTEXT = "POLICY"; //sensor events sumerized table name for temperature - public static final String TEMPERATURE_EVENT_TABLE = "IOT_PER_DEVICE_STREAM_VIRTUALFIREALARM_TEMPERATURE"; +// public static final String TEMPERATURE_EVENT_TABLE = "IOT_PER_DEVICE_STREAM_VIRTUALFIREALARM_TEMPERATURE"; public final static String DEVICE_TYPE_PROVIDER_DOMAIN = "carbon.super"; //mqtt tranport related constants diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dao/DeviceEventsDAO.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dao/DeviceEventsDAO.java new file mode 100644 index 000000000..84f8a29ab --- /dev/null +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dao/DeviceEventsDAO.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2018 - 2023 Entgra (Pvt) Ltd, Inc - All Rights Reserved. + * + * Unauthorised copying/redistribution of this file, via any medium is strictly prohibited. + * + * Licensed under the Entgra Commercial License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://entgra.io/licenses/entgra-commercial/1.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.dao; + +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.dto.SensorRecord; + +public interface DeviceEventsDAO { + + SensorRecord getStats(String deviceId, long fromTime, long toTime); +} diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dao/DeviceEventsDAOFactory.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dao/DeviceEventsDAOFactory.java new file mode 100644 index 000000000..5d3820bd1 --- /dev/null +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dao/DeviceEventsDAOFactory.java @@ -0,0 +1,120 @@ +/* + * Copyright (C) 2018 - 2023 Entgra (Pvt) Ltd, Inc - All Rights Reserved. + * + * Unauthorised copying/redistribution of this file, via any medium is strictly prohibited. + * + * Licensed under the Entgra Commercial License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://entgra.io/licenses/entgra-commercial/1.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.dao; + +import org.wso2.carbon.device.mgt.common.exceptions.*; +import org.wso2.carbon.device.mgt.core.dao.util.*; + +public class DeviceEventsDAOFactory { + + private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(DeviceEventsDAOFactory.class); + private static javax.sql.DataSource dataSource; + private static String databaseEngine; + private static final ThreadLocal currentConnection = new ThreadLocal<>(); + + public static void init(String jndiName) { + dataSource = DeviceManagementDAOUtil.lookupDataSource(jndiName, null); + try { + databaseEngine = dataSource.getConnection().getMetaData().getDatabaseProductName(); + } catch (java.sql.SQLException e) { + log.error("Error occurred while retrieving config.datasource connection", e); + } + } + + public static DeviceEventsDAO getDeviceEventDao() { + return new DeviceEventsDAOImpl(); + } + + public static void openDBConnection() throws DBConnectionException { + java.sql.Connection conn = currentConnection.get(); + if (conn != null) { + throw new IllegalTransactionStateException("Database connection has already been obtained."); + } + try { + conn = dataSource.getConnection(); + } catch (java.sql.SQLException e) { + throw new DBConnectionException("Failed to get a database connection.", e); + } + currentConnection.set(conn); + } + + public static void beginTransaction() throws DBConnectionException { + try { + java.sql.Connection conn = dataSource.getConnection(); + conn.setAutoCommit(false); + currentConnection.set(conn); + } catch (java.sql.SQLException e) { + throw new DBConnectionException("Error occurred while retrieving datasource connection", e); + } + } + + public static java.sql.Connection getConnection() throws DBConnectionException { + if (currentConnection.get() == null) { + try { + currentConnection.set(dataSource.getConnection()); + } catch (java.sql.SQLException e) { + throw new DBConnectionException("Error occurred while retrieving data source connection", e); + } + } + return currentConnection.get(); + } + + public static void commitTransaction() throws DBConnectionException { + try { + java.sql.Connection conn = currentConnection.get(); + if (conn != null) { + conn.commit(); + } else { + if (log.isDebugEnabled()) { + log.debug("Datasource connection associated with the current thread is null, hence commit " + + "has not been attempted"); + } + } + } catch (java.sql.SQLException e) { + throw new DBConnectionException("Error occurred while committing the transaction", e); + } + } + + public static void closeConnection() { + java.sql.Connection conn = currentConnection.get(); + try { + if (conn != null) { + conn.close(); + } + } catch (java.sql.SQLException e) { + log.error("Error occurred while close the connection"); + } + currentConnection.remove(); + } + + public static void rollbackTransaction() { + java.sql.Connection conn = currentConnection.get(); + if (conn == null) { + throw new org.wso2.carbon.device.mgt.common.exceptions.IllegalTransactionStateException("Database connection is not active. Hence, rollback is " + + "not attempted."); + } + try { + conn.rollback(); + } catch (java.sql.SQLException e) { + log.warn("Error occurred while roll-backing the transaction", e); + } + } + +} diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dao/DeviceEventsDAOImpl.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dao/DeviceEventsDAOImpl.java new file mode 100644 index 000000000..9bbd73613 --- /dev/null +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dao/DeviceEventsDAOImpl.java @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2018 - 2023 Entgra (Pvt) Ltd, Inc - All Rights Reserved. + * + * Unauthorised copying/redistribution of this file, via any medium is strictly prohibited. + * + * Licensed under the Entgra Commercial License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://entgra.io/licenses/entgra-commercial/1.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.dao; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.dto.SensorRecord; +import org.wso2.carbon.device.mgt.common.exceptions.*; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.LinkedHashMap; +import java.util.Map; +/** + * Implements MobileDeviceDAO for Android Devices. + */ +public class DeviceEventsDAOImpl implements DeviceEventsDAO { + + private static final Log log = LogFactory.getLog(DeviceEventsDAOImpl.class); + + @Override + public SensorRecord getStats(String deviceId, long fromTime, long toTime) { + String sql = "SELECT * FROM TABLE_VIRTUALFIREALARM_CARBONSUPER_RDBMS_PUBLISHER WHERE " + + "META_DEVICEID = ? AND " + + "META_TIME >= ? AND " + + "META_TIME <= ? " + + "ORDER BY META_TIME ASC"; + Map stats = new LinkedHashMap<>(); + try { + DeviceEventsDAOFactory.init("jdbc/EVENT_DB"); + Connection conn = DeviceEventsDAOFactory.getConnection(); + try (PreparedStatement stmt = conn.prepareStatement(sql)) { + stmt.setString(1, deviceId); + stmt.setLong(2, fromTime); + stmt.setLong(3, toTime); + try (ResultSet rs = stmt.executeQuery()) { + while (rs.next()) { + stats.put(rs.getLong("META_TIME"), rs.getFloat("TEMPERATURE")); + } + } + } catch (SQLException e) { + String msg = "Error occurred while retrieving device details"; + log.error(msg); + + } + } catch (DBConnectionException e) { + String msg = "Error occurred while obtaining DB connection to retrieve device details"; + log.error(msg); + + } +// stats.entrySet() +// .stream() +// .sorted(Map.Entry.comparingByKey()) +// .forEach(System.out::println); + return new SensorRecord(stats); + } + +} diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dto/SensorRecord.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dto/SensorRecord.java index e1f46d2d7..833851ea9 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dto/SensorRecord.java +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/dto/SensorRecord.java @@ -11,58 +11,23 @@ import java.util.Map; @XmlRootElement /** - * This stores sensor event data for android sense. + * This stores sensor event data for virtual fire alarm sense. */ @JsonIgnoreProperties(ignoreUnknown = true) public class SensorRecord { - @XmlElementWrapper(required = true, name = "values") - private Map values; + @XmlElementWrapper(required = true, name = "stats") + private Map stats; - /** The id. */ - @XmlElement(required = false, name = "id") - private String id; - - /** - * Gets the values. - * @return the values - */ - public Map getValues() { - return values; - } - - /** - * Sets the values. - * @param values the values - */ - public void setValues(Map values) { - this.values = values; + public Map getStats() { + return stats; } - /** - * Sets the id. - * @param id the new id - */ - public void setId(String id) { - this.id = id; + public void setStats(Map stats) { + this.stats = stats; } - /** - * Gets the id. - * @return the id - */ - public String getId() { - return id; + public SensorRecord(Map stats) { + this.stats = stats; } - - @Override - public String toString(){ - List valueList = new ArrayList(); - for (Map.Entry entry : values.entrySet()) { - valueList.add(entry.getKey() + ":" + entry.getValue()); - } - return valueList.toString(); - - } - } diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java index bbcf1acef..cc31583e1 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/APIUtil.java @@ -2,27 +2,13 @@ package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.wso2.carbon.analytics.api.AnalyticsDataAPI; -import org.wso2.carbon.analytics.api.AnalyticsDataAPIUtil; -import org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse; -import org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry; -import org.wso2.carbon.analytics.dataservice.commons.SortByField; -import org.wso2.carbon.analytics.datasource.commons.Record; -import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException; import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService; -import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationService; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfigurationManagementService; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.dto.SensorRecord; import org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - /** * This class provides utility functions used by REST-API. */ @@ -52,81 +38,6 @@ public class APIUtil { return deviceManagementProviderService; } - public static AnalyticsDataAPI getAnalyticsDataAPI() { - PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); - AnalyticsDataAPI analyticsDataAPI = - (AnalyticsDataAPI) ctx.getOSGiService(AnalyticsDataAPI.class, null); - if (analyticsDataAPI == null) { - String msg = "Analytics api service has not initialized."; - log.error(msg); - throw new IllegalStateException(msg); - } - return analyticsDataAPI; - } - - public static List getAllEventsForDevice(String tableName, String query, - List sortByFields) throws AnalyticsException { - int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); - AnalyticsDataAPI analyticsDataAPI = getAnalyticsDataAPI(); - int eventCount = analyticsDataAPI.searchCount(tenantId, tableName, query); - if (eventCount == 0) { - return null; - } - List resultEntries = analyticsDataAPI.search(tenantId, tableName, query, 0, eventCount, - sortByFields); - List recordIds = getRecordIds(resultEntries); - AnalyticsDataResponse response = analyticsDataAPI.get(tenantId, tableName, 1, null, recordIds); - Map sensorDatas = createSensorData(AnalyticsDataAPIUtil.listRecords( - analyticsDataAPI, response)); - List sortedSensorData = getSortedSensorData(sensorDatas, resultEntries); - return sortedSensorData; - } - - private static List getRecordIds(List searchResults) { - List ids = new ArrayList<>(); - for (SearchResultEntry searchResult : searchResults) { - ids.add(searchResult.getId()); - } - return ids; - } - - public static List getSortedSensorData(Map sensorDatas, - List searchResults) { - List sortedRecords = new ArrayList<>(); - for (SearchResultEntry searchResultEntry : searchResults) { - sortedRecords.add(sensorDatas.get(searchResultEntry.getId())); - } - return sortedRecords; - } - - /** - * Creates the SensorDatas from records. - * - * @param records the records - * @return the Map of SensorRecord - */ - public static Map createSensorData(List records) { - Map sensorDatas = new HashMap<>(); - for (Record record : records) { - SensorRecord sensorData = createSensorData(record); - sensorDatas.put(sensorData.getId(), sensorData); - } - return sensorDatas; - } - - /** - * Create a SensorRecord object out of a Record object - * - * @param record the record object - * @return SensorRecord object - */ - public static SensorRecord createSensorData(Record record) { - SensorRecord recordBean = new SensorRecord(); - recordBean.setId(record.getId()); - recordBean.setValues(record.getValues()); - return recordBean; - } - public static APIManagementProviderService getAPIManagementProviderService() { PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); APIManagementProviderService apiManagementProviderService = diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java index 496d5eb5a..ed05d03c6 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/util/ZipUtil.java @@ -25,7 +25,7 @@ import org.apache.commons.logging.LogFactory; import org.json.JSONObject; import org.wso2.carbon.apimgt.application.extension.constants.ApiApplicationConstants; import org.wso2.carbon.core.util.Utils; -import org.wso2.carbon.device.mgt.common.DeviceManagementException; +import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; @@ -72,7 +72,7 @@ public class ZipUtil { String iotServerIP; try { - iotServerIP = getServerUrl(); + iotServerIP = "127.0.0.1"; //getServerUrl(); String httpsServerEP = Utils.replaceSystemProperty(HTTPS_PROTOCOL_URL); String httpServerEP = Utils.replaceSystemProperty(HTTP_PROTOCOL_URL); String mqttEndpoint = Utils.replaceSystemProperty(DEFAULT_MQTT_ENDPOINT); diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/webapp/META-INF/webapp-classloading.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/webapp/META-INF/webapp-classloading.xml index fa4461919..7fc571bef 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/webapp/META-INF/webapp-classloading.xml +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/webapp/META-INF/webapp-classloading.xml @@ -29,5 +29,5 @@ Tomcat environment is the default and every webapps gets it even if they didn't specify it. e.g. If a webapps requires CXF, they will get both Tomcat and CXF. --> - CXF,Carbon + CXF3,Carbon diff --git a/components/device-types/virtual-fire-alarm-plugin/pom.xml b/components/device-types/virtual-fire-alarm-plugin/pom.xml new file mode 100644 index 000000000..086689116 --- /dev/null +++ b/components/device-types/virtual-fire-alarm-plugin/pom.xml @@ -0,0 +1,59 @@ + + + + + + + org.wso2.carbon.devicemgt-plugins + device-types + 6.0.16-SNAPSHOT + ../pom.xml + + + 4.0.0 + virtual-fire-alarm-plugin + pom + WSO2 Carbon - Virtual Fire Alarm Plugin + http://wso2.org + + + org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl + org.wso2.carbon.device.mgt.iot.virtualfirealarm.api + + + + + + + org.apache.felix + maven-scr-plugin + 1.7.2 + + + generate-scr-scrdescriptor + + scr + + + + + + + + diff --git a/features/device-types-feature/pom.xml b/features/device-types-feature/pom.xml new file mode 100644 index 000000000..80dee946e --- /dev/null +++ b/features/device-types-feature/pom.xml @@ -0,0 +1,39 @@ + + + + + + + org.wso2.carbon.devicemgt-plugins + carbon-device-mgt-plugins-parent + 6.0.16-SNAPSHOT + ../../pom.xml + + + 4.0.0 + device-types-feature + pom + WSO2 Carbon - Device Management IoT Plugins Feature + http://wso2.org + + + virtual-fire-alarm-plugin-feature + + + diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml new file mode 100644 index 000000000..12b505e63 --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml @@ -0,0 +1,157 @@ + + + + + + + + org.wso2.carbon.devicemgt-plugins + virtual-fire-alarm-plugin-feature + 6.0.16-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature + pom + WSO2 Carbon - IoT Server VirtualFireAlarm Backend Feature + http://wso2.org + This feature contains the VirtualFireAlarm Device type specific backend implementations for the IoT Server + + + + + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.virtualfirealarm.api + ${carbon.devicemgt.plugins.version} + war + + + org.wso2.orbit.com.h2database + h2 + ${orbit.h2.version} + + + + + + + maven-resources-plugin + + + copy-resources + generate-resources + + copy-resources + + + src/main/resources + + + resources + + build.properties + p2.inf + + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + copy-jaxrs-war + package + + copy + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.virtualfirealarm.api + + war + true + ${project.build.directory}/maven-shared-archive-resources/webapps/ + virtual_firealarm.war + + + + + + copy-agent-jar + package + + copy + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl + + true + ${project.build.directory}/maven-shared-archive-resources/agent/ + wso2-firealarm-virtual-agent.jar + + + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + p2-feature-generation + package + + p2-feature-gen + + + org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend + ../../../features/etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + org.eclipse.equinox.p2.type.group:true + + + + + + + + + + diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/deviceConfig.properties b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/deviceConfig.properties new file mode 100644 index 000000000..80bee115a --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/deviceConfig.properties @@ -0,0 +1,34 @@ +# +# Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +#[Device-Configurations] +tenantDomain=${TENANT_DOMAIN} +owner=${DEVICE_OWNER} +deviceId=${DEVICE_ID} +device-name=${DEVICE_NAME} +https-ep=${HTTPS_EP} +http-ep=${HTTP_EP} +apim-ep=${APIM_EP} +mqtt-ep=${MQTT_EP} +xmpp-ep=${XMPP_EP} +application-key=${API_APPLICATION_KEY} +auth-token=${DEVICE_TOKEN} +refresh-token=${DEVICE_REFRESH_TOKEN} +push-interval=15 +xmpp-server-name=${SERVER_NAME} +server-jid=${SERVER_JID} + diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/sketch.properties b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/sketch.properties new file mode 100644 index 000000000..801bd88de --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/sketch.properties @@ -0,0 +1,2 @@ +templates=deviceConfig.properties +zipfilename=FireAlarmVirtualAgent.zip diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/start-device.bat b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/start-device.bat new file mode 100755 index 000000000..f19520f14 --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/start-device.bat @@ -0,0 +1,7 @@ +@echo off +echo. +echo.WSO2 IOT Sample +echo.Virtual Fire Alarm +echo.initializing agent +echo. +java -jar wso2-firealarm-virtual-agent.jar \ No newline at end of file diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/start-device.sh b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/start-device.sh new file mode 100755 index 000000000..37853c9b1 --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/start-device.sh @@ -0,0 +1,190 @@ +#!/bin/bash + +echo "----------------------------------------------------------------" +echo "| WSO2 IOT Sample " +echo "| Virtual RaspiAlarm " +echo "| ---------------- " +echo "| ....initializing startup-script " +echo "----------------------------------------------------------------" + +#while true; do +# read -p "What is the network-interface of your device that the Agent should use (find from ifconfig. ex: wlan0,en0,eth0..) > " interface +# +# echo "Setting the network-interface to " $interface +# sed s/^network-interface=.*/network-interface=$interface/ deviceConfig.properties > myTmp +# mv -f myTmp deviceConfig.properties +# break; +#done +# +#while true; do +# read -p "Whats the time-interval (in seconds) between successive Data-Pushes to the WSO2-IoT-Server (ex: '60' indicates 1 minute) > " interval +# +# if [ $interval -eq $interval 2>/dev/null ] +# then +# echo "Setting data-push interval to " $interval " seconds." +# sed s/^push-interval=.*/push-interval=$interval/ deviceConfig.properties > myTmp +# mv -f myTmp deviceConfig.properties +# break; +# else +# echo "Input needs to be an integer indicating the number seconds between successive data-pushes." +# fi +#done + + +java -jar wso2-firealarm-virtual-agent.jar + +#while true; do +# read -p "Do you wish to run 'apt-get update' and continue? [Yes/No] " yn +# case $yn in +# [Yy]* ) sudo apt-get update; +# break;; +# [Nn]* ) echo "Continuing without apt-get update..."; +# break;; +# * ) echo "Please answer yes or no."; +# esac +#done +# +#if [ $? -ne 0 ]; then +# echo "apt-get update failed.... Some dependencies may not get installed" +# echo "If an already installed version of the package exists, try running:" +# echo "----------------------------------------------------------------" +# echo "sudo -i" +# echo "cd /var/lib/dpkg/info" +# echo "rm -rf wso2-raspi-alarm*" +# echo "dpkg --remove --force-remove-reinstreq wso2-raspi-alarm" +# echo "exit" +# echo "----------------------------------------------------------------" +# echo "Retry Installation...." +# break; +#fi +# +#echo "Installing 'gdebi' package..." +#sudo apt-get install gdebi # installation of gdebi +# +# +#if [ $? -ne 0 ]; then +# echo "gdebi installation failed.... dependencies will not be installed without gdebi" +# read -p "Do you wish to continue without gdebi? [Yes/No] " yn +# case $yn in +# [Yy]* ) echo "Continueing without gdebi.....";; +# [Nn]* ) echo "Try to resolve errors and re-run the script."; +# exit;; +# * ) exit;; +# esac +#fi +# +# +#for f in ./wso2-raspi-alarm_1.0_armhf.deb; do +# ## Check if the glob gets expanded to existing files. +# ## If not, f here will be exactly the pattern above +# ## and the exists test will evaluate to false. +# # [ -e "$f" ] && echo "'wso2-raspi-alarm_1.0_armhf.deb' file found and installing" || echo "'wso2-raspi-alarm_1.0_armhf.deb' file does not exist in current path"; exit; +# if [ -e "$f" ]; then +# echo "'wso2-raspi-alarm_1.0_armhf.deb' file found and installing now...." +# else +# echo "'wso2-raspi-alarm_1.0_armhf.deb' file does not exist in current path. \nExiting installation..."; +# exit; +# fi +# ## This is all we needed to know, so we can break after the first iteration +# break +#done +# +#echo "Installing the 'wso2-raspi-alarm deb package'" +#sudo gdebi wso2-raspi-alarm_1.0_armhf.deb +# +#if [ $? -ne 0 ]; then +# echo "Installation Failed...." +# exit; +#fi + +#sudo killall -9 python +# +#for f in ./RaspberryAgent.zip; do +# ## Check if the glob gets expanded to existing files. +# ## If not, f here will be exactly the pattern above +# ## and the exists test will evaluate to false. +# # [ -e "$f" ] && echo "'wso2-raspi-alarm_1.0_armhf.deb' file found and installing" || echo "'wso2-raspi-alarm_1.0_armhf.deb' file does not exist in current path"; exit; +# if [ -e "$f" ]; then +# echo "Agent files found......" +# sudo rm -rf /usr/local/src/RaspberryAgent +# sudo unzip RaspberryAgent.zip -d /usr/local/src/ +# else +# echo "'RaspberryAgent.zip' file does not exist in current path. \nInstalling without upgrading agent..."; +# fi +# ## This is all we needed to know, so we can break after the first iteration +# break +#done +# +#for f in /usr/local/src/RaspberryAgent/rc.local; do +# ## Check if the glob gets expanded to existing files. +# ## If not, f here will be exactly the pattern above +# ## and the exists test will evaluate to false. +# if [ -e "$f" ]; then +# echo "Copying boot script" +# sudo mv /usr/local/src/RaspberryAgent/rc.local /etc/rc.local +# sudo chmod +x /etc/rc.local +# else +# echo "Unable to set agent statup on boot"; +# fi +# ## This is all we needed to know, so we can break after the first iteration +# break +#done +# +#for f in ./deviceConfigs.cfg; do +# ## Check if the glob gets expanded to existing files. +# ## If not, f here will be exactly the pattern above +# ## and the exists test will evaluate to false. +# if [ -e "$f" ]; then +# echo "Configuration file found......" +# else +# echo "'deviceConfigs.cfg' file does not exist in current path. \nExiting installation..."; +# exit; +# fi +# ## This is all we needed to know, so we can break after the first iteration +# break +#done +# +#echo "Altering Configuration file" +#sed -i 's|[/,]||g' deviceConfigs.cfg +# +#echo "Copying configurations file to /usr/local/src/RaspberryAgent" +#sudo cp ./deviceConfigs.cfg /usr/local/src/RaspberryAgent/ +# +#if [ $? -ne 0 ]; then +# echo "Copying configuration file failed...." +# exit; +#fi +# +#while true; do +# read -p "Whats the time-interval (in seconds) between successive Data-Pushes to the WSO2-DC (ex: '60' indicates 1 minute) > " input +# +# if [ $input -eq $input 2>/dev/null ] +# then +# echo "Setting data-push interval to $input seconds." +# echo $input > /usr/local/src/RaspberryAgent/time-interval +# break; +# else +# echo "Input needs to be an integer indicating the number seconds between successive data-pushes." +# fi +#done +# +#cd /usr/local/src/RaspberryAgent/ +#sudo chmod +x RaspberryStats.py +#sudo nohup ./RaspberryStats.py -i $input ~|d-uF1FtA4GnHpFE6m?<$jZRn*vnwh*vZt`$S`I3FVSmX=Y0P1 z#8IPRua(}0Gv|!k*05(R-L`jvR?qY9X;a1Cn|?Uur#nge!)A4V)1^~pzt7+cWMI$C zahUzPpS5>G+$Cwbz{{0#bM)ubAC5j2Q;_}Sd6AXXuH7vg)?c0YcE^JilQ@e1u)J

Rd_Z+cf2pnXKsRr`tWWWK{TXH#K@FtlY7J=Tv9%<8+6* F4*;FQ(GLIs literal 0 HcmV?d00001 diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/build.properties b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/build.properties new file mode 100644 index 000000000..9c86577d7 --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/build.properties @@ -0,0 +1 @@ +custom = true diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/devicetypes/virtual_firealarm.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/devicetypes/virtual_firealarm.xml new file mode 100644 index 000000000..55196f13f --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/devicetypes/virtual_firealarm.xml @@ -0,0 +1,58 @@ + + + + + + + Control buzzer + Control buzzer on Virtual Firealarm + + + + + + + true + + + + true + + + + + + + + + + + + + + + + + + en_US + 1.0.0 + This is license text + + + \ No newline at end of file diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/p2.inf b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/p2.inf new file mode 100644 index 000000000..1656f09da --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/p2.inf @@ -0,0 +1,16 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/receiver/,target:${installFolder}/../../../repository/deployment/server/eventreceivers/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/streams/,target:${installFolder}/../../../repository/deployment/server/eventstreams/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/publisher/,target:${installFolder}/../../../repository/deployment/server/eventpublishers/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/virtual_firealarm/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/virtual_firealarm/,overwrite:true);\ + +instructions.unconfigure = \ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/virtual_firealarm.war);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/virtual_firealarm);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/virtual_firealarm.xml);\ diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/publisher/virtual_firealam_rdbms_publisher-carbon.super.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/publisher/virtual_firealam_rdbms_publisher-carbon.super.xml new file mode 100644 index 000000000..39cd6d4cf --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/publisher/virtual_firealam_rdbms_publisher-carbon.super.xml @@ -0,0 +1,13 @@ + + + + + + EVENT_DB + table_virtualfirealarm_carbonsuper_rdbms_publisher + insert + + + + diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/receiver/virtualfirealarm_receiver.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/receiver/virtualfirealarm_receiver.xml new file mode 100644 index 000000000..1deea34dd --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/receiver/virtualfirealarm_receiver.xml @@ -0,0 +1,29 @@ + + + + + + carbon.super/virtual_firealarm/+/temperature + default + true + + + + + diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/streams/iot.per.device.stream.virtualfirealarm_1.0.0.json b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/streams/iot.per.device.stream.virtualfirealarm_1.0.0.json new file mode 100644 index 000000000..751c13824 --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/streams/iot.per.device.stream.virtualfirealarm_1.0.0.json @@ -0,0 +1,16 @@ +{ + "name": "iot.per.device.stream.virtualfirealarm", + "version": "1.0.0", + "nickName": "virtual_firealarm", + "description": "Temperature data received from the virtual_firealarm", + "metaData": [ + {"name":"owner","type":"STRING"}, + {"name":"deviceId","type":"STRING"}, + {"name":"time","type":"TIMESTAMP"} + ], + "payloadData": [ + { + "name": "temperature","type": "FLOAT" + } + ] +} \ No newline at end of file diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/pom.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/pom.xml new file mode 100644 index 000000000..81b17d129 --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/pom.xml @@ -0,0 +1,39 @@ + + + + + + + org.wso2.carbon.devicemgt-plugins + device-types-feature + 6.0.16-SNAPSHOT + ../pom.xml + + + 4.0.0 + virtual-fire-alarm-plugin-feature + pom + WSO2 Carbon - IoT Server VirtualFireAlarm Device Feature + http://wso2.org + + + org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature + + + diff --git a/pom.xml b/pom.xml index 196acd4f5..aabd1f6c1 100644 --- a/pom.xml +++ b/pom.xml @@ -37,10 +37,12 @@ components/extensions components/mobile-plugins + components/device-types features/analytics-feature features/mobile-plugins-feature features/extensions-feature + features/device-types-feature @@ -491,6 +493,16 @@ org.wso2.carbon.device.mgt.mobile.android.api ${carbon.devicemgt.plugins.version} + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.virtualfirealarm.api + ${carbon.devicemgt.plugins.version} + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl + ${carbon.devicemgt.plugins.version} +