From d0183deb2ad2dffa861dff45284b51fe8e210252 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Fri, 13 May 2016 02:54:21 +0530 Subject: [PATCH 1/3] few changes in event recievers and remove type and method from feature --- .../EventReceiver_ConnectedCup.xml | 13 ++++++------- .../resources/carbonapps/ConnectedCup/artifacts.xml | 2 +- .../api/ConnectedCupControllerService.java | 3 +-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/ConnectedCup/EventReceiver_ConnectedCup_1.0.0/EventReceiver_ConnectedCup.xml b/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/ConnectedCup/EventReceiver_ConnectedCup_1.0.0/EventReceiver_ConnectedCup.xml index 94c1c435..6dbe5218 100644 --- a/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/ConnectedCup/EventReceiver_ConnectedCup_1.0.0/EventReceiver_ConnectedCup.xml +++ b/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/ConnectedCup/EventReceiver_ConnectedCup_1.0.0/EventReceiver_ConnectedCup.xml @@ -17,17 +17,16 @@ ~ under the License. --> - + - wso2/carbon.super/connectedcup/# + carbon.super/connectedcup/# admin device_id_json_path:event.metaData.deviceId,device_id_topic_hierarchy_index:3 - default - https://localhost:9443/dynamic-client-web/register - tcp://localhost:1883 + org.wso2.carbon.device.mgt.iot.input.adapter.mqtt.util.MQTTContentValidator + https://localhost:${carbon.https.port}/dynamic-client-web/register + tcp://${mqtt.broker.host}:${mqtt.broker.port} true - - + \ No newline at end of file diff --git a/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/ConnectedCup/artifacts.xml b/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/ConnectedCup/artifacts.xml index 86306d71..a4c1a87e 100644 --- a/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/ConnectedCup/artifacts.xml +++ b/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/ConnectedCup/artifacts.xml @@ -20,7 +20,7 @@ - + diff --git a/modules/samples/connectedcup/component/api/src/main/java/org/coffeeking/api/ConnectedCupControllerService.java b/modules/samples/connectedcup/component/api/src/main/java/org/coffeeking/api/ConnectedCupControllerService.java index f89a405e..a41d44e2 100644 --- a/modules/samples/connectedcup/component/api/src/main/java/org/coffeeking/api/ConnectedCupControllerService.java +++ b/modules/samples/connectedcup/component/api/src/main/java/org/coffeeking/api/ConnectedCupControllerService.java @@ -39,8 +39,7 @@ public interface ConnectedCupControllerService { @Path("device/ordercoffee") @POST - @Feature(code = "ordercoffee", name = "Order Coffee", type = "control", - description = "Order coffee cup") + @Feature(code = "ordercoffee", name = "Order Coffee", description = "Order coffee cup") Response orderCoffee(@QueryParam("deviceId") String deviceId); /** From 0b893ad64cfc74481fe678f0e2552a43c84b54e3 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Sat, 14 May 2016 11:11:50 +0530 Subject: [PATCH 2/3] refactored connected cup analytics scripts --- .../component/analytics/build.xml | 4 ++-- .../artifact.xml | 23 ------------------- .../artifacts.xml | 10 ++++---- .../coffee_level_receiver}/artifact.xml | 4 ++-- .../coffee_level_receiver.xml} | 2 +- .../coffee_level_script}/artifact.xml | 2 +- .../coffee_level_script.xml} | 2 +- .../coffee_level_store}/artifact.xml | 2 +- .../org_wso2_iot_devices_coffeelevel.xml | 0 .../coffee_level_stream}/artifact.xml | 2 +- ...rg.wso2.iot.devices.coffeelevel_1.0.0.json | 0 .../artifacts.xml | 13 ++++------- .../connected_cup_execution}/artifact.xml | 5 ++-- .../connected_cup_execution.siddhiql} | 4 ++-- .../connected_cup_publisher}/artifact.xml | 4 ++-- .../connected_cup_publisher.xml} | 2 +- .../connected_cup_receiver/artifact.xml | 22 ++++++++++++++++++ .../connected_cup_receiver.xml} | 7 +++--- .../connected_cup_stream}/artifact.xml | 2 +- .../org.wso2.iot.connectedcup_1.0.0.json | 0 20 files changed, 54 insertions(+), 56 deletions(-) delete mode 100644 modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/ConnectedCup/EventExecution_ConnectedCup_1.0.0/artifact.xml rename modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/{ConnectedCup => coffee_level}/artifacts.xml (61%) rename modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/{CoffeeLevel_Sensor/Eventreceiver_coffeelevel_1.0.0 => coffee_level/coffee_level_receiver}/artifact.xml (82%) rename modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/{CoffeeLevel_Sensor/Eventreceiver_coffeelevel_1.0.0/EventReceiver_coffeelevel.xml => coffee_level/coffee_level_receiver/coffee_level_receiver.xml} (92%) rename modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/{CoffeeLevel_Sensor/Sparkscripts_1.0.0 => coffee_level/coffee_level_script}/artifact.xml (94%) rename modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/{CoffeeLevel_Sensor/Sparkscripts_1.0.0/CoffeeLevel_Sensor_Script.xml => coffee_level/coffee_level_script/coffee_level_script.xml} (97%) rename modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/{CoffeeLevel_Sensor/Eventstore_coffeelevel_1.0.0 => coffee_level/coffee_level_store}/artifact.xml (87%) rename modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/{CoffeeLevel_Sensor/Eventstore_coffeelevel_1.0.0 => coffee_level/coffee_level_store}/org_wso2_iot_devices_coffeelevel.xml (100%) rename modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/{CoffeeLevel_Sensor/Eventstream_coffeelevel_1.0.0 => coffee_level/coffee_level_stream}/artifact.xml (87%) rename modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/{CoffeeLevel_Sensor/Eventstream_coffeelevel_1.0.0 => coffee_level/coffee_level_stream}/org.wso2.iot.devices.coffeelevel_1.0.0.json (100%) rename modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/{CoffeeLevel_Sensor => connected_cup}/artifacts.xml (62%) rename modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/{ConnectedCup/EventPublisher_ConnectedCup_1.0.0 => connected_cup/connected_cup_execution}/artifact.xml (81%) rename modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/{ConnectedCup/EventExecution_ConnectedCup_1.0.0/EventExecution_ConnectedCup.siddhiql => connected_cup/connected_cup_execution/connected_cup_execution.siddhiql} (90%) rename modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/{ConnectedCup/EventReceiver_ConnectedCup_1.0.0 => connected_cup/connected_cup_publisher}/artifact.xml (81%) rename modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/{ConnectedCup/EventPublisher_ConnectedCup_1.0.0/EventPublisher_ConnectedCup.xml => connected_cup/connected_cup_publisher/connected_cup_publisher.xml} (87%) create mode 100644 modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/connected_cup/connected_cup_receiver/artifact.xml rename modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/{ConnectedCup/EventReceiver_ConnectedCup_1.0.0/EventReceiver_ConnectedCup.xml => connected_cup/connected_cup_receiver/connected_cup_receiver.xml} (72%) rename modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/{ConnectedCup/EventStream_ConnectedCup_1.0.0 => connected_cup/connected_cup_stream}/artifact.xml (87%) rename modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/{ConnectedCup/EventStream_ConnectedCup_1.0.0 => connected_cup/connected_cup_stream}/org.wso2.iot.connectedcup_1.0.0.json (100%) diff --git a/modules/samples/connectedcup/component/analytics/build.xml b/modules/samples/connectedcup/component/analytics/build.xml index 9f8b8850..89289868 100644 --- a/modules/samples/connectedcup/component/analytics/build.xml +++ b/modules/samples/connectedcup/component/analytics/build.xml @@ -23,8 +23,8 @@ - - + + diff --git a/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/ConnectedCup/EventExecution_ConnectedCup_1.0.0/artifact.xml b/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/ConnectedCup/EventExecution_ConnectedCup_1.0.0/artifact.xml deleted file mode 100644 index ea5b8630..00000000 --- a/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/ConnectedCup/EventExecution_ConnectedCup_1.0.0/artifact.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - EventExecution_ConnectedCup.siddhiql - - diff --git a/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/ConnectedCup/artifacts.xml b/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/artifacts.xml similarity index 61% rename from modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/ConnectedCup/artifacts.xml rename to modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/artifacts.xml index a4c1a87e..652aab82 100644 --- a/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/ConnectedCup/artifacts.xml +++ b/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/artifacts.xml @@ -18,10 +18,10 @@ --> - - - - - + + + + + diff --git a/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/CoffeeLevel_Sensor/Eventreceiver_coffeelevel_1.0.0/artifact.xml b/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_receiver/artifact.xml similarity index 82% rename from modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/CoffeeLevel_Sensor/Eventreceiver_coffeelevel_1.0.0/artifact.xml rename to modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_receiver/artifact.xml index ab46c07d..ef5b1648 100644 --- a/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/CoffeeLevel_Sensor/Eventreceiver_coffeelevel_1.0.0/artifact.xml +++ b/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_receiver/artifact.xml @@ -17,6 +17,6 @@ ~ under the License. --> - - EventReceiver_coffeelevel.xml + + coffee_level_receiver.xml diff --git a/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/CoffeeLevel_Sensor/Eventreceiver_coffeelevel_1.0.0/EventReceiver_coffeelevel.xml b/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_receiver/coffee_level_receiver.xml similarity index 92% rename from modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/CoffeeLevel_Sensor/Eventreceiver_coffeelevel_1.0.0/EventReceiver_coffeelevel.xml rename to modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_receiver/coffee_level_receiver.xml index f61865c5..ebe3b990 100644 --- a/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/CoffeeLevel_Sensor/Eventreceiver_coffeelevel_1.0.0/EventReceiver_coffeelevel.xml +++ b/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_receiver/coffee_level_receiver.xml @@ -17,7 +17,7 @@ ~ under the License. --> - false diff --git a/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/CoffeeLevel_Sensor/Sparkscripts_1.0.0/artifact.xml b/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_script/artifact.xml similarity index 94% rename from modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/CoffeeLevel_Sensor/Sparkscripts_1.0.0/artifact.xml rename to modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_script/artifact.xml index 0ed651a9..879a923d 100644 --- a/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/CoffeeLevel_Sensor/Sparkscripts_1.0.0/artifact.xml +++ b/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_script/artifact.xml @@ -18,5 +18,5 @@ --> - CoffeeLevel_Sensor_Script.xml + coffee_level_script.xml diff --git a/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/CoffeeLevel_Sensor/Sparkscripts_1.0.0/CoffeeLevel_Sensor_Script.xml b/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_script/coffee_level_script.xml similarity index 97% rename from modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/CoffeeLevel_Sensor/Sparkscripts_1.0.0/CoffeeLevel_Sensor_Script.xml rename to modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_script/coffee_level_script.xml index 84e3e693..f8f93781 100644 --- a/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/CoffeeLevel_Sensor/Sparkscripts_1.0.0/CoffeeLevel_Sensor_Script.xml +++ b/modules/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_script/coffee_level_script.xml @@ -18,7 +18,7 @@ --> - CoffeeLevel_Sensor_Script + coffee_level_script