diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml
index c32e570c9d..e0c6345ebb 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml
@@ -30,7 +30,6 @@
4.0.0
org.wso2.carbon.device.mgt.analytics.data.publisher
- 1.1.0-SNAPSHOT
bundle
WSO2 Carbon - Device Analytics
WSO2 Carbon - Device Analytics
@@ -112,7 +111,7 @@
${project.artifactId}
${carbon.device.mgt.version}
Data Publisher
- org.wso2.carbon.device.mgt.analytics.internal
+ org.wso2.carbon.device.mgt.analytics.data.publisher.internal
!org.wso2.carbon.device.mgt.analytics.data.publisher.internal,
org.wso2.carbon.device.mgt.analytics.data.publisher.*;version="${carbon.device.mgt.version}"
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/AnalyticsDataRecord.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/AnalyticsDataRecord.java
index d869aed1c3..ac1f50f13a 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/AnalyticsDataRecord.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/AnalyticsDataRecord.java
@@ -16,7 +16,7 @@
* under the License.
*
*/
-package org.wso2.carbon.device.mgt.analytics;
+package org.wso2.carbon.device.mgt.analytics.data.publisher;
import java.util.HashMap;
import java.util.Map;
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/DeviceAnalyticsUtil.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/DeviceAnalyticsUtil.java
index b50c57aa7f..c622369b18 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/DeviceAnalyticsUtil.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/DeviceAnalyticsUtil.java
@@ -16,10 +16,10 @@
* under the License.
*
*/
-package org.wso2.carbon.device.mgt.analytics;
+package org.wso2.carbon.device.mgt.analytics.data.publisher;
import org.w3c.dom.Document;
-import org.wso2.carbon.device.mgt.analytics.exception.DataPublisherConfigurationException;
+import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DataPublisherConfigurationException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/DeviceDataPublisher.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/DeviceDataPublisher.java
index 464a6a444a..2891904561 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/DeviceDataPublisher.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/DeviceDataPublisher.java
@@ -16,7 +16,7 @@
* under the License.
*
*/
-package org.wso2.carbon.device.mgt.analytics;
+package org.wso2.carbon.device.mgt.analytics.data.publisher;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -31,11 +31,10 @@ import org.wso2.carbon.databridge.agent.exception.DataEndpointAuthenticationExce
import org.wso2.carbon.databridge.agent.exception.DataEndpointConfigurationException;
import org.wso2.carbon.databridge.agent.exception.DataEndpointException;
import org.wso2.carbon.databridge.commons.exception.TransportException;
-import org.wso2.carbon.device.mgt.analytics.config.AnalyticsConfiguration;
-import org.wso2.carbon.device.mgt.analytics.exception.DataPublisherAlreadyExistsException;
-import org.wso2.carbon.device.mgt.analytics.exception.DataPublisherConfigurationException;
-import org.wso2.carbon.device.mgt.analytics.internal.DeviceAnalyticsDataHolder;
-import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager;
+import org.wso2.carbon.device.mgt.analytics.data.publisher.config.AnalyticsConfiguration;
+import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DataPublisherAlreadyExistsException;
+import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DataPublisherConfigurationException;
+import org.wso2.carbon.device.mgt.analytics.data.publisher.internal.DeviceAnalyticsDataHolder;
import org.wso2.carbon.registry.core.Registry;
import org.wso2.carbon.registry.core.Resource;
import org.wso2.carbon.registry.core.exceptions.RegistryException;
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/config/AnalyticsConfiguration.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/config/AnalyticsConfiguration.java
index 28146dd6f5..c08dfc420f 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/config/AnalyticsConfiguration.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/config/AnalyticsConfiguration.java
@@ -16,24 +16,20 @@
* under the License.
*
*/
-package org.wso2.carbon.device.mgt.analytics.config;
+package org.wso2.carbon.device.mgt.analytics.data.publisher.config;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document;
-import org.wso2.carbon.device.mgt.analytics.DeviceAnalyticsUtil;
-import org.wso2.carbon.device.mgt.analytics.exception.DataPublisherConfigurationException;
+import org.wso2.carbon.device.mgt.analytics.data.publisher.DeviceAnalyticsUtil;
+import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DataPublisherConfigurationException;
import org.wso2.carbon.utils.CarbonUtils;
-import org.xml.sax.SAXException;
-import javax.xml.XMLConstants;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.validation.Schema;
-import javax.xml.validation.SchemaFactory;
import java.io.File;
/**
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/config/InvalidConfigurationStateException.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/config/InvalidConfigurationStateException.java
index b471c9e82a..8603b21f16 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/config/InvalidConfigurationStateException.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/config/InvalidConfigurationStateException.java
@@ -16,7 +16,7 @@
* under the License.
*
*/
-package org.wso2.carbon.device.mgt.analytics.config;
+package org.wso2.carbon.device.mgt.analytics.data.publisher.config;
public class InvalidConfigurationStateException extends RuntimeException {
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/exception/DataPublisherAlreadyExistsException.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/exception/DataPublisherAlreadyExistsException.java
index b174b407f2..8646d92e57 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/exception/DataPublisherAlreadyExistsException.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/exception/DataPublisherAlreadyExistsException.java
@@ -17,7 +17,7 @@
*
*/
-package org.wso2.carbon.device.mgt.analytics.exception;
+package org.wso2.carbon.device.mgt.analytics.data.publisher.exception;
public class DataPublisherAlreadyExistsException extends Exception {
public DataPublisherAlreadyExistsException() {
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/exception/DataPublisherConfigurationException.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/exception/DataPublisherConfigurationException.java
index 8bf57137ed..7db8ae1009 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/exception/DataPublisherConfigurationException.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/exception/DataPublisherConfigurationException.java
@@ -16,7 +16,7 @@
* under the License.
*
*/
-package org.wso2.carbon.device.mgt.analytics.exception;
+package org.wso2.carbon.device.mgt.analytics.data.publisher.exception;
public class DataPublisherConfigurationException extends Exception {
public DataPublisherConfigurationException() {
@@ -40,4 +40,5 @@ public class DataPublisherConfigurationException extends Exception {
boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
+
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/exception/DeviceManagementAnalyticsException.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/exception/DeviceManagementAnalyticsException.java
index 602d8da587..021ddc9b1e 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/exception/DeviceManagementAnalyticsException.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/exception/DeviceManagementAnalyticsException.java
@@ -16,7 +16,7 @@
* under the License.
*
*/
-package org.wso2.carbon.device.mgt.analytics.exception;
+package org.wso2.carbon.device.mgt.analytics.data.publisher.exception;
public class DeviceManagementAnalyticsException extends Exception {
public DeviceManagementAnalyticsException() {
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/internal/DeviceAnalyticsDataHolder.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/internal/DeviceAnalyticsDataHolder.java
index 0f2c01d40d..9de111fb9c 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/internal/DeviceAnalyticsDataHolder.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/internal/DeviceAnalyticsDataHolder.java
@@ -16,7 +16,7 @@
* under the License.
*
*/
-package org.wso2.carbon.device.mgt.analytics.internal;
+package org.wso2.carbon.device.mgt.analytics.data.publisher.internal;
import org.wso2.carbon.analytics.api.AnalyticsDataAPI;
import org.wso2.carbon.registry.core.service.RegistryService;
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/internal/DeviceAnalyticsServiceComponent.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/internal/DeviceAnalyticsServiceComponent.java
index 51d45c78dc..83f71348ac 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/internal/DeviceAnalyticsServiceComponent.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/internal/DeviceAnalyticsServiceComponent.java
@@ -16,7 +16,7 @@
* under the License.
*
*/
-package org.wso2.carbon.device.mgt.analytics.internal;
+package org.wso2.carbon.device.mgt.analytics.data.publisher.internal;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -24,9 +24,9 @@ import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.component.ComponentContext;
import org.wso2.carbon.analytics.api.AnalyticsDataAPI;
-import org.wso2.carbon.device.mgt.analytics.config.AnalyticsConfiguration;
-import org.wso2.carbon.device.mgt.analytics.service.DeviceAnalyticsService;
-import org.wso2.carbon.device.mgt.analytics.service.DeviceAnalyticsServiceImpl;
+import org.wso2.carbon.device.mgt.analytics.data.publisher.config.AnalyticsConfiguration;
+import org.wso2.carbon.device.mgt.analytics.data.publisher.service.DeviceAnalyticsService;
+import org.wso2.carbon.device.mgt.analytics.data.publisher.service.DeviceAnalyticsServiceImpl;
import org.wso2.carbon.registry.core.service.RegistryService;
import org.wso2.carbon.registry.core.service.TenantRegistryLoader;
import org.wso2.carbon.registry.indexing.service.TenantIndexingLoader;
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/service/DeviceAnalyticsService.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/service/DeviceAnalyticsService.java
index 25359cb4b2..4b918d0385 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/service/DeviceAnalyticsService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/service/DeviceAnalyticsService.java
@@ -16,11 +16,12 @@
* under the License.
*
*/
-package org.wso2.carbon.device.mgt.analytics.service;
+package org.wso2.carbon.device.mgt.analytics.data.publisher.service;
+
+import org.wso2.carbon.device.mgt.analytics.data.publisher.AnalyticsDataRecord;
+import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DataPublisherConfigurationException;
+import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DeviceManagementAnalyticsException;
-import org.wso2.carbon.device.mgt.analytics.AnalyticsDataRecord;
-import org.wso2.carbon.device.mgt.analytics.exception.DataPublisherConfigurationException;
-import org.wso2.carbon.device.mgt.analytics.exception.DeviceManagementAnalyticsException;
import java.util.List;
/**
@@ -48,5 +49,7 @@ public interface DeviceAnalyticsService {
* @return the record list
* @throws DeviceManagementAnalyticsException
*/
- List getAllEventsForDevice(String tableName, String query) throws DeviceManagementAnalyticsException;
+ List getAllEventsForDevice(String tableName,
+ String query) throws DeviceManagementAnalyticsException;
+
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/service/DeviceAnalyticsServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/service/DeviceAnalyticsServiceImpl.java
index 26cf6ee74a..c0f2ab6ad5 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/service/DeviceAnalyticsServiceImpl.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/service/DeviceAnalyticsServiceImpl.java
@@ -17,7 +17,7 @@
*
*/
-package org.wso2.carbon.device.mgt.analytics.service;
+package org.wso2.carbon.device.mgt.analytics.data.publisher.service;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -31,11 +31,11 @@ import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException
import org.wso2.carbon.context.CarbonContext;
import org.wso2.carbon.databridge.agent.DataPublisher;
import org.wso2.carbon.databridge.commons.utils.DataBridgeCommonsUtils;
-import org.wso2.carbon.device.mgt.analytics.AnalyticsDataRecord;
-import org.wso2.carbon.device.mgt.analytics.DeviceDataPublisher;
-import org.wso2.carbon.device.mgt.analytics.exception.DataPublisherConfigurationException;
-import org.wso2.carbon.device.mgt.analytics.exception.DeviceManagementAnalyticsException;
-import org.wso2.carbon.device.mgt.analytics.internal.DeviceAnalyticsDataHolder;
+import org.wso2.carbon.device.mgt.analytics.data.publisher.AnalyticsDataRecord;
+import org.wso2.carbon.device.mgt.analytics.data.publisher.DeviceDataPublisher;
+import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DataPublisherConfigurationException;
+import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DeviceManagementAnalyticsException;
+import org.wso2.carbon.device.mgt.analytics.data.publisher.internal.DeviceAnalyticsDataHolder;
import java.util.ArrayList;
import java.util.List;
@@ -78,7 +78,7 @@ public class DeviceAnalyticsServiceImpl implements DeviceAnalyticsService {
*/
@Override
public List getAllEventsForDevice(String tableName, String query) throws
- DeviceManagementAnalyticsException {
+ DeviceManagementAnalyticsException {
try {
int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId();
AnalyticsDataAPI analyticsDataAPI = DeviceAnalyticsDataHolder.getInstance().getAnalyticsDataAPI();