Fixing build failures in device.mgt.analytics.data.publisher bundle

revert-70aa11f8
prabathabey 9 years ago
parent 85ecae22e0
commit b584131160

@ -30,7 +30,6 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.analytics.data.publisher</artifactId> <artifactId>org.wso2.carbon.device.mgt.analytics.data.publisher</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Device Analytics</name> <name>WSO2 Carbon - Device Analytics</name>
<description>WSO2 Carbon - Device Analytics</description> <description>WSO2 Carbon - Device Analytics</description>
@ -112,7 +111,7 @@
<Bundle-Name>${project.artifactId}</Bundle-Name> <Bundle-Name>${project.artifactId}</Bundle-Name>
<Bundle-Version>${carbon.device.mgt.version}</Bundle-Version> <Bundle-Version>${carbon.device.mgt.version}</Bundle-Version>
<Bundle-Description>Data Publisher</Bundle-Description> <Bundle-Description>Data Publisher</Bundle-Description>
<Private-Package>org.wso2.carbon.device.mgt.analytics.internal</Private-Package> <Private-Package>org.wso2.carbon.device.mgt.analytics.data.publisher.internal</Private-Package>
<Export-Package> <Export-Package>
!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}" org.wso2.carbon.device.mgt.analytics.data.publisher.*;version="${carbon.device.mgt.version}"

@ -16,7 +16,7 @@
* under the License. * 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.HashMap;
import java.util.Map; import java.util.Map;

@ -16,10 +16,10 @@
* under the License. * 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.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.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;

@ -16,7 +16,7 @@
* under the License. * 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.Log;
import org.apache.commons.logging.LogFactory; 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.DataEndpointConfigurationException;
import org.wso2.carbon.databridge.agent.exception.DataEndpointException; import org.wso2.carbon.databridge.agent.exception.DataEndpointException;
import org.wso2.carbon.databridge.commons.exception.TransportException; import org.wso2.carbon.databridge.commons.exception.TransportException;
import org.wso2.carbon.device.mgt.analytics.config.AnalyticsConfiguration; import org.wso2.carbon.device.mgt.analytics.data.publisher.config.AnalyticsConfiguration;
import org.wso2.carbon.device.mgt.analytics.exception.DataPublisherAlreadyExistsException; import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DataPublisherAlreadyExistsException;
import org.wso2.carbon.device.mgt.analytics.exception.DataPublisherConfigurationException; import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DataPublisherConfigurationException;
import org.wso2.carbon.device.mgt.analytics.internal.DeviceAnalyticsDataHolder; import org.wso2.carbon.device.mgt.analytics.data.publisher.internal.DeviceAnalyticsDataHolder;
import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager;
import org.wso2.carbon.registry.core.Registry; import org.wso2.carbon.registry.core.Registry;
import org.wso2.carbon.registry.core.Resource; import org.wso2.carbon.registry.core.Resource;
import org.wso2.carbon.registry.core.exceptions.RegistryException; import org.wso2.carbon.registry.core.exceptions.RegistryException;

@ -16,24 +16,20 @@
* under the License. * 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.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.wso2.carbon.device.mgt.analytics.DeviceAnalyticsUtil; import org.wso2.carbon.device.mgt.analytics.data.publisher.DeviceAnalyticsUtil;
import org.wso2.carbon.device.mgt.analytics.exception.DataPublisherConfigurationException; import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DataPublisherConfigurationException;
import org.wso2.carbon.utils.CarbonUtils; import org.wso2.carbon.utils.CarbonUtils;
import org.xml.sax.SAXException;
import javax.xml.XMLConstants;
import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException; import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller; import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
import java.io.File; import java.io.File;
/** /**

@ -16,7 +16,7 @@
* under the License. * 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 { public class InvalidConfigurationStateException extends RuntimeException {

@ -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 class DataPublisherAlreadyExistsException extends Exception {
public DataPublisherAlreadyExistsException() { public DataPublisherAlreadyExistsException() {

@ -16,7 +16,7 @@
* under the License. * 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 class DataPublisherConfigurationException extends Exception {
public DataPublisherConfigurationException() { public DataPublisherConfigurationException() {
@ -40,4 +40,5 @@ public class DataPublisherConfigurationException extends Exception {
boolean writableStackTrace) { boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace); super(message, cause, enableSuppression, writableStackTrace);
} }
} }

@ -16,7 +16,7 @@
* under the License. * 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 class DeviceManagementAnalyticsException extends Exception {
public DeviceManagementAnalyticsException() { public DeviceManagementAnalyticsException() {

@ -16,7 +16,7 @@
* under the License. * 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.analytics.api.AnalyticsDataAPI;
import org.wso2.carbon.registry.core.service.RegistryService; import org.wso2.carbon.registry.core.service.RegistryService;

@ -16,7 +16,7 @@
* under the License. * 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.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
@ -24,9 +24,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.analytics.api.AnalyticsDataAPI; import org.wso2.carbon.analytics.api.AnalyticsDataAPI;
import org.wso2.carbon.device.mgt.analytics.config.AnalyticsConfiguration; import org.wso2.carbon.device.mgt.analytics.data.publisher.config.AnalyticsConfiguration;
import org.wso2.carbon.device.mgt.analytics.service.DeviceAnalyticsService; import org.wso2.carbon.device.mgt.analytics.data.publisher.service.DeviceAnalyticsService;
import org.wso2.carbon.device.mgt.analytics.service.DeviceAnalyticsServiceImpl; 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.RegistryService;
import org.wso2.carbon.registry.core.service.TenantRegistryLoader; import org.wso2.carbon.registry.core.service.TenantRegistryLoader;
import org.wso2.carbon.registry.indexing.service.TenantIndexingLoader; import org.wso2.carbon.registry.indexing.service.TenantIndexingLoader;

@ -16,11 +16,12 @@
* under the License. * 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; import java.util.List;
/** /**
@ -48,5 +49,7 @@ public interface DeviceAnalyticsService {
* @return the record list * @return the record list
* @throws DeviceManagementAnalyticsException * @throws DeviceManagementAnalyticsException
*/ */
List<AnalyticsDataRecord> getAllEventsForDevice(String tableName, String query) throws DeviceManagementAnalyticsException; List<AnalyticsDataRecord> getAllEventsForDevice(String tableName,
String query) throws DeviceManagementAnalyticsException;
} }

@ -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.Log;
import org.apache.commons.logging.LogFactory; 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.context.CarbonContext;
import org.wso2.carbon.databridge.agent.DataPublisher; import org.wso2.carbon.databridge.agent.DataPublisher;
import org.wso2.carbon.databridge.commons.utils.DataBridgeCommonsUtils; import org.wso2.carbon.databridge.commons.utils.DataBridgeCommonsUtils;
import org.wso2.carbon.device.mgt.analytics.AnalyticsDataRecord; import org.wso2.carbon.device.mgt.analytics.data.publisher.AnalyticsDataRecord;
import org.wso2.carbon.device.mgt.analytics.DeviceDataPublisher; import org.wso2.carbon.device.mgt.analytics.data.publisher.DeviceDataPublisher;
import org.wso2.carbon.device.mgt.analytics.exception.DataPublisherConfigurationException; import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DataPublisherConfigurationException;
import org.wso2.carbon.device.mgt.analytics.exception.DeviceManagementAnalyticsException; import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DeviceManagementAnalyticsException;
import org.wso2.carbon.device.mgt.analytics.internal.DeviceAnalyticsDataHolder; import org.wso2.carbon.device.mgt.analytics.data.publisher.internal.DeviceAnalyticsDataHolder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -78,7 +78,7 @@ public class DeviceAnalyticsServiceImpl implements DeviceAnalyticsService {
*/ */
@Override @Override
public List<AnalyticsDataRecord> getAllEventsForDevice(String tableName, String query) throws public List<AnalyticsDataRecord> getAllEventsForDevice(String tableName, String query) throws
DeviceManagementAnalyticsException { DeviceManagementAnalyticsException {
try { try {
int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId();
AnalyticsDataAPI analyticsDataAPI = DeviceAnalyticsDataHolder.getInstance().getAnalyticsDataAPI(); AnalyticsDataAPI analyticsDataAPI = DeviceAnalyticsDataHolder.getInstance().getAnalyticsDataAPI();

Loading…
Cancel
Save