merge with upstream master

feature/appm-store/pbac
lasantha 7 years ago
commit 02415dfd92

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

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

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

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

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

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

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

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

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

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

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

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

@ -427,7 +427,10 @@ public class CertificateGenerator {
Date validityBeginDate = commonUtil.getValidityStartDate();
Date validityEndDate = commonUtil.getValidityEndDate();
X500Name certSubject = new X500Name(CertificateManagementConstants.DEFAULT_PRINCIPAL);
X500Name certSubject = request.getSubject();
if (certSubject == null) { //This is highly unlikely as the csr must have a subject name.
certSubject = new X500Name(CertificateManagementConstants.DEFAULT_PRINCIPAL);
}
Attribute attributes[] = request.getAttributes();
RDN[] certUniqueIdRDN;

@ -45,6 +45,7 @@
<minRetriesToMarkInactive>20</minRetriesToMarkInactive>
<!--<PolicyEvaluationPoint>Simple</PolicyEvaluationPoint>-->
<PolicyEvaluationPoint>Simple</PolicyEvaluationPoint>
<CacheEnable>true</CacheEnable>
</PolicyConfiguration>
<!--This specifies whether to enable the DeviceStatus Task in this node.-->
<DeviceStatusTaskConfig>

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -299,6 +299,7 @@ public class ApplicationManagerProviderServiceImpl implements ApplicationManagem
applicationMappingDAO.removeApplicationMapping(device.getId(), appIdsToRemove, tenantId);
Application installedApp;
List<Integer> applicationIds = new ArrayList<>();
List<Application> applicationsToMap = new ArrayList<>();
for (Application application : applications) {
if (!installedAppList.contains(application)) {
@ -307,7 +308,8 @@ public class ApplicationManagerProviderServiceImpl implements ApplicationManagem
if (installedApp == null) {
appsToAdd.add(application);
} else {
applicationIds.add(installedApp.getId());
application.setId(installedApp.getId());
applicationsToMap.add(application);
}
}
}
@ -315,11 +317,18 @@ public class ApplicationManagerProviderServiceImpl implements ApplicationManagem
log.debug("num of apps add:" + appsToAdd.size());
}
applicationIds.addAll(applicationDAO.addApplications(appsToAdd, tenantId));
// Getting the applications ids for the second time
for (Application application : appsToAdd) {
installedApp = applicationDAO.getApplication(application.getApplicationIdentifier(),
application.getVersion(), tenantId);
application.setId(installedApp.getId());
applicationsToMap.add(application);
}
if (log.isDebugEnabled()) {
log.debug("num of app Ids:" + applicationIds.size());
}
applicationMappingDAO.addApplicationMappings(device.getId(), applicationIds, tenantId);
applicationMappingDAO.addApplicationMappingsWithApps(device.getId(), applicationsToMap, tenantId);
if (log.isDebugEnabled()) {
log.debug("num of remove app Ids:" + appIdsToRemove.size());

@ -34,6 +34,7 @@ public class PolicyConfiguration {
private int minRetriesToMarkInactive;
private List<String> platforms;
private String policyEvaluationPoint;
private boolean cacheEnable;
@XmlElement(name = "MonitoringClass", required = true)
public String getMonitoringClass() {
@ -108,4 +109,13 @@ public class PolicyConfiguration {
this.policyEvaluationPoint = policyEvaluationPointName;
}
@XmlElement(name = "CacheEnable", required = true)
public boolean getCacheEnable() {
return cacheEnable;
}
public void setCacheEnable(boolean cacheEnable) {
this.cacheEnable = cacheEnable;
}
}

@ -34,5 +34,7 @@ public interface ApplicationDAO {
Application getApplication(String identifier, String version,int tenantId) throws DeviceManagementDAOException;
Application getApplication(String identifier, String version, int deviceId, int tenantId) throws DeviceManagementDAOException;
List<Application> getInstalledApplications(int deviceId) throws DeviceManagementDAOException;
}

@ -30,6 +30,9 @@ public interface ApplicationMappingDAO {
void addApplicationMappings(int deviceId, List<Integer> applicationIds, int tenantId)
throws DeviceManagementDAOException;
void addApplicationMappingsWithApps(int deviceId, List<Application> applications, int tenantId)
throws DeviceManagementDAOException;
void removeApplicationMapping(int deviceId, List<Integer> appIdList, int tenantId)
throws DeviceManagementDAOException;

@ -112,8 +112,6 @@ public class ApplicationDAOImpl implements ApplicationDAO {
Connection conn;
PreparedStatement stmt = null;
ResultSet rs;
ByteArrayOutputStream bao = null;
ObjectOutputStream oos = null;
List<Integer> applicationIds = new ArrayList<>();
try {
conn = this.getConnection();
@ -133,14 +131,15 @@ public class ApplicationDAOImpl implements ApplicationDAO {
stmt.setString(7, application.getImageUrl());
stmt.setInt(8, tenantId);
bao = new ByteArrayOutputStream();
oos = new ObjectOutputStream(bao);
oos.writeObject(application.getAppProperties());
stmt.setBytes(9, bao.toByteArray());
// Removing the application properties saving from the application table.
stmt.setBigDecimal(9, null);
stmt.setString(10, application.getApplicationIdentifier());
stmt.setInt(11, application.getMemoryUsage());
stmt.setBoolean(12, application.isActive());
// Removing the application memory
stmt.setInt(11, 0);
stmt.setBoolean(12, true);
stmt.executeUpdate();
rs = stmt.getGeneratedKeys();
@ -151,23 +150,7 @@ public class ApplicationDAOImpl implements ApplicationDAO {
return applicationIds;
} catch (SQLException e) {
throw new DeviceManagementDAOException("Error occurred while adding bulk application list", e);
} catch (IOException e) {
throw new DeviceManagementDAOException("Error occurred while serializing application properties object", e);
} finally {
if (bao != null) {
try {
bao.close();
} catch (IOException e) {
log.error("Error occurred while closing ByteArrayOutputStream", e);
}
}
if (oos != null) {
try {
oos.close();
} catch (IOException e) {
log.error("Error occurred while closing ObjectOutputStream", e);
}
}
DeviceManagementDAOUtil.cleanupResources(stmt, null);
}
}
@ -264,6 +247,38 @@ public class ApplicationDAOImpl implements ApplicationDAO {
}
}
@Override
public Application getApplication(String identifier, String version, int deviceId, int tenantId) throws DeviceManagementDAOException {
Connection conn;
PreparedStatement stmt = null;
ResultSet rs = null;
Application application = null;
try {
conn = this.getConnection();
stmt = conn.prepareStatement("SELECT ID, NAME, APP_IDENTIFIER, PLATFORM, CATEGORY, VERSION, TYPE, " +
"LOCATION_URL, IMAGE_URL, appmap.APP_PROPERTIES, appmap.MEMORY_USAGE, appmap.IS_ACTIVE, TENANT_ID " +
"FROM DM_APPLICATION app INNER JOIN " +
"(SELECT APPLICATION_ID, APP_PROPERTIES, MEMORY_USAGE, IS_ACTIVE FROM DM_DEVICE_APPLICATION_MAPPING W" +
"HERE DEVICE_ID = ?) appmap WHERE app.APP_IDENTIFIER = ? AND app.VERSION = ? AND " +
"appmap.APPLICATION_ID = app.id AND TENANT_ID = ?");
stmt.setInt(1, deviceId);
stmt.setString(2, identifier);
stmt.setString(3, version);
stmt.setInt(4, tenantId);
rs = stmt.executeQuery();
if (rs.next()) {
application = this.loadApplication(rs);
}
return application;
} catch (SQLException e) {
throw new DeviceManagementDAOException("Error occurred while retrieving application application '" +
identifier + "' and version '" + version + "'.", e);
} finally {
DeviceManagementDAOUtil.cleanupResources(stmt, rs);
}
}
private Connection getConnection() throws SQLException {
return DeviceManagementDAOFactory.getConnection();
}
@ -278,9 +293,10 @@ public class ApplicationDAOImpl implements ApplicationDAO {
try {
conn = this.getConnection();
stmt = conn.prepareStatement("Select ID, NAME, APP_IDENTIFIER, PLATFORM, CATEGORY, VERSION, TYPE, " +
"LOCATION_URL, IMAGE_URL, APP_PROPERTIES, MEMORY_USAGE, IS_ACTIVE, TENANT_ID From DM_APPLICATION app " +
"INNER JOIN " +
"(Select APPLICATION_ID From DM_DEVICE_APPLICATION_MAPPING WHERE DEVICE_ID=?) APPMAP " +
"LOCATION_URL, IMAGE_URL, APPMAP.APP_PROPERTIES, APPMAP.MEMORY_USAGE, APPMAP.IS_ACTIVE, " +
"TENANT_ID From DM_APPLICATION app INNER JOIN " +
"(Select APPLICATION_ID, APP_PROPERTIES, MEMORY_USAGE, IS_ACTIVE" +
" From DM_DEVICE_APPLICATION_MAPPING WHERE DEVICE_ID=?) APPMAP " +
"ON " +
"app.ID = APPMAP.APPLICATION_ID ");

@ -29,9 +29,7 @@ import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory;
import org.wso2.carbon.device.mgt.core.dao.util.DeviceManagementDAOUtil;
import org.wso2.carbon.device.mgt.core.dto.operation.mgt.ProfileOperation;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.*;
import java.sql.*;
import java.util.ArrayList;
import java.util.List;
@ -52,7 +50,7 @@ public class ApplicationMappingDAOImpl implements ApplicationMappingDAO {
conn = this.getConnection();
String sql = "INSERT INTO DM_DEVICE_APPLICATION_MAPPING (DEVICE_ID, APPLICATION_ID, " +
"TENANT_ID) VALUES (?, ?, ?)";
stmt = conn.prepareStatement(sql, new String[] {"id"});
stmt = conn.prepareStatement(sql, new String[]{"id"});
stmt.setInt(1, deviceId);
stmt.setInt(2, applicationId);
stmt.setInt(3, tenantId);
@ -72,7 +70,7 @@ public class ApplicationMappingDAOImpl implements ApplicationMappingDAO {
@Override
public void addApplicationMappings(int deviceId, List<Integer> applicationIds,
int tenantId) throws DeviceManagementDAOException {
int tenantId) throws DeviceManagementDAOException {
Connection conn;
PreparedStatement stmt = null;
ResultSet rs = null;
@ -99,6 +97,64 @@ public class ApplicationMappingDAOImpl implements ApplicationMappingDAO {
}
}
@Override
public void addApplicationMappingsWithApps(int deviceId, List<Application> applications, int tenantId)
throws DeviceManagementDAOException {
Connection conn;
PreparedStatement stmt = null;
ResultSet rs = null;
ByteArrayOutputStream bao = null;
ObjectOutputStream oos = null;
try {
conn = this.getConnection();
String sql = "INSERT INTO DM_DEVICE_APPLICATION_MAPPING (DEVICE_ID, APPLICATION_ID, APP_PROPERTIES, " +
"MEMORY_USAGE, IS_ACTIVE, TENANT_ID) VALUES (?, ?, ?, ?, ?, ?)";
conn.setAutoCommit(false);
stmt = conn.prepareStatement(sql);
for (Application application : applications) {
stmt.setInt(1, deviceId);
stmt.setInt(2, application.getId());
bao = new ByteArrayOutputStream();
oos = new ObjectOutputStream(bao);
oos.writeObject(application.getAppProperties());
stmt.setBytes(3, bao.toByteArray());
stmt.setInt(4, application.getMemoryUsage());
stmt.setBoolean(5, application.isActive());
stmt.setInt(6, tenantId);
stmt.addBatch();
}
stmt.executeBatch();
} catch (SQLException e) {
throw new DeviceManagementDAOException("Error occurred while adding device application mappings", e);
} catch (IOException e) {
throw new DeviceManagementDAOException("Error occurred while serializing application properties object", e);
} finally {
if (bao != null) {
try {
bao.close();
} catch (IOException e) {
log.error("Error occurred while closing ByteArrayOutputStream", e);
}
}
if (oos != null) {
try {
oos.close();
} catch (IOException e) {
log.error("Error occurred while closing ObjectOutputStream", e);
}
}
DeviceManagementDAOUtil.cleanupResources(stmt, rs);
}
}
@Override
public void removeApplicationMapping(int deviceId, List<Integer> appIdList,
int tenantId) throws DeviceManagementDAOException {

@ -26,6 +26,7 @@ import org.wso2.carbon.device.mgt.core.notification.mgt.dao.util.NotificationDAO
import java.sql.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
@ -43,14 +44,15 @@ public abstract class AbstractNotificationDAOImpl implements NotificationDAO {
try {
conn = NotificationManagementDAOFactory.getConnection();
String sql =
"INSERT INTO DM_NOTIFICATION(DEVICE_ID, OPERATION_ID, STATUS, DESCRIPTION, TENANT_ID) " +
"VALUES (?, ?, ?, ?, ?)";
"INSERT INTO DM_NOTIFICATION(DEVICE_ID, OPERATION_ID, STATUS, DESCRIPTION, " +
"TENANT_ID, LAST_UPDATED_TIMESTAMP) VALUES (?, ?, ?, ?, ?, ?)";
stmt = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
stmt.setInt(1, deviceId);
stmt.setInt(2, notification.getOperationId());
stmt.setString(3, notification.getStatus().toString());
stmt.setString(4, notification.getDescription());
stmt.setInt(5, tenantId);
stmt.setTimestamp(6, new Timestamp(new Date().getTime()));
stmt.execute();
rs = stmt.getGeneratedKeys();
if (rs.next()) {
@ -103,13 +105,14 @@ public abstract class AbstractNotificationDAOImpl implements NotificationDAO {
int rows;
try {
conn = NotificationManagementDAOFactory.getConnection();
String sql = "UPDATE DM_NOTIFICATION SET OPERATION_ID = ?, STATUS = ?, DESCRIPTION = ? " +
"WHERE NOTIFICATION_ID = ?";
String sql = "UPDATE DM_NOTIFICATION SET OPERATION_ID = ?, STATUS = ?, DESCRIPTION = ?, " +
"LAST_UPDATED_TIMESTAMP = ? WHERE NOTIFICATION_ID = ?";
stmt = conn.prepareStatement(sql);
stmt.setInt(1, notification.getOperationId());
stmt.setString(2, notification.getStatus().toString());
stmt.setString(3, notification.getDescription());
stmt.setInt(4, notification.getNotificationId());
stmt.setTimestamp(4, new Timestamp(new Date().getTime()));
stmt.setInt(5, notification.getNotificationId());
rows = stmt.executeUpdate();
} catch (Exception e) {
throw new NotificationManagementException("Error occurred while updating the " +
@ -128,10 +131,11 @@ public abstract class AbstractNotificationDAOImpl implements NotificationDAO {
int rows;
try {
conn = NotificationManagementDAOFactory.getConnection();
String sql = "UPDATE DM_NOTIFICATION SET STATUS = ? WHERE NOTIFICATION_ID = ?";
String sql = "UPDATE DM_NOTIFICATION SET STATUS = ?, LAST_UPDATED_TIMESTAMP = ? WHERE NOTIFICATION_ID = ?";
stmt = conn.prepareStatement(sql);
stmt.setString(1, status.toString());
stmt.setInt(2, notificationId);
stmt.setTimestamp(2, new Timestamp(new Date().getTime()));
stmt.setInt(3, notificationId);
rows = stmt.executeUpdate();
} catch (Exception e) {
throw new NotificationManagementException("Error occurred while updating the status of " +
@ -150,10 +154,11 @@ public abstract class AbstractNotificationDAOImpl implements NotificationDAO {
int rows;
try {
conn = NotificationManagementDAOFactory.getConnection();
String sql = "UPDATE DM_NOTIFICATION SET STATUS = ? WHERE TENANT_ID= ?";
String sql = "UPDATE DM_NOTIFICATION SET STATUS = ?, LAST_UPDATED_TIMESTAMP = ? WHERE TENANT_ID= ?";
stmt = conn.prepareStatement(sql);
stmt.setString(1, status.toString());
stmt.setInt(2, tenantID);
stmt.setTimestamp(2, new Timestamp(new Date().getTime()));
stmt.setInt(3, tenantID);
rows = stmt.executeUpdate();
} catch (Exception e) {
throw new NotificationManagementException("Error while trying to clear all " +

@ -26,6 +26,7 @@ import org.wso2.carbon.device.mgt.core.notification.mgt.dao.util.NotificationDAO
import java.sql.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
@ -41,14 +42,16 @@ public class OracleNotificationDAOImpl extends AbstractNotificationDAOImpl {
int notificationId = -1;
try {
conn = NotificationManagementDAOFactory.getConnection();
String sql = "INSERT INTO DM_NOTIFICATION(DEVICE_ID, OPERATION_ID, STATUS, DESCRIPTION, TENANT_ID) "
+ "VALUES (?, ?, ?, ?, ?)";
String sql = "INSERT INTO DM_NOTIFICATION(DEVICE_ID, OPERATION_ID, STATUS, " +
"DESCRIPTION, TENANT_ID, LAST_UPDATED_TIMESTAMP) "
+ "VALUES (?, ?, ?, ?, ?, ?)";
stmt = conn.prepareStatement(sql, new int[] { 1 });
stmt.setInt(1, deviceId);
stmt.setInt(2, notification.getOperationId());
stmt.setString(3, notification.getStatus().toString());
stmt.setString(4, notification.getDescription());
stmt.setInt(5, tenantId);
stmt.setTimestamp(6, new Timestamp(new Date().getTime()));
stmt.execute();
rs = stmt.getGeneratedKeys();
if (rs.next()) {

@ -565,7 +565,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
DeviceManagementDAOFactory.closeConnection();
}
if (requireDeviceInfo) {
if (!allDevices.isEmpty() && requireDeviceInfo) {
return this.getAllDeviceInfo(allDevices);
}
return allDevices;

@ -57,6 +57,7 @@
<!--Simple -> Simple policy evaluation point-->
<!--Merged -> Merged policy evaluation point -->
<PolicyEvaluationPoint>Simple</PolicyEvaluationPoint>
<CacheEnable>true</CacheEnable>
</PolicyConfiguration>
<!-- Default Page size configuration for paginated DM APIs-->
<PaginationConfiguration>

@ -57,6 +57,7 @@
<!--Simple -> Simple policy evaluation point-->
<!--Merged -> Merged policy evaluation point -->
<PolicyEvaluationPoint>Simple</PolicyEvaluationPoint>
<CacheEnable>true</CacheEnable>
</PolicyConfiguration>
<!-- Default Page size configuration for paginated DM APIs-->
<PaginationConfiguration>

@ -367,6 +367,9 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_APPLICATION_MAPPING (
ID INTEGER AUTO_INCREMENT NOT NULL,
DEVICE_ID INTEGER NOT NULL,
APPLICATION_ID INTEGER NOT NULL,
APP_PROPERTIES BLOB NULL,
MEMORY_USAGE INTEGER(10) NULL,
IS_ACTIVE BOOLEAN NOT NULL DEFAULT FALSE,
TENANT_ID INTEGER NOT NULL,
PRIMARY KEY (ID),
CONSTRAINT fk_dm_device FOREIGN KEY (DEVICE_ID) REFERENCES
@ -385,6 +388,7 @@ CREATE TABLE IF NOT EXISTS DM_NOTIFICATION (
TENANT_ID INTEGER NOT NULL,
STATUS VARCHAR(10) NULL,
DESCRIPTION VARCHAR(1000) NULL,
LAST_UPDATED_TIMESTAMP TIMESTAMP NOT NULL,
PRIMARY KEY (NOTIFICATION_ID),
CONSTRAINT fk_dm_device_notification FOREIGN KEY (DEVICE_ID) REFERENCES
DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,

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

@ -367,6 +367,9 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_APPLICATION_MAPPING (
ID INTEGER AUTO_INCREMENT NOT NULL,
DEVICE_ID INTEGER NOT NULL,
APPLICATION_ID INTEGER NOT NULL,
APP_PROPERTIES BLOB NULL,
MEMORY_USAGE INTEGER(10) NULL,
IS_ACTIVE BOOLEAN NOT NULL DEFAULT FALSE,
TENANT_ID INTEGER NOT NULL,
PRIMARY KEY (ID),
CONSTRAINT fk_dm_device FOREIGN KEY (DEVICE_ID) REFERENCES

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

@ -9,7 +9,7 @@
"remoteSessionWSURL": "https://%iot.core.host%:%iot.core.https.port%",
"portalURL": "https://%iot.analytics.host%:%iot.analytics.https.port%",
"dashboardServerURL": "%https.ip%",
"androidEnrollmentDir": "/android-web-agent/enrollment",
"androidAgentDownloadURL": "%https.ip%/devicemgt/public/cdmf.unit.device.type.android.type-view/assets/android-agent.apk",
"windowsEnrollmentDir": "/windows-web-agent/enrollment",
"iOSEnrollmentDir": "/ios-web-agent/enrollment",
"iOSConfigRoot": "%https.ip%/ios-enrollment/",

@ -7,7 +7,7 @@
<p class="page-sub-title">Register</p>
<p>Create new account on WSO2 IoT (All fields are required.)</p>
<p>Create a new account in WSO2 IoT Server(All fields are required.)</p>
<hr/>
<!-- validation -->
<div class="wr-validation-summary hidden alert alert-danger">

@ -23,7 +23,7 @@
{{#if deviceFound}}
{{#if isAuthorized}}
<div class="row">
<div class="col-lg-4">
<div class="col-lg-5">
<div class="device-info-container">
<div class="row">
<div class="col-lg-3">
@ -68,8 +68,8 @@
{{/defineZone}}
<div class="clearfix"></div>
</div>
<!-- /col-lg-4 -->
<div class="col-lg-8">
<!-- /col-lg-5 -->
<div class="col-lg-7">
<ul class="nav nav-tabs">
{{#defineZone "device-view-tabs"}}
<li class="active"><a data-toggle="tab" href="#event_log">Operations Log</a></li>
@ -118,7 +118,7 @@
{{/defineZone}}
</div>
</div>
<!-- /col-lg-08 -->
<!-- /col-lg-7 -->
</div>
<!-- /row -->
{{else}}

@ -56,7 +56,7 @@ function addTileUrl() {
var serverUrl = "/portal/store/carbon.super/fs/gadget/geo-dashboard/controllers/tile_servers.jag";
// TODO: If failure happens notify user about the error message
$.post(serverUrl, data, function (response) {
noty({text: '<span style="color: dodgerblue">' + response + '</span>', type: 'success' });
noty({text: '<span style="color: dodgerblue">' + response + '</span>', type: 'success'});
closeAll();
});
}
@ -75,9 +75,12 @@ function getTileServers() {
});*/
$.getJSON("/api/controllers/tile_servers?serverId=all", function (data) {
console.log(JSON.stringify(data));
$.each(data, function (key, val) {
noty({text: 'Loading... <span style="color: #ccfcff">' + val.NAME + '</span>', type: 'info'});
noty({
text: 'Loading... <span style="color: #ccfcff">' + val.NAME + '</span>',
type: 'info'
});
//baseLayers[val.name]
var newTileLayer = L.tileLayer(
val.URL, {
@ -152,8 +155,10 @@ function addWmsEndPoint() {
var serverUrl = "/api/controllers/wms_endpoints";
// TODO: If failure happens notify user about the error message
$.post(serverUrl, data, function (response) {
console.log("------->><wms_endpoints>"+ response);
noty({text: '<span style="color: dodgerblue">' + response + '</span>',type: 'success'});
noty({
text: '<span style="color: dodgerblue">' + response + '</span>',
type: 'success'
});
closeAll();
});
}
@ -182,12 +187,9 @@ function setSpeedAlert() {
//TODO: get the device Id from the URL
var speedAlertValue = $("#speedAlertValue").val();
if (speedAlertValue == null || speedAlertValue === undefined || speedAlertValue == "") {
if (!speedAlertValue) {
var message = "Speed cannot be empty.";
noty({text: message, type : 'error' });
} else if (areaName.indexOf(" ") > -1) {
var message = "Area Name cannot contain spaces.";
noty({text: message, type : 'error' });
noty({text: message, type: 'error'});
} else {
data = {
'parseData': JSON.stringify({'speedAlertValue': speedAlertValue, 'deviceId': deviceId}), // parseKey : parseValue pair , this key pair is replace with the key in the template file
@ -200,7 +202,7 @@ function setSpeedAlert() {
var responseHandler = function (data, textStatus, xhr) {
closeAll();
if (xhr.status == 200) {
noty({text: 'Successfully added alert', type : 'success'});
noty({text: 'Successfully added alert', type: 'success'});
} else {
var ptrn = /(?:<am\:description>)(.*)(?:<\/am\:description>)/g;
var result = (ptrn.exec(data));
@ -210,12 +212,12 @@ function setSpeedAlert() {
} else {
errorTxt = data;
}
noty({text: textStatus + ' : ' + errorTxt, type : 'error'});
noty({text: textStatus + ' : ' + errorTxt, type: 'error'});
}
};
invokerUtil.put(serviceUrl,
data,
responseHandler, function (xhr) {
data,
responseHandler, function (xhr) {
responseHandler(xhr.responseText, xhr.statusText, xhr);
});
}
@ -237,30 +239,31 @@ function setWithinAlert(leafletId) {
if (areaName == null || areaName === undefined || areaName == "") {
var message = "Area Name cannot be empty.";
noty({text: message, type : 'error' });
} else if (areaName.indexOf(" ") > -1) {
noty({text: message, type: 'error'});
} else if ($.trim(areaName).indexOf(" ") > -1) {
var message = "Area Name cannot contain spaces.";
noty({text: message, type : 'error' });
noty({text: message, type: 'error'});
} else {
areaName = $.trim(areaName);
var data = {
'parseData': JSON.stringify({
'geoFenceGeoJSON': selectedAreaGeoJson,
'executionPlanName': createExecutionPlanName(queryName, "WithIn", deviceId),
'areaName': areaName,
'deviceId' : deviceId
}),
'geoFenceGeoJSON': selectedAreaGeoJson,
'executionPlanName': createExecutionPlanName(queryName, "WithIn", deviceId),
'areaName': areaName,
'deviceId': deviceId
}),
'executionPlan': 'Within',
'customName': areaName, // TODO: fix , When template copies there can be two queryName and areaName id elements in the DOM
'queryName': queryName,
'cepAction': 'deploy',
'deviceId' : deviceId
'deviceId': deviceId
};
var serviceUrl = '/api/device-mgt/v1.0/geo-services/alerts/Within/' + deviceType + '/' + deviceId;
var responseHandler = function (data, textStatus, xhr) {
closeTools(leafletId);
if (xhr.status == 200) {
noty({text: 'Successfully added alert', type : 'success'});
noty({text: 'Successfully added alert', type: 'success'});
} else {
var ptrn = /(?:<am\:description>)(.*)(?:<\/am\:description>)/g;
var errorTxt;
@ -270,12 +273,12 @@ function setWithinAlert(leafletId) {
} else {
errorTxt = data;
}
noty({text: textStatus + ' : ' + errorTxt, type : 'error'});
noty({text: textStatus + ' : ' + errorTxt, type: 'error'});
}
};
invokerUtil.post(serviceUrl,
data,
responseHandler, function (xhr) {
data,
responseHandler, function (xhr) {
responseHandler(xhr.responseText, xhr.statusText, xhr);
});
viewFenceByData(selectedAreaGeoJson, queryName, areaName, null, 'Within');
@ -295,30 +298,31 @@ function setExitAlert(leafletId) {
if (areaName == null || areaName === undefined || areaName == "") {
var message = "Area Name cannot be empty.";
noty({text: message, type : 'error' });
} else if (areaName.indexOf(" ") > -1) {
noty({text: message, type: 'error'});
} else if ($.trim(areaName).indexOf(" ") > -1) {
var message = "Area Name cannot contain spaces.";
noty({text: message, type : 'error' });
noty({text: message, type: 'error'});
} else {
areaName = $.trim(areaName);
var data = {
'parseData': JSON.stringify({
'geoFenceGeoJSON': selectedAreaGeoJson,
'executionPlanName': createExecutionPlanName(queryName, "Exit", deviceId),
'areaName': areaName,
'deviceId' : deviceId
}),
'geoFenceGeoJSON': selectedAreaGeoJson,
'executionPlanName': createExecutionPlanName(queryName, "Exit", deviceId),
'areaName': areaName,
'deviceId': deviceId
}),
'executionPlan': 'Exit',
'customName': areaName, // TODO: fix , When template copies there can be two queryName and areaName id elements in the DOM
'queryName': queryName,
'cepAction': 'deploy',
'deviceId' : deviceId
'deviceId': deviceId
};
var serviceUrl = '/api/device-mgt/v1.0/geo-services/alerts/Exit/' + deviceType + '/' + deviceId;
var responseHandler = function (data, textStatus, xhr) {
closeTools(leafletId);
if (xhr.status == 200) {
noty({text: 'Successfully added alert', type : 'success'});
noty({text: 'Successfully added alert', type: 'success'});
} else {
var ptrn = /(?:<am\:description>)(.*)(?:<\/am\:description>)/g;
var errorTxt;
@ -328,12 +332,12 @@ function setExitAlert(leafletId) {
} else {
errorTxt = data;
}
noty({text: textStatus + ' : ' + errorTxt, type : 'error'});
noty({text: textStatus + ' : ' + errorTxt, type: 'error'});
}
};
invokerUtil.post(serviceUrl,
data,
responseHandler, function (xhr) {
data,
responseHandler, function (xhr) {
responseHandler(xhr.responseText, xhr.statusText, xhr);
});
viewFenceByData(selectedAreaGeoJson, queryName, areaName, null, 'Exit');
@ -360,25 +364,26 @@ function setStationeryAlert(leafletId) {
if (stationeryName == null || stationeryName === undefined || stationeryName == "") {
var message = "Stationery Name cannot be empty.";
noty({text: message, type : 'error' });
} else if (stationeryName.indexOf(" ") > -1) {
noty({text: message, type: 'error'});
} else if ($.trim(stationeryName).indexOf(" ") > -1) {
var message = "Stationery Name cannot contain spaces.";
noty({text: message, type : 'error' });
noty({text: message, type: 'error'});
} else if (fluctuationRadius == null || fluctuationRadius === undefined || fluctuationRadius == "") {
var message = "Fluctuation Radius cannot be empty.";
noty({text: message, type : 'error' });
noty({text: message, type: 'error'});
} else if (time == null || time === undefined || time == "") {
var message = "Time cannot be empty.";
noty({text: message, type: 'error' });
noty({text: message, type: 'error'});
} else {
stationeryName = $.trim(stationeryName);
var data = {
'parseData': JSON.stringify({
'geoFenceGeoJSON': selectedProcessedAreaGeoJson,
'executionPlanName': createExecutionPlanName(queryName, "Stationery", deviceId),
'stationeryName': stationeryName,
'stationeryTime': time,
'fluctuationRadius': fluctuationRadius
}),
'geoFenceGeoJSON': selectedProcessedAreaGeoJson,
'executionPlanName': createExecutionPlanName(queryName, "Stationery", deviceId),
'stationeryName': stationeryName,
'stationeryTime': time,
'fluctuationRadius': fluctuationRadius
}),
'stationeryTime': time,
'fluctuationRadius': fluctuationRadius,
'executionPlan': 'Stationery',
@ -391,7 +396,7 @@ function setStationeryAlert(leafletId) {
var responseHandler = function (data, textStatus, xhr) {
closeTools(leafletId);
if (xhr.status == 200) {
noty({text: 'Successfully added alert', type : 'success'});
noty({text: 'Successfully added alert', type: 'success'});
} else {
var ptrn = /(?:<am\:description>)(.*)(?:<\/am\:description>)/g;
var errorTxt;
@ -401,12 +406,12 @@ function setStationeryAlert(leafletId) {
} else {
errorTxt = data;
}
noty({text: textStatus + ' : ' + errorTxt, type : 'error'});
noty({text: textStatus + ' : ' + errorTxt, type: 'error'});
}
};
invokerUtil.post(serviceUrl,
data,
responseHandler, function (xhr) {
data,
responseHandler, function (xhr) {
responseHandler(xhr.responseText, xhr.statusText, xhr);
});
viewFenceByData(selectedProcessedAreaGeoJson, queryName, areaName, time, 'Stationery');
@ -461,7 +466,6 @@ function setTrafficAlert(leafletId) {
* this is against JSON standards so has been re-replaced when getting the data from governance registry
* (look in get_alerts for .replace() method)
* */
console.log("leafletId: " + leafletId);
var selectedAreaGeoJson = map._layers[leafletId].toGeoJSON().geometry;
//if a circle is drawn adding radius for the object
@ -479,29 +483,30 @@ function setTrafficAlert(leafletId) {
if (areaName == null || areaName === undefined || areaName == "") {
var message = "Area Name cannot be empty.";
noty({text: message, type : 'error' });
} else if (areaName.indexOf(" ") > -1) {
noty({text: message, type: 'error'});
} else if ($.trim(areaName).indexOf(" ") > -1) {
var message = "Area Name cannot contain spaces.";
noty({text: message, type : 'error' });
noty({text: message, type: 'error'});
} else {
areaName = $.trim(areaName);
var data = {
'parseData': JSON.stringify({
'geoFenceGeoJSON': selectedProcessedAreaGeoJson,
'executionPlanName': createExecutionPlanName(queryName, "Traffic", deviceId),
'areaName': areaName
}),
'geoFenceGeoJSON': selectedProcessedAreaGeoJson,
'executionPlanName': createExecutionPlanName(queryName, "Traffic", deviceId),
'areaName': areaName
}),
'executionPlan': 'Traffic',
'customName': areaName, // TODO: fix , When template copies there can be two queryName and areaName id elements in the DOM
'queryName': queryName,
'cepAction': 'deploy',
'deviceId': deviceId
};
console.log(JSON.stringify(data));
var serviceUrl = '/api/device-mgt/v1.0/geo-services/alerts/Traffic/' + deviceType + '/' + deviceId;
var responseHandler = function (data, textStatus, xhr) {
closeTools(leafletId);
if (xhr.status == 200) {
noty({text: 'Successfully added alert', type : 'success'});
noty({text: 'Successfully added alert', type: 'success'});
} else {
var ptrn = /(?:<am\:description>)(.*)(?:<\/am\:description>)/g;
var errorTxt;
@ -511,12 +516,12 @@ function setTrafficAlert(leafletId) {
} else {
errorTxt = data;
}
noty({text: textStatus + ' : ' + errorTxt, type : 'error'});
noty({text: textStatus + ' : ' + errorTxt, type: 'error'});
}
};
invokerUtil.post(serviceUrl,
data,
responseHandler, function (xhr) {
data,
responseHandler, function (xhr) {
responseHandler(xhr.responseText, xhr.statusText, xhr);
});
}
@ -527,24 +532,23 @@ function removeGeoFence(geoFenceElement, id) {
var areaName = $(geoFenceElement).attr('data-areaName');
var serviceUrl = '/api/device-mgt/v1.0/geo-services/alerts/' + id + '/' + deviceType + '/' + deviceId + '?queryName='
+ queryName;
+ queryName;
invokerUtil.delete(serviceUrl, function (response) {
noty({
text: 'Successfully removed ' + id + ' alert',
type: 'success'
});
closeAll();
},
function (xhr) {
noty({
text: 'Could not remove ' + id + ' alert',
type: 'error'
})
});
noty({
text: 'Successfully removed ' + id + ' alert',
type: 'success'
});
closeAll();
},
function (xhr) {
noty({
text: 'Could not remove ' + id + ' alert',
type: 'error'
})
});
}
function getAlertsHistory(deviceType, deviceId, timeFrom, timeTo) {
var timeRange = '';
if (timeFrom && timeTo) {
@ -552,30 +556,30 @@ function getAlertsHistory(deviceType, deviceId, timeFrom, timeTo) {
}
var serviceUrl = '/api/device-mgt/v1.0/geo-services/alerts/history/' + deviceType + '/' + deviceId + timeRange;
invokerUtil.get(serviceUrl,
function (data) {
geoAlertsBar.clearAllAlerts();
var alerts = JSON.parse(data);
$.each(alerts, function (key, val) {
if(val.values){
val = val.values;
}
var msg = deviceType.charAt(0).toUpperCase() + deviceType.slice(1) +
" " + deviceId +" "+ val.information.replace("Alerts: ,", "") + " - " + timeSince(val.timeStamp);
switch (val.state) {
case "NORMAL":
return;
case "WARNING":
geoAlertsBar.addAlert('warn', msg, val);
break;
case "ALERTED":
geoAlertsBar.addAlert('danger', msg, val);
break;
case "OFFLINE":
geoAlertsBar.addAlert('info', msg, val);
break;
}
});
}, function (message) {
function (data) {
geoAlertsBar.clearAllAlerts();
var alerts = JSON.parse(data);
$.each(alerts, function (key, val) {
if (val.values) {
val = val.values;
}
var msg = deviceType.charAt(0).toUpperCase() + deviceType.slice(1) +
" " + deviceId + " " + val.information.replace("Alerts: ,", "") + " - " + timeSince(val.timeStamp);
switch (val.state) {
case "NORMAL":
return;
case "WARNING":
geoAlertsBar.addAlert('warn', msg, val);
break;
case "ALERTED":
geoAlertsBar.addAlert('danger', msg, val);
break;
case "OFFLINE":
geoAlertsBar.addAlert('info', msg, val);
break;
}
});
}, function (message) {
});
}
@ -587,14 +591,16 @@ function setProximityAlert() {
if (proximityDistance == null || proximityDistance === undefined || proximityDistance == "") {
var message = "Proximity distance cannot be empty.";
noty({text: message, type : 'error'});
noty({text: message, type: 'error'});
} else if (proximityTime == null || proximityTime === undefined || proximityTime == "") {
var message = "Proximity Time cannot be empty.";
noty({text: message, type : 'error'});
noty({text: message, type: 'error'});
} else {
var data = {
'parseData': JSON.stringify({'proximityTime': proximityTime, 'proximityDistance': proximityDistance}),
'parseData': JSON.stringify({
'proximityTime': proximityTime,
'proximityDistance': proximityDistance
}),
'proximityTime': proximityTime,
'proximityDistance': proximityDistance,
'executionPlan': 'Proximity',
@ -606,7 +612,7 @@ function setProximityAlert() {
var responseHandler = function (data, textStatus, xhr) {
closeAll();
if (xhr.status == 200) {
noty({text: 'Successfully added alert', type : 'success'});
noty({text: 'Successfully added alert', type: 'success'});
} else {
var ptrn = /(?:<am\:description>)(.*)(?:<\/am\:description>)/g;
var errorTxt;
@ -616,12 +622,12 @@ function setProximityAlert() {
} else {
errorTxt = data;
}
noty({text: textStatus + ' : ' + errorTxt, type : 'error'});
noty({text: textStatus + ' : ' + errorTxt, type: 'error'});
}
};
invokerUtil.put(serviceUrl,
data,
responseHandler, function (xhr) {
data,
responseHandler, function (xhr) {
responseHandler(xhr.responseText, xhr.statusText, xhr);
});
@ -633,7 +639,7 @@ function createExecutionPlanName(queryName, id, deviceId) {
if (id == "WithIn") {
return 'Geo-ExecutionPlan-Within' + (queryName ? '_' + queryName : '') + "---" + (deviceId ? '_' + deviceId : '') + '_alert'; // TODO: value of the `queryName` can't be empty, because it will cause name conflicts in CEP, have to do validation(check not empty String)
} else if(id == "Exit"){
} else if (id == "Exit") {
return 'Geo-ExecutionPlan-Exit' + (queryName ? '_' + queryName : '') + "---" + (deviceId ? '_' + deviceId : '') + '_alert'; // TODO: value of the `queryName` can't be empty, because it will cause name conflicts in CEP, have to do validation(check not empty String)
} else if (id == "Stationery") {
return 'Geo-ExecutionPlan-Stationery' + (queryName ? '_' + queryName : '') + "---" + (deviceId ? '_' + deviceId : '') + '_alert'; // TODO: value of the `queryName` can't be empty, because it will cause name conflicts in CEP, have to do validation(check not empty String)

@ -7472,7 +7472,6 @@ ul.sidebar-messages > li {
* ======================================================================== */
.body-wrapper {
padding: 40px;
margin-bottom:40px;
}
.body-wrapper a.btn:hover,.body-wrapper a:hover {

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

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

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

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

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

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

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

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

@ -62,6 +62,7 @@
<!--Simple -> Simple policy evaluation point-->
<!--Merged -> Merged policy evaluation point -->
<PolicyEvaluationPoint>Simple</PolicyEvaluationPoint>
<CacheEnable>true</CacheEnable>
</PolicyConfiguration>
<!-- Default Page size configuration for paginated DM APIs-->
<PaginationConfiguration>

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

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

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

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

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

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

@ -23,6 +23,8 @@ import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager;
import org.wso2.carbon.device.mgt.core.config.policy.PolicyConfiguration;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
import org.wso2.carbon.ntask.core.Task;
import org.wso2.carbon.policy.mgt.common.PolicyManagementException;
@ -39,6 +41,7 @@ import java.util.Map;
public class DelegationTask implements Task {
private static final Log log = LogFactory.getLog(DelegationTask.class);
private PolicyConfiguration policyConfiguration = DeviceConfigurationManager.getInstance().getDeviceManagementConfig().getPolicyConfiguration();
@Override
public void setProperties(Map<String, String> map) {
@ -57,9 +60,9 @@ public class DelegationTask implements Task {
PolicyManager policyManager = new PolicyManagerImpl();
UpdatedPolicyDeviceListBean updatedPolicyDeviceList = policyManager.applyChangesMadeToPolicies();
List<String> deviceTypes = updatedPolicyDeviceList.getChangedDeviceTypes();
PolicyCacheManagerImpl.getInstance().rePopulateCache();
if (policyConfiguration.getCacheEnable()) {
PolicyCacheManagerImpl.getInstance().rePopulateCache();
}
if (log.isDebugEnabled()) {
log.debug("Number of device types which policies are changed .......... : " + deviceTypes.size());
}

@ -24,6 +24,8 @@ import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.policy.mgt.Policy;
import org.wso2.carbon.device.mgt.common.policy.mgt.Profile;
import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager;
import org.wso2.carbon.device.mgt.core.config.policy.PolicyConfiguration;
import org.wso2.carbon.ntask.common.TaskException;
import org.wso2.carbon.ntask.core.TaskInfo;
import org.wso2.carbon.ntask.core.TaskManager;
@ -53,6 +55,7 @@ public class PolicyAdministratorPointImpl implements PolicyAdministratorPoint {
private ProfileManager profileManager;
private FeatureManager featureManager;
private PolicyCacheManager cacheManager;
private PolicyConfiguration policyConfiguration;
// private PolicyEnforcementDelegator delegator;
public PolicyAdministratorPointImpl() {
@ -60,6 +63,7 @@ public class PolicyAdministratorPointImpl implements PolicyAdministratorPoint {
this.profileManager = new ProfileManagerImpl();
this.featureManager = new FeatureManagerImpl();
this.cacheManager = PolicyCacheManagerImpl.getInstance();
this.policyConfiguration = DeviceConfigurationManager.getInstance().getDeviceManagementConfig().getPolicyConfiguration();
// this.delegator = new PolicyEnforcementDelegatorImpl();
}
@ -71,7 +75,9 @@ public class PolicyAdministratorPointImpl implements PolicyAdministratorPoint {
// } catch (PolicyDelegationException e) {
// throw new PolicyManagementException("Error occurred while delegating policy operation to the devices", e);
// }
PolicyCacheManagerImpl.getInstance().rePopulateCache();
if (policyConfiguration.getCacheEnable()) {
PolicyCacheManagerImpl.getInstance().rePopulateCache();
}
return resultantPolicy;
}
@ -83,42 +89,54 @@ public class PolicyAdministratorPointImpl implements PolicyAdministratorPoint {
// } catch (PolicyDelegationException e) {
// throw new PolicyManagementException("Error occurred while delegating policy operation to the devices", e);
// }
PolicyCacheManagerImpl.getInstance().rePopulateCache();
if (policyConfiguration.getCacheEnable()) {
PolicyCacheManagerImpl.getInstance().rePopulateCache();
}
return resultantPolicy;
}
@Override
public boolean updatePolicyPriorities(List<Policy> policies) throws PolicyManagementException {
boolean bool = policyManager.updatePolicyPriorities(policies);
PolicyCacheManagerImpl.getInstance().rePopulateCache();
if (policyConfiguration.getCacheEnable()) {
PolicyCacheManagerImpl.getInstance().rePopulateCache();
}
return bool;
}
@Override
public void activatePolicy(int policyId) throws PolicyManagementException {
policyManager.activatePolicy(policyId);
PolicyCacheManagerImpl.getInstance().rePopulateCache();
if (policyConfiguration.getCacheEnable()) {
PolicyCacheManagerImpl.getInstance().rePopulateCache();
}
}
@Override
public void inactivatePolicy(int policyId) throws PolicyManagementException {
policyManager.inactivatePolicy(policyId);
PolicyCacheManagerImpl.getInstance().rePopulateCache();
if (policyConfiguration.getCacheEnable()) {
PolicyCacheManagerImpl.getInstance().rePopulateCache();
}
}
@Override
public boolean deletePolicy(Policy policy) throws PolicyManagementException {
boolean bool = policyManager.deletePolicy(policy);
PolicyCacheManager policyCacheManager = PolicyCacheManagerImpl.getInstance();
policyCacheManager.rePopulateCache();
if (policyConfiguration.getCacheEnable()) {
PolicyCacheManager policyCacheManager = PolicyCacheManagerImpl.getInstance();
policyCacheManager.rePopulateCache();
}
return bool;
}
@Override
public boolean deletePolicy(int policyId) throws PolicyManagementException {
boolean bool = policyManager.deletePolicy(policyId);
PolicyCacheManager policyCacheManager = PolicyCacheManagerImpl.getInstance();
policyCacheManager.rePopulateCache();
if (policyConfiguration.getCacheEnable()) {
PolicyCacheManager policyCacheManager = PolicyCacheManagerImpl.getInstance();
policyCacheManager.rePopulateCache();
}
return bool;
}
@ -222,25 +240,37 @@ public class PolicyAdministratorPointImpl implements PolicyAdministratorPoint {
public Policy addPolicyToDevice(List<DeviceIdentifier> deviceIdentifierList, Policy policy) throws
PolicyManagementException {
policy = policyManager.addPolicyToDevice(deviceIdentifierList, policy);
PolicyCacheManagerImpl.getInstance().rePopulateCache();
if (policyConfiguration.getCacheEnable()) {
PolicyCacheManagerImpl.getInstance().rePopulateCache();
}
return policy;
}
@Override
public Policy addPolicyToRole(List<String> roleNames, Policy policy) throws PolicyManagementException {
policy = policyManager.addPolicyToRole(roleNames, policy);
PolicyCacheManagerImpl.getInstance().rePopulateCache();
if (policyConfiguration.getCacheEnable()) {
PolicyCacheManagerImpl.getInstance().rePopulateCache();
}
return policy;
}
@Override
public List<Policy> getPolicies() throws PolicyManagementException {
return PolicyCacheManagerImpl.getInstance().getAllPolicies();
if (policyConfiguration.getCacheEnable()) {
return PolicyCacheManagerImpl.getInstance().getAllPolicies();
} else {
return policyManager.getPolicies();
}
}
@Override
public Policy getPolicy(int policyId) throws PolicyManagementException {
return PolicyCacheManagerImpl.getInstance().getPolicy(policyId);
if (policyConfiguration.getCacheEnable()) {
return PolicyCacheManagerImpl.getInstance().getPolicy(policyId);
} else {
return policyManager.getPolicy(policyId);
}
}
@Override
@ -340,7 +370,11 @@ public class PolicyAdministratorPointImpl implements PolicyAdministratorPoint {
@Override
public int getPolicyCount() throws PolicyManagementException {
return PolicyCacheManagerImpl.getInstance().getAllPolicies().size();
if (policyConfiguration.getCacheEnable()) {
return PolicyCacheManagerImpl.getInstance().getAllPolicies().size();
} else {
return policyManager.getPolicyCount();
}
}
}

@ -33,6 +33,8 @@ import org.wso2.carbon.device.mgt.common.policy.mgt.Policy;
import org.wso2.carbon.device.mgt.common.policy.mgt.PolicyCriterion;
import org.wso2.carbon.device.mgt.common.policy.mgt.Profile;
import org.wso2.carbon.device.mgt.common.policy.mgt.ProfileFeature;
import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager;
import org.wso2.carbon.device.mgt.core.config.policy.PolicyConfiguration;
import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation;
import org.wso2.carbon.device.mgt.core.operation.mgt.OperationMgtConstants;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
@ -42,9 +44,6 @@ import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderServiceImp
import org.wso2.carbon.policy.mgt.common.*;
import org.wso2.carbon.policy.mgt.core.cache.impl.PolicyCacheManagerImpl;
import org.wso2.carbon.policy.mgt.core.dao.*;
import org.wso2.carbon.policy.mgt.core.enforcement.PolicyDelegationException;
import org.wso2.carbon.policy.mgt.core.enforcement.PolicyEnforcementDelegator;
import org.wso2.carbon.policy.mgt.core.enforcement.PolicyEnforcementDelegatorImpl;
import org.wso2.carbon.policy.mgt.core.internal.PolicyManagementDataHolder;
import org.wso2.carbon.policy.mgt.core.mgt.PolicyManager;
import org.wso2.carbon.policy.mgt.core.mgt.ProfileManager;
@ -61,12 +60,14 @@ public class PolicyManagerImpl implements PolicyManager {
private ProfileDAO profileDAO;
private FeatureDAO featureDAO;
private ProfileManager profileManager;
private PolicyConfiguration policyConfiguration;
private static Log log = LogFactory.getLog(PolicyManagerImpl.class);
public PolicyManagerImpl() {
this.policyDAO = PolicyManagementDAOFactory.getPolicyDAO();
this.profileDAO = PolicyManagementDAOFactory.getProfileDAO();
this.featureDAO = PolicyManagementDAOFactory.getFeatureDAO();
this.policyConfiguration = DeviceConfigurationManager.getInstance().getDeviceManagementConfig().getPolicyConfiguration();
this.profileManager = new ProfileManagerImpl();
}
@ -272,7 +273,12 @@ public class PolicyManagerImpl implements PolicyManager {
boolean bool;
try {
// List<Policy> existingPolicies = this.getPolicies();
List<Policy> existingPolicies = PolicyCacheManagerImpl.getInstance().getAllPolicies();
List<Policy> existingPolicies;
if (policyConfiguration.getCacheEnable()) {
existingPolicies = PolicyCacheManagerImpl.getInstance().getAllPolicies();
} else {
existingPolicies = this.getPolicies();
}
PolicyManagementDAOFactory.beginTransaction();
bool = policyDAO.updatePolicyPriorities(policies);
@ -683,7 +689,12 @@ public class PolicyManagerImpl implements PolicyManager {
}
// List<Policy> tempPolicyList = this.getPolicies();
List<Policy> tempPolicyList = PolicyCacheManagerImpl.getInstance().getAllPolicies();
List<Policy> tempPolicyList;
if (policyConfiguration.getCacheEnable()) {
tempPolicyList = PolicyCacheManagerImpl.getInstance().getAllPolicies();
} else {
tempPolicyList = this.getPolicies();
}
for (Policy policy : tempPolicyList) {
for (Integer i : policyIdList) {
@ -703,7 +714,12 @@ public class PolicyManagerImpl implements PolicyManager {
// try {
// List<Profile> profileList = profileManager.getProfilesOfDeviceType(deviceTypeName);
// List<Policy> allPolicies = this.getPolicies();
List<Policy> allPolicies = PolicyCacheManagerImpl.getInstance().getAllPolicies();
List<Policy> allPolicies;
if (policyConfiguration.getCacheEnable()) {
allPolicies = PolicyCacheManagerImpl.getInstance().getAllPolicies();
} else {
allPolicies = this.getPolicies();
}
for (Policy policy : allPolicies) {
if (policy.getProfile().getDeviceType().equalsIgnoreCase(deviceTypeName)) {
@ -745,7 +761,12 @@ public class PolicyManagerImpl implements PolicyManager {
}
// List<Policy> tempPolicyList = this.getPolicies();
List<Policy> tempPolicyList = PolicyCacheManagerImpl.getInstance().getAllPolicies();
List<Policy> tempPolicyList;
if (policyConfiguration.getCacheEnable()) {
tempPolicyList = PolicyCacheManagerImpl.getInstance().getAllPolicies();
} else {
tempPolicyList = this.getPolicies();
}
for (Policy policy : tempPolicyList) {
for (Integer i : policyIdList) {
@ -775,7 +796,12 @@ public class PolicyManagerImpl implements PolicyManager {
PolicyManagementDAOFactory.closeConnection();
}
// List<Policy> tempPolicyList = this.getPolicies();
List<Policy> tempPolicyList = PolicyCacheManagerImpl.getInstance().getAllPolicies();
List<Policy> tempPolicyList;
if (policyConfiguration.getCacheEnable()) {
tempPolicyList = PolicyCacheManagerImpl.getInstance().getAllPolicies();
} else {
tempPolicyList = this.getPolicies();
}
for (Policy policy : tempPolicyList) {
for (Integer i : policyIdList) {
@ -868,8 +894,12 @@ public class PolicyManagerImpl implements PolicyManager {
// List<Policy> inactivePolicies = new ArrayList<>();
// List<Policy> allPolicies = this.getPolicies();
List<Policy> allPolicies = PolicyCacheManagerImpl.getInstance().getAllPolicies();
List<Policy> allPolicies;
if (policyConfiguration.getCacheEnable()) {
allPolicies = PolicyCacheManagerImpl.getInstance().getAllPolicies();
} else {
allPolicies = this.getPolicies();
}
for (Policy policy : allPolicies) {
if (policy.isUpdated()) {
updatedPolicies.add(policy);

@ -45,6 +45,7 @@
<minRetriesToMarkInactive>20</minRetriesToMarkInactive>
<!--<PolicyEvaluationPoint>Simple</PolicyEvaluationPoint>-->
<PolicyEvaluationPoint>Simple</PolicyEvaluationPoint>
<CacheEnable>true</CacheEnable>
</PolicyConfiguration>
<!--This specifies whether to enable the DeviceStatus Task in this node.-->
<DeviceStatusTaskConfig>

@ -418,6 +418,9 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_APPLICATION_MAPPING (
ID INTEGER AUTO_INCREMENT NOT NULL,
DEVICE_ID INTEGER NOT NULL,
APPLICATION_ID INTEGER NOT NULL,
APP_PROPERTIES BLOB NULL,
MEMORY_USAGE INTEGER(10) NULL,
IS_ACTIVE BOOLEAN NOT NULL DEFAULT FALSE,
TENANT_ID INTEGER NOT NULL,
PRIMARY KEY (ID),
CONSTRAINT fk_dm_device FOREIGN KEY (DEVICE_ID) REFERENCES

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

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

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

@ -106,6 +106,14 @@ public class WebappAuthenticationValve extends CarbonTomcatValve {
}
private boolean isNonSecuredEndPoint(Request request) {
if (request.getCoyoteRequest() != null && request.getCoyoteRequest().getMimeHeaders() !=
null && request.getCoyoteRequest().getMimeHeaders().getValue(Constants
.HTTPHeaders.HEADER_HTTP_AUTHORIZATION) != null) {
//This is to handle the DEP behaviours of the same endpoint being non-secured in the
// first call and then being secured in the second call which comes with the basic
// auth header.
return false;
}
String uri = request.getRequestURI();
if (uri == null) {
uri = "";
@ -146,8 +154,9 @@ public class WebappAuthenticationValve extends CarbonTomcatValve {
String msg = "Failed to authorize incoming request";
if (authenticationInfo.getMessage() != null && !authenticationInfo.getMessage().isEmpty()) {
msg = authenticationInfo.getMessage();
response.setHeader("WWW-Authenticate", msg);
response.setHeader("WWW-Authenticate", "Basic");
}
if (log.isDebugEnabled()) {
log.debug(msg + " , API : " + Encode.forUriComponent(request.getRequestURI()));
}

@ -50,6 +50,14 @@ public class BasicAuthAuthenticator implements WebappAuthenticator {
@Override
public boolean canHandle(Request request) {
/*
This is done to avoid every endpoint being able to use basic auth. Add the following to
the required web.xml of the web app.
<context-param>
<param-name>basicAuth</param-name>
<param-value>true</param-value>
</context-param>
*/
if (!isAuthenticationSupported(request)) {
return false;
}
@ -84,6 +92,7 @@ public class BasicAuthAuthenticator implements WebappAuthenticator {
authenticationInfo.setTenantDomain(Utils.getTenantDomain(tenantId));
authenticationInfo.setTenantId(tenantId);
} else {
authenticationInfo.setMessage("Failed to authorize incoming request.");
authenticationInfo.setStatus(Status.FAILURE);
}
} catch (UserStoreException e) {

@ -57,6 +57,7 @@
<!--Simple -> Simple policy evaluation point-->
<!--Merged -> Merged policy evaluation point -->
<PolicyEvaluationPoint>Simple</PolicyEvaluationPoint>
<CacheEnable>true</CacheEnable>
</PolicyConfiguration>
<!-- Default Page size configuration for paginated DM APIs-->
<PaginationConfiguration>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -62,6 +62,7 @@
<!--Simple -> Simple policy evaluation point-->
<!--Merged -> Merged policy evaluation point -->
<PolicyEvaluationPoint>Simple</PolicyEvaluationPoint>
<CacheEnable>true</CacheEnable>
</PolicyConfiguration>
<!-- Default Page size configuration for paginated DM APIs-->
<PaginationConfiguration>

@ -301,7 +301,7 @@ CREATE TABLE IF NOT EXISTS DM_POLICY_CRITERIA_PROPERTIES (
POLICY_CRITERION_ID INT NOT NULL,
PROP_KEY VARCHAR(45) NULL,
PROP_VALUE VARCHAR(100) NULL,
CONTENT BLOB NULL COMMENT 'This is used to ',
CONTENT BLOB NULL,
PRIMARY KEY (ID),
CONSTRAINT FK_POLICY_CRITERIA_PROPERTIES
FOREIGN KEY (POLICY_CRITERION_ID)
@ -367,6 +367,9 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_APPLICATION_MAPPING (
ID INTEGER AUTO_INCREMENT NOT NULL,
DEVICE_ID INTEGER NOT NULL,
APPLICATION_ID INTEGER NOT NULL,
APP_PROPERTIES BLOB NULL,
MEMORY_USAGE INTEGER(10) NULL,
IS_ACTIVE BOOLEAN NOT NULL DEFAULT FALSE,
TENANT_ID INTEGER NOT NULL,
PRIMARY KEY (ID),
CONSTRAINT fk_dm_device FOREIGN KEY (DEVICE_ID) REFERENCES
@ -385,6 +388,7 @@ CREATE TABLE IF NOT EXISTS DM_NOTIFICATION (
TENANT_ID INTEGER NOT NULL,
STATUS VARCHAR(10) NULL,
DESCRIPTION VARCHAR(1000) NULL,
LAST_UPDATED_TIMESTAMP TIMESTAMP NOT NULL,
PRIMARY KEY (NOTIFICATION_ID),
CONSTRAINT fk_dm_device_notification FOREIGN KEY (DEVICE_ID) REFERENCES
DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,

@ -396,6 +396,9 @@ CREATE TABLE DM_DEVICE_APPLICATION_MAPPING (
ID INTEGER IDENTITY(1,1) NOT NULL,
DEVICE_ID INTEGER NOT NULL,
APPLICATION_ID INTEGER NOT NULL,
APP_PROPERTIES VARBINARY(MAX) NULL,
MEMORY_USAGE INTEGER NULL,
IS_ACTIVE BIT NOT NULL DEFAULT 0,
TENANT_ID INTEGER NOT NULL,
PRIMARY KEY (ID),
CONSTRAINT FK_DM_DEVICE FOREIGN KEY (DEVICE_ID) REFERENCES
@ -437,6 +440,7 @@ CREATE TABLE DM_NOTIFICATION (
TENANT_ID INTEGER NOT NULL,
STATUS VARCHAR(10) NULL,
DESCRIPTION VARCHAR(1000) NULL,
LAST_UPDATED_TIMESTAMP DATETIME2 NOT NULL,
PRIMARY KEY (NOTIFICATION_ID),
CONSTRAINT FL_DM_NOTIFICATION FOREIGN KEY (DEVICE_ID) REFERENCES
DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,

@ -452,6 +452,7 @@ CREATE TABLE IF NOT EXISTS DM_NOTIFICATION (
TENANT_ID INTEGER NOT NULL,
STATUS VARCHAR(10) NULL,
DESCRIPTION VARCHAR(1000) NULL,
LAST_UPDATED_TIMESTAMP TIMESTAMP NOT NULL,
PRIMARY KEY (NOTIFICATION_ID),
CONSTRAINT fk_dm_device_notification FOREIGN KEY (DEVICE_ID) REFERENCES
DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,

@ -715,6 +715,9 @@ CREATE TABLE DM_DEVICE_APPLICATION_MAPPING (
ID NUMBER(10) NOT NULL,
DEVICE_ID NUMBER(10) NOT NULL,
APPLICATION_ID NUMBER(10) NOT NULL,
APP_PROPERTIES BLOB NULL,
MEMORY_USAGE NUMBER(10) NULL,
IS_ACTIVE NUMBER(10) DEFAULT 0 NOT NULL,
TENANT_ID NUMBER(10) NOT NULL,
CONSTRAINT PK_DM_DEVICE_APP_MAPPING PRIMARY KEY (ID),
CONSTRAINT fk_dm_device FOREIGN KEY (DEVICE_ID) REFERENCES
@ -747,6 +750,7 @@ CREATE TABLE DM_NOTIFICATION (
TENANT_ID NUMBER(10) NOT NULL,
STATUS VARCHAR2(10) NULL,
DESCRIPTION VARCHAR2(1000) NULL,
LAST_UPDATED_TIMESTAMP TIMESTAMP(0) NOT NULL,
CONSTRAINT PK_DM_NOTIFICATION PRIMARY KEY (NOTIFICATION_ID),
CONSTRAINT FK_DM_DEVICE_NOTIFICATION FOREIGN KEY (DEVICE_ID) REFERENCES
DM_DEVICE (ID),

@ -357,6 +357,9 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_APPLICATION_MAPPING (
ID BIGSERIAL NOT NULL PRIMARY KEY,
DEVICE_ID INTEGER NOT NULL,
APPLICATION_ID INTEGER NOT NULL,
APP_PROPERTIES BYTEA NULL,
MEMORY_USAGE INTEGER NULL,
IS_ACTIVE BOOLEAN NOT NULL DEFAULT FALSE,
TENANT_ID INTEGER NOT NULL,
CONSTRAINT fk_dm_device FOREIGN KEY (DEVICE_ID) REFERENCES
DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,
@ -395,6 +398,7 @@ CREATE TABLE IF NOT EXISTS DM_NOTIFICATION (
TENANT_ID INTEGER NOT NULL,
STATUS VARCHAR(10) NULL,
DESCRIPTION VARCHAR(1000) NULL,
LAST_UPDATED_TIMESTAMP TIMESTAMP NOT NULL,
CONSTRAINT fk_dm_device_notification FOREIGN KEY (DEVICE_ID) REFERENCES
DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT fk_dm_operation_notification FOREIGN KEY (OPERATION_ID) REFERENCES

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

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

Loading…
Cancel
Save