Merge pull request #244 from ayyoob/3.0.0
IOTS-372 & IOTS-370 & Made plugins and sample pom to use the filter propertiesapplication-manager-new
@ -0,0 +1,29 @@
|
||||
<processor>
|
||||
<!-- Add input event adapter config element -->
|
||||
<add>
|
||||
<after>inputEventAdaptersConfig/adapterConfig[@type="jms"]</after>
|
||||
<value><![CDATA[<adapterConfig type="oauth-http">
|
||||
<property key="minThread">8</property>
|
||||
<property key="maxThread">100</property>
|
||||
<property key="keepAliveTimeInMillis">20000</property>
|
||||
<property key="jobQueueSize">10000</property>
|
||||
<property key="maximumHttpConnectionPerHost">2</property>
|
||||
<property key="maximumTotalHttpConnection">100</property>
|
||||
<property key="keymanagerUrl">https://${iot.keymanager.host}:${iot.keymanager.https.port}</property>
|
||||
<property key="username">admin</property>
|
||||
<property key="password">admin</property>
|
||||
</adapterConfig>
|
||||
|
||||
<adapterConfig type="oauth-mqtt">
|
||||
<!-- Thread Pool Related Properties -->
|
||||
<property key="minThread">8</property>
|
||||
<property key="maxThread">100</property>
|
||||
<property key="keepAliveTimeInMillis">20000</property>
|
||||
<property key="jobQueueSize">10000</property>
|
||||
<property key="connectionKeepAliveInterval">60</property>
|
||||
<property key="dcrUrl">https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register</property>
|
||||
<property key="tokenUrl">https://${iot.gateway.host}:${iot.gateway.https.port}/token</property>
|
||||
<property key="url">tcp://${mqtt.broker.host}:${mqtt.broker.port}</property>
|
||||
</adapterConfig>]]></value>
|
||||
</add>
|
||||
</processor>
|
@ -0,0 +1,40 @@
|
||||
<processor>
|
||||
<!-- Add outpu event adapter config element -->
|
||||
<add>
|
||||
<after>/outputEventAdaptersConfig/adapterConfig[@type="websocket"]</after>
|
||||
<value><![CDATA[<adapterConfig type="oauth-mqtt">
|
||||
<!-- Thread Pool Related Properties -->
|
||||
<property key="minThread">8</property>
|
||||
<property key="maxThread">100</property>
|
||||
<property key="keepAliveTimeInMillis">20000</property>
|
||||
<property key="jobQueueSize">10000</property>
|
||||
<property key="connectionKeepAliveInterval">60</property>
|
||||
<property key="dcrUrl">https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register</property>
|
||||
<property key="tokenUrl">https://${iot.gateway.host}:${iot.gateway.https.port}/token</property>
|
||||
<property key="url">tcp://${mqtt.broker.host}:${mqtt.broker.port}</property>
|
||||
</adapterConfig>
|
||||
|
||||
<adapterConfig type="secured-websocket">
|
||||
<!-- Thread Pool Related Properties -->
|
||||
<property key="minThread">8</property>
|
||||
<property key="maxThread">100</property>
|
||||
<property key="keepAliveTimeInMillis">20000</property>
|
||||
<property key="jobQueueSize">10000</property>
|
||||
<!--Authorizer holds the information of the authorizer that is used authorize a connection.-->
|
||||
<property key="authenticator">org.wso2.carbon.device.mgt.output.adapter.websocket.authentication.OAuthAuthenticator</property>
|
||||
<property key="keymanagerUrl">https://${iot.keymanager.host}:${iot.keymanager.https.port}</property>
|
||||
<property key="maximumHttpConnectionPerHost">2</property>
|
||||
<property key="maximumTotalHttpConnection">100</property>
|
||||
<property key="authorizer">org.wso2.carbon.device.mgt.output.adapter.websocket.authorization.DeviceAuthorizer</property>
|
||||
<property key="tokenUrl">https://${iot.gateway.host}:${iot.gateway.https.port}/token</property>
|
||||
<property key="deviceMgtServerUrl">https://${iot.core.host}:${iot.core.https.port}</property>
|
||||
<property key="username">admin</property>
|
||||
<property key="password">admin</property>
|
||||
<property key="scopes"></property>
|
||||
<!--websocket connection permissions which are validated for grouping (can have multiple permission.)-->
|
||||
<property key="statsPermission">/permission/device-mgt/realtime_analytics</property>
|
||||
<!--offset time from expiry time to trigger refresh call (in seconds)-->
|
||||
<property key="tokenRefreshTimeOffset">100</property>
|
||||
</adapterConfig>]]></value>
|
||||
</add>
|
||||
</processor>
|
@ -0,0 +1,29 @@
|
||||
<processor>
|
||||
<!-- Add input event adapter config element -->
|
||||
<add>
|
||||
<after>inputEventAdaptersConfig/adapterConfig[@type="jms"]</after>
|
||||
<value><![CDATA[<adapterConfig type="oauth-http">
|
||||
<property key="minThread">8</property>
|
||||
<property key="maxThread">100</property>
|
||||
<property key="keepAliveTimeInMillis">20000</property>
|
||||
<property key="jobQueueSize">10000</property>
|
||||
<property key="maximumHttpConnectionPerHost">2</property>
|
||||
<property key="maximumTotalHttpConnection">100</property>
|
||||
<property key="keymanagerUrl">https://${iot.keymanager.host}:${iot.keymanager.https.port}</property>
|
||||
<property key="username">admin</property>
|
||||
<property key="password">admin</property>
|
||||
</adapterConfig>
|
||||
|
||||
<adapterConfig type="oauth-mqtt">
|
||||
<!-- Thread Pool Related Properties -->
|
||||
<property key="minThread">8</property>
|
||||
<property key="maxThread">100</property>
|
||||
<property key="keepAliveTimeInMillis">20000</property>
|
||||
<property key="jobQueueSize">10000</property>
|
||||
<property key="connectionKeepAliveInterval">60</property>
|
||||
<property key="dcrUrl">https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register</property>
|
||||
<property key="tokenUrl">https://${iot.gateway.host}:${iot.gateway.https.port}/token</property>
|
||||
<property key="url">tcp://${mqtt.broker.host}:${mqtt.broker.port}</property>
|
||||
</adapterConfig>]]></value>
|
||||
</add>
|
||||
</processor>
|
@ -0,0 +1,40 @@
|
||||
<processor>
|
||||
<!-- Add outpu event adapter config element -->
|
||||
<add>
|
||||
<after>/outputEventAdaptersConfig/adapterConfig[@type="websocket"]</after>
|
||||
<value><![CDATA[<adapterConfig type="oauth-mqtt">
|
||||
<!-- Thread Pool Related Properties -->
|
||||
<property key="minThread">8</property>
|
||||
<property key="maxThread">100</property>
|
||||
<property key="keepAliveTimeInMillis">20000</property>
|
||||
<property key="jobQueueSize">10000</property>
|
||||
<property key="connectionKeepAliveInterval">60</property>
|
||||
<property key="dcrUrl">https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register</property>
|
||||
<property key="tokenUrl">https://${iot.gateway.host}:${iot.gateway.https.port}/token</property>
|
||||
<property key="url">tcp://${mqtt.broker.host}:${mqtt.broker.port}</property>
|
||||
</adapterConfig>
|
||||
|
||||
<adapterConfig type="secured-websocket">
|
||||
<!-- Thread Pool Related Properties -->
|
||||
<property key="minThread">8</property>
|
||||
<property key="maxThread">100</property>
|
||||
<property key="keepAliveTimeInMillis">20000</property>
|
||||
<property key="jobQueueSize">10000</property>
|
||||
<!--Authorizer holds the information of the authorizer that is used authorize a connection.-->
|
||||
<property key="authenticator">org.wso2.carbon.device.mgt.output.adapter.websocket.authentication.OAuthAuthenticator</property>
|
||||
<property key="keymanagerUrl">https://${iot.keymanager.host}:${iot.keymanager.https.port}</property>
|
||||
<property key="maximumHttpConnectionPerHost">2</property>
|
||||
<property key="maximumTotalHttpConnection">100</property>
|
||||
<property key="authorizer">org.wso2.carbon.device.mgt.output.adapter.websocket.authorization.DeviceAuthorizer</property>
|
||||
<property key="tokenUrl">https://${iot.gateway.host}:${iot.gateway.https.port}/token</property>
|
||||
<property key="deviceMgtServerUrl">https://${iot.core.host}:${iot.core.https.port}</property>
|
||||
<property key="username">admin</property>
|
||||
<property key="password">admin</property>
|
||||
<property key="scopes"></property>
|
||||
<!--websocket connection permissions which are validated for grouping (can have multiple permission.)-->
|
||||
<property key="statsPermission">/permission/device-mgt/realtime_analytics</property>
|
||||
<!--offset time from expiry time to trigger refresh call (in seconds)-->
|
||||
<property key="tokenRefreshTimeOffset">100</property>
|
||||
</adapterConfig>]]></value>
|
||||
</add>
|
||||
</processor>
|
@ -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.coffeeking.api;
|
||||
|
||||
import org.wso2.carbon.apimgt.annotations.api.API;
|
||||
import org.wso2.carbon.apimgt.annotations.api.Permission;
|
||||
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.Consumes;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
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;
|
||||
|
||||
@API(name = "connectedcup", version = "1.0.0", context = "/connectedcup", tags = {"connectedcup"})
|
||||
@DeviceType(value = "connectedcup")
|
||||
public interface ConnectedCupService {
|
||||
|
||||
@Path("device/ordercoffee")
|
||||
@POST
|
||||
@Feature(code = "ordercoffee", name = "Order Coffee", description = "Order coffee cup")
|
||||
//@Permission(scope = "connectedcup_user", permissions = {"/permission/admin/device-mgt/user/operations"})
|
||||
Response orderCoffee(@QueryParam("deviceId") String deviceId);
|
||||
|
||||
/**
|
||||
* Retrieve Sensor data for the device type
|
||||
*/
|
||||
@Path("stats/{deviceId}/sensors/{sensorName}")
|
||||
@GET
|
||||
@Consumes("application/json")
|
||||
@Produces("application/json")
|
||||
//@Permission(scope = "connectedcup_user", permissions = {"/permission/admin/device-mgt/user/stats"})
|
||||
Response getDeviceStats(@PathParam("deviceId") String deviceId, @PathParam("sensorName") String sensor,
|
||||
@QueryParam("from") long from, @QueryParam("to") long to);
|
||||
|
||||
@Path("device/register")
|
||||
@POST
|
||||
//@Permission(scope = "connectedcup_user", permissions = {"/permission/admin/device-mgt/user/devices"})
|
||||
boolean register(@QueryParam("name") String name);
|
||||
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<DeviceManagementConfiguration>
|
||||
<DeviceType>connectedcup</DeviceType>
|
||||
|
||||
<ManagementRepository>
|
||||
<DeviceDefinition>
|
||||
<License>
|
||||
<Language>en_US</Language>
|
||||
<Version>1.0.0</Version>
|
||||
<Text>This is license text</Text>
|
||||
</License>
|
||||
<!--if generate is set to true then the feature information will be picked up from the annotation in the api-->
|
||||
<Features generate="true"/>
|
||||
</DeviceDefinition>
|
||||
|
||||
<ProvisioningConfig>
|
||||
<SharedWithAllTenants>false</SharedWithAllTenants>
|
||||
</ProvisioningConfig>
|
||||
</ManagementRepository>
|
||||
</DeviceManagementConfiguration>
|
0
modules/core/distribution/src/samples/connectedcup/component/agent/src/main/java/org/coffeeking/agent/transport/mqtt/ConnectedCupMQttTransportHandler.java → modules/distribution/src/resources/samples/connectedcup/component/agent/src/main/java/org/coffeeking/agent/transport/mqtt/ConnectedCupMQttTransportHandler.java
0
modules/core/distribution/src/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_receiver/artifact.xml → modules/distribution/src/resources/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_receiver/artifact.xml
0
modules/core/distribution/src/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_receiver/coffee_level_receiver.xml → modules/distribution/src/resources/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_receiver/coffee_level_receiver.xml
0
modules/core/distribution/src/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_script/artifact.xml → modules/distribution/src/resources/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_script/artifact.xml
0
modules/core/distribution/src/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_script/coffee_level_script.xml → modules/distribution/src/resources/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_script/coffee_level_script.xml
0
modules/core/distribution/src/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_store/artifact.xml → modules/distribution/src/resources/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_store/artifact.xml
0
modules/core/distribution/src/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_store/org_wso2_iot_devices_coffeelevel.xml → modules/distribution/src/resources/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_store/org_wso2_iot_devices_coffeelevel.xml
0
modules/core/distribution/src/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_stream/artifact.xml → modules/distribution/src/resources/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_stream/artifact.xml
0
modules/core/distribution/src/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_stream/org.wso2.iot.devices.coffeelevel_1.0.0.json → modules/distribution/src/resources/samples/connectedcup/component/analytics/src/main/resources/carbonapps/coffee_level/coffee_level_stream/org.wso2.iot.devices.coffeelevel_1.0.0.json
0
modules/core/distribution/src/samples/connectedcup/component/analytics/src/main/resources/carbonapps/connected_cup/connected_cup_execution/artifact.xml → modules/distribution/src/resources/samples/connectedcup/component/analytics/src/main/resources/carbonapps/connected_cup/connected_cup_execution/artifact.xml
0
modules/core/distribution/src/samples/connectedcup/component/analytics/src/main/resources/carbonapps/connected_cup/connected_cup_execution/connected_cup_execution.siddhiql → modules/distribution/src/resources/samples/connectedcup/component/analytics/src/main/resources/carbonapps/connected_cup/connected_cup_execution/connected_cup_execution.siddhiql
0
modules/core/distribution/src/samples/connectedcup/component/analytics/src/main/resources/carbonapps/connected_cup/connected_cup_publisher/artifact.xml → modules/distribution/src/resources/samples/connectedcup/component/analytics/src/main/resources/carbonapps/connected_cup/connected_cup_publisher/artifact.xml
0
modules/core/distribution/src/samples/connectedcup/component/analytics/src/main/resources/carbonapps/connected_cup/connected_cup_publisher/connected_cup_publisher.xml → modules/distribution/src/resources/samples/connectedcup/component/analytics/src/main/resources/carbonapps/connected_cup/connected_cup_publisher/connected_cup_publisher.xml
0
modules/core/distribution/src/samples/connectedcup/component/analytics/src/main/resources/carbonapps/connected_cup/connected_cup_receiver/artifact.xml → modules/distribution/src/resources/samples/connectedcup/component/analytics/src/main/resources/carbonapps/connected_cup/connected_cup_receiver/artifact.xml
6
modules/core/distribution/src/samples/connectedcup/component/analytics/src/main/resources/carbonapps/connected_cup/connected_cup_receiver/connected_cup_receiver.xml → modules/distribution/src/resources/samples/connectedcup/component/analytics/src/main/resources/carbonapps/connected_cup/connected_cup_receiver/connected_cup_receiver.xml
0
modules/core/distribution/src/samples/connectedcup/component/analytics/src/main/resources/carbonapps/connected_cup/connected_cup_stream/artifact.xml → modules/distribution/src/resources/samples/connectedcup/component/analytics/src/main/resources/carbonapps/connected_cup/connected_cup_stream/artifact.xml
0
modules/core/distribution/src/samples/connectedcup/component/analytics/src/main/resources/carbonapps/connected_cup/connected_cup_stream/org.wso2.iot.connectedcup_1.0.0.json → modules/distribution/src/resources/samples/connectedcup/component/analytics/src/main/resources/carbonapps/connected_cup/connected_cup_stream/org.wso2.iot.connectedcup_1.0.0.json
@ -0,0 +1,127 @@
|
||||
/*
|
||||
* 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.coffeeking.api;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.Extension;
|
||||
import io.swagger.annotations.ExtensionProperty;
|
||||
import io.swagger.annotations.Info;
|
||||
import io.swagger.annotations.SwaggerDefinition;
|
||||
import io.swagger.annotations.Tag;
|
||||
import org.wso2.carbon.apimgt.annotations.api.Scope;
|
||||
import org.wso2.carbon.apimgt.annotations.api.Scopes;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
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.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
|
||||
@SwaggerDefinition(
|
||||
info = @Info(
|
||||
version = "1.0.0",
|
||||
title = "",
|
||||
extensions = {
|
||||
@Extension(properties = {
|
||||
@ExtensionProperty(name = "name", value = "connectedcup"),
|
||||
@ExtensionProperty(name = "context", value = "/connectedcup"),
|
||||
})
|
||||
}
|
||||
),
|
||||
tags = {
|
||||
@Tag(name = "connectedcup", description = "")
|
||||
}
|
||||
)
|
||||
@Scopes(
|
||||
scopes = {
|
||||
@Scope(
|
||||
name = "Enroll device",
|
||||
description = "",
|
||||
key = "perm:connectedcup:enroll",
|
||||
permissions = {"/device-mgt/devices/enroll/connectedcup"}
|
||||
)
|
||||
}
|
||||
)
|
||||
public interface ConnectedCupService {
|
||||
|
||||
String SCOPE = "scope";
|
||||
|
||||
@Path("device/ordercoffee")
|
||||
@POST
|
||||
@ApiOperation(
|
||||
consumes = MediaType.APPLICATION_JSON,
|
||||
httpMethod = "POST",
|
||||
value = "Order Coffee",
|
||||
notes = "",
|
||||
response = Response.class,
|
||||
tags = "connectedcup",
|
||||
extensions = {
|
||||
@Extension(properties = {
|
||||
@ExtensionProperty(name = SCOPE, value = "perm:connectedcup:enroll")
|
||||
})
|
||||
}
|
||||
)
|
||||
Response orderCoffee(@QueryParam("deviceId") String deviceId);
|
||||
|
||||
/**
|
||||
* Retrieve Sensor data for the device type
|
||||
*/
|
||||
@Path("stats/{deviceId}/sensors/{sensorName}")
|
||||
@GET
|
||||
@Consumes("application/json")
|
||||
@Produces("application/json")
|
||||
@ApiOperation(
|
||||
consumes = MediaType.APPLICATION_JSON,
|
||||
httpMethod = "GET",
|
||||
value = "Retrieve Sensor data for the device type",
|
||||
notes = "",
|
||||
response = Response.class,
|
||||
tags = "connectedcup",
|
||||
extensions = {
|
||||
@Extension(properties = {
|
||||
@ExtensionProperty(name = SCOPE, value = "perm:connectedcup:enroll")
|
||||
})
|
||||
}
|
||||
)
|
||||
Response getDeviceStats(@PathParam("deviceId") String deviceId, @PathParam("sensorName") String sensor,
|
||||
@QueryParam("from") long from, @QueryParam("to") long to);
|
||||
|
||||
@Path("device/register")
|
||||
@POST
|
||||
@ApiOperation(
|
||||
consumes = MediaType.APPLICATION_JSON,
|
||||
httpMethod = "POST",
|
||||
value = "Enroll Cup",
|
||||
notes = "",
|
||||
response = Response.class,
|
||||
tags = "connectedcup",
|
||||
extensions = {
|
||||
@Extension(properties = {
|
||||
@ExtensionProperty(name = SCOPE, value = "perm:connectedcup:enroll")
|
||||
})
|
||||
}
|
||||
)
|
||||
boolean register(@QueryParam("name") String name);
|
||||
|
||||
}
|
@ -0,0 +1,116 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>device-mgt-iot-connectedcup</artifactId>
|
||||
<groupId>org.coffeeking</groupId>
|
||||
<version>1.0.0</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>org.coffeeking.connectedcup.plugin</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<packaging>bundle</packaging>
|
||||
<name>WSO2 IoTS(Device Types) - Connected Cup CDMF Plugin</name>
|
||||
<description>WSO2 IoTS(Device Types) - Connected Cup CDMF Plugin</description>
|
||||
<url>http://wso2.org</url>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-scr-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
</configuration>
|
||||
<version>2.3.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<version>1.4.0</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<instructions>
|
||||
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
|
||||
<Bundle-Name>${project.artifactId}</Bundle-Name>
|
||||
<Bundle-Version>${carbon.device.mgt.plugin.version}</Bundle-Version>
|
||||
<Bundle-Description>IoT Server Impl Bundle</Bundle-Description>
|
||||
<Private-Package>org.coffeeking.connectedcup.plugin.internal</Private-Package>
|
||||
<Import-Package>
|
||||
org.osgi.framework,
|
||||
org.osgi.service.component,
|
||||
org.apache.commons.logging,
|
||||
javax.xml.bind.*;resolution:=optional,
|
||||
javax.naming;resolution:=optional,
|
||||
javax.sql;resolution:=optional,
|
||||
javax.xml.bind.annotation.*;resolution:=optional,
|
||||
javax.net;resolution:=optional,
|
||||
javax.net.ssl;resolution:=optional,
|
||||
org.w3c.dom;resolution:=optional,
|
||||
org.wso2.carbon.device.mgt.common.*,
|
||||
org.wso2.carbon.device.mgt.common,
|
||||
org.wso2.carbon.context.*,
|
||||
org.wso2.carbon.ndatasource.core,
|
||||
javax.xml.parsers.*;resolution:=optional
|
||||
</Import-Package>
|
||||
|
||||
<Export-Package>
|
||||
!org.coffeeking.connectedcup.plugin.internal,
|
||||
org.coffeeking.connectedcup.plugin.*
|
||||
</Export-Package>
|
||||
</instructions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.osgi</groupId>
|
||||
<artifactId>org.eclipse.osgi</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.osgi</groupId>
|
||||
<artifactId>org.eclipse.osgi.services</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon</groupId>
|
||||
<artifactId>org.wso2.carbon.logging</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||
<artifactId>org.wso2.carbon.device.mgt.common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon</groupId>
|
||||
<artifactId>org.wso2.carbon.ndatasource.core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* 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.coffeeking.connectedcup.plugin.exception;
|
||||
|
||||
public class ConnectedCupDeviceMgtPluginException extends Exception {
|
||||
|
||||
public ConnectedCupDeviceMgtPluginException(String msg, Exception nestedEx) {
|
||||
super(msg, nestedEx);
|
||||
}
|
||||
|
||||
public ConnectedCupDeviceMgtPluginException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public ConnectedCupDeviceMgtPluginException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
||||
public ConnectedCupDeviceMgtPluginException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ConnectedCupDeviceMgtPluginException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,100 @@
|
||||
/*
|
||||
* 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.coffeeking.connectedcup.plugin.impl;
|
||||
|
||||
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
||||
import org.wso2.carbon.device.mgt.common.Feature;
|
||||
import org.wso2.carbon.device.mgt.common.FeatureManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* This hold the feature manager implementation for Connected CUp.
|
||||
*/
|
||||
public class ConnectedCupFeatureManager implements FeatureManager{
|
||||
private static Feature feature = new Feature();
|
||||
private static final String METHOD = "method";
|
||||
private static final String URI = "uri";
|
||||
private static final String CONTENT_TYPE = "contentType";
|
||||
private static final String PATH_PARAMS = "pathParams";
|
||||
private static final String QUERY_PARAMS = "queryParams";
|
||||
private static final String FORM_PARAMS = "formParams";
|
||||
|
||||
public ConnectedCupFeatureManager() {
|
||||
|
||||
feature.setCode("ordercoffee");
|
||||
feature.setName("Order Coffee");
|
||||
feature.setDescription("Order coffee cup");
|
||||
|
||||
Map<String, Object> apiParams = new HashMap<>();
|
||||
apiParams.put(METHOD, "POST");
|
||||
apiParams.put(URI, "/connectedcup/device/ordercoffee");
|
||||
List<String> pathParams = new ArrayList<>();
|
||||
List<String> queryParams = new ArrayList<>();
|
||||
List<String> formParams = new ArrayList<>();
|
||||
apiParams.put(PATH_PARAMS, pathParams);
|
||||
queryParams.add("deviceId");
|
||||
apiParams.put(QUERY_PARAMS, queryParams);
|
||||
apiParams.put(FORM_PARAMS, formParams);
|
||||
List<Feature.MetadataEntry> metadataEntries = new ArrayList<>();
|
||||
Feature.MetadataEntry metadataEntry = new Feature.MetadataEntry();
|
||||
metadataEntry.setId(-1);
|
||||
metadataEntry.setValue(apiParams);
|
||||
metadataEntries.add(metadataEntry);
|
||||
feature.setMetadataEntries(metadataEntries);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addFeature(Feature feature) throws DeviceManagementException {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addFeatures(List<Feature> list) throws DeviceManagementException {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Feature getFeature(String code) throws DeviceManagementException {
|
||||
if (code.equals(feature.getCode())) {
|
||||
return feature;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Feature> getFeatures() throws DeviceManagementException {
|
||||
List<Feature> features = new ArrayList<>();
|
||||
features.add(feature);
|
||||
return features;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeFeature(String s) throws DeviceManagementException {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addSupportedFeaturesToDB() throws DeviceManagementException {
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,255 @@
|
||||
/*
|
||||
* 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.coffeeking.connectedcup.plugin.impl;
|
||||
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.coffeeking.connectedcup.plugin.exception.ConnectedCupDeviceMgtPluginException;
|
||||
import org.coffeeking.connectedcup.plugin.impl.dao.ConnectedCupDAOUtil;
|
||||
import org.wso2.carbon.device.mgt.common.Device;
|
||||
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
|
||||
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
||||
import org.wso2.carbon.device.mgt.common.DeviceManager;
|
||||
import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
|
||||
import org.wso2.carbon.device.mgt.common.FeatureManager;
|
||||
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
|
||||
import org.wso2.carbon.device.mgt.common.license.mgt.License;
|
||||
import org.wso2.carbon.device.mgt.common.license.mgt.LicenseManagementException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Device Manager interface impl for connected cup.
|
||||
*/
|
||||
public class ConnectedCupManager implements DeviceManager {
|
||||
|
||||
private static final Log log = LogFactory.getLog(ConnectedCupManager.class);
|
||||
|
||||
private static final ConnectedCupDAOUtil CONNECTED_CUP_DAO_UTIL = new ConnectedCupDAOUtil();
|
||||
|
||||
|
||||
@Override
|
||||
public FeatureManager getFeatureManager() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveConfiguration(PlatformConfiguration platformConfiguration) throws DeviceManagementException {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlatformConfiguration getConfiguration() throws DeviceManagementException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean enrollDevice(Device device) throws DeviceManagementException {
|
||||
boolean status;
|
||||
try {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Enrolling a new Connected Cup device : " + device.getDeviceIdentifier());
|
||||
}
|
||||
ConnectedCupDAOUtil.beginTransaction();
|
||||
status = CONNECTED_CUP_DAO_UTIL.getConnectedCupDeviceDAO().addDevice(device);
|
||||
ConnectedCupDAOUtil.commitTransaction();
|
||||
} catch (ConnectedCupDeviceMgtPluginException e) {
|
||||
try {
|
||||
ConnectedCupDAOUtil.rollbackTransaction();
|
||||
} catch (ConnectedCupDeviceMgtPluginException iotDAOEx) {
|
||||
String msg = "Error occurred while roll back the device enrol transaction :" + device.toString();
|
||||
log.warn(msg, iotDAOEx);
|
||||
}
|
||||
String msg = "Error while enrolling the Connected Cup device : " + device.getDeviceIdentifier();
|
||||
log.error(msg, e);
|
||||
throw new DeviceManagementException(msg, e);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean modifyEnrollment(Device device) throws DeviceManagementException {
|
||||
boolean status;
|
||||
try {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Modifying the Connected Cup device enrollment data");
|
||||
}
|
||||
ConnectedCupDAOUtil.beginTransaction();
|
||||
status = CONNECTED_CUP_DAO_UTIL.getConnectedCupDeviceDAO().updateDevice(device);
|
||||
ConnectedCupDAOUtil.commitTransaction();
|
||||
} catch (ConnectedCupDeviceMgtPluginException e) {
|
||||
try {
|
||||
ConnectedCupDAOUtil.rollbackTransaction();
|
||||
} catch (ConnectedCupDeviceMgtPluginException iotDAOEx) {
|
||||
String msg = "Error occurred while roll back the update device transaction :" + device.toString();
|
||||
log.warn(msg, iotDAOEx);
|
||||
}
|
||||
String msg = "Error while updating the enrollment of the Connected Cup device : " +
|
||||
device.getDeviceIdentifier();
|
||||
log.error(msg, e);
|
||||
throw new DeviceManagementException(msg, e);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean disenrollDevice(DeviceIdentifier deviceId) throws DeviceManagementException {
|
||||
boolean status;
|
||||
try {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Dis-enrolling Connected Cup device : " + deviceId);
|
||||
}
|
||||
ConnectedCupDAOUtil.beginTransaction();
|
||||
status = CONNECTED_CUP_DAO_UTIL.getConnectedCupDeviceDAO().deleteDevice(deviceId.getId());
|
||||
ConnectedCupDAOUtil.commitTransaction();
|
||||
} catch (ConnectedCupDeviceMgtPluginException e) {
|
||||
try {
|
||||
ConnectedCupDAOUtil.rollbackTransaction();
|
||||
} catch (ConnectedCupDeviceMgtPluginException iotDAOEx) {
|
||||
String msg = "Error occurred while roll back the device dis enrol transaction :" + deviceId.toString();
|
||||
log.warn(msg, iotDAOEx);
|
||||
}
|
||||
String msg = "Error while removing the Connected Cup device : " + deviceId.getId();
|
||||
log.error(msg, e);
|
||||
throw new DeviceManagementException(msg, e);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnrolled(DeviceIdentifier deviceId) throws DeviceManagementException {
|
||||
boolean isEnrolled = false;
|
||||
try {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Checking the enrollment of Connected Cup device : " + deviceId.getId());
|
||||
}
|
||||
Device iotDevice = CONNECTED_CUP_DAO_UTIL.getConnectedCupDeviceDAO().getDevice(deviceId.getId());
|
||||
if (iotDevice != null) {
|
||||
isEnrolled = true;
|
||||
}
|
||||
} catch (ConnectedCupDeviceMgtPluginException e) {
|
||||
String msg = "Error while checking the enrollment status of Connected Cup device : " +
|
||||
deviceId.getId();
|
||||
log.error(msg, e);
|
||||
throw new DeviceManagementException(msg, e);
|
||||
}
|
||||
return isEnrolled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isActive(DeviceIdentifier deviceId) throws DeviceManagementException {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setActive(DeviceIdentifier deviceId, boolean status)
|
||||
throws DeviceManagementException {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Device getDevice(DeviceIdentifier deviceId) throws DeviceManagementException {
|
||||
Device device;
|
||||
try {if (log.isDebugEnabled()) {
|
||||
log.debug("Getting the details of Connected Cup device : " + deviceId.getId());
|
||||
}
|
||||
device = CONNECTED_CUP_DAO_UTIL.getConnectedCupDeviceDAO().getDevice(deviceId.getId());
|
||||
|
||||
} catch (ConnectedCupDeviceMgtPluginException e) {
|
||||
String msg = "Error while fetching the Connected Cup device : " + deviceId.getId();
|
||||
log.error(msg, e);
|
||||
throw new DeviceManagementException(msg, e);
|
||||
}
|
||||
return device;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setOwnership(DeviceIdentifier deviceId, String ownershipType)
|
||||
throws DeviceManagementException {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isClaimable(DeviceIdentifier deviceIdentifier) throws DeviceManagementException {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setStatus(DeviceIdentifier deviceId, String currentOwner,
|
||||
EnrolmentInfo.Status status) throws DeviceManagementException {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public License getLicense(String s) throws LicenseManagementException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addLicense(License license) throws LicenseManagementException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean requireDeviceAuthorization() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateDeviceInfo(DeviceIdentifier deviceIdentifier, Device device) throws DeviceManagementException {
|
||||
boolean status;
|
||||
try {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug(
|
||||
"updating the details of Connected Cup device : " + deviceIdentifier);
|
||||
}
|
||||
ConnectedCupDAOUtil.beginTransaction();
|
||||
status = CONNECTED_CUP_DAO_UTIL.getConnectedCupDeviceDAO().updateDevice(device);
|
||||
ConnectedCupDAOUtil.commitTransaction();
|
||||
} catch (ConnectedCupDeviceMgtPluginException e) {
|
||||
try {
|
||||
ConnectedCupDAOUtil.rollbackTransaction();
|
||||
} catch (ConnectedCupDeviceMgtPluginException iotDAOEx) {
|
||||
String msg = "Error occurred while roll back the update device info transaction :" + device.toString();
|
||||
log.warn(msg, iotDAOEx);
|
||||
}
|
||||
String msg =
|
||||
"Error while updating the Connected Cup device : " + deviceIdentifier;
|
||||
log.error(msg, e);
|
||||
throw new DeviceManagementException(msg, e);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Device> getAllDevices() throws DeviceManagementException {
|
||||
List<Device> devices = null;
|
||||
try {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Fetching the details of all Connected Cup devices");
|
||||
}
|
||||
devices = CONNECTED_CUP_DAO_UTIL.getConnectedCupDeviceDAO().getAllDevices();
|
||||
} catch (ConnectedCupDeviceMgtPluginException e) {
|
||||
String msg = "Error while fetching all Connected Cup devices.";
|
||||
log.error(msg, e);
|
||||
throw new DeviceManagementException(msg, e);
|
||||
}
|
||||
return devices;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 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.coffeeking.connectedcup.plugin.impl;
|
||||
|
||||
import org.coffeeking.connectedcup.plugin.constants.ConnectedCupConstants;
|
||||
import org.wso2.carbon.base.MultitenantConstants;
|
||||
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
|
||||
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
||||
import org.wso2.carbon.device.mgt.common.DeviceManager;
|
||||
import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig;
|
||||
import org.wso2.carbon.device.mgt.common.ProvisioningConfig;
|
||||
import org.wso2.carbon.device.mgt.common.app.mgt.Application;
|
||||
import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException;
|
||||
import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManager;
|
||||
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
|
||||
import org.wso2.carbon.device.mgt.common.policy.mgt.PolicyMonitoringManager;
|
||||
import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig;
|
||||
import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ConnectedCupManagerService implements DeviceManagementService{
|
||||
private DeviceManager deviceManager;
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return ConnectedCupConstants.DEVICE_TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OperationMonitoringTaskConfig getOperationMonitoringConfig() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() throws DeviceManagementException {
|
||||
this.deviceManager=new ConnectedCupManager();
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceManager getDeviceManager() {
|
||||
return deviceManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApplicationManager getApplicationManager() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProvisioningConfig getProvisioningConfig() {
|
||||
return new ProvisioningConfig(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PushNotificationConfig getPushNotificationConfig() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PolicyMonitoringManager getPolicyMonitoringManager() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,204 @@
|
||||
/*
|
||||
* 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.coffeeking.connectedcup.plugin.impl.dao;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.coffeeking.connectedcup.plugin.constants.ConnectedCupConstants;
|
||||
import org.coffeeking.connectedcup.plugin.exception.ConnectedCupDeviceMgtPluginException;
|
||||
import org.coffeeking.connectedcup.plugin.impl.dao.util.ConnectedCupUtils;
|
||||
import org.wso2.carbon.device.mgt.common.Device;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Device Dao for connected cup Devices.
|
||||
*/
|
||||
public class ConnectedCupDAO {
|
||||
|
||||
|
||||
private static final Log log = LogFactory.getLog(ConnectedCupDAO.class);
|
||||
|
||||
public Device getDevice(String deviceId) throws ConnectedCupDeviceMgtPluginException {
|
||||
Connection conn = null;
|
||||
PreparedStatement stmt = null;
|
||||
Device connectedCupDevice = null;
|
||||
ResultSet resultSet = null;
|
||||
try {
|
||||
conn = ConnectedCupDAOUtil.getConnection();
|
||||
String selectDBQuery =
|
||||
"SELECT CONNECTED_CUP_DEVICE_ID, DEVICE_NAME FROM CONNECTED_CUP_DEVICE WHERE CONNECTED_CUP_DEVICE_ID = ?";
|
||||
stmt = conn.prepareStatement(selectDBQuery);
|
||||
stmt.setString(1, deviceId);
|
||||
resultSet = stmt.executeQuery();
|
||||
|
||||
if (resultSet.next()) {
|
||||
connectedCupDevice = new Device();
|
||||
connectedCupDevice.setName(resultSet.getString(ConnectedCupConstants.DEVICE_PLUGIN_DEVICE_NAME));
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Connected Cup service " + deviceId + " data has been fetched from" +
|
||||
"Connected Cup database.");
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
String msg = "Error occurred while fetching Connected Cup device : '" + deviceId + "'";
|
||||
log.error(msg, e);
|
||||
throw new ConnectedCupDeviceMgtPluginException(msg, e);
|
||||
} finally {
|
||||
ConnectedCupUtils.cleanupResources(stmt, resultSet);
|
||||
ConnectedCupDAOUtil.closeConnection();
|
||||
}
|
||||
return connectedCupDevice;
|
||||
}
|
||||
|
||||
|
||||
public boolean addDevice(Device connectedCupDevice) throws ConnectedCupDeviceMgtPluginException {
|
||||
boolean status = false;
|
||||
Connection conn = null;
|
||||
PreparedStatement stmt = null;
|
||||
try {
|
||||
conn = ConnectedCupDAOUtil.getConnection();
|
||||
String createDBQuery =
|
||||
"INSERT INTO CONNECTED_CUP_DEVICE(CONNECTED_CUP_DEVICE_ID, DEVICE_NAME ) VALUES (?, ?)";
|
||||
|
||||
stmt = conn.prepareStatement(createDBQuery);
|
||||
stmt.setString(1, connectedCupDevice.getDeviceIdentifier());
|
||||
stmt.setString(2, connectedCupDevice.getName());
|
||||
|
||||
int rows = stmt.executeUpdate();
|
||||
if (rows > 0) {
|
||||
status = true;
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Connected Cup device " + connectedCupDevice.getDeviceIdentifier() +
|
||||
" data has been added to the Connected Cup database.");
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
String msg = "Error occurred while adding the Connected Cup device '" +
|
||||
connectedCupDevice.getDeviceIdentifier() + "' to the Connected Cup db.";
|
||||
log.error(msg, e);
|
||||
throw new ConnectedCupDeviceMgtPluginException(msg, e);
|
||||
} finally {
|
||||
ConnectedCupUtils.cleanupResources(stmt, null);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
public boolean updateDevice(Device connectedCupDevice) throws ConnectedCupDeviceMgtPluginException {
|
||||
boolean status = false;
|
||||
Connection conn = null;
|
||||
PreparedStatement stmt = null;
|
||||
try {
|
||||
conn = ConnectedCupDAOUtil.getConnection();
|
||||
String updateDBQuery =
|
||||
"UPDATE CONNECTED_CUP_DEVICE SET DEVICE_NAME = ? WHERE CONNECTED_CUP_DEVICE_ID = ?";
|
||||
|
||||
stmt = conn.prepareStatement(updateDBQuery);
|
||||
stmt.setString(1, connectedCupDevice.getName());
|
||||
stmt.setString(2, connectedCupDevice.getDeviceIdentifier());
|
||||
int rows = stmt.executeUpdate();
|
||||
if (rows > 0) {
|
||||
status = true;
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Connected Cup device " + connectedCupDevice.getDeviceIdentifier() +
|
||||
" data has been modified.");
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
String msg = "Error occurred while modifying the Connected Cup device '" +
|
||||
connectedCupDevice.getDeviceIdentifier() + "' data.";
|
||||
log.error(msg, e);
|
||||
throw new ConnectedCupDeviceMgtPluginException(msg, e);
|
||||
} finally {
|
||||
ConnectedCupUtils.cleanupResources(stmt, null);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
public boolean deleteDevice(String deviceId) throws ConnectedCupDeviceMgtPluginException {
|
||||
boolean status = false;
|
||||
Connection conn = null;
|
||||
PreparedStatement stmt = null;
|
||||
try {
|
||||
conn = ConnectedCupDAOUtil.getConnection();
|
||||
String deleteDBQuery =
|
||||
"DELETE FROM CONNECTED_CUP_DEVICE WHERE CONNECTED_CUP_DEVICE_ID = ?";
|
||||
stmt = conn.prepareStatement(deleteDBQuery);
|
||||
stmt.setString(1, deviceId);
|
||||
int rows = stmt.executeUpdate();
|
||||
if (rows > 0) {
|
||||
status = true;
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Connected Cup device " + deviceId + " data has deleted" +
|
||||
" from the Connected Cup database.");
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
String msg = "Error occurred while deleting Connected Cup device " + deviceId;
|
||||
log.error(msg, e);
|
||||
throw new ConnectedCupDeviceMgtPluginException(msg, e);
|
||||
} finally {
|
||||
ConnectedCupUtils.cleanupResources(stmt, null);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
public List<Device> getAllDevices() throws ConnectedCupDeviceMgtPluginException {
|
||||
|
||||
Connection conn = null;
|
||||
PreparedStatement stmt = null;
|
||||
ResultSet resultSet = null;
|
||||
Device connectedCupDevice;
|
||||
List<Device> iotDevices = new ArrayList<>();
|
||||
|
||||
try {
|
||||
conn = ConnectedCupDAOUtil.getConnection();
|
||||
String selectDBQuery =
|
||||
"SELECT CONNECTED_CUP_DEVICE_ID, DEVICE_NAME" +
|
||||
"FROM CONNECTED_CUP_DEVICE";
|
||||
stmt = conn.prepareStatement(selectDBQuery);
|
||||
resultSet = stmt.executeQuery();
|
||||
while (resultSet.next()) {
|
||||
connectedCupDevice = new Device();
|
||||
connectedCupDevice.setDeviceIdentifier(resultSet.getString(
|
||||
ConnectedCupConstants.DEVICE_PLUGIN_DEVICE_ID));
|
||||
connectedCupDevice.setName(resultSet.getString(
|
||||
ConnectedCupConstants.DEVICE_PLUGIN_DEVICE_NAME));
|
||||
}
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("All Connected Cup device details have fetched from Connected Cup database" +
|
||||
".");
|
||||
}
|
||||
return iotDevices;
|
||||
} catch (SQLException e) {
|
||||
String msg = "Error occurred while fetching all Connected Cup device data'";
|
||||
log.error(msg, e);
|
||||
throw new ConnectedCupDeviceMgtPluginException(msg, e);
|
||||
} finally {
|
||||
ConnectedCupUtils.cleanupResources(stmt, resultSet);
|
||||
ConnectedCupDAOUtil.closeConnection();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,132 @@
|
||||
/*
|
||||
* 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.coffeeking.connectedcup.plugin.impl.dao;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.coffeeking.connectedcup.plugin.constants.ConnectedCupConstants;
|
||||
import org.coffeeking.connectedcup.plugin.exception.ConnectedCupDeviceMgtPluginException;
|
||||
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
import javax.naming.NamingException;
|
||||
import javax.sql.DataSource;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class ConnectedCupDAOUtil {
|
||||
|
||||
private static final Log log = LogFactory.getLog(ConnectedCupDAOUtil.class);
|
||||
static DataSource dataSource;
|
||||
private static ThreadLocal<Connection> currentConnection = new ThreadLocal<Connection>();
|
||||
|
||||
public ConnectedCupDAOUtil() {
|
||||
initConnectedCupDAO();
|
||||
}
|
||||
|
||||
public static void initConnectedCupDAO() {
|
||||
try {
|
||||
Context ctx = new InitialContext();
|
||||
dataSource = (DataSource) ctx.lookup(ConnectedCupConstants.DATA_SOURCE_NAME);
|
||||
} catch (NamingException e) {
|
||||
log.error("Error while looking up the data source: " +
|
||||
ConnectedCupConstants.DATA_SOURCE_NAME);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public ConnectedCupDAO getConnectedCupDeviceDAO() {
|
||||
return new ConnectedCupDAO();
|
||||
}
|
||||
|
||||
public static void beginTransaction() throws ConnectedCupDeviceMgtPluginException {
|
||||
try {
|
||||
Connection conn = dataSource.getConnection();
|
||||
conn.setAutoCommit(false);
|
||||
currentConnection.set(conn);
|
||||
} catch (SQLException e) {
|
||||
throw new ConnectedCupDeviceMgtPluginException(
|
||||
"Error occurred while retrieving datasource connection", e);
|
||||
}
|
||||
}
|
||||
|
||||
public static Connection getConnection() throws ConnectedCupDeviceMgtPluginException {
|
||||
if (currentConnection.get() == null) {
|
||||
try {
|
||||
currentConnection.set(dataSource.getConnection());
|
||||
} catch (SQLException e) {
|
||||
throw new ConnectedCupDeviceMgtPluginException(
|
||||
"Error occurred while retrieving data source connection", e);
|
||||
}
|
||||
}
|
||||
return currentConnection.get();
|
||||
}
|
||||
|
||||
public static void commitTransaction() throws ConnectedCupDeviceMgtPluginException {
|
||||
try {
|
||||
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 (SQLException e) {
|
||||
throw new ConnectedCupDeviceMgtPluginException(
|
||||
"Error occurred while committing the transaction", e);
|
||||
} finally {
|
||||
closeConnection();
|
||||
}
|
||||
}
|
||||
|
||||
public static void closeConnection() throws ConnectedCupDeviceMgtPluginException {
|
||||
|
||||
Connection con = currentConnection.get();
|
||||
if (con != null) {
|
||||
try {
|
||||
con.close();
|
||||
} catch (SQLException e) {
|
||||
log.error("Error occurred while close the connection");
|
||||
}
|
||||
}
|
||||
currentConnection.remove();
|
||||
}
|
||||
|
||||
public static void rollbackTransaction() throws ConnectedCupDeviceMgtPluginException {
|
||||
try {
|
||||
Connection conn = currentConnection.get();
|
||||
if (conn != null) {
|
||||
conn.rollback();
|
||||
} else {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug(
|
||||
"Datasource connection associated with the current thread is null, " +
|
||||
"hence rollback has not been attempted");
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
throw new ConnectedCupDeviceMgtPluginException("Error occurred while rollback the transaction", e);
|
||||
} finally {
|
||||
closeConnection();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
/*
|
||||
* 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.coffeeking.connectedcup.plugin.impl.dao.util;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.wso2.carbon.device.mgt.common.Device;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Contains utility methods used by FireAlarm plugin.
|
||||
*/
|
||||
public class ConnectedCupUtils {
|
||||
|
||||
private static Log log = LogFactory.getLog(ConnectedCupUtils.class);
|
||||
|
||||
public static String getDeviceProperty(List<Device.Property> deviceProperties, String propertyKey) {
|
||||
String deviceProperty = "";
|
||||
for (Device.Property property : deviceProperties) {
|
||||
if (propertyKey.equals(property.getName())) {
|
||||
deviceProperty = property.getValue();
|
||||
}
|
||||
}
|
||||
return deviceProperty;
|
||||
}
|
||||
|
||||
public static Device.Property getProperty(String property, String value) {
|
||||
if (property != null) {
|
||||
Device.Property prop = new Device.Property();
|
||||
prop.setName(property);
|
||||
prop.setValue(value);
|
||||
return prop;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void cleanupResources(Connection conn, PreparedStatement stmt, ResultSet rs) {
|
||||
if (rs != null) {
|
||||
try {
|
||||
rs.close();
|
||||
} catch (SQLException e) {
|
||||
log.warn("Error occurred while closing result set", e);
|
||||
}
|
||||
}
|
||||
if (stmt != null) {
|
||||
try {
|
||||
stmt.close();
|
||||
} catch (SQLException e) {
|
||||
log.warn("Error occurred while closing prepared statement", e);
|
||||
}
|
||||
}
|
||||
if (conn != null) {
|
||||
try {
|
||||
conn.close();
|
||||
} catch (SQLException e) {
|
||||
log.warn("Error occurred while closing database connection", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void cleanupResources(PreparedStatement stmt, ResultSet rs) {
|
||||
cleanupResources(null, stmt, rs);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
/*
|
||||
* 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.coffeeking.connectedcup.plugin.internal;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.coffeeking.connectedcup.plugin.impl.ConnectedCupManagerService;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.ServiceRegistration;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService;
|
||||
|
||||
/**
|
||||
* @scr.component name="org.coffeeking.connectedcup.plugin.internal
|
||||
* .ConnectedCupServiceComponent"
|
||||
* immediate="true"
|
||||
*/
|
||||
|
||||
public class ConnectedCupServiceComponent {
|
||||
private static final Log log = LogFactory.getLog(ConnectedCupServiceComponent.class);
|
||||
private ServiceRegistration connectedCupServiceRegRef;
|
||||
|
||||
protected void activate(ComponentContext ctx) {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Activating Connected Cup Service Component");
|
||||
}
|
||||
try {
|
||||
BundleContext bundleContext = ctx.getBundleContext();
|
||||
connectedCupServiceRegRef =
|
||||
bundleContext.registerService(DeviceManagementService.class.getName(),
|
||||
new ConnectedCupManagerService(), null);
|
||||
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Connected Cup Service Component has been successfully activated");
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
log.error("Error occurred while activating Connected Cup Service Component", e);
|
||||
}
|
||||
}
|
||||
|
||||
protected void deactivate(ComponentContext ctx) {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("De-activating Connected Cup Service Component");
|
||||
}
|
||||
try {
|
||||
if (connectedCupServiceRegRef != null) {
|
||||
connectedCupServiceRegRef.unregister();
|
||||
}
|
||||
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Connected Cup Service Component has been successfully de-activated");
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
log.error("Error occurred while de-activating Connected Cup Service Component", e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
0
modules/core/distribution/src/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.analytics-view/analytics-view.hbs → modules/distribution/src/resources/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.analytics-view/analytics-view.hbs
0
modules/core/distribution/src/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.analytics-view/analytics-view.js → modules/distribution/src/resources/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.analytics-view/analytics-view.js
0
modules/core/distribution/src/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.analytics-view/analytics-view.json → modules/distribution/src/resources/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.analytics-view/analytics-view.json
0
modules/core/distribution/src/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.analytics-view/public/js/connectedcup.js → modules/distribution/src/resources/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.analytics-view/public/js/connectedcup.js
0
modules/core/distribution/src/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.device-view/device-view.hbs → modules/distribution/src/resources/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.device-view/device-view.hbs
0
modules/core/distribution/src/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.device-view/device-view.js → modules/distribution/src/resources/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.device-view/device-view.js
0
modules/core/distribution/src/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.device-view/device-view.json → modules/distribution/src/resources/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.device-view/device-view.json
0
modules/core/distribution/src/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.device-view/public/images/thumb.png → modules/distribution/src/resources/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.device-view/public/images/thumb.png
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
0
modules/core/distribution/src/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.realtime.analytics-view/analytics-view.hbs → modules/distribution/src/resources/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.realtime.analytics-view/analytics-view.hbs
0
modules/core/distribution/src/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.realtime.analytics-view/analytics-view.js → modules/distribution/src/resources/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.realtime.analytics-view/analytics-view.js
0
modules/core/distribution/src/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.realtime.analytics-view/analytics-view.json → modules/distribution/src/resources/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.realtime.analytics-view/analytics-view.json
0
modules/core/distribution/src/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.realtime.analytics-view/public/js/device-stats.js → modules/distribution/src/resources/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.realtime.analytics-view/public/js/device-stats.js
0
modules/core/distribution/src/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.realtime.analytics-view/public/js/moment.min.js → modules/distribution/src/resources/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.realtime.analytics-view/public/js/moment.min.js
vendored
0
modules/core/distribution/src/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.realtime.analytics-view/public/js/socket.io.min.js → modules/distribution/src/resources/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.realtime.analytics-view/public/js/socket.io.min.js
vendored
0
modules/core/distribution/src/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/private/config.json → modules/distribution/src/resources/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/private/config.json
0
modules/core/distribution/src/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/public/images/coffee_stats.png → modules/distribution/src/resources/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/public/images/coffee_stats.png
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
0
modules/core/distribution/src/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/public/images/coffeecup.png → modules/distribution/src/resources/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/public/images/coffeecup.png
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
0
modules/core/distribution/src/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/public/images/thumb.png → modules/distribution/src/resources/samples/connectedcup/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/public/images/thumb.png
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |