Merge pull request #1658 from rasika/fix-773

Fixing Connectudcup, SampleDevice device types examples
merge-requests/1/head
Ruwan 7 years ago committed by GitHub
commit e32056ff31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -648,6 +648,8 @@
<excludes> <excludes>
<exclude>**/*connectedcup-samples-deployer.xml</exclude> <exclude>**/*connectedcup-samples-deployer.xml</exclude>
<exclude>**/*connectedcup/pom.xml</exclude> <exclude>**/*connectedcup/pom.xml</exclude>
<exclude>**/*sampledevice/pom.xml</exclude>
<exclude>**/*sampledevice-deployer.xml</exclude>
<exclude>**/*device-plugins-deployer.xml</exclude> <exclude>**/*device-plugins-deployer.xml</exclude>
</excludes> </excludes>
</fileSet> </fileSet>
@ -1690,12 +1692,24 @@
<filtered>true</filtered> <filtered>true</filtered>
<fileMode>644</fileMode> <fileMode>644</fileMode>
</file> </file>
<file>
<source>src/core/samples/sampledevice-deployer.xml</source>
<outputDirectory>${pom.artifactId}-${pom.version}/samples/</outputDirectory>
<filtered>true</filtered>
<fileMode>644</fileMode>
</file>
<file> <file>
<source>src/core/samples/connectedcup/pom.xml</source> <source>src/core/samples/connectedcup/pom.xml</source>
<outputDirectory>${pom.artifactId}-${pom.version}/samples/connectedcup/</outputDirectory> <outputDirectory>${pom.artifactId}-${pom.version}/samples/connectedcup/</outputDirectory>
<filtered>true</filtered> <filtered>true</filtered>
<fileMode>644</fileMode> <fileMode>644</fileMode>
</file> </file>
<file>
<source>src/core/samples/sampledevice/pom.xml</source>
<outputDirectory>${pom.artifactId}-${pom.version}/samples/sampledevice/</outputDirectory>
<filtered>true</filtered>
<fileMode>644</fileMode>
</file>
<!-- ********************************* End of IoT Core Profile ********************************* --> <!-- ********************************* End of IoT Core Profile ********************************* -->
<!-- ********************************* Start of Analytics Profile ********************************* --> <!-- ********************************* Start of Analytics Profile ********************************* -->

@ -251,4 +251,9 @@ public class ConnectedCupManager implements DeviceManager {
} }
return devices; return devices;
} }
@Override
public boolean updateDeviceProperties(DeviceIdentifier deviceIdentifier, List<Device.Property> list) throws DeviceManagementException {
return false;
}
} }

@ -26,6 +26,7 @@ import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig;
import org.wso2.carbon.device.mgt.common.InitialOperationConfig; import org.wso2.carbon.device.mgt.common.InitialOperationConfig;
import org.wso2.carbon.device.mgt.common.DeviceStatusTaskPluginConfig; import org.wso2.carbon.device.mgt.common.DeviceStatusTaskPluginConfig;
import org.wso2.carbon.device.mgt.common.ProvisioningConfig; import org.wso2.carbon.device.mgt.common.ProvisioningConfig;
import org.wso2.carbon.device.mgt.common.general.GeneralConfig;
import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManager; import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManager;
import org.wso2.carbon.device.mgt.common.policy.mgt.PolicyMonitoringManager; import org.wso2.carbon.device.mgt.common.policy.mgt.PolicyMonitoringManager;
import org.wso2.carbon.device.mgt.common.pull.notification.PullNotificationSubscriber; import org.wso2.carbon.device.mgt.common.pull.notification.PullNotificationSubscriber;
@ -35,6 +36,11 @@ import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService;
public class ConnectedCupManagerService implements DeviceManagementService { public class ConnectedCupManagerService implements DeviceManagementService {
private DeviceManager deviceManager; private DeviceManager deviceManager;
@Override
public void init() throws DeviceManagementException {
this.deviceManager = new ConnectedCupManager();
}
@Override @Override
public String getType() { public String getType() {
return ConnectedCupConstants.DEVICE_TYPE; return ConnectedCupConstants.DEVICE_TYPE;
@ -45,11 +51,6 @@ public class ConnectedCupManagerService implements DeviceManagementService {
return null; return null;
} }
@Override
public void init() throws DeviceManagementException {
this.deviceManager = new ConnectedCupManager();
}
@Override @Override
public DeviceManager getDeviceManager() { public DeviceManager getDeviceManager() {
return deviceManager; return deviceManager;
@ -76,17 +77,22 @@ public class ConnectedCupManagerService implements DeviceManagementService {
} }
@Override @Override
public DeviceStatusTaskPluginConfig getDeviceStatusTaskPluginConfig() { public InitialOperationConfig getInitialOperationConfig() {
return null; return null;
} }
@Override @Override
public InitialOperationConfig getInitialOperationConfig() { public PullNotificationSubscriber getPullNotificationSubscriber() {
return null; return null;
} }
@Override @Override
public PullNotificationSubscriber getPullNotificationSubscriber() { public DeviceStatusTaskPluginConfig getDeviceStatusTaskPluginConfig() {
return null;
}
@Override
public GeneralConfig getGeneralConfig() {
return null; return null;
} }
} }

@ -60,6 +60,12 @@
<artifactId>h2-database-engine</artifactId> <artifactId>h2-database-engine</artifactId>
<version>1.2.140.wso2v3</version> <version>1.2.140.wso2v3</version>
</dependency> </dependency>
<dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.mgt.server.feature</artifactId>
<type>zip</type>
<version>${carbon.device.mgt.version}</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

@ -51,13 +51,13 @@
<goal>p2-repo-gen</goal> <goal>p2-repo-gen</goal>
</goals> </goals>
<configuration> <configuration>
<metadataRepository>file:${basedir}/p2-repo</metadataRepository> <metadataRepository>file:\${basedir}/p2-repo</metadataRepository>
<artifactRepository>file:${basedir}/p2-repo</artifactRepository> <artifactRepository>file:\${basedir}/p2-repo</artifactRepository>
<publishArtifacts>true</publishArtifacts> <publishArtifacts>true</publishArtifacts>
<publishArtifactRepository>true</publishArtifactRepository> <publishArtifactRepository>true</publishArtifactRepository>
<featureArtifacts> <featureArtifacts>
<featureArtifactDef> <featureArtifactDef>
org.wso2.carbon:org.wso2.carbon.sampledevice.feature:1.0.0 org.wso2.carbon:org.wso2.iot.sampledevice.feature:1.0.0
</featureArtifactDef> </featureArtifactDef>
</featureArtifacts> </featureArtifacts>
</configuration> </configuration>
@ -70,13 +70,13 @@
</goals> </goals>
<configuration> <configuration>
<profile>default</profile> <profile>default</profile>
<metadataRepository>file:${basedir}/p2-repo</metadataRepository> <metadataRepository>file:\${basedir}/p2-repo</metadataRepository>
<artifactRepository>file:${basedir}/p2-repo</artifactRepository> <artifactRepository>file:\${basedir}/p2-repo</artifactRepository>
<destination>${basedir}/../wso2/components</destination> <destination>\${basedir}/../wso2/components</destination>
<deleteOldProfileFiles>false</deleteOldProfileFiles> <deleteOldProfileFiles>false</deleteOldProfileFiles>
<features> <features>
<feature> <feature>
<id>org.wso2.carbon.sampledevice.feature.group</id> <id>org.wso2.iot.sampledevice.feature.group</id>
<version>1.0.0</version> <version>1.0.0</version>
</feature> </feature>
</features> </features>
@ -190,6 +190,6 @@
</repository> </repository>
</repositories> </repositories>
<properties> <properties>
<carbon.device.mgt.plugin.version>4.0.34</carbon.device.mgt.plugin.version> <carbon.device.mgt.plugin.version>${carbon.device.mgt.plugin.version}</carbon.device.mgt.plugin.version>
</properties> </properties>
</project> </project>

@ -26,10 +26,10 @@
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>${groupId}.sampledevice.analytics</artifactId> <artifactId>${project-base-package}.analytics</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>${groupId}.sampledevice.analytics</name> <name>${project-base-package}.analytics</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<build> <build>
<plugins> <plugins>

@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.sampledevice.api; package org.wso2.iot.sampledevice.api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Extension; import io.swagger.annotations.Extension;

@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.sampledevice.api; package org.wso2.iot.sampledevice.api;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
@ -41,12 +41,12 @@ import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation;
import org.wso2.carbon.identity.jwt.client.extension.JWTClient; 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.dto.AccessTokenInfo;
import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException; import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException;
import org.wso2.carbon.sampledevice.api.dto.DeviceJSON; import org.wso2.iot.sampledevice.api.dto.DeviceJSON;
import org.wso2.carbon.sampledevice.api.dto.SensorRecord; import org.wso2.iot.sampledevice.api.dto.SensorRecord;
import org.wso2.carbon.sampledevice.api.util.APIUtil; import org.wso2.iot.sampledevice.api.util.APIUtil;
import org.wso2.carbon.sampledevice.api.util.ZipArchive; import org.wso2.iot.sampledevice.api.util.ZipArchive;
import org.wso2.carbon.sampledevice.api.util.ZipUtil; import org.wso2.iot.sampledevice.api.util.ZipUtil;
import org.wso2.carbon.sampledevice.plugin.constants.DeviceTypeConstants; import org.wso2.iot.sampledevice.plugin.constants.DeviceTypeConstants;
import org.wso2.carbon.user.api.UserStoreException; import org.wso2.carbon.user.api.UserStoreException;
import java.io.IOException; import java.io.IOException;

@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.sampledevice.api.dto; package org.wso2.iot.sampledevice.api.dto;
import org.codehaus.jackson.annotate.JsonIgnoreProperties; import org.codehaus.jackson.annotate.JsonIgnoreProperties;

@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.sampledevice.api.dto; package org.wso2.iot.sampledevice.api.dto;
import org.codehaus.jackson.annotate.JsonIgnoreProperties; import org.codehaus.jackson.annotate.JsonIgnoreProperties;

@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.sampledevice.api.exception; package org.wso2.iot.sampledevice.api.exception;
/** /**
* Device specific exception handler. * Device specific exception handler.

@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.sampledevice.api.util; package org.wso2.iot.sampledevice.api.util;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
@ -34,7 +34,7 @@ import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationService; import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationService;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
import org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService; import org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService;
import org.wso2.carbon.sampledevice.api.dto.SensorRecord; import org.wso2.iot.sampledevice.api.dto.SensorRecord;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;

@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.sampledevice.api.util; package org.wso2.iot.sampledevice.api.util;
import java.io.File; import java.io.File;

@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.sampledevice.api.util; package org.wso2.iot.sampledevice.api.util;
import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;

@ -27,7 +27,7 @@
<jaxrs:server id="sampledevice" address="/"> <jaxrs:server id="sampledevice" address="/">
<jaxrs:serviceBeans> <jaxrs:serviceBeans>
<bean id="DeviceTypeService" <bean id="DeviceTypeService"
class="org.wso2.carbon.sampledevice.api.DeviceTypeServiceImpl"> class="org.wso2.iot.sampledevice.api.DeviceTypeServiceImpl">
</bean> </bean>
</jaxrs:serviceBeans> </jaxrs:serviceBeans>
<jaxrs:providers> <jaxrs:providers>

@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.sampledevice.plugin.constants; package org.wso2.iot.sampledevice.plugin.constants;
import org.wso2.carbon.utils.CarbonUtils; import org.wso2.carbon.utils.CarbonUtils;

@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.sampledevice.plugin.exception; package org.wso2.iot.sampledevice.plugin.exception;
/** /**
* Device type plugin exception handler. * Device type plugin exception handler.

@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.sampledevice.plugin.impl; package org.wso2.iot.sampledevice.plugin.impl;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
@ -29,9 +29,9 @@ 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.configuration.mgt.PlatformConfiguration;
import org.wso2.carbon.device.mgt.common.license.mgt.License; import org.wso2.carbon.device.mgt.common.license.mgt.License;
import org.wso2.carbon.device.mgt.common.license.mgt.LicenseManagementException; import org.wso2.carbon.device.mgt.common.license.mgt.LicenseManagementException;
import org.wso2.carbon.sampledevice.plugin.exception.DeviceMgtPluginException; import org.wso2.iot.sampledevice.plugin.exception.DeviceMgtPluginException;
import org.wso2.carbon.sampledevice.plugin.impl.dao.DeviceTypeDAO; import org.wso2.iot.sampledevice.plugin.impl.dao.DeviceTypeDAO;
import org.wso2.carbon.sampledevice.plugin.impl.feature.DeviceTypeFeatureManager; import org.wso2.iot.sampledevice.plugin.impl.feature.DeviceTypeFeatureManager;
import java.util.List; import java.util.List;
@ -259,4 +259,10 @@ public class DeviceTypeManager implements DeviceManager {
} }
return devices; return devices;
} }
@Override
public boolean updateDeviceProperties(DeviceIdentifier deviceIdentifier, List<Device.Property> list)
throws DeviceManagementException {
return false;
}
} }

@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.sampledevice.plugin.impl; package org.wso2.iot.sampledevice.plugin.impl;
import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.DeviceManager; import org.wso2.carbon.device.mgt.common.DeviceManager;
@ -24,12 +24,13 @@ import org.wso2.carbon.device.mgt.common.DeviceStatusTaskPluginConfig;
import org.wso2.carbon.device.mgt.common.InitialOperationConfig; import org.wso2.carbon.device.mgt.common.InitialOperationConfig;
import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig; import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig;
import org.wso2.carbon.device.mgt.common.ProvisioningConfig; import org.wso2.carbon.device.mgt.common.ProvisioningConfig;
import org.wso2.carbon.device.mgt.common.general.GeneralConfig;
import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManager; import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManager;
import org.wso2.carbon.device.mgt.common.policy.mgt.PolicyMonitoringManager; import org.wso2.carbon.device.mgt.common.policy.mgt.PolicyMonitoringManager;
import org.wso2.carbon.device.mgt.common.pull.notification.PullNotificationSubscriber; import org.wso2.carbon.device.mgt.common.pull.notification.PullNotificationSubscriber;
import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig; import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig;
import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService;
import org.wso2.carbon.sampledevice.plugin.constants.DeviceTypeConstants; import org.wso2.iot.sampledevice.plugin.constants.DeviceTypeConstants;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -114,4 +115,9 @@ public class DeviceTypeManagerService implements DeviceManagementService {
return null; return null;
} }
@Override
public GeneralConfig getGeneralConfig() {
return null;
}
} }

@ -16,13 +16,13 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.sampledevice.plugin.impl.dao; package org.wso2.iot.sampledevice.plugin.impl.dao;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.sampledevice.plugin.constants.DeviceTypeConstants; import org.wso2.iot.sampledevice.plugin.constants.DeviceTypeConstants;
import org.wso2.carbon.sampledevice.plugin.exception.DeviceMgtPluginException; import org.wso2.iot.sampledevice.plugin.exception.DeviceMgtPluginException;
import org.wso2.carbon.sampledevice.plugin.impl.dao.impl.DeviceTypeDAOImpl; import org.wso2.iot.sampledevice.plugin.impl.dao.impl.DeviceTypeDAOImpl;
import java.sql.Connection; import java.sql.Connection;
import java.sql.SQLException; import java.sql.SQLException;

@ -16,15 +16,15 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.sampledevice.plugin.impl.dao.impl; package org.wso2.iot.sampledevice.plugin.impl.dao.impl;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.sampledevice.plugin.constants.DeviceTypeConstants; import org.wso2.iot.sampledevice.plugin.constants.DeviceTypeConstants;
import org.wso2.carbon.sampledevice.plugin.exception.DeviceMgtPluginException; import org.wso2.iot.sampledevice.plugin.exception.DeviceMgtPluginException;
import org.wso2.carbon.sampledevice.plugin.impl.dao.DeviceTypeDAO; import org.wso2.iot.sampledevice.plugin.impl.dao.DeviceTypeDAO;
import org.wso2.carbon.sampledevice.plugin.impl.util.DeviceTypeUtils; import org.wso2.iot.sampledevice.plugin.impl.util.DeviceTypeUtils;
import java.sql.Connection; import java.sql.Connection;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.wso2.carbon.sampledevice.plugin.impl.feature; package org.wso2.iot.sampledevice.plugin.impl.feature;
import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.Feature; import org.wso2.carbon.device.mgt.common.Feature;

@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.sampledevice.plugin.impl.util; package org.wso2.iot.sampledevice.plugin.impl.util;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;

@ -16,15 +16,15 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.sampledevice.plugin.impl.util; package org.wso2.iot.sampledevice.plugin.impl.util;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.base.ServerConfiguration; import org.wso2.carbon.base.ServerConfiguration;
import org.wso2.carbon.core.util.Utils; import org.wso2.carbon.core.util.Utils;
import org.wso2.carbon.sampledevice.plugin.constants.DeviceTypeConstants; import org.wso2.iot.sampledevice.plugin.constants.DeviceTypeConstants;
import org.wso2.carbon.sampledevice.plugin.exception.DeviceMgtPluginException; import org.wso2.iot.sampledevice.plugin.exception.DeviceMgtPluginException;
import java.sql.Connection; import java.sql.Connection;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
@ -41,7 +41,7 @@ import javax.sql.DataSource;
*/ */
public class DeviceTypeUtils { public class DeviceTypeUtils {
private static Log log = LogFactory.getLog(org.wso2.carbon.sampledevice.plugin.impl.util.DeviceTypeUtils.class); private static Log log = LogFactory.getLog(DeviceTypeUtils.class);
public static void cleanupResources(Connection conn, PreparedStatement stmt, ResultSet rs) { public static void cleanupResources(Connection conn, PreparedStatement stmt, ResultSet rs) {
if (rs != null) { if (rs != null) {

@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.sampledevice.plugin.internal; package org.wso2.iot.sampledevice.plugin.internal;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
@ -25,9 +25,9 @@ import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration; import org.osgi.framework.ServiceRegistration;
import org.osgi.service.component.ComponentContext; import org.osgi.service.component.ComponentContext;
import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService;
import org.wso2.carbon.sampledevice.plugin.exception.DeviceMgtPluginException; import org.wso2.iot.sampledevice.plugin.exception.DeviceMgtPluginException;
import org.wso2.carbon.sampledevice.plugin.impl.DeviceTypeManagerService; import org.wso2.iot.sampledevice.plugin.impl.DeviceTypeManagerService;
import org.wso2.carbon.sampledevice.plugin.impl.util.DeviceTypeUtils; import org.wso2.iot.sampledevice.plugin.impl.util.DeviceTypeUtils;
/** /**
* @scr.component name="org.wso2.carbon.sampledevice.plugin.internal.ServiceComponent" * @scr.component name="org.wso2.carbon.sampledevice.plugin.internal.ServiceComponent"

@ -1,19 +1,19 @@
instructions.configure = \ instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\ 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.sampledevice_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.iot.sampledevice_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/sketches/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/sketches/);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/sketches/sampledevice/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/sketches/sampledevice/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.sampledevice_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/sampledevice/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.iot.sampledevice_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/sampledevice/,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.sampledevice_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/sampledevice,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.iot.sampledevice_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/sampledevice,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.sampledevice_${feature.version}/datasources/,target:${installFolder}/../../../conf/datasources/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.iot.sampledevice_${feature.version}/datasources/,target:${installFolder}/../../../conf/datasources/,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.sampledevice_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.iot.sampledevice_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/database/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/database/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.sampledevice_${feature.version}/database/,target:${installFolder}/../../../repository/database/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.iot.sampledevice_${feature.version}/database/,target:${installFolder}/../../../repository/database/,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/carbonapps/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/carbonapps/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.sampledevice_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/deployment/server/carbonapps/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.iot.sampledevice_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/deployment/server/carbonapps/,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ 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.sampledevice_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.iot.sampledevice_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\

@ -39,13 +39,13 @@
<dependency> <dependency>
<groupId>org.eclipse.osgi</groupId> <groupId>org.eclipse.osgi</groupId>
<artifactId>org.eclipse.osgi</artifactId> <artifactId>org.eclipse.osgi</artifactId>
<version>${eclipse.osgi.version}</version> <version>\${eclipse.osgi.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.equinox</groupId> <groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.common</artifactId> <artifactId>org.eclipse.equinox.common</artifactId>
<version>${eclipse.equinox.common.version}</version> <version>\${eclipse.equinox.common.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -57,7 +57,7 @@
<dependency> <dependency>
<groupId>org.wso2.carbon</groupId> <groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.logging</artifactId> <artifactId>org.wso2.carbon.logging</artifactId>
<version>${carbon.kernel.version}</version> <version>\${carbon.kernel.version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.apache.log4j.wso2</groupId> <groupId>org.apache.log4j.wso2</groupId>
@ -78,33 +78,33 @@
<dependency> <dependency>
<groupId>org.apache.cxf</groupId> <groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId> <artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version> <version>\${cxf.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cxf</groupId> <groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId> <artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>${cxf.version}</version> <version>\${cxf.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cxf</groupId> <groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId> <artifactId>cxf-rt-transports-http</artifactId>
<version>${cxf.version}</version> <version>\${cxf.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.paho</groupId> <groupId>org.eclipse.paho</groupId>
<artifactId>org.eclipse.paho.client.mqttv3</artifactId> <artifactId>org.eclipse.paho.client.mqttv3</artifactId>
<version>${paho.mqtt.version}</version> <version>\${paho.mqtt.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.codehaus.jackson</groupId> <groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId> <artifactId>jackson-core-asl</artifactId>
<version>${jackson.version}</version> <version>\${jackson.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.codehaus.jackson</groupId> <groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId> <artifactId>jackson-jaxrs</artifactId>
<version>${jackson.version}</version> <version>\${jackson.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax</groupId> <groupId>javax</groupId>
@ -115,24 +115,24 @@
<dependency> <dependency>
<groupId>javax.ws.rs</groupId> <groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId> <artifactId>jsr311-api</artifactId>
<version>${javax.ws.rs.version}</version> <version>\${javax.ws.rs.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.httpcomponents</groupId> <groupId>org.apache.httpcomponents</groupId>
<artifactId>httpasyncclient</artifactId> <artifactId>httpasyncclient</artifactId>
<version>${org.apache.httpcomponents.version}</version> <version>\${org.apache.httpcomponents.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon</groupId> <groupId>org.wso2.carbon</groupId>
<artifactId>${project-base-package}.plugin</artifactId> <artifactId>\${project-base-package}.plugin</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon</groupId> <groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.ndatasource.core</artifactId> <artifactId>org.wso2.carbon.ndatasource.core</artifactId>
<version>${carbon.kernel.version}</version> <version>\${carbon.kernel.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId> <groupId>org.wso2.carbon.devicemgt-plugins</groupId>
@ -142,62 +142,62 @@
<dependency> <dependency>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.mgt.core</artifactId> <artifactId>org.wso2.carbon.device.mgt.core</artifactId>
<version>${carbon.device.mgt.version}</version> <version>\${carbon.device.mgt.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.mgt.common</artifactId> <artifactId>org.wso2.carbon.device.mgt.common</artifactId>
<version>${carbon.device.mgt.version}</version> <version>\${carbon.device.mgt.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.certificate.mgt.core</artifactId> <artifactId>org.wso2.carbon.certificate.mgt.core</artifactId>
<version>${carbon.device.mgt.version}</version> <version>\${carbon.device.mgt.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.apimgt.annotations</artifactId> <artifactId>org.wso2.carbon.apimgt.annotations</artifactId>
<version>${carbon.device.mgt.version}</version> <version>\${carbon.device.mgt.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.mgt.analytics.data.publisher</artifactId> <artifactId>org.wso2.carbon.device.mgt.analytics.data.publisher</artifactId>
<version>${carbon.device.mgt.version}</version> <version>\${carbon.device.mgt.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.mgt.extensions</artifactId> <artifactId>org.wso2.carbon.device.mgt.extensions</artifactId>
<version>${carbon.device.mgt.version}</version> <version>\${carbon.device.mgt.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.analytics</groupId> <groupId>org.wso2.carbon.analytics</groupId>
<artifactId>org.wso2.carbon.analytics.api</artifactId> <artifactId>org.wso2.carbon.analytics.api</artifactId>
<version>${carbon.analytics.version}</version> <version>\${carbon.analytics.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.analytics</groupId> <groupId>org.wso2.carbon.analytics</groupId>
<artifactId>org.wso2.carbon.analytics.datasource.commons</artifactId> <artifactId>org.wso2.carbon.analytics.datasource.commons</artifactId>
<version>${carbon.analytics.version}</version> <version>\${carbon.analytics.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.analytics</groupId> <groupId>org.wso2.carbon.analytics</groupId>
<artifactId>org.wso2.carbon.analytics.dataservice.commons</artifactId> <artifactId>org.wso2.carbon.analytics.dataservice.commons</artifactId>
<version>${carbon.analytics.version}</version> <version>\${carbon.analytics.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.analytics</groupId> <groupId>org.wso2.carbon.analytics</groupId>
<artifactId>org.wso2.carbon.analytics.dataservice.core</artifactId> <artifactId>org.wso2.carbon.analytics.dataservice.core</artifactId>
<version>${carbon.analytics.version}</version> <version>\${carbon.analytics.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-httpclient.wso2</groupId> <groupId>commons-httpclient.wso2</groupId>
<artifactId>commons-httpclient</artifactId> <artifactId>commons-httpclient</artifactId>
<version>${commons-httpclient.orbit.version}</version> <version>\${commons-httpclient.orbit.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon</groupId> <groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.utils</artifactId> <artifactId>org.wso2.carbon.utils</artifactId>
<version>${carbon.kernel.version}</version> <version>\${carbon.kernel.version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.bouncycastle.wso2</groupId> <groupId>org.bouncycastle.wso2</groupId>
@ -260,32 +260,32 @@
<dependency> <dependency>
<groupId>org.igniterealtime.smack.wso2</groupId> <groupId>org.igniterealtime.smack.wso2</groupId>
<artifactId>smack</artifactId> <artifactId>smack</artifactId>
<version>${smack.wso2.version}</version> <version>\${smack.wso2.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.igniterealtime.smack.wso2</groupId> <groupId>org.igniterealtime.smack.wso2</groupId>
<artifactId>smackx</artifactId> <artifactId>smackx</artifactId>
<version>${smackx.wso2.version}</version> <version>\${smackx.wso2.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.json.wso2</groupId> <groupId>org.json.wso2</groupId>
<artifactId>json</artifactId> <artifactId>json</artifactId>
<version>${commons-json.version}</version> <version>\${commons-json.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.mgt.extensions</artifactId> <artifactId>org.wso2.carbon.device.mgt.extensions</artifactId>
<version>${carbon.device.mgt.version}</version> <version>\${carbon.device.mgt.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.apimgt.application.extension</artifactId> <artifactId>org.wso2.carbon.apimgt.application.extension</artifactId>
<version>${carbon.device.mgt.version}</version> <version>\${carbon.device.mgt.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.identity.jwt.client.extension</artifactId> <artifactId>org.wso2.carbon.identity.jwt.client.extension</artifactId>
<version>${carbon.device.mgt.version}</version> <version>\${carbon.device.mgt.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.h2database.wso2</groupId> <groupId>com.h2database.wso2</groupId>
@ -295,17 +295,17 @@
<dependency> <dependency>
<groupId>org.wso2.carbon.analytics-common</groupId> <groupId>org.wso2.carbon.analytics-common</groupId>
<artifactId>org.wso2.carbon.event.output.adapter.core</artifactId> <artifactId>org.wso2.carbon.event.output.adapter.core</artifactId>
<version>${carbon.analytics.common.version}</version> <version>\${carbon.analytics.common.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.mgt.extensions</artifactId> <artifactId>org.wso2.carbon.device.mgt.extensions</artifactId>
<version>${carbon.device.mgt.version}</version> <version>\${carbon.device.mgt.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-codec.wso2</groupId> <groupId>commons-codec.wso2</groupId>
<artifactId>commons-codec</artifactId> <artifactId>commons-codec</artifactId>
<version>${commons-codec.wso2.version}</version> <version>\${commons-codec.wso2.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
@ -374,12 +374,11 @@
</repository> </repository>
</repositories> </repositories>
<properties> <properties>
<carbon.kernel.version>4.4.11</carbon.kernel.version> <carbon.kernel.version>${carbon.kernel.version}</carbon.kernel.version>
<!-- Carbon Device Management --> <!-- Carbon Device Management -->
<carbon.device.mgt.version>3.0.37</carbon.device.mgt.version> <carbon.device.mgt.version>${carbon.device.mgt.version}</carbon.device.mgt.version>
<carbon.device.mgt.plugin.version>4.0.34</carbon.device.mgt.plugin.version> <carbon.device.mgt.plugin.version>${carbon.device.mgt.plugin.version}</carbon.device.mgt.plugin.version>
<project-base-package>${project.groupId}.sampledevice</project-base-package> <project-base-package>${project.groupId}.sampledevice</project-base-package>

@ -1520,14 +1520,14 @@
<carbon.governance.version>4.7.8</carbon.governance.version> <carbon.governance.version>4.7.8</carbon.governance.version>
<!-- Carbon Device Management--> <!-- Carbon Device Management-->
<carbon.device.mgt.version>3.0.219</carbon.device.mgt.version> <carbon.device.mgt.version>3.0.220</carbon.device.mgt.version>
<carbon.device.mgt.version.range>[3.0.0, 4.0.0)</carbon.device.mgt.version.range> <carbon.device.mgt.version.range>[3.0.0, 4.0.0)</carbon.device.mgt.version.range>
<!-- IOT Device Management --> <!-- IOT Device Management -->
<product.iot.version>${project.version}</product.iot.version> <product.iot.version>${project.version}</product.iot.version>
<!-- Carbon Device Management Plugins--> <!-- Carbon Device Management Plugins-->
<carbon.device.mgt.plugin.version>4.0.123</carbon.device.mgt.plugin.version> <carbon.device.mgt.plugin.version>4.0.125</carbon.device.mgt.plugin.version>
<!-- API Management --> <!-- API Management -->
<carbon.api.mgt.version>6.1.109</carbon.api.mgt.version> <carbon.api.mgt.version>6.1.109</carbon.api.mgt.version>

Loading…
Cancel
Save