Merge branch 'master' of https://github.com/wso2/carbon-device-mgt into fix-1624

revert-70aa11f8
Rasika Perera 7 years ago
commit 8a09e44c3e

@ -22,13 +22,13 @@
<parent> <parent>
<artifactId>apimgt-extensions</artifactId> <artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.annotations</artifactId> <artifactId>org.wso2.carbon.apimgt.annotations</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - API Management Annotations</name> <name>WSO2 Carbon - API Management Annotations</name>
<description>WSO2 Carbon - API Management Custom Annotation Module</description> <description>WSO2 Carbon - API Management Custom Annotation Module</description>

@ -21,12 +21,12 @@
<parent> <parent>
<artifactId>apimgt-extensions</artifactId> <artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<artifactId>org.wso2.carbon.apimgt.application.extension.api</artifactId> <artifactId>org.wso2.carbon.apimgt.application.extension.api</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<name>WSO2 Carbon - API Application Management API</name> <name>WSO2 Carbon - API Application Management API</name>

@ -22,12 +22,12 @@
<parent> <parent>
<artifactId>apimgt-extensions</artifactId> <artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<artifactId>org.wso2.carbon.apimgt.application.extension</artifactId> <artifactId>org.wso2.carbon.apimgt.application.extension</artifactId>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - API Application Management</name> <name>WSO2 Carbon - API Application Management</name>

@ -21,13 +21,13 @@
<parent> <parent>
<artifactId>apimgt-extensions</artifactId> <artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.handlers</artifactId> <artifactId>org.wso2.carbon.apimgt.handlers</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - API Security Handler Component</name> <name>WSO2 Carbon - API Security Handler Component</name>
<description>WSO2 Carbon - API Management Security Handler Module</description> <description>WSO2 Carbon - API Management Security Handler Module</description>

@ -13,13 +13,13 @@
<parent> <parent>
<artifactId>apimgt-extensions</artifactId> <artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.integration.client</artifactId> <artifactId>org.wso2.carbon.apimgt.integration.client</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - API Management Integration Client</name> <name>WSO2 Carbon - API Management Integration Client</name>
<description>WSO2 Carbon - API Management Integration Client</description> <description>WSO2 Carbon - API Management Integration Client</description>

@ -13,13 +13,13 @@
<parent> <parent>
<artifactId>apimgt-extensions</artifactId> <artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.integration.generated.client</artifactId> <artifactId>org.wso2.carbon.apimgt.integration.generated.client</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - API Management Integration Generated Client</name> <name>WSO2 Carbon - API Management Integration Generated Client</name>
<description>WSO2 Carbon - API Management Integration Client</description> <description>WSO2 Carbon - API Management Integration Client</description>

@ -22,13 +22,13 @@
<parent> <parent>
<artifactId>apimgt-extensions</artifactId> <artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.webapp.publisher</artifactId> <artifactId>org.wso2.carbon.apimgt.webapp.publisher</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - API Management Webapp Publisher</name> <name>WSO2 Carbon - API Management Webapp Publisher</name>
<description>WSO2 Carbon - API Management Webapp Publisher</description> <description>WSO2 Carbon - API Management Webapp Publisher</description>

@ -22,13 +22,13 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>apimgt-extensions</artifactId> <artifactId>apimgt-extensions</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - API Management Extensions Component</name> <name>WSO2 Carbon - API Management Extensions Component</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>certificate-mgt</artifactId> <artifactId>certificate-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>certificate-mgt</artifactId> <artifactId>certificate-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -24,7 +24,7 @@
<parent> <parent>
<artifactId>certificate-mgt</artifactId> <artifactId>certificate-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -21,13 +21,13 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>certificate-mgt</artifactId> <artifactId>certificate-mgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.certificate.mgt.core</artifactId> <artifactId>org.wso2.carbon.certificate.mgt.core</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Certificate Management Core</name> <name>WSO2 Carbon - Certificate Management Core</name>
<description>WSO2 Carbon - Certificate Management Core</description> <description>WSO2 Carbon - Certificate Management Core</description>

@ -24,7 +24,7 @@
<parent> <parent>
<artifactId>certificate-mgt</artifactId> <artifactId>certificate-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>certificate-mgt</artifactId> <artifactId>certificate-mgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Certificate Management Component</name> <name>WSO2 Carbon - Certificate Management Component</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt-extensions</artifactId> <artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt-extensions</artifactId> <artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt-extensions</artifactId> <artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt-extensions</artifactId> <artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt-extensions</artifactId> <artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt-extensions</artifactId> <artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -70,7 +70,7 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService {
@PathParam("deviceType") String deviceType, @PathParam("deviceType") String deviceType,
@QueryParam("from") long from, @QueryParam("to") long to) { @QueryParam("from") long from, @QueryParam("to") long to) {
try { try {
if (!DeviceManagerUtil.isPublishOperationResponseEnabled()) { if (!DeviceManagerUtil.isPublishLocationResponseEnabled()) {
return Response.status(Response.Status.BAD_REQUEST.getStatusCode()) return Response.status(Response.Status.BAD_REQUEST.getStatusCode())
.entity("Unable to retrive Geo Device stats. Geo Data publishing does not enabled.").build(); .entity("Unable to retrive Geo Device stats. Geo Data publishing does not enabled.").build();
} }

@ -21,7 +21,7 @@
<parent> <parent>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -0,0 +1,34 @@
/*
* Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.wso2.carbon.device.mgt.common.general;
public class GeneralConfig {
private boolean policyMonitoringEnabled;
public boolean isPolicyMonitoringEnabled() {
return policyMonitoringEnabled;
}
public void setPolicyMonitoringEnabled(boolean policyMonitoringEnabled) {
this.policyMonitoringEnabled = policyMonitoringEnabled;
}
}

@ -20,6 +20,7 @@ package org.wso2.carbon.device.mgt.common.spi;
import org.wso2.carbon.device.mgt.common.*; import org.wso2.carbon.device.mgt.common.*;
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.general.GeneralConfig;
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;
@ -52,4 +53,6 @@ public interface DeviceManagementService {
DeviceStatusTaskPluginConfig getDeviceStatusTaskPluginConfig(); DeviceStatusTaskPluginConfig getDeviceStatusTaskPluginConfig();
GeneralConfig getGeneralConfig();
} }

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -19,6 +19,7 @@ package org.wso2.carbon.device.mgt.core.config;
import org.wso2.carbon.device.mgt.core.config.archival.ArchivalConfiguration; import org.wso2.carbon.device.mgt.core.config.archival.ArchivalConfiguration;
import org.wso2.carbon.device.mgt.core.config.cache.CertificateCacheConfiguration; import org.wso2.carbon.device.mgt.core.config.cache.CertificateCacheConfiguration;
import org.wso2.carbon.device.mgt.core.config.geo.location.GeoLocationConfiguration;
import org.wso2.carbon.device.mgt.core.config.geo.location.OperationAnalyticsConfiguration; import org.wso2.carbon.device.mgt.core.config.geo.location.OperationAnalyticsConfiguration;
import org.wso2.carbon.device.mgt.core.config.cache.DeviceCacheConfiguration; import org.wso2.carbon.device.mgt.core.config.cache.DeviceCacheConfiguration;
import org.wso2.carbon.device.mgt.core.config.identity.IdentityConfigurations; import org.wso2.carbon.device.mgt.core.config.identity.IdentityConfigurations;
@ -53,6 +54,7 @@ public final class DeviceManagementConfig {
private DeviceCacheConfiguration deviceCacheConfiguration; private DeviceCacheConfiguration deviceCacheConfiguration;
private CertificateCacheConfiguration certificateCacheConfiguration; private CertificateCacheConfiguration certificateCacheConfiguration;
private OperationAnalyticsConfiguration operationAnalyticsConfiguration; private OperationAnalyticsConfiguration operationAnalyticsConfiguration;
private GeoLocationConfiguration geoLocationConfiguration;
private String defaultGroupsConfiguration; private String defaultGroupsConfiguration;
private RemoteSessionConfiguration remoteSessionConfiguration; private RemoteSessionConfiguration remoteSessionConfiguration;
private ArchivalConfiguration archivalConfiguration; private ArchivalConfiguration archivalConfiguration;
@ -167,6 +169,15 @@ public final class DeviceManagementConfig {
this.operationAnalyticsConfiguration = operationAnalyticsConfiguration; this.operationAnalyticsConfiguration = operationAnalyticsConfiguration;
} }
@XmlElement(name = "GeoLocationConfiguration", required = true)
public GeoLocationConfiguration getGeoLocationConfiguration() {
return geoLocationConfiguration;
}
public void setGeoLocationConfiguration(GeoLocationConfiguration geoLocationConfiguration) {
this.geoLocationConfiguration = geoLocationConfiguration;
}
@XmlElement(name = "DefaultGroupsConfiguration", required = true) @XmlElement(name = "DefaultGroupsConfiguration", required = true)
public String getDefaultGroupsConfiguration() { public String getDefaultGroupsConfiguration() {
return defaultGroupsConfiguration; return defaultGroupsConfiguration;

@ -0,0 +1,40 @@
/*
* Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* you may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.wso2.carbon.device.mgt.core.config.geo.location;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/**
* This class represents the information related to Geo Location configuration.
*/
@XmlRootElement(name = "GeoLocationConfiguration")
public class GeoLocationConfiguration {
private boolean enabled;
public boolean getEnabled() {
return enabled;
}
@XmlElement(name = "Enabled", required = true)
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
}

@ -27,24 +27,24 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "OperationAnalyticsConfiguration") @XmlRootElement(name = "OperationAnalyticsConfiguration")
public class OperationAnalyticsConfiguration { public class OperationAnalyticsConfiguration {
private boolean publishOperationResponse; private boolean publishDeviceInfoResponse;
private boolean isEnabled; private boolean publishLocationResponse;
public boolean getPublishOperationResponse() { public boolean getPublishDeviceInfoResponse() {
return publishOperationResponse; return publishDeviceInfoResponse;
} }
@XmlElement(name = "PublishOperationResponse", required = true) @XmlElement(name = "PublishDeviceInfoResponse", required = true)
public void setPublishOperationResponse(boolean publishOperationResponse) { public void setPublishDeviceInfoResponse(boolean publishDeviceInfoResponse) {
this.publishOperationResponse = publishOperationResponse; this.publishDeviceInfoResponse = publishDeviceInfoResponse;
} }
public boolean getIsEnabled() { public boolean getPublishLocationResponse() {
return isEnabled; return publishLocationResponse;
} }
@XmlElement(name = "isEnabled", required = true) @XmlElement(name = "PublishLocationResponse", required = true)
public void setEnabled(boolean enabled) { public void setPublishLocationResponse(boolean publishLocationResponse) {
isEnabled = enabled; this.publishLocationResponse = publishLocationResponse;
} }
} }

@ -74,7 +74,7 @@ public class DeviceInformationManagerImpl implements DeviceInformationManager {
deviceDetailsDAO.addDeviceProperties(deviceInfo.getDeviceDetailsMap(), device.getId()); deviceDetailsDAO.addDeviceProperties(deviceInfo.getDeviceDetailsMap(), device.getId());
DeviceManagementDAOFactory.commitTransaction(); DeviceManagementDAOFactory.commitTransaction();
if (DeviceManagerUtil.isPublishOperationResponseEnabled()) { if (DeviceManagerUtil.isPublishDeviceInfoResponseEnabled()) {
Object[] metaData = {device.getDeviceIdentifier(), device.getType()}; Object[] metaData = {device.getDeviceIdentifier(), device.getType()};
Object[] payload = new Object[]{ Object[] payload = new Object[]{
Calendar.getInstance().getTimeInMillis(), Calendar.getInstance().getTimeInMillis(),
@ -192,7 +192,7 @@ public class DeviceInformationManagerImpl implements DeviceInformationManager {
deviceDAO.updateDevice(device, CarbonContext.getThreadLocalCarbonContext().getTenantId()); deviceDAO.updateDevice(device, CarbonContext.getThreadLocalCarbonContext().getTenantId());
deviceDetailsDAO.deleteDeviceLocation(deviceLocation.getDeviceId()); deviceDetailsDAO.deleteDeviceLocation(deviceLocation.getDeviceId());
deviceDetailsDAO.addDeviceLocation(deviceLocation); deviceDetailsDAO.addDeviceLocation(deviceLocation);
if (DeviceManagerUtil.isPublishOperationResponseEnabled()) { if (DeviceManagerUtil.isPublishLocationResponseEnabled()) {
Object[] metaData = {device.getDeviceIdentifier(), device.getType()}; Object[] metaData = {device.getDeviceIdentifier(), device.getType()};
Object[] payload = new Object[]{ Object[] payload = new Object[]{
deviceLocation.getUpdatedTime().getTime(), deviceLocation.getUpdatedTime().getTime(),

@ -522,6 +522,8 @@ public interface DeviceManagementProviderService {
List<String> getAvailableDeviceTypes() throws DeviceManagementException; List<String> getAvailableDeviceTypes() throws DeviceManagementException;
List<String> getPolicyMonitoringEnableDeviceTypes() throws DeviceManagementException;
boolean updateDeviceInfo(DeviceIdentifier deviceIdentifier, Device device) throws DeviceManagementException; boolean updateDeviceInfo(DeviceIdentifier deviceIdentifier, Device device) throws DeviceManagementException;
boolean setOwnership(DeviceIdentifier deviceId, String ownershipType) throws DeviceManagementException; boolean setOwnership(DeviceIdentifier deviceId, String ownershipType) throws DeviceManagementException;

@ -1177,6 +1177,29 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
return deviceTypesResponse; return deviceTypesResponse;
} }
@Override
public List<String> getPolicyMonitoringEnableDeviceTypes() throws DeviceManagementException {
List<String> deviceTypes = this.getAvailableDeviceTypes();
List<String> deviceTypesToMonitor = new ArrayList<>();
int tenantId = this.getTenantId();
Map<DeviceTypeServiceIdentifier, DeviceManagementService> registeredTypes =
pluginRepository.getAllDeviceManagementServices(tenantId);
List<DeviceManagementService> services = new ArrayList<>(registeredTypes.values());
for (DeviceManagementService deviceType : services) {
if (deviceType != null && deviceType.getGeneralConfig() != null &&
deviceType.getGeneralConfig().isPolicyMonitoringEnabled()) {
for (String type : deviceTypes) {
if (type.equalsIgnoreCase(deviceType.getType())) {
deviceTypesToMonitor.add(type);
}
}
}
}
return deviceTypesToMonitor;
}
@Override @Override
public boolean updateDeviceInfo(DeviceIdentifier deviceId, Device device) throws DeviceManagementException { public boolean updateDeviceInfo(DeviceIdentifier deviceId, Device device) throws DeviceManagementException {
if (deviceId == null || device == null) { if (deviceId == null || device == null) {
@ -1489,13 +1512,13 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
} }
@Override @Override
public List<Activity> getFilteredActivities(String operationCode, int limit, int offset) throws OperationManagementException{ public List<Activity> getFilteredActivities(String operationCode, int limit, int offset) throws OperationManagementException {
limit = DeviceManagerUtil.validateActivityListPageSize(limit); limit = DeviceManagerUtil.validateActivityListPageSize(limit);
return DeviceManagementDataHolder.getInstance().getOperationManager().getFilteredActivities(operationCode, limit, offset); return DeviceManagementDataHolder.getInstance().getOperationManager().getFilteredActivities(operationCode, limit, offset);
} }
@Override @Override
public int getTotalCountOfFilteredActivities(String operationCode) throws OperationManagementException{ public int getTotalCountOfFilteredActivities(String operationCode) throws OperationManagementException {
return DeviceManagementDataHolder.getInstance().getOperationManager().getTotalCountOfFilteredActivities(operationCode); return DeviceManagementDataHolder.getInstance().getOperationManager().getTotalCountOfFilteredActivities(operationCode);
} }
@ -2565,7 +2588,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
} }
try { try {
DeviceManagementDAOFactory.openConnection(); DeviceManagementDAOFactory.openConnection();
return deviceDAO.findGeoClusters(southWest,northEast,geohashLength,this.getTenantId()); return deviceDAO.findGeoClusters(southWest, northEast, geohashLength, this.getTenantId());
} catch (DeviceManagementDAOException e) { } catch (DeviceManagementDAOException e) {
String msg = "Error occurred while retrieving the geo clusters."; String msg = "Error occurred while retrieving the geo clusters.";
log.error(msg, e); log.error(msg, e);

@ -31,7 +31,6 @@ import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
import org.wso2.carbon.device.mgt.common.GroupPaginationRequest; import org.wso2.carbon.device.mgt.common.GroupPaginationRequest;
import org.wso2.carbon.device.mgt.common.PaginationRequest; import org.wso2.carbon.device.mgt.common.PaginationRequest;
import org.wso2.carbon.device.mgt.common.TransactionManagementException; import org.wso2.carbon.device.mgt.common.TransactionManagementException;
import org.wso2.carbon.device.mgt.common.device.details.DeviceInfo;
import org.wso2.carbon.device.mgt.common.group.mgt.GroupManagementException; import org.wso2.carbon.device.mgt.common.group.mgt.GroupManagementException;
import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementException; import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementException;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
@ -418,23 +417,22 @@ public final class DeviceManagerUtil {
return limit; return limit;
} }
public static boolean isOperationAnalyticsEnabled() throws DeviceManagementException { public static boolean isPublishLocationResponseEnabled() throws DeviceManagementException {
DeviceManagementConfig deviceManagementConfig = DeviceConfigurationManager.getInstance(). DeviceManagementConfig deviceManagementConfig = DeviceConfigurationManager.getInstance().
getDeviceManagementConfig(); getDeviceManagementConfig();
if (deviceManagementConfig != null) { if (deviceManagementConfig != null) {
return deviceManagementConfig.getOperationAnalyticsConfiguration().getIsEnabled(); return deviceManagementConfig.getOperationAnalyticsConfiguration().getPublishLocationResponse();
} else { } else {
throw new DeviceManagementException("Device-Mgt configuration has not initialized. Please check the " + throw new DeviceManagementException("Device-Mgt configuration has not initialized. Please check the " +
"cdm-config.xml file."); "cdm-config.xml file.");
} }
} }
public static boolean isPublishOperationResponseEnabled() throws DeviceManagementException { public static boolean isPublishDeviceInfoResponseEnabled() throws DeviceManagementException {
DeviceManagementConfig deviceManagementConfig = DeviceConfigurationManager.getInstance(). DeviceManagementConfig deviceManagementConfig = DeviceConfigurationManager.getInstance().
getDeviceManagementConfig(); getDeviceManagementConfig();
if (deviceManagementConfig != null) { if (deviceManagementConfig != null) {
return isOperationAnalyticsEnabled() return deviceManagementConfig.getOperationAnalyticsConfiguration().getPublishDeviceInfoResponse();
&& deviceManagementConfig.getOperationAnalyticsConfiguration().getPublishOperationResponse();
} else { } else {
throw new DeviceManagementException("Device-Mgt configuration has not initialized. Please check the " + throw new DeviceManagementException("Device-Mgt configuration has not initialized. Please check the " +
"cdm-config.xml file."); "cdm-config.xml file.");

@ -19,6 +19,7 @@ package org.wso2.carbon.device.mgt.core;
import org.wso2.carbon.device.mgt.common.*; import org.wso2.carbon.device.mgt.common.*;
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.general.GeneralConfig;
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;
@ -108,4 +109,9 @@ public class TestDeviceManagementService implements DeviceManagementService {
public DeviceStatusTaskPluginConfig getDeviceStatusTaskPluginConfig() { public DeviceStatusTaskPluginConfig getDeviceStatusTaskPluginConfig() {
return null; return null;
} }
@Override
public GeneralConfig getGeneralConfig() {
return null;
}
} }

@ -88,9 +88,24 @@
<Enable>false</Enable> <Enable>false</Enable>
<ExpiryTime>86400</ExpiryTime> <ExpiryTime>86400</ExpiryTime>
</CertificateCacheConfiguration> </CertificateCacheConfiguration>
<GeoLocationConfiguration>
<Enabled>false</Enabled>
</GeoLocationConfiguration>
<OperationAnalyticsConfiguration> <OperationAnalyticsConfiguration>
<isEnabled>false</isEnabled> <PublishLocationResponse>false</PublishLocationResponse>
<PublishOperationResponse>false</PublishOperationResponse> <PublishDeviceInfoResponse>false</PublishDeviceInfoResponse>
<PublishOperationResponse>
<Enabled>false</Enabled>
<Operations>
<!-- Publish specific operation responses -->
<!--
<Operation>BATTERY_LEVEL</Operation>
<Operation>CHECK_LOCK_STATUS</Operation>
-->
<!-- use wildcard '*' to publish all responses -->
<Operation>*</Operation>
</Operations>
</PublishOperationResponse>
</OperationAnalyticsConfiguration> </OperationAnalyticsConfiguration>
<DefaultGroupsConfiguration>BYOD,COPE</DefaultGroupsConfiguration> <DefaultGroupsConfiguration>BYOD,COPE</DefaultGroupsConfiguration>
</DeviceMgtConfiguration> </DeviceMgtConfiguration>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -30,6 +30,7 @@ import org.wso2.carbon.device.mgt.common.ProvisioningConfig;
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.configuration.mgt.ConfigurationEntry; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
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.general.GeneralConfig;
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;
@ -69,6 +70,7 @@ public class DeviceTypeManagerService implements DeviceManagementService {
private InitialOperationConfig initialOperationConfig; private InitialOperationConfig initialOperationConfig;
private PullNotificationSubscriber pullNotificationSubscriber; private PullNotificationSubscriber pullNotificationSubscriber;
private DeviceStatusTaskPluginConfig deviceStatusTaskPluginConfig; private DeviceStatusTaskPluginConfig deviceStatusTaskPluginConfig;
private GeneralConfig generalConfig;
public DeviceTypeManagerService(DeviceTypeConfigIdentifier deviceTypeConfigIdentifier, public DeviceTypeManagerService(DeviceTypeConfigIdentifier deviceTypeConfigIdentifier,
DeviceTypeConfiguration deviceTypeConfiguration) { DeviceTypeConfiguration deviceTypeConfiguration) {
@ -84,6 +86,7 @@ public class DeviceTypeManagerService implements DeviceManagementService {
this.setDeviceStatusTaskPluginConfig(deviceTypeConfiguration.getDeviceStatusTaskConfiguration()); this.setDeviceStatusTaskPluginConfig(deviceTypeConfiguration.getDeviceStatusTaskConfiguration());
this.setPolicyMonitoringManager(deviceTypeConfiguration.getPolicyMonitoring()); this.setPolicyMonitoringManager(deviceTypeConfiguration.getPolicyMonitoring());
this.setPullNotificationSubscriber(deviceTypeConfiguration.getPullNotificationSubscriberConfig()); this.setPullNotificationSubscriber(deviceTypeConfiguration.getPullNotificationSubscriberConfig());
this.setGeneralConfig(deviceTypeConfiguration);
} }
@Override @Override
@ -92,7 +95,7 @@ public class DeviceTypeManagerService implements DeviceManagementService {
} }
@Override @Override
public OperationMonitoringTaskConfig getOperationMonitoringConfig(){ public OperationMonitoringTaskConfig getOperationMonitoringConfig() {
return operationMonitoringConfigs; return operationMonitoringConfigs;
} }
@ -193,6 +196,11 @@ public class DeviceTypeManagerService implements DeviceManagementService {
return deviceStatusTaskPluginConfig; return deviceStatusTaskPluginConfig;
} }
@Override
public GeneralConfig getGeneralConfig() {
return generalConfig;
}
private void setProvisioningConfig(String tenantDomain, DeviceTypeConfiguration deviceTypeConfiguration) { private void setProvisioningConfig(String tenantDomain, DeviceTypeConfiguration deviceTypeConfiguration) {
if (deviceTypeConfiguration.getProvisioningConfig() != null) { if (deviceTypeConfiguration.getProvisioningConfig() != null) {
boolean sharedWithAllTenants = deviceTypeConfiguration.getProvisioningConfig().isSharedWithAllTenants(); boolean sharedWithAllTenants = deviceTypeConfiguration.getProvisioningConfig().isSharedWithAllTenants();
@ -264,4 +272,12 @@ public class DeviceTypeManagerService implements DeviceManagementService {
} }
} }
} }
public void setGeneralConfig(DeviceTypeConfiguration deviceTypeConfiguration) {
this.generalConfig = new GeneralConfig();
if (deviceTypeConfiguration.getPolicyMonitoring() != null) {
this.generalConfig.setPolicyMonitoringEnabled(deviceTypeConfiguration.getPolicyMonitoring().isEnabled());
}
}
} }

@ -33,7 +33,7 @@ public class InitialOperationConfig {
return operations; return operations;
} }
public void setOperationsll(List<String> operations) { public void setOperations(List<String> operations) {
this.operations = operations; this.operations = operations;
} }
} }

@ -33,6 +33,7 @@ import org.wso2.carbon.device.mgt.common.ProvisioningConfig;
import org.wso2.carbon.device.mgt.common.ProvisioningConfig; import org.wso2.carbon.device.mgt.common.ProvisioningConfig;
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
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.general.GeneralConfig;
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.device.mgt.common.push.notification.PushNotificationConfig; import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig;
@ -76,6 +77,7 @@ public class DeviceTypeManagerServiceTest {
private Method populatePushNotificationConfig; private Method populatePushNotificationConfig;
private Method setPolicyMonitoringManager; private Method setPolicyMonitoringManager;
private Method setPullNotificationSubscriber; private Method setPullNotificationSubscriber;
private Method setGeneralConfig;
@BeforeClass @BeforeClass
public void setup() throws NoSuchMethodException, SAXException, JAXBException, ParserConfigurationException, public void setup() throws NoSuchMethodException, SAXException, JAXBException, ParserConfigurationException,
@ -102,10 +104,19 @@ public class DeviceTypeManagerServiceTest {
.getDeclaredMethod("setPullNotificationSubscriber", PullNotificationSubscriberConfig.class); .getDeclaredMethod("setPullNotificationSubscriber", PullNotificationSubscriberConfig.class);
setPullNotificationSubscriber.setAccessible(true); setPullNotificationSubscriber.setAccessible(true);
setGeneralConfig = DeviceTypeManagerService.class
.getDeclaredMethod("setGeneralConfig", DeviceTypeConfiguration.class);
setGeneralConfig.setAccessible(true);
Field deviceStatusTaskPluginConfig = DeviceTypeManagerService.class Field deviceStatusTaskPluginConfig = DeviceTypeManagerService.class
.getDeclaredField("deviceStatusTaskPluginConfig"); .getDeclaredField("deviceStatusTaskPluginConfig");
deviceStatusTaskPluginConfig.setAccessible(true); deviceStatusTaskPluginConfig.setAccessible(true);
Field generalConfig = DeviceTypeManagerService.class
.getDeclaredField("generalConfig");
generalConfig.setAccessible(true);
Field operationMonitoringConfigs = DeviceTypeManagerService.class Field operationMonitoringConfigs = DeviceTypeManagerService.class
.getDeclaredField("operationMonitoringConfigs"); .getDeclaredField("operationMonitoringConfigs");
operationMonitoringConfigs.setAccessible(true); operationMonitoringConfigs.setAccessible(true);

@ -30,6 +30,7 @@
</Feature> </Feature>
</Features> </Features>
<PolicyMonitoring enabled="false"/>
<ProvisioningConfig> <ProvisioningConfig>
<SharedWithAllTenants>true</SharedWithAllTenants> <SharedWithAllTenants>true</SharedWithAllTenants>
</ProvisioningConfig> </ProvisioningConfig>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -73,7 +73,7 @@ deviceModule = function () {
} }
var userName = carbonUser.username + "@" + carbonUser.domain; var userName = carbonUser.username + "@" + carbonUser.domain;
var locationHistory = []; var locationHistory = [];
var geoServicesEnabled = devicemgtProps.serverConfig.operationAnalyticsConfiguration.isEnabled; var geoServicesEnabled = devicemgtProps.serverConfig.geoLocationConfiguration.enabled;
if (geoServicesEnabled) { if (geoServicesEnabled) {
try { try {
var fromDate = new Date(); var fromDate = new Date();

@ -576,8 +576,8 @@
<div id="setWithinAlert"> <div id="setWithinAlert">
<form role="form" style="width: auto;"> <form role="form" style="width: auto;">
<div class="form-group"> <div class="form-group">
<label class="text-primary" for="areaName">Fence name</label> <label class="text-primary" for="withinAlertAreaName">Fence name</label>
<input class="form-control" id="areaName" placeholder="Fence name" type="text"> <input class="form-control" id="withinAlertAreaName" placeholder="Fence name" type="text">
<span class="help-block">Name of the selected area(e.g. colombo)</span> <span class="help-block">Name of the selected area(e.g. colombo)</span>
</div> </div>
<div> <div>
@ -589,9 +589,8 @@
</button> </button>
</div> </div>
<div class="btn-group"> <div class="btn-group">
<button id="editGeoJson" <button onclick="$('#editWithinGeoJSON #updateGeoJson').attr('leaflet_id',$(this).attr('leaflet_id'));$('#editWithinGeoJSON textarea').text(JSON.stringify(map._layers[$(this).attr('leaflet_id')].toGeoJSON(),null, '\t'));$('#editWithinGeoJSON').modal('toggle')"
onclick="$('#editWithinGeoJSON #updateGeoJson').attr('leaflet_id',$(this).attr('leaflet_id'));$('#editWithinGeoJSON textarea').text(JSON.stringify(map._layers[$(this).attr('leaflet_id')].toGeoJSON(),null, '\t'));$('#editWithinGeoJSON').modal('toggle')" type="button" class="btn btn-default btn-xs editGeoJson">Edit
type="button" class="btn btn-default btn-xs">Edit
</button> </button>
</div> </div>
<div class="btn-group"> <div class="btn-group">
@ -607,8 +606,8 @@
<div id="setExitAlert"> <div id="setExitAlert">
<form role="form" style="width: auto;"> <form role="form" style="width: auto;">
<div class="form-group"> <div class="form-group">
<label class="text-primary" for="areaName">Fence name</label> <label class="text-primary" for="exitAlertAreaName">Fence name</label>
<input class="form-control" id="areaName" placeholder="Fence name" type="text"> <input class="form-control" id="exitAlertAreaName" placeholder="Fence name" type="text">
<span class="help-block">Name of the selected area(e.g. colombo)</span> <span class="help-block">Name of the selected area(e.g. colombo)</span>
</div> </div>
<div> <div>
@ -620,9 +619,8 @@
</button> </button>
</div> </div>
<div class="btn-group"> <div class="btn-group">
<button id="editGeoJson" <button onclick="$('#editExitGeoJSON #updateGeoJson').attr('leaflet_id',$(this).attr('leaflet_id'));$('#editExitGeoJSON textarea').text(JSON.stringify(map._layers[$(this).attr('leaflet_id')].toGeoJSON(),null, '\t'));$('#editExitGeoJSON').modal('toggle')"
onclick="$('#editExitGeoJSON #updateGeoJson').attr('leaflet_id',$(this).attr('leaflet_id'));$('#editExitGeoJSON textarea').text(JSON.stringify(map._layers[$(this).attr('leaflet_id')].toGeoJSON(),null, '\t'));$('#editExitGeoJSON').modal('toggle')" type="button" class="btn btn-default btn-xs editGeoJson">Edit
type="button" class="btn btn-default btn-xs">Edit
</button> </button>
</div> </div>
<div class="btn-group"> <div class="btn-group">
@ -639,8 +637,8 @@
<div id="setStationeryAlert"> <div id="setStationeryAlert">
<form role="form" style="width: auto;"> <form role="form" style="width: auto;">
<div class="form-group"> <div class="form-group">
<label class="text-primary" for="areaName">Fence name</label> <label class="text-primary" for="stationaryAlertAreaName">Fence name</label>
<input class="form-control" id="areaName" placeholder="Stationery name" type="text"> <input class="form-control" id="stationaryAlertAreaName" placeholder="Stationery name" type="text">
<span class="help-block">Name of the selected area(e.g. colombo)</span> <span class="help-block">Name of the selected area(e.g. colombo)</span>
<label class="text-primary" for="fRadius">Fluctuation radius</label> <label class="text-primary" for="fRadius">Fluctuation radius</label>
@ -658,9 +656,8 @@
</button> </button>
</div> </div>
<div class="btn-group"> <div class="btn-group">
<button id="editGeoJson" <button onclick="$('#editWithinGeoJSON #updateGeoJson').attr('leaflet_id',$(this).attr('leaflet_id'));$('#editWithinGeoJSON textarea').text(JSON.stringify(map._layers[$(this).attr('leaflet_id')].toGeoJSON(),null, '\t'));$('#editWithinGeoJSON').modal('toggle')"
onclick="$('#editWithinGeoJSON #updateGeoJson').attr('leaflet_id',$(this).attr('leaflet_id'));$('#editWithinGeoJSON textarea').text(JSON.stringify(map._layers[$(this).attr('leaflet_id')].toGeoJSON(),null, '\t'));$('#editWithinGeoJSON').modal('toggle')" type="button" class="btn btn-default btn-xs editGeoJson">Edit
type="button" class="btn btn-default btn-xs">Edit
</button> </button>
</div> </div>
<div class="btn-group"> <div class="btn-group">
@ -676,8 +673,8 @@
<div id="setTrafficAlert"> <div id="setTrafficAlert">
<form role="form" style="width: auto;"> <form role="form" style="width: auto;">
<div class="form-group"> <div class="form-group">
<label class="text-primary" for="areaName">Fence name</label> <label class="text-primary" for="trafficAlertAreaName">Fence name</label>
<input class="form-control" id="areaName" placeholder="Area Name" type="text"> <input class="form-control" id="trafficAlertAreaName" placeholder="Area Name" type="text">
<span class="help-block">Name of the selected area(e.g. colombo)</span> <span class="help-block">Name of the selected area(e.g. colombo)</span>
</div> </div>
<div> <div>
@ -689,9 +686,8 @@
</button> </button>
</div> </div>
<div class="btn-group"> <div class="btn-group">
<button id="editGeoJson" <button onclick="$('#editTrafficGeoJSON #updateGeoJson').attr('leaflet_id',$(this).attr('leaflet_id'));$('#editTrafficGeoJSON textarea').text(JSON.stringify(map._layers[$(this).attr('leaflet_id')].toGeoJSON(),null, '\t'));$('#editTrafficGeoJSON').modal('toggle')"
onclick="$('#editTrafficGeoJSON #updateGeoJson').attr('leaflet_id',$(this).attr('leaflet_id'));$('#editTrafficGeoJSON textarea').text(JSON.stringify(map._layers[$(this).attr('leaflet_id')].toGeoJSON(),null, '\t'));$('#editTrafficGeoJSON').modal('toggle')" type="button" class="btn btn-default btn-xs editGeoJson">Edit
type="button" class="btn btn-default btn-xs">Edit
</button> </button>
</div> </div>
<div class="btn-group"> <div class="btn-group">

@ -60,6 +60,6 @@ function onRequest(context) {
} else { } else {
viewModel.lastLocation = stringify({}); viewModel.lastLocation = stringify({});
} }
viewModel.geoServicesEnabled = devicemgtProps.serverConfig.operationAnalyticsConfiguration.isEnabled; viewModel.geoServicesEnabled = devicemgtProps.serverConfig.geoLocationConfiguration.enabled;
return viewModel; return viewModel;
} }

@ -271,8 +271,8 @@ function createPopup(layer,id) {
return; return;
} }
popupTemplate.find('#exportGeoJson').attr('leaflet_id', layer._leaflet_id); popupTemplate.find('.exportGeoJson').attr('leaflet_id', layer._leaflet_id);
popupTemplate.find('#editGeoJson').attr('leaflet_id', layer._leaflet_id); popupTemplate.find('.editGeoJson').attr('leaflet_id', layer._leaflet_id);
layer.bindPopup(popupTemplate.html(), {closeOnClick: false, closeButton: false}).openPopup(); layer.bindPopup(popupTemplate.html(), {closeOnClick: false, closeButton: false}).openPopup();
// transparent the layer .leaflet-popup-content-wrapper // transparent the layer .leaflet-popup-content-wrapper

@ -233,7 +233,7 @@ function setWithinAlert(leafletId) {
* (look in get_alerts for .replace() method) * (look in get_alerts for .replace() method)
* */ * */
var selectedAreaGeoJson = JSON.stringify(map._layers[leafletId].toGeoJSON().geometry).replace(/"/g, "'"); var selectedAreaGeoJson = JSON.stringify(map._layers[leafletId].toGeoJSON().geometry).replace(/"/g, "'");
var areaName = $("#areaName").val(); var areaName = $("#withinAlertAreaName").val();
var queryName = areaName; var queryName = areaName;
@ -292,7 +292,7 @@ function setExitAlert(leafletId) {
* (look in get_alerts for .replace() method) * (look in get_alerts for .replace() method)
* */ * */
var selectedAreaGeoJson = JSON.stringify(map._layers[leafletId].toGeoJSON().geometry).replace(/"/g, "'"); var selectedAreaGeoJson = JSON.stringify(map._layers[leafletId].toGeoJSON().geometry).replace(/"/g, "'");
var areaName = $("#areaName").val(); var areaName = $("#exitAlertAreaName").val();
var queryName = areaName; var queryName = areaName;
@ -357,7 +357,7 @@ function setStationeryAlert(leafletId) {
var selectedProcessedAreaGeoJson = JSON.stringify(selectedAreaGeoJson).replace(/"/g, "'"); var selectedProcessedAreaGeoJson = JSON.stringify(selectedAreaGeoJson).replace(/"/g, "'");
var stationeryName = $("#areaName").val(); var stationeryName = $("#stationaryAlertAreaName").val();
var queryName = stationeryName; var queryName = stationeryName;
var fluctuationRadius = $("#fRadius").val(); var fluctuationRadius = $("#fRadius").val();
var time = $("#time").val(); var time = $("#time").val();
@ -477,7 +477,7 @@ function setTrafficAlert(leafletId) {
var selectedProcessedAreaGeoJson = JSON.stringify(selectedAreaGeoJson).replace(/"/g, "'"); var selectedProcessedAreaGeoJson = JSON.stringify(selectedAreaGeoJson).replace(/"/g, "'");
var areaName = $("#areaName").val(); var areaName = $("#trafficAlertAreaName").val();
var queryName = areaName; var queryName = areaName;
//var time = $("#time").val(); //var time = $("#time").val();

@ -23,7 +23,7 @@
<parent> <parent>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -70,7 +70,7 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService {
@PathParam("deviceType") String deviceType, @PathParam("deviceType") String deviceType,
@QueryParam("from") long from, @QueryParam("to") long to) { @QueryParam("from") long from, @QueryParam("to") long to) {
try { try {
if (!DeviceManagerUtil.isPublishOperationResponseEnabled()) { if (!DeviceManagerUtil.isPublishLocationResponseEnabled()) {
return Response.status(Response.Status.BAD_REQUEST.getStatusCode()) return Response.status(Response.Status.BAD_REQUEST.getStatusCode())
.entity("Unable to retrive Geo Device stats. Geo Data publishing does not enabled.").build(); .entity("Unable to retrive Geo Device stats. Geo Data publishing does not enabled.").build();
} }

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>email-sender</artifactId> <artifactId>email-sender</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>

@ -22,13 +22,13 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>identity-extensions</artifactId> <artifactId>identity-extensions</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.oauth.extensions</artifactId> <artifactId>org.wso2.carbon.device.mgt.oauth.extensions</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - OAuth Extensions</name> <name>WSO2 Carbon - OAuth Extensions</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -21,7 +21,7 @@
<parent> <parent>
<artifactId>identity-extensions</artifactId> <artifactId>identity-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>identity-extensions</artifactId> <artifactId>identity-extensions</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt</artifactId> <artifactId>policy-mgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.complex.policy.decision.point</artifactId> <artifactId>org.wso2.carbon.complex.policy.decision.point</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Policy Decision Point</name> <name>WSO2 Carbon - Policy Decision Point</name>
<description>WSO2 Carbon - Policy Decision Point</description> <description>WSO2 Carbon - Policy Decision Point</description>

@ -3,14 +3,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt</artifactId> <artifactId>policy-mgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.policy.decision.point</artifactId> <artifactId>org.wso2.carbon.policy.decision.point</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Policy Decision Point</name> <name>WSO2 Carbon - Policy Decision Point</name>
<description>WSO2 Carbon - Policy Decision Point</description> <description>WSO2 Carbon - Policy Decision Point</description>

@ -3,7 +3,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt</artifactId> <artifactId>policy-mgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
@ -11,7 +11,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.policy.information.point</artifactId> <artifactId>org.wso2.carbon.policy.information.point</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Policy Information Point</name> <name>WSO2 Carbon - Policy Information Point</name>
<description>WSO2 Carbon - Policy Information Point</description> <description>WSO2 Carbon - Policy Information Point</description>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt</artifactId> <artifactId>policy-mgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.policy.mgt.common</artifactId> <artifactId>org.wso2.carbon.policy.mgt.common</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Policy Management Common</name> <name>WSO2 Carbon - Policy Management Common</name>
<description>WSO2 Carbon - Policy Management Common</description> <description>WSO2 Carbon - Policy Management Common</description>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt</artifactId> <artifactId>policy-mgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.policy.mgt.core</artifactId> <artifactId>org.wso2.carbon.policy.mgt.core</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Policy Management Core</name> <name>WSO2 Carbon - Policy Management Core</name>
<description>WSO2 Carbon - Policy Management Core</description> <description>WSO2 Carbon - Policy Management Core</description>

@ -209,7 +209,12 @@ public class PolicyManagerServiceImpl implements PolicyManagerService {
List<ComplianceFeature> complianceFeatures = List<ComplianceFeature> complianceFeatures =
monitoringManager.checkPolicyCompliance(deviceIdentifier, response); monitoringManager.checkPolicyCompliance(deviceIdentifier, response);
return !(complianceFeatures == null || complianceFeatures.isEmpty()); if(complianceFeatures == null || complianceFeatures.isEmpty()) {
return true;
} else {
return false;
}
} }
@Override @Override

@ -242,6 +242,7 @@ public class MonitoringDAOImpl implements MonitoringDAO {
PreparedStatement stmt = null; PreparedStatement stmt = null;
ResultSet resultSet = null; ResultSet resultSet = null;
NonComplianceData complianceData = new NonComplianceData(); NonComplianceData complianceData = new NonComplianceData();
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();
try { try {

@ -20,6 +20,7 @@ package org.wso2.carbon.policy.mgt.core.mgt.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.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.DeviceManagementException;
@ -92,19 +93,21 @@ public class MonitoringManagerImpl implements MonitoringManager {
PolicyManagementDAOFactory.openConnection(); PolicyManagementDAOFactory.openConnection();
NonComplianceData cmd = monitoringDAO.getCompliance(device.getId(), device.getEnrolmentInfo().getId()); NonComplianceData cmd = monitoringDAO.getCompliance(device.getId(), device.getEnrolmentInfo().getId());
complianceData = monitoringService.checkPolicyCompliance(deviceIdentifier, complianceData = monitoringService.checkPolicyCompliance(deviceIdentifier,
policy, deviceResponse); policy, deviceResponse);
if (cmd != null) {
complianceData.setId(cmd.getId());
complianceData.setPolicy(policy);
complianceFeatures = complianceData.getComplianceFeatures();
complianceData.setDeviceId(device.getId());
complianceData.setPolicyId(policy.getId());
}
complianceData.setId(cmd.getId());
complianceData.setPolicy(policy);
complianceFeatures = complianceData.getComplianceFeatures();
complianceData.setDeviceId(device.getId());
complianceData.setPolicyId(policy.getId());
} catch (SQLException e) { } catch (SQLException e) {
throw new PolicyComplianceException("Error occurred while opening a data source connection", e); throw new PolicyComplianceException("Error occurred while opening a data source connection", e);
} catch (MonitoringDAOException e) { } catch (MonitoringDAOException e) {
throw new PolicyComplianceException( throw new PolicyComplianceException(
"Unable to add the none compliance features to database for device " + "Unable to add the none compliance features to database for device " +
deviceIdentifier.getId() + " - " + deviceIdentifier.getType(), e); deviceIdentifier.getId() + " - " + deviceIdentifier.getType(), e);
} finally { } finally {
PolicyManagementDAOFactory.closeConnection(); PolicyManagementDAOFactory.closeConnection();
} }
@ -115,7 +118,7 @@ public class MonitoringManagerImpl implements MonitoringManager {
try { try {
PolicyManagementDAOFactory.beginTransaction(); PolicyManagementDAOFactory.beginTransaction();
monitoringDAO.setDeviceAsNoneCompliance(device.getId(), device.getEnrolmentInfo().getId(), monitoringDAO.setDeviceAsNoneCompliance(device.getId(), device.getEnrolmentInfo().getId(),
policy.getId()); policy.getId());
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("Compliance status primary key " + complianceData.getId()); log.debug("Compliance status primary key " + complianceData.getId());
} }
@ -181,19 +184,19 @@ public class MonitoringManagerImpl implements MonitoringManager {
device = service.getDevice(deviceIdentifier, false); device = service.getDevice(deviceIdentifier, false);
} catch (DeviceManagementException e) { } catch (DeviceManagementException e) {
throw new PolicyComplianceException("Unable to retrieve device data for " + deviceIdentifier.getId() + throw new PolicyComplianceException("Unable to retrieve device data for " + deviceIdentifier.getId() +
" - " + deviceIdentifier.getType(), e); " - " + deviceIdentifier.getType(), e);
} }
try { try {
PolicyManagementDAOFactory.openConnection(); PolicyManagementDAOFactory.openConnection();
NonComplianceData complianceData = monitoringDAO.getCompliance(device.getId(), device.getEnrolmentInfo() NonComplianceData complianceData = monitoringDAO.getCompliance(device.getId(), device.getEnrolmentInfo()
.getId()); .getId());
if (complianceData == null || !complianceData.isStatus()) { if (complianceData != null && !complianceData.isStatus()) {
return false; return false;
} }
} catch (MonitoringDAOException e) { } catch (MonitoringDAOException e) {
throw new PolicyComplianceException("Unable to retrieve compliance status for " + deviceIdentifier.getId() + throw new PolicyComplianceException("Unable to retrieve compliance status for " + deviceIdentifier.getId() +
" - " + deviceIdentifier.getType(), e); " - " + deviceIdentifier.getType(), e);
} catch (SQLException e) { } catch (SQLException e) {
throw new PolicyComplianceException("Error occurred while opening a connection to the data source", e); throw new PolicyComplianceException("Error occurred while opening a connection to the data source", e);
} finally { } finally {
@ -204,7 +207,7 @@ public class MonitoringManagerImpl implements MonitoringManager {
@Override @Override
public NonComplianceData getDevicePolicyCompliance(DeviceIdentifier deviceIdentifier) throws public NonComplianceData getDevicePolicyCompliance(DeviceIdentifier deviceIdentifier) throws
PolicyComplianceException { PolicyComplianceException {
NonComplianceData complianceData; NonComplianceData complianceData;
try { try {
PolicyManagementDAOFactory.openConnection(); PolicyManagementDAOFactory.openConnection();
@ -218,11 +221,11 @@ public class MonitoringManagerImpl implements MonitoringManager {
} catch (DeviceManagementException e) { } catch (DeviceManagementException e) {
throw new PolicyComplianceException("Unable to retrieve device data for " + deviceIdentifier.getId() + throw new PolicyComplianceException("Unable to retrieve device data for " + deviceIdentifier.getId() +
" - " + deviceIdentifier.getType(), e); " - " + deviceIdentifier.getType(), e);
} catch (MonitoringDAOException e) { } catch (MonitoringDAOException e) {
throw new PolicyComplianceException("Unable to retrieve compliance data for " + deviceIdentifier.getId() + throw new PolicyComplianceException("Unable to retrieve compliance data for " + deviceIdentifier.getId() +
" - " + deviceIdentifier.getType(), e); " - " + deviceIdentifier.getType(), e);
} catch (SQLException e) { } catch (SQLException e) {
throw new PolicyComplianceException("Error occurred while opening a connection to the data source", e); throw new PolicyComplianceException("Error occurred while opening a connection to the data source", e);
} finally { } finally {
@ -288,10 +291,10 @@ public class MonitoringManagerImpl implements MonitoringManager {
if (complianceData.getAttempts() == 0) { if (complianceData.getAttempts() == 0) {
deviceIdsToAddOperation.put(complianceData.getDeviceId(), deviceIdsToAddOperation.put(complianceData.getDeviceId(),
deviceIds.get(complianceData.getDeviceId())); deviceIds.get(complianceData.getDeviceId()));
} else { } else {
deviceIdsWithExistingOperation.put(complianceData.getDeviceId(), deviceIdsWithExistingOperation.put(complianceData.getDeviceId(),
deviceIds.get(complianceData.getDeviceId())); deviceIds.get(complianceData.getDeviceId()));
} }
} }
} }
@ -315,7 +318,7 @@ public class MonitoringManagerImpl implements MonitoringManager {
log.debug("These devices are in the system for the first time"); log.debug("These devices are in the system for the first time");
for (PolicyDeviceWrapper wrapper : firstTimeDevices) { for (PolicyDeviceWrapper wrapper : firstTimeDevices) {
log.debug("First time device primary key : " + wrapper.getDeviceId() + " & policy id " + log.debug("First time device primary key : " + wrapper.getDeviceId() + " & policy id " +
wrapper.getPolicyId()); wrapper.getPolicyId());
} }
} }
@ -358,11 +361,11 @@ public class MonitoringManagerImpl implements MonitoringManager {
List<String> deviceTypes = new ArrayList<>(); List<String> deviceTypes = new ArrayList<>();
try { try {
//when shutdown, it sets DeviceManagementService to null, therefore need to have a null check //when shutdown, it sets DeviceManagementService to null, therefore need to have a null check
if (PolicyManagementDataHolder.getInstance().getDeviceManagementService() != null) { if (PolicyManagementDataHolder.getInstance().getDeviceManagementService() != null) {
deviceTypes = deviceTypes =
PolicyManagementDataHolder.getInstance().getDeviceManagementService().getAvailableDeviceTypes(); PolicyManagementDataHolder.getInstance().getDeviceManagementService().getPolicyMonitoringEnableDeviceTypes();
} }
} catch (DeviceManagementException e) { } catch (DeviceManagementException e) {
throw new PolicyComplianceException("Error occurred while getting the device types.", e); throw new PolicyComplianceException("Error occurred while getting the device types.", e);
} }

@ -46,6 +46,8 @@ import org.wso2.carbon.policy.mgt.common.PolicyEvaluationPoint;
import org.wso2.carbon.policy.mgt.common.PolicyManagementException; import org.wso2.carbon.policy.mgt.common.PolicyManagementException;
import org.wso2.carbon.policy.mgt.core.enforcement.DelegationTask; import org.wso2.carbon.policy.mgt.core.enforcement.DelegationTask;
import org.wso2.carbon.policy.mgt.core.internal.PolicyManagementDataHolder; import org.wso2.carbon.policy.mgt.core.internal.PolicyManagementDataHolder;
import org.wso2.carbon.policy.mgt.core.mgt.MonitoringManager;
import org.wso2.carbon.policy.mgt.core.mgt.impl.MonitoringManagerImpl;
import org.wso2.carbon.policy.mgt.core.mock.TypeXDeviceManagementService; import org.wso2.carbon.policy.mgt.core.mock.TypeXDeviceManagementService;
import org.wso2.carbon.policy.mgt.core.task.MonitoringTask; import org.wso2.carbon.policy.mgt.core.task.MonitoringTask;
import org.wso2.carbon.policy.mgt.core.task.TaskScheduleService; import org.wso2.carbon.policy.mgt.core.task.TaskScheduleService;
@ -232,7 +234,7 @@ public class PolicyManagerServiceImplTest extends BasePolicyManagementDAOTest {
} }
@Test(dependsOnMethods = "applyPolicy") @Test(dependsOnMethods = "applyPolicy")
public void checkCompliance() throws PolicyComplianceException { public void checkCompliance() throws PolicyComplianceException, DeviceManagementException {
new MonitoringTask().execute(); new MonitoringTask().execute();
List<ComplianceFeature> complianceFeatures = new ArrayList<>(); List<ComplianceFeature> complianceFeatures = new ArrayList<>();
@ -246,6 +248,15 @@ public class PolicyManagerServiceImplTest extends BasePolicyManagementDAOTest {
complianceFeature.setMessage("Test message"); complianceFeature.setMessage("Test message");
complianceFeature.setCompliance(true); complianceFeature.setCompliance(true);
complianceFeatures.add(complianceFeature); complianceFeatures.add(complianceFeature);
Device device = DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().
getDevice(new DeviceIdentifier(DEVICE1, DEVICE_TYPE_A), false);
List<Device> deviceList = new ArrayList<>();
deviceList.add(device);
MonitoringManager manager = new MonitoringManagerImpl();
manager.addMonitoringOperation(deviceList);
policyManagerService.checkCompliance(new DeviceIdentifier(DEVICE1, DEVICE_TYPE_A), complianceFeatures); policyManagerService.checkCompliance(new DeviceIdentifier(DEVICE1, DEVICE_TYPE_A), complianceFeatures);
boolean deviceCompliance = policyManagerService.isCompliant(new DeviceIdentifier(DEVICE1, DEVICE_TYPE_A)); boolean deviceCompliance = policyManagerService.isCompliant(new DeviceIdentifier(DEVICE1, DEVICE_TYPE_A));
@ -253,7 +264,7 @@ public class PolicyManagerServiceImplTest extends BasePolicyManagementDAOTest {
} }
@Test(dependsOnMethods = "checkCompliance") @Test(dependsOnMethods = "checkCompliance")
public void checkNonCompliance() throws PolicyComplianceException { public void checkNonCompliance() throws PolicyComplianceException, DeviceManagementException {
new MonitoringTask().execute(); new MonitoringTask().execute();
List<ComplianceFeature> complianceFeatures = new ArrayList<>(); List<ComplianceFeature> complianceFeatures = new ArrayList<>();
@ -267,6 +278,15 @@ public class PolicyManagerServiceImplTest extends BasePolicyManagementDAOTest {
complianceFeature.setMessage("Test message"); complianceFeature.setMessage("Test message");
complianceFeature.setCompliance(false); complianceFeature.setCompliance(false);
complianceFeatures.add(complianceFeature); complianceFeatures.add(complianceFeature);
Device device = DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().
getDevice(new DeviceIdentifier(DEVICE1, DEVICE_TYPE_A), false);
List<Device> deviceList = new ArrayList<>();
deviceList.add(device);
MonitoringManager manager = new MonitoringManagerImpl();
manager.addMonitoringOperation(deviceList);
policyManagerService.checkCompliance(new DeviceIdentifier(DEVICE1, DEVICE_TYPE_A), complianceFeatures); policyManagerService.checkCompliance(new DeviceIdentifier(DEVICE1, DEVICE_TYPE_A), complianceFeatures);
boolean deviceCompliance = policyManagerService.isCompliant(new DeviceIdentifier(DEVICE1, DEVICE_TYPE_A)); boolean deviceCompliance = policyManagerService.isCompliant(new DeviceIdentifier(DEVICE1, DEVICE_TYPE_A));
Assert.assertFalse(deviceCompliance, "Policy was compliant even though the response was not compliant"); Assert.assertFalse(deviceCompliance, "Policy was compliant even though the response was not compliant");

@ -25,6 +25,7 @@ import org.wso2.carbon.device.mgt.common.MonitoringOperation;
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.app.mgt.ApplicationManager; import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManager;
import org.wso2.carbon.device.mgt.common.general.GeneralConfig;
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;
@ -96,4 +97,9 @@ public class TypeXDeviceManagementService implements DeviceManagementService {
public DeviceStatusTaskPluginConfig getDeviceStatusTaskPluginConfig() { public DeviceStatusTaskPluginConfig getDeviceStatusTaskPluginConfig() {
return null; return null;
} }
@Override
public GeneralConfig getGeneralConfig() {
return null;
}
} }

@ -23,13 +23,13 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>policy-mgt</artifactId> <artifactId>policy-mgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Policy Management Component</name> <name>WSO2 Carbon - Policy Management Component</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -21,7 +21,7 @@
<parent> <parent>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -21,14 +21,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>webapp-authenticator-framework</artifactId> <artifactId>webapp-authenticator-framework</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.webapp.authenticator.framework</artifactId> <artifactId>org.wso2.carbon.webapp.authenticator.framework</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Web Application Authenticator Framework Bundle</name> <name>WSO2 Carbon - Web Application Authenticator Framework Bundle</name>
<description>WSO2 Carbon - Web Application Authenticator Framework Bundle</description> <description>WSO2 Carbon - Web Application Authenticator Framework Bundle</description>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>webapp-authenticator-framework</artifactId> <artifactId>webapp-authenticator-framework</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Webapp Authenticator Framework</name> <name>WSO2 Carbon - Webapp Authenticator Framework</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -21,14 +21,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>apimgt-extensions-feature</artifactId> <artifactId>apimgt-extensions-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.application.extension.feature</artifactId> <artifactId>org.wso2.carbon.apimgt.application.extension.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<name>WSO2 Carbon - API Management Application Extension Feature</name> <name>WSO2 Carbon - API Management Application Extension Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains an implementation of a api application registration, which takes care of subscription <description>This feature contains an implementation of a api application registration, which takes care of subscription

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>apimgt-extensions-feature</artifactId> <artifactId>apimgt-extensions-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.handler.server.feature</artifactId> <artifactId>org.wso2.carbon.apimgt.handler.server.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<name>WSO2 Carbon - Device Management - APIM handler Server Feature</name> <name>WSO2 Carbon - Device Management - APIM handler Server Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains the handler for the api authentications <description>This feature contains the handler for the api authentications

@ -21,13 +21,13 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>apimgt-extensions-feature</artifactId> <artifactId>apimgt-extensions-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.integration.client.feature</artifactId> <artifactId>org.wso2.carbon.apimgt.integration.client.feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - APIM Integration Client Feature</name> <name>WSO2 Carbon - APIM Integration Client Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -21,14 +21,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>apimgt-extensions-feature</artifactId> <artifactId>apimgt-extensions-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.webapp.publisher.feature</artifactId> <artifactId>org.wso2.carbon.apimgt.webapp.publisher.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<name>WSO2 Carbon - API Management Webapp Publisher Feature</name> <name>WSO2 Carbon - API Management Webapp Publisher Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains an implementation of a Tomcat lifecycle listener, which takes care of publishing <description>This feature contains an implementation of a Tomcat lifecycle listener, which takes care of publishing

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>apimgt-extensions-feature</artifactId> <artifactId>apimgt-extensions-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - API Management Extensions Feature</name> <name>WSO2 Carbon - API Management Extensions Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>certificate-mgt-feature</artifactId> <artifactId>certificate-mgt-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>certificate-mgt-feature</artifactId> <artifactId>certificate-mgt-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>certificate-mgt-feature</artifactId> <artifactId>certificate-mgt-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.certificate.mgt.server.feature</artifactId> <artifactId>org.wso2.carbon.certificate.mgt.server.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<name>WSO2 Carbon - Certificate Management Server Feature</name> <name>WSO2 Carbon - Certificate Management Server Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains the core bundles required for back-end Certificate Management functionality <description>This feature contains the core bundles required for back-end Certificate Management functionality

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>certificate-mgt-feature</artifactId> <artifactId>certificate-mgt-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Certificate Management Feature</name> <name>WSO2 Carbon - Certificate Management Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-extensions-feature</artifactId> <artifactId>device-mgt-extensions-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<name>WSO2 Carbon - Device Type Deployer Feature</name> <name>WSO2 Carbon - Device Type Deployer Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>WSO2 Carbon - Device Type Deployer Feature</description> <description>WSO2 Carbon - Device Type Deployer Feature</description>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-extensions-feature</artifactId> <artifactId>device-mgt-extensions-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<name>WSO2 Carbon - FCM Based Push Notification Provider Feature</name> <name>WSO2 Carbon - FCM Based Push Notification Provider Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>WSO2 Carbon - MQTT Based Push Notification Provider Feature</description> <description>WSO2 Carbon - MQTT Based Push Notification Provider Feature</description>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-extensions-feature</artifactId> <artifactId>device-mgt-extensions-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<name>WSO2 Carbon - MQTT Based Push Notification Provider Feature</name> <name>WSO2 Carbon - MQTT Based Push Notification Provider Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>WSO2 Carbon - MQTT Based Push Notification Provider Feature</description> <description>WSO2 Carbon - MQTT Based Push Notification Provider Feature</description>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-extensions-feature</artifactId> <artifactId>device-mgt-extensions-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<name>WSO2 Carbon - MQTT Based Push Notification Provider Feature</name> <name>WSO2 Carbon - MQTT Based Push Notification Provider Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>WSO2 Carbon - MQTT Based Push Notification Provider Feature</description> <description>WSO2 Carbon - MQTT Based Push Notification Provider Feature</description>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-extensions-feature</artifactId> <artifactId>device-mgt-extensions-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<name>WSO2 Carbon - XMPP Based Push Notification Provider Feature</name> <name>WSO2 Carbon - XMPP Based Push Notification Provider Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>WSO2 Carbon - XMPP Based Push Notification Provider Feature</description> <description>WSO2 Carbon - XMPP Based Push Notification Provider Feature</description>

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-feature</artifactId> <artifactId>device-mgt-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.analytics.data.publisher.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.analytics.data.publisher.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<name>WSO2 Carbon - Device Management Server Feature</name> <name>WSO2 Carbon - Device Management Server Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains bundles related to device analytics data publisher</description> <description>This feature contains bundles related to device analytics data publisher</description>

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-feature</artifactId> <artifactId>device-mgt-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-feature</artifactId> <artifactId>device-mgt-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -118,9 +118,24 @@
</PurgingTask> </PurgingTask>
</ArchivalTask> </ArchivalTask>
</ArchivalConfiguration> </ArchivalConfiguration>
<GeoLocationConfiguration>
<Enabled>false</Enabled>
</GeoLocationConfiguration>
<OperationAnalyticsConfiguration> <OperationAnalyticsConfiguration>
<isEnabled>false</isEnabled> <PublishLocationResponse>false</PublishLocationResponse>
<PublishOperationResponse>false</PublishOperationResponse> <PublishDeviceInfoResponse>false</PublishDeviceInfoResponse>
<PublishOperationResponse>
<Enabled>false</Enabled>
<Operations>
<!-- Publish specific operation responses -->
<!--
<Operation>BATTERY_LEVEL</Operation>
<Operation>CHECK_LOCK_STATUS</Operation>
-->
<!-- use wildcard '*' to publish all responses -->
<Operation>*</Operation>
</Operations>
</PublishOperationResponse>
</OperationAnalyticsConfiguration> </OperationAnalyticsConfiguration>
<!--This configuration used to configure the options for remote device control feature --> <!--This configuration used to configure the options for remote device control feature -->
<RemoteSessionConfiguration> <RemoteSessionConfiguration>

@ -4,14 +4,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-feature</artifactId> <artifactId>device-mgt-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.extensions.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.extensions.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<name>WSO2 Carbon - Device Management Extensions Feature</name> <name>WSO2 Carbon - Device Management Extensions Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains common extensions used by key device management functionalities <description>This feature contains common extensions used by key device management functionalities

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-feature</artifactId> <artifactId>device-mgt-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-feature</artifactId> <artifactId>device-mgt-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.server.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.server.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<name>WSO2 Carbon - Device Management Server Feature</name> <name>WSO2 Carbon - Device Management Server Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains the core bundles required for Back-end Device Management functionality <description>This feature contains the core bundles required for Back-end Device Management functionality

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-feature</artifactId> <artifactId>device-mgt-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>email-sender-feature</artifactId> <artifactId>email-sender-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.email.sender.feature</artifactId> <artifactId>org.wso2.carbon.email.sender.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<name>WSO2 Carbon - Email Sender Feature</name> <name>WSO2 Carbon - Email Sender Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains the core bundles required for email sender related functionality <description>This feature contains the core bundles required for email sender related functionality

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>email-sender-feature</artifactId> <artifactId>email-sender-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Email Sender Feature</name> <name>WSO2 Carbon - Email Sender Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -23,14 +23,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>jwt-client-feature</artifactId> <artifactId>jwt-client-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.identity.jwt.client.extension.feature</artifactId> <artifactId>org.wso2.carbon.identity.jwt.client.extension.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<name>WSO2 Carbon - JWT Client Feature</name> <name>WSO2 Carbon - JWT Client Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains jwt client implementation from which we can get a access token using the jwt <description>This feature contains jwt client implementation from which we can get a access token using the jwt

@ -23,13 +23,13 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>jwt-client-feature</artifactId> <artifactId>jwt-client-feature</artifactId>
<version>3.0.207-SNAPSHOT</version> <version>3.0.209-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - JWT Client Extension Feature</name> <name>WSO2 Carbon - JWT Client Extension Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save