From 39097abcece220c6ba01b4272cc865b5bc4040eb Mon Sep 17 00:00:00 2001 From: ayyoob Date: Tue, 9 May 2017 16:11:09 +0530 Subject: [PATCH] set default value for mqtt input adapter --- .../mgt/input/adapter/mqtt/MQTTEventAdapterFactory.java | 2 +- .../mgt/output/adapter/mqtt/MQTTEventAdapterFactory.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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/MQTTEventAdapterFactory.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/MQTTEventAdapterFactory.java index f5f93b17a7..0419d26ebe 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/MQTTEventAdapterFactory.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/MQTTEventAdapterFactory.java @@ -120,7 +120,7 @@ public class MQTTEventAdapterFactory extends InputEventAdapterFactory { // set clientId Property clientId = new Property(MQTTEventAdapterConstants.ADAPTER_CONF_CLIENTID); clientId.setDisplayName(resourceBundle.getString(MQTTEventAdapterConstants.ADAPTER_CONF_CLIENTID)); - clientId.setRequired(false); + clientId.setRequired(true); clientId.setHint(resourceBundle.getString(MQTTEventAdapterConstants.ADAPTER_CONF_CLIENTID_HINT)); propertyList.add(clientId); diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/MQTTEventAdapterFactory.java b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/MQTTEventAdapterFactory.java index 1c8cd43de2..b3351234f6 100644 --- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/MQTTEventAdapterFactory.java +++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/MQTTEventAdapterFactory.java @@ -90,9 +90,9 @@ public class MQTTEventAdapterFactory extends OutputEventAdapterFactory { // set Quality of Service Property qos = new Property(MQTTEventAdapterConstants.ADAPTER_MESSAGE_QOS); qos.setDisplayName(resourceBundle.getString(MQTTEventAdapterConstants.ADAPTER_MESSAGE_QOS)); - qos.setRequired(true); + qos.setRequired(false); qos.setOptions(new String[]{"0", "1", "2"}); - qos.setDefaultValue("1"); + qos.setDefaultValue("2"); staticPropertyList.add(brokerUrl); staticPropertyList.add(userName);