From c1d90b3f79340dfd175201fcaaedd15879ceec8d Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Mon, 5 Feb 2018 16:08:56 +0530 Subject: [PATCH] Fixes https://github.com/wso2/product-iots/issues/773 --- .../core/samples/sampledevice-deployer.xml | 14 ++-- .../sampledevice/component/analytics/pom.xml | 4 +- .../sampledevice/api/DeviceTypeService.java | 2 +- .../api/DeviceTypeServiceImpl.java | 16 ++--- .../sampledevice/api/dto/DeviceJSON.java | 2 +- .../sampledevice/api/dto/SensorRecord.java | 2 +- .../api/exception/DeviceTypeException.java | 2 +- .../sampledevice/api/util/APIUtil.java | 4 +- .../sampledevice/api/util/ZipArchive.java | 2 +- .../sampledevice/api/util/ZipUtil.java | 2 +- .../src/main/webapp/WEB-INF/cxf-servlet.xml | 2 +- .../plugin/constants/DeviceTypeConstants.java | 2 +- .../exception/DeviceMgtPluginException.java | 2 +- .../plugin/impl/DeviceTypeManager.java | 8 +-- .../plugin/impl/DeviceTypeManagerService.java | 4 +- .../plugin/impl/dao/DeviceTypeDAO.java | 8 +-- .../impl/dao/impl/DeviceTypeDAOImpl.java | 10 +-- .../feature/DeviceTypeFeatureManager.java | 2 +- .../impl/util/DeviceSchemaInitializer.java | 2 +- .../plugin/impl/util/DeviceTypeUtils.java | 8 +-- .../plugin/internal/ServiceComponent.java | 8 +-- .../feature/feature/src/main/resources/p2.inf | 16 ++--- .../src/core/samples/sampledevice/pom.xml | 68 +++++++++---------- 23 files changed, 95 insertions(+), 95 deletions(-) rename modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/{carbon => iot}/sampledevice/api/DeviceTypeService.java (99%) rename modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/{carbon => iot}/sampledevice/api/DeviceTypeServiceImpl.java (96%) rename modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/{carbon => iot}/sampledevice/api/dto/DeviceJSON.java (96%) rename modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/{carbon => iot}/sampledevice/api/dto/SensorRecord.java (97%) rename modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/{carbon => iot}/sampledevice/api/exception/DeviceTypeException.java (96%) rename modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/{carbon => iot}/sampledevice/api/util/APIUtil.java (98%) rename modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/{carbon => iot}/sampledevice/api/util/ZipArchive.java (95%) rename modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/{carbon => iot}/sampledevice/api/util/ZipUtil.java (99%) rename modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/{carbon => iot}/sampledevice/plugin/constants/DeviceTypeConstants.java (98%) rename modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/{carbon => iot}/sampledevice/plugin/exception/DeviceMgtPluginException.java (96%) rename modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/{carbon => iot}/sampledevice/plugin/impl/DeviceTypeManager.java (97%) rename modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/{carbon => iot}/sampledevice/plugin/impl/DeviceTypeManagerService.java (97%) rename modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/{carbon => iot}/sampledevice/plugin/impl/dao/DeviceTypeDAO.java (93%) rename modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/{carbon => iot}/sampledevice/plugin/impl/dao/impl/DeviceTypeDAOImpl.java (95%) rename modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/{carbon => iot}/sampledevice/plugin/impl/feature/DeviceTypeFeatureManager.java (98%) rename modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/{carbon => iot}/sampledevice/plugin/impl/util/DeviceSchemaInitializer.java (97%) rename modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/{carbon => iot}/sampledevice/plugin/impl/util/DeviceTypeUtils.java (93%) rename modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/{carbon => iot}/sampledevice/plugin/internal/ServiceComponent.java (92%) diff --git a/modules/distribution/src/core/samples/sampledevice-deployer.xml b/modules/distribution/src/core/samples/sampledevice-deployer.xml index fd9dc107..9af92088 100644 --- a/modules/distribution/src/core/samples/sampledevice-deployer.xml +++ b/modules/distribution/src/core/samples/sampledevice-deployer.xml @@ -51,13 +51,13 @@ p2-repo-gen - file:${basedir}/p2-repo - file:${basedir}/p2-repo + file:\${basedir}/p2-repo + file:\${basedir}/p2-repo true true - org.wso2.carbon:org.wso2.carbon.sampledevice.feature:1.0.0 + org.wso2.carbon:org.wso2.iot.sampledevice.feature:1.0.0 @@ -70,13 +70,13 @@ default - file:${basedir}/p2-repo - file:${basedir}/p2-repo - ${basedir}/../wso2/components + file:\${basedir}/p2-repo + file:\${basedir}/p2-repo + \${basedir}/../wso2/components false - org.wso2.carbon.sampledevice.feature.group + org.wso2.iot.sampledevice.feature.group 1.0.0 diff --git a/modules/distribution/src/core/samples/sampledevice/component/analytics/pom.xml b/modules/distribution/src/core/samples/sampledevice/component/analytics/pom.xml index e032eaa4..7cedab9c 100644 --- a/modules/distribution/src/core/samples/sampledevice/component/analytics/pom.xml +++ b/modules/distribution/src/core/samples/sampledevice/component/analytics/pom.xml @@ -26,10 +26,10 @@ ../pom.xml 4.0.0 - ${groupId}.sampledevice.analytics + ${project-base-package}.analytics 1.0.0 pom - ${groupId}.sampledevice.analytics + ${project-base-package}.analytics http://wso2.org diff --git a/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/DeviceTypeService.java b/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/DeviceTypeService.java similarity index 99% rename from modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/DeviceTypeService.java rename to modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/DeviceTypeService.java index 43299c99..e8bcc467 100644 --- a/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/DeviceTypeService.java +++ b/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/DeviceTypeService.java @@ -16,7 +16,7 @@ * under the License. */ -package org.wso2.carbon.sampledevice.api; +package org.wso2.iot.sampledevice.api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.Extension; diff --git a/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/DeviceTypeServiceImpl.java b/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/DeviceTypeServiceImpl.java similarity index 96% rename from modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/DeviceTypeServiceImpl.java rename to modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/DeviceTypeServiceImpl.java index d492be15..98f0d3da 100644 --- a/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/DeviceTypeServiceImpl.java +++ b/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/DeviceTypeServiceImpl.java @@ -16,7 +16,7 @@ * under the License. */ -package org.wso2.carbon.sampledevice.api; +package org.wso2.iot.sampledevice.api; 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.dto.AccessTokenInfo; import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException; -import org.wso2.carbon.sampledevice.api.dto.DeviceJSON; -import org.wso2.carbon.sampledevice.api.dto.SensorRecord; -import org.wso2.carbon.sampledevice.api.util.APIUtil; -import org.wso2.carbon.sampledevice.api.util.ZipArchive; -import org.wso2.carbon.sampledevice.api.util.ZipUtil; -import org.wso2.carbon.sampledevice.plugin.constants.DeviceTypeConstants; +import org.wso2.iot.sampledevice.api.dto.DeviceJSON; +import org.wso2.iot.sampledevice.api.dto.SensorRecord; +import org.wso2.iot.sampledevice.api.util.APIUtil; +import org.wso2.iot.sampledevice.api.util.ZipArchive; +import org.wso2.iot.sampledevice.api.util.ZipUtil; +import org.wso2.iot.sampledevice.plugin.constants.DeviceTypeConstants; import org.wso2.carbon.user.api.UserStoreException; import java.io.IOException; @@ -114,7 +114,7 @@ public class DeviceTypeServiceImpl implements DeviceTypeService { @Context HttpServletResponse response) { try { if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized(new DeviceIdentifier(deviceId, - DeviceTypeConstants.DEVICE_TYPE))) { + DeviceTypeConstants.DEVICE_TYPE))) { return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build(); } String sensorState = state.toUpperCase(); diff --git a/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/dto/DeviceJSON.java b/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/dto/DeviceJSON.java similarity index 96% rename from modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/dto/DeviceJSON.java rename to modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/dto/DeviceJSON.java index b360fb78..a0349bc0 100644 --- a/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/dto/DeviceJSON.java +++ b/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/dto/DeviceJSON.java @@ -16,7 +16,7 @@ * under the License. */ -package org.wso2.carbon.sampledevice.api.dto; +package org.wso2.iot.sampledevice.api.dto; import org.codehaus.jackson.annotate.JsonIgnoreProperties; diff --git a/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/dto/SensorRecord.java b/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/dto/SensorRecord.java similarity index 97% rename from modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/dto/SensorRecord.java rename to modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/dto/SensorRecord.java index bd84b2b4..e93c4145 100644 --- a/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/dto/SensorRecord.java +++ b/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/dto/SensorRecord.java @@ -16,7 +16,7 @@ * under the License. */ -package org.wso2.carbon.sampledevice.api.dto; +package org.wso2.iot.sampledevice.api.dto; import org.codehaus.jackson.annotate.JsonIgnoreProperties; diff --git a/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/exception/DeviceTypeException.java b/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/exception/DeviceTypeException.java similarity index 96% rename from modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/exception/DeviceTypeException.java rename to modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/exception/DeviceTypeException.java index f65830da..7e47b2d1 100644 --- a/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/exception/DeviceTypeException.java +++ b/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/exception/DeviceTypeException.java @@ -16,7 +16,7 @@ * under the License. */ -package org.wso2.carbon.sampledevice.api.exception; +package org.wso2.iot.sampledevice.api.exception; /** * Device specific exception handler. diff --git a/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/util/APIUtil.java b/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/util/APIUtil.java similarity index 98% rename from modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/util/APIUtil.java rename to modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/util/APIUtil.java index 7ad92215..2c2facc6 100644 --- a/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/util/APIUtil.java +++ b/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/util/APIUtil.java @@ -16,7 +16,7 @@ * under the License. */ -package org.wso2.carbon.sampledevice.api.util; +package org.wso2.iot.sampledevice.api.util; 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.core.service.DeviceManagementProviderService; 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.HashMap; diff --git a/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/util/ZipArchive.java b/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/util/ZipArchive.java similarity index 95% rename from modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/util/ZipArchive.java rename to modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/util/ZipArchive.java index c6fb7d82..d3e886f8 100644 --- a/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/util/ZipArchive.java +++ b/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/util/ZipArchive.java @@ -16,7 +16,7 @@ * under the License. */ -package org.wso2.carbon.sampledevice.api.util; +package org.wso2.iot.sampledevice.api.util; import java.io.File; diff --git a/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/util/ZipUtil.java b/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/util/ZipUtil.java similarity index 99% rename from modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/util/ZipUtil.java rename to modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/util/ZipUtil.java index 7be74c97..95e0b792 100644 --- a/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/carbon/sampledevice/api/util/ZipUtil.java +++ b/modules/distribution/src/core/samples/sampledevice/component/api/src/main/java/org/wso2/iot/sampledevice/api/util/ZipUtil.java @@ -16,7 +16,7 @@ * 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.io.FileUtils; diff --git a/modules/distribution/src/core/samples/sampledevice/component/api/src/main/webapp/WEB-INF/cxf-servlet.xml b/modules/distribution/src/core/samples/sampledevice/component/api/src/main/webapp/WEB-INF/cxf-servlet.xml index d5c5b7c6..66165807 100644 --- a/modules/distribution/src/core/samples/sampledevice/component/api/src/main/webapp/WEB-INF/cxf-servlet.xml +++ b/modules/distribution/src/core/samples/sampledevice/component/api/src/main/webapp/WEB-INF/cxf-servlet.xml @@ -27,7 +27,7 @@ + class="org.wso2.iot.sampledevice.api.DeviceTypeServiceImpl"> diff --git a/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/constants/DeviceTypeConstants.java b/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/constants/DeviceTypeConstants.java similarity index 98% rename from modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/constants/DeviceTypeConstants.java rename to modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/constants/DeviceTypeConstants.java index 03466b2b..4e763086 100644 --- a/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/constants/DeviceTypeConstants.java +++ b/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/constants/DeviceTypeConstants.java @@ -16,7 +16,7 @@ * under the License. */ -package org.wso2.carbon.sampledevice.plugin.constants; +package org.wso2.iot.sampledevice.plugin.constants; import org.wso2.carbon.utils.CarbonUtils; diff --git a/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/exception/DeviceMgtPluginException.java b/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/exception/DeviceMgtPluginException.java similarity index 96% rename from modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/exception/DeviceMgtPluginException.java rename to modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/exception/DeviceMgtPluginException.java index e0fe4b9b..9a7856cc 100644 --- a/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/exception/DeviceMgtPluginException.java +++ b/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/exception/DeviceMgtPluginException.java @@ -16,7 +16,7 @@ * under the License. */ -package org.wso2.carbon.sampledevice.plugin.exception; +package org.wso2.iot.sampledevice.plugin.exception; /** * Device type plugin exception handler. diff --git a/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/DeviceTypeManager.java b/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/DeviceTypeManager.java similarity index 97% rename from modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/DeviceTypeManager.java rename to modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/DeviceTypeManager.java index fa62356b..5482feb0 100644 --- a/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/DeviceTypeManager.java +++ b/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/DeviceTypeManager.java @@ -16,7 +16,7 @@ * 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.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.license.mgt.License; import org.wso2.carbon.device.mgt.common.license.mgt.LicenseManagementException; -import org.wso2.carbon.sampledevice.plugin.exception.DeviceMgtPluginException; -import org.wso2.carbon.sampledevice.plugin.impl.dao.DeviceTypeDAO; -import org.wso2.carbon.sampledevice.plugin.impl.feature.DeviceTypeFeatureManager; +import org.wso2.iot.sampledevice.plugin.exception.DeviceMgtPluginException; +import org.wso2.iot.sampledevice.plugin.impl.dao.DeviceTypeDAO; +import org.wso2.iot.sampledevice.plugin.impl.feature.DeviceTypeFeatureManager; import java.util.List; diff --git a/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/DeviceTypeManagerService.java b/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/DeviceTypeManagerService.java similarity index 97% rename from modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/DeviceTypeManagerService.java rename to modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/DeviceTypeManagerService.java index 9ecb5311..725f4379 100644 --- a/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/DeviceTypeManagerService.java +++ b/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/DeviceTypeManagerService.java @@ -16,7 +16,7 @@ * 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.DeviceManager; @@ -30,7 +30,7 @@ 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.push.notification.PushNotificationConfig; 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.HashMap; diff --git a/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/dao/DeviceTypeDAO.java b/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/dao/DeviceTypeDAO.java similarity index 93% rename from modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/dao/DeviceTypeDAO.java rename to modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/dao/DeviceTypeDAO.java index 6b2b5098..779e0e81 100644 --- a/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/dao/DeviceTypeDAO.java +++ b/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/dao/DeviceTypeDAO.java @@ -16,13 +16,13 @@ * 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.LogFactory; -import org.wso2.carbon.sampledevice.plugin.constants.DeviceTypeConstants; -import org.wso2.carbon.sampledevice.plugin.exception.DeviceMgtPluginException; -import org.wso2.carbon.sampledevice.plugin.impl.dao.impl.DeviceTypeDAOImpl; +import org.wso2.iot.sampledevice.plugin.constants.DeviceTypeConstants; +import org.wso2.iot.sampledevice.plugin.exception.DeviceMgtPluginException; +import org.wso2.iot.sampledevice.plugin.impl.dao.impl.DeviceTypeDAOImpl; import java.sql.Connection; import java.sql.SQLException; diff --git a/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/dao/impl/DeviceTypeDAOImpl.java b/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/dao/impl/DeviceTypeDAOImpl.java similarity index 95% rename from modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/dao/impl/DeviceTypeDAOImpl.java rename to modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/dao/impl/DeviceTypeDAOImpl.java index 529b7a27..b298f34a 100644 --- a/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/dao/impl/DeviceTypeDAOImpl.java +++ b/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/dao/impl/DeviceTypeDAOImpl.java @@ -16,15 +16,15 @@ * 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.LogFactory; import org.wso2.carbon.device.mgt.common.Device; -import org.wso2.carbon.sampledevice.plugin.constants.DeviceTypeConstants; -import org.wso2.carbon.sampledevice.plugin.exception.DeviceMgtPluginException; -import org.wso2.carbon.sampledevice.plugin.impl.dao.DeviceTypeDAO; -import org.wso2.carbon.sampledevice.plugin.impl.util.DeviceTypeUtils; +import org.wso2.iot.sampledevice.plugin.constants.DeviceTypeConstants; +import org.wso2.iot.sampledevice.plugin.exception.DeviceMgtPluginException; +import org.wso2.iot.sampledevice.plugin.impl.dao.DeviceTypeDAO; +import org.wso2.iot.sampledevice.plugin.impl.util.DeviceTypeUtils; import java.sql.Connection; import java.sql.PreparedStatement; diff --git a/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/feature/DeviceTypeFeatureManager.java b/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/feature/DeviceTypeFeatureManager.java similarity index 98% rename from modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/feature/DeviceTypeFeatureManager.java rename to modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/feature/DeviceTypeFeatureManager.java index 0215df11..f63a2731 100644 --- a/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/feature/DeviceTypeFeatureManager.java +++ b/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/feature/DeviceTypeFeatureManager.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * 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.Feature; diff --git a/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/util/DeviceSchemaInitializer.java b/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/util/DeviceSchemaInitializer.java similarity index 97% rename from modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/util/DeviceSchemaInitializer.java rename to modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/util/DeviceSchemaInitializer.java index 5cd1d095..02db735c 100644 --- a/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/util/DeviceSchemaInitializer.java +++ b/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/util/DeviceSchemaInitializer.java @@ -16,7 +16,7 @@ * 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.LogFactory; diff --git a/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/util/DeviceTypeUtils.java b/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/util/DeviceTypeUtils.java similarity index 93% rename from modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/util/DeviceTypeUtils.java rename to modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/util/DeviceTypeUtils.java index 71c77354..2a6588fc 100644 --- a/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/impl/util/DeviceTypeUtils.java +++ b/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/impl/util/DeviceTypeUtils.java @@ -16,15 +16,15 @@ * 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.LogFactory; import org.wso2.carbon.base.ServerConfiguration; import org.wso2.carbon.core.util.Utils; -import org.wso2.carbon.sampledevice.plugin.constants.DeviceTypeConstants; -import org.wso2.carbon.sampledevice.plugin.exception.DeviceMgtPluginException; +import org.wso2.iot.sampledevice.plugin.constants.DeviceTypeConstants; +import org.wso2.iot.sampledevice.plugin.exception.DeviceMgtPluginException; import java.sql.Connection; import java.sql.PreparedStatement; @@ -41,7 +41,7 @@ import javax.sql.DataSource; */ 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) { if (rs != null) { diff --git a/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/internal/ServiceComponent.java b/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/internal/ServiceComponent.java similarity index 92% rename from modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/internal/ServiceComponent.java rename to modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/internal/ServiceComponent.java index bc87d848..c7984654 100644 --- a/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/carbon/sampledevice/plugin/internal/ServiceComponent.java +++ b/modules/distribution/src/core/samples/sampledevice/component/plugin/src/main/java/org/wso2/iot/sampledevice/plugin/internal/ServiceComponent.java @@ -16,7 +16,7 @@ * under the License. */ -package org.wso2.carbon.sampledevice.plugin.internal; +package org.wso2.iot.sampledevice.plugin.internal; import org.apache.commons.logging.Log; @@ -25,9 +25,9 @@ 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; -import org.wso2.carbon.sampledevice.plugin.exception.DeviceMgtPluginException; -import org.wso2.carbon.sampledevice.plugin.impl.DeviceTypeManagerService; -import org.wso2.carbon.sampledevice.plugin.impl.util.DeviceTypeUtils; +import org.wso2.iot.sampledevice.plugin.exception.DeviceMgtPluginException; +import org.wso2.iot.sampledevice.plugin.impl.DeviceTypeManagerService; +import org.wso2.iot.sampledevice.plugin.impl.util.DeviceTypeUtils; /** * @scr.component name="org.wso2.carbon.sampledevice.plugin.internal.ServiceComponent" diff --git a/modules/distribution/src/core/samples/sampledevice/feature/feature/src/main/resources/p2.inf b/modules/distribution/src/core/samples/sampledevice/feature/feature/src/main/resources/p2.inf index 080a8eb1..78c27a1e 100644 --- a/modules/distribution/src/core/samples/sampledevice/feature/feature/src/main/resources/p2.inf +++ b/modules/distribution/src/core/samples/sampledevice/feature/feature/src/main/resources/p2.inf @@ -1,19 +1,19 @@ instructions.configure = \ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.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/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.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.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}/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}/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}/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.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.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.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.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);\ diff --git a/modules/distribution/src/core/samples/sampledevice/pom.xml b/modules/distribution/src/core/samples/sampledevice/pom.xml index deeff3ae..8605058c 100644 --- a/modules/distribution/src/core/samples/sampledevice/pom.xml +++ b/modules/distribution/src/core/samples/sampledevice/pom.xml @@ -39,13 +39,13 @@ org.eclipse.osgi org.eclipse.osgi - ${eclipse.osgi.version} + \${eclipse.osgi.version} provided org.eclipse.equinox org.eclipse.equinox.common - ${eclipse.equinox.common.version} + \${eclipse.equinox.common.version} provided @@ -57,7 +57,7 @@ org.wso2.carbon org.wso2.carbon.logging - ${carbon.kernel.version} + \${carbon.kernel.version} org.apache.log4j.wso2 @@ -78,33 +78,33 @@ org.apache.cxf cxf-rt-frontend-jaxws - ${cxf.version} + \${cxf.version} org.apache.cxf cxf-rt-frontend-jaxrs - ${cxf.version} + \${cxf.version} org.apache.cxf cxf-rt-transports-http - ${cxf.version} + \${cxf.version} org.eclipse.paho org.eclipse.paho.client.mqttv3 - ${paho.mqtt.version} + \${paho.mqtt.version} provided org.codehaus.jackson jackson-core-asl - ${jackson.version} + \${jackson.version} org.codehaus.jackson jackson-jaxrs - ${jackson.version} + \${jackson.version} javax @@ -115,24 +115,24 @@ javax.ws.rs jsr311-api - ${javax.ws.rs.version} + \${javax.ws.rs.version} org.apache.httpcomponents httpasyncclient - ${org.apache.httpcomponents.version} + \${org.apache.httpcomponents.version} provided org.wso2.carbon - ${project-base-package}.plugin + \${project-base-package}.plugin 1.0.0 provided org.wso2.carbon org.wso2.carbon.ndatasource.core - ${carbon.kernel.version} + \${carbon.kernel.version} org.wso2.carbon.devicemgt-plugins @@ -142,62 +142,62 @@ org.wso2.carbon.devicemgt org.wso2.carbon.device.mgt.core - ${carbon.device.mgt.version} + \${carbon.device.mgt.version} org.wso2.carbon.devicemgt org.wso2.carbon.device.mgt.common - ${carbon.device.mgt.version} + \${carbon.device.mgt.version} org.wso2.carbon.devicemgt org.wso2.carbon.certificate.mgt.core - ${carbon.device.mgt.version} + \${carbon.device.mgt.version} org.wso2.carbon.devicemgt org.wso2.carbon.apimgt.annotations - ${carbon.device.mgt.version} + \${carbon.device.mgt.version} org.wso2.carbon.devicemgt org.wso2.carbon.device.mgt.analytics.data.publisher - ${carbon.device.mgt.version} + \${carbon.device.mgt.version} org.wso2.carbon.devicemgt org.wso2.carbon.device.mgt.extensions - ${carbon.device.mgt.version} + \${carbon.device.mgt.version} org.wso2.carbon.analytics org.wso2.carbon.analytics.api - ${carbon.analytics.version} + \${carbon.analytics.version} org.wso2.carbon.analytics org.wso2.carbon.analytics.datasource.commons - ${carbon.analytics.version} + \${carbon.analytics.version} org.wso2.carbon.analytics org.wso2.carbon.analytics.dataservice.commons - ${carbon.analytics.version} + \${carbon.analytics.version} org.wso2.carbon.analytics org.wso2.carbon.analytics.dataservice.core - ${carbon.analytics.version} + \${carbon.analytics.version} commons-httpclient.wso2 commons-httpclient - ${commons-httpclient.orbit.version} + \${commons-httpclient.orbit.version} org.wso2.carbon org.wso2.carbon.utils - ${carbon.kernel.version} + \${carbon.kernel.version} org.bouncycastle.wso2 @@ -260,32 +260,32 @@ org.igniterealtime.smack.wso2 smack - ${smack.wso2.version} + \${smack.wso2.version} org.igniterealtime.smack.wso2 smackx - ${smackx.wso2.version} + \${smackx.wso2.version} org.json.wso2 json - ${commons-json.version} + \${commons-json.version} org.wso2.carbon.devicemgt org.wso2.carbon.device.mgt.extensions - ${carbon.device.mgt.version} + \${carbon.device.mgt.version} org.wso2.carbon.devicemgt org.wso2.carbon.apimgt.application.extension - ${carbon.device.mgt.version} + \${carbon.device.mgt.version} org.wso2.carbon.devicemgt org.wso2.carbon.identity.jwt.client.extension - ${carbon.device.mgt.version} + \${carbon.device.mgt.version} com.h2database.wso2 @@ -295,17 +295,17 @@ org.wso2.carbon.analytics-common org.wso2.carbon.event.output.adapter.core - ${carbon.analytics.common.version} + \${carbon.analytics.common.version} org.wso2.carbon.devicemgt org.wso2.carbon.device.mgt.extensions - ${carbon.device.mgt.version} + \${carbon.device.mgt.version} commons-codec.wso2 commons-codec - ${commons-codec.wso2.version} + \${commons-codec.wso2.version}