adapterProperties) {
+ if (adapterProperties.isEmpty()) {
+ String errMsg = "Invalid payload: event property attributes invalid!!!";
+ ErrorResponse errorResponse = new ErrorResponse();
+ errorResponse.setMessage(errMsg);
+ log.error(errMsg);
+ throw new BadRequestException(errorResponse);
+ }
+ }
+ /**
+ * Validate adapter mapping attributes
+ *
+ * Conditions
+ * - if both inputMappingProperties and namespaceMappingProperties null check remaining property lists
+ * - if all correlationMappingProperties, payloadMappingProperties, metaMappingProperties null log error
+ * - if message format is null change the final result to TRUE
+ * - else continue
+ *
+ * @param adapterMappingConfiguration Adapter mapping attributes
+ */
+ private void validateAdapterMapping(AdapterMappingConfiguration adapterMappingConfiguration) {
+
+ if (adapterMappingConfiguration.getInputMappingString() == null &&
+ (adapterMappingConfiguration.getInputMappingProperties().isEmpty() &&
+ adapterMappingConfiguration.getNamespaceMappingProperties().isEmpty()) &&
+ (
+ adapterMappingConfiguration.getCorrelationMappingProperties().isEmpty() &&
+ adapterMappingConfiguration.getPayloadMappingProperties().isEmpty() &&
+ adapterMappingConfiguration.getMetaMappingProperties().isEmpty()
+ )
+ || adapterMappingConfiguration.getMessageFormat() == null) {
+ String errMsg = "Invalid payload: event mapping attributes invalid!!!";
+ ErrorResponse errorResponse = new ErrorResponse();
+ errorResponse.setMessage(errMsg);
+ log.error(errMsg);
+ throw new BadRequestException(errorResponse);
+ }
+ }
+
+ /**
+ * This will set payload of receiver attributes to the DTO
+ *
+ * @param adapterProperties List of receiver attributes
+ * @return DTO with all the receiver attributes
+ */
private BasicInputAdapterPropertyDto[] addReceiverConfigToDto(
List adapterProperties) {
BasicInputAdapterPropertyDto[] basicInputAdapterPropertyDtos
@@ -671,7 +621,14 @@ public class AnalyticsArtifactsManagementServiceImpl implements AnalyticsArtifac
return basicInputAdapterPropertyDtos;
}
- private EventMappingPropertyDto[] addReceiverMappingToDto(List mapProperties) {
+ /**
+ * This will set payload of receiver mapping attributes to the DTO
+ *
+ * @param mapProperties List of receiver mapping attributes
+ * @return DTO with all the receiver mapping attributes
+ */
+ private EventMappingPropertyDto[] addReceiverMappingToDto
+ (List mapProperties) {
EventMappingPropertyDto[] eventMappingPropertyDtos = new EventMappingPropertyDto[mapProperties.size()];
for (int i = 0; i < mapProperties.size(); i++) {
EventMappingPropertyDto eventMappingPropertyDto = new EventMappingPropertyDto();
@@ -683,6 +640,12 @@ public class AnalyticsArtifactsManagementServiceImpl implements AnalyticsArtifac
return eventMappingPropertyDtos;
}
+ /**
+ * This will set payload of publisher attributes to the DTO
+ *
+ * @param adapterProperties List of publisher attributes
+ * @return DTO with all the publisher attributes
+ */
private BasicOutputAdapterPropertyDto[] addPublisherConfigToDto(
List adapterProperties) {
BasicOutputAdapterPropertyDto[] basicOutputAdapterPropertyDtos =
@@ -697,8 +660,14 @@ public class AnalyticsArtifactsManagementServiceImpl implements AnalyticsArtifac
return basicOutputAdapterPropertyDtos;
}
+ /**
+ * This will set payload of publisher mapping attributes to the DTO
+ *
+ * @param mapProperties List of publisher mapping attributes
+ * @return DTO with all the publisher mapping attributes
+ */
private org.wso2.carbon.event.publisher.stub.types.EventMappingPropertyDto[] addPublisherMappingToDto
- (List mapProperties) {
+ (List mapProperties) {
org.wso2.carbon.event.publisher.stub.types.EventMappingPropertyDto[] eventMappingPropertyDtos
= new org.wso2.carbon.event.publisher.stub.types.EventMappingPropertyDto[mapProperties.size()];
for (int i = 0; i < mapProperties.size(); i++) {
@@ -712,6 +681,11 @@ public class AnalyticsArtifactsManagementServiceImpl implements AnalyticsArtifac
return eventMappingPropertyDtos;
}
+ /**
+ * Clean Service client in the stub
+ *
+ * @param stub Stud that needs to be cleaned
+ */
private void cleanup(Stub stub) {
if (stub != null) {
try {
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml
index c56de855be..5cd5126b47 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml
@@ -21,7 +21,7 @@
device-mgt
org.wso2.carbon.devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml
index 560b693618..f8a478cd61 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java
index 5471fa3a6f..0fe6a8215f 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java
@@ -1724,6 +1724,7 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
return deviceLocationHistories;
}
+ @Override
public void deleteDevices(List deviceIdentifiers, List deviceIds, List enrollmentIds)
throws DeviceManagementDAOException {
Connection conn;
@@ -1793,8 +1794,8 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
}
}
} catch (SQLException e) {
- String msg ="Error occurred while deleting the devices: " + deviceIdentifiers;
- log.error(msg,e);
+ String msg = "Error occurred while deleting the devices: " + deviceIdentifiers;
+ log.error(msg, e);
throw new DeviceManagementDAOException(msg, e);
}
}
@@ -1808,9 +1809,14 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
private void removeDeviceDetail(Connection conn, List deviceIds) throws DeviceManagementDAOException {
String sql = "DELETE FROM DM_DEVICE_DETAIL WHERE DEVICE_ID = ?";
try {
- executeBatchOperation(conn, sql, deviceIds);
+ if (!executeBatchOperation(conn, sql, deviceIds)) {
+ String msg = "Failed to remove device details of devices with deviceIds : " + deviceIds +
+ " while executing batch operation";
+ log.error(msg);
+ throw new DeviceManagementDAOException(msg);
+ }
} catch (SQLException e) {
- String msg = "Error occurred while removing device details.";
+ String msg = "SQL error occurred while removing device details of devices with deviceIds : " + deviceIds;
log.error(msg, e);
throw new DeviceManagementDAOException(msg, e);
}
@@ -1825,9 +1831,14 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
private void removeDeviceLocation(Connection conn, List deviceIds) throws DeviceManagementDAOException {
String sql = "DELETE FROM DM_DEVICE_LOCATION WHERE DEVICE_ID = ?";
try {
- executeBatchOperation(conn, sql, deviceIds);
+ if (!executeBatchOperation(conn, sql, deviceIds)) {
+ String msg = "Failed to remove locations of devices with deviceIds : " + deviceIds
+ + " while executing batch operation";
+ log.error(msg);
+ throw new DeviceManagementDAOException(msg);
+ }
} catch (SQLException e) {
- String msg = "Error occurred while obtaining locations of devices.";
+ String msg = "SQL error occurred while removing locations of devices with deviceIds : " + deviceIds;
log.error(msg, e);
throw new DeviceManagementDAOException(msg, e);
}
@@ -1842,9 +1853,14 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
private void removeDeviceInfo(Connection conn, List deviceIds) throws DeviceManagementDAOException {
String sql = "DELETE FROM DM_DEVICE_INFO WHERE DEVICE_ID = ?";
try {
- executeBatchOperation(conn, sql, deviceIds);
+ if (!executeBatchOperation(conn, sql, deviceIds)) {
+ String msg = "Failed to remove device info of devices with deviceIds : " + deviceIds
+ + " while executing batch operation";
+ log.error(msg);
+ throw new DeviceManagementDAOException(msg);
+ }
} catch (SQLException e) {
- String msg = "Error occurred while removing device info.";
+ String msg = "SQL error occurred while removing device info of devices with deviceIds : " + deviceIds;
log.error(msg, e);
throw new DeviceManagementDAOException(msg, e);
}
@@ -1859,9 +1875,14 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
private void removeDeviceNotification(Connection conn, List deviceIds) throws DeviceManagementDAOException {
String sql = "DELETE FROM DM_NOTIFICATION WHERE DEVICE_ID = ?";
try {
- executeBatchOperation(conn, sql, deviceIds);
+ if (!executeBatchOperation(conn, sql, deviceIds)) {
+ String msg = "Failed to remove device notifications of devices with deviceIds : " + deviceIds +
+ " while executing batch operation";
+ log.error(msg);
+ throw new DeviceManagementDAOException(msg);
+ }
} catch (SQLException e) {
- String msg = "Error occurred while removing device notifications.";
+ String msg = "SQL error occurred while removing device notifications of devices with deviceIds : " + deviceIds;
log.error(msg, e);
throw new DeviceManagementDAOException(msg, e);
}
@@ -1878,9 +1899,15 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
throws DeviceManagementDAOException {
String sql = "DELETE FROM DM_DEVICE_APPLICATION_MAPPING WHERE DEVICE_ID = ?";
try {
- executeBatchOperation(conn, sql, deviceIds);
+ if (!executeBatchOperation(conn, sql, deviceIds)) {
+ String msg = "Failed to remove device application mapping of of devices with deviceIds : " + deviceIds +
+ " while executing batch operation";
+ log.error(msg);
+ throw new DeviceManagementDAOException(msg);
+ }
} catch (SQLException e) {
- String msg = "Error occurred while removing device application mapping";
+ String msg = "SQL error occurred while removing device application mapping of devices with deviceIds : "
+ + deviceIds;
log.error(msg, e);
throw new DeviceManagementDAOException(msg, e);
}
@@ -1896,9 +1923,14 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
throws DeviceManagementDAOException {
String sql = "DELETE FROM DM_DEVICE_POLICY_APPLIED WHERE DEVICE_ID = ?";
try {
- executeBatchOperation(conn, sql, deviceIds);
+ if (!executeBatchOperation(conn, sql, deviceIds)) {
+ String msg = "Failed to remove policies applied on devices with deviceIds : " + deviceIds +
+ " while executing batch operation";
+ log.error(msg);
+ throw new DeviceManagementDAOException(msg);
+ }
} catch (SQLException e) {
- String msg = "Error occurred while removing policies applied on devices";
+ String msg = "SQL error occurred while removing policies applied on devices with deviceIds : " + deviceIds;
log.error(msg, e);
throw new DeviceManagementDAOException(msg, e);
}
@@ -1913,9 +1945,14 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
private void removeDevicePolicy(Connection conn, List deviceIds) throws DeviceManagementDAOException {
String sql = "DELETE FROM DM_DEVICE_POLICY WHERE DEVICE_ID = ?";
try {
- executeBatchOperation(conn, sql, deviceIds);
+ if (!executeBatchOperation(conn, sql, deviceIds)) {
+ String msg = "Failed to remove policies of devices with deviceIds : " + deviceIds +
+ " while executing batch operation";
+ log.error(msg);
+ throw new DeviceManagementDAOException(msg);
+ }
} catch (SQLException e) {
- String msg = "Error occurred while removing policies of devices";
+ String msg = "SQL error occurred while removing policies of devices with deviceIds : " + deviceIds;
log.error(msg, e);
throw new DeviceManagementDAOException(msg, e);
}
@@ -1931,9 +1968,15 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
throws DeviceManagementDAOException {
String sql = "DELETE FROM DM_DEVICE_DETAIL WHERE ENROLMENT_ID = ?";
try {
- executeBatchOperation(conn, sql, enrollmentIds);
+ if (!executeBatchOperation(conn, sql, enrollmentIds)) {
+ String msg = "Failed to remove enrollment details of devices with enrollmentIds : " + enrollmentIds
+ + " while executing batch operation";
+ log.error(msg);
+ throw new DeviceManagementDAOException(msg);
+ }
} catch (SQLException e) {
- String msg = "Error occurred while removing enrollment details of devices";
+ String msg = "SQL error occurred while removing enrollment details of devices with enrollmentIds : "
+ + enrollmentIds;
log.error(msg, e);
throw new DeviceManagementDAOException(msg, e);
}
@@ -1949,9 +1992,15 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
throws DeviceManagementDAOException {
String sql = "DELETE FROM DM_DEVICE_LOCATION WHERE ENROLMENT_ID = ?";
try {
- executeBatchOperation(conn, sql, enrollmentIds);
+ if (!executeBatchOperation(conn, sql, enrollmentIds)) {
+ String msg = "Failed to remove enrollment locations of devices with enrollmentIds : " + enrollmentIds
+ + " while executing batch operation";
+ log.error(msg);
+ throw new DeviceManagementDAOException(msg);
+ }
} catch (SQLException e) {
- String msg = "Error occurred while removing enrollment locations of devices";
+ String msg = "SQL error occurred while removing enrollment locations of devices with enrollmentIds : "
+ + enrollmentIds;
log.error(msg, e);
throw new DeviceManagementDAOException(msg, e);
}
@@ -1967,9 +2016,15 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
throws DeviceManagementDAOException {
String sql = "DELETE FROM DM_DEVICE_INFO WHERE ENROLMENT_ID = ?";
try {
- executeBatchOperation(conn, sql, enrollmentIds);
+ if (!executeBatchOperation(conn, sql, enrollmentIds)) {
+ String msg = "Failed to remove enrollment info of devices with enrollmentIds : " + enrollmentIds
+ + " while executing batch operation";
+ log.error(msg);
+ throw new DeviceManagementDAOException(msg);
+ }
} catch (SQLException e) {
- String msg = "Error occurred while removing enrollment info of devices";
+ String msg = "SQL error occurred while removing enrollment info of devices with enrollmentIds : "
+ + enrollmentIds;
log.error(msg, e);
throw new DeviceManagementDAOException(msg, e);
}
@@ -1985,9 +2040,15 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
throws DeviceManagementDAOException {
String sql = "DELETE FROM DM_DEVICE_APPLICATION_MAPPING WHERE ENROLMENT_ID = ?";
try {
- executeBatchOperation(conn, sql, enrollmentIds);
+ if (!executeBatchOperation(conn, sql, enrollmentIds)) {
+ String msg = "Failed to remove enrollment device application mapping of devices with enrollmentIds : "
+ + enrollmentIds + " while executing batch operation";
+ log.error(msg);
+ throw new DeviceManagementDAOException(msg);
+ }
} catch (SQLException e) {
- String msg = "Error occurred while removing enrollment device application mapping";
+ String msg = "SQL error occurred while removing enrollment device application mapping of devices with " +
+ "enrollmentIds : " + enrollmentIds;
log.error(msg, e);
throw new DeviceManagementDAOException(msg, e);
}
@@ -2003,9 +2064,15 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
throws DeviceManagementDAOException {
String sql = "DELETE FROM DM_DEVICE_OPERATION_RESPONSE WHERE ENROLMENT_ID = ?";
try {
- executeBatchOperation(conn, sql, enrollmentIds);
+ if (!executeBatchOperation(conn, sql, enrollmentIds)) {
+ String msg = "Failed to remove device operation response of devices with enrollmentIds : "
+ + enrollmentIds + " while executing batch operation";
+ log.error(msg);
+ throw new DeviceManagementDAOException(msg);
+ }
} catch (SQLException e) {
- String msg = "Error occurred while removing device operation response";
+ String msg = "SQL error occurred while removing device operation response of devices with enrollmentIds : "
+ + enrollmentIds;
log.error(msg, e);
throw new DeviceManagementDAOException(msg, e);
}
@@ -2021,9 +2088,15 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
throws DeviceManagementDAOException {
String sql = "DELETE FROM DM_ENROLMENT_OP_MAPPING WHERE ENROLMENT_ID = ?";
try {
- executeBatchOperation(conn, sql, enrollmentIds);
+ if (!executeBatchOperation(conn, sql, enrollmentIds)) {
+ String msg = "Failed to remove enrollment operation mapping of devices with enrollmentIds : "
+ + enrollmentIds + " while executing batch operation";
+ log.error(msg);
+ throw new DeviceManagementDAOException(msg);
+ }
} catch (SQLException e) {
- String msg = "Error occurred while removing enrollment operation mapping";
+ String msg = "SQL error occurred while removing enrollment operation mapping of devices with enrollmentIds :"
+ + enrollmentIds;
log.error(msg, e);
throw new DeviceManagementDAOException(msg, e);
}
@@ -2039,9 +2112,15 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
throws DeviceManagementDAOException {
String sql = "DELETE FROM DM_ENROLMENT WHERE DEVICE_ID = ?";
try {
- executeBatchOperation(conn, sql, enrollmentIds);
+ if (!executeBatchOperation(conn, sql, enrollmentIds)) {
+ String msg = "Failed to remove enrollments of devices with enrollmentIds : " + enrollmentIds
+ + " while executing batch operation";
+ log.error(msg);
+ throw new DeviceManagementDAOException(msg);
+ }
} catch (SQLException e) {
- String msg = "Error occurred while removing enrollments of devices";
+ String msg = "SQL error occurred while removing enrollments of devices with enrollmentIds : "
+ + enrollmentIds;
log.error(msg, e);
throw new DeviceManagementDAOException(msg, e);
}
@@ -2056,9 +2135,15 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
private void removeDeviceGroupMapping(Connection conn, List deviceIds) throws DeviceManagementDAOException {
String sql = "DELETE FROM DM_DEVICE_GROUP_MAP WHERE DEVICE_ID = ?";
try {
- executeBatchOperation(conn, sql, deviceIds);
+ if (!executeBatchOperation(conn, sql, deviceIds)) {
+ String msg = "Failed to remove device group mapping of devices with deviceIds : " + deviceIds
+ + " while executing batch operation";
+ log.error(msg);
+ throw new DeviceManagementDAOException(msg);
+ }
} catch (SQLException e) {
- String msg = "Error occurred while removing device group mapping";
+ String msg = "SQL error occurred while removing device group mapping of devices with deviceIds : "
+ + deviceIds;
log.error(msg, e);
throw new DeviceManagementDAOException(msg, e);
}
@@ -2073,9 +2158,13 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
private void removeDevice(Connection conn, List deviceIds) throws DeviceManagementDAOException {
String sql = "DELETE FROM DM_DEVICE WHERE ID = ?";
try {
- executeBatchOperation(conn, sql, deviceIds);
+ if (!executeBatchOperation(conn, sql, deviceIds)) {
+ String msg = "Failed to remove devices with deviceIds : " + deviceIds + " while executing batch operation";
+ log.error(msg);
+ throw new DeviceManagementDAOException(msg);
+ }
} catch (SQLException e) {
- String msg = "Error occurred while removing devices.";
+ String msg = "SQL error occurred while removing devices with deviceIds : " + deviceIds;
log.error(msg, e);
throw new DeviceManagementDAOException(msg, e);
}
@@ -2085,12 +2174,15 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
* This method executes batch operations for a given list of primary keys
* where the statement only has one param of type int, following the given pattern:
* DELETE FROM TABLE WHERE ID = ?
+ *
+ * This method does not check if the number of rows affected by the executeBatch() method is 0
+ * because there can be tables with no records to delete.
* @param sql SQL statement
* @param conn Connection object
* @param identifiers list of device ids (primary keys)
* @throws SQLException if deletion fails.
*/
- private void executeBatchOperation(Connection conn, String sql, List identifiers) throws SQLException {
+ private boolean executeBatchOperation(Connection conn, String sql, List identifiers) throws SQLException {
try (PreparedStatement ps = conn.prepareStatement(sql)) {
if (conn.getMetaData().supportsBatchUpdates()) {
for (int identifier : identifiers) {
@@ -2098,19 +2190,18 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
ps.addBatch();
}
for (int i : ps.executeBatch()) {
- if (i == 0 || i == Statement.SUCCESS_NO_INFO || i == Statement.EXECUTE_FAILED) {
- break;
+ if (i == Statement.SUCCESS_NO_INFO || i == Statement.EXECUTE_FAILED) {
+ return false;
}
}
} else {
- for (int enrollmentId : identifiers) {
- ps.setInt(1, enrollmentId);
- if (ps.executeUpdate() == 0) {
- break;
- }
+ for (int identifier : identifiers) {
+ ps.setInt(1, identifier);
+ ps.executeUpdate();
}
}
}
+ return true;
}
private int getDeviceId(Connection conn, DeviceIdentifier deviceIdentifier, int tenantId)
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java
index 3be6900f90..d4732d172d 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java
@@ -528,43 +528,39 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
}
@Override
- public boolean deleteDevices(List deviceIdentifiers) throws DeviceManagementException, InvalidDeviceException {
- List deviceIds = new ArrayList<>();
+ public boolean deleteDevices(List deviceIdentifiers) throws DeviceManagementException,
+ InvalidDeviceException {
+ if (deviceIdentifiers == null || deviceIdentifiers.isEmpty()) {
+ String msg = "Required values of device identifiers are not set to permanently delete device/s.";
+ log.error(msg);
+ throw new InvalidDeviceException(msg);
+ }
+ HashSet deviceIds = new HashSet<>();
List enrollmentIds = new ArrayList<>();
+ List validDeviceIdentifiers = new ArrayList<>();
Map> deviceIdentifierMap = new HashMap<>();
Map deviceManagerMap = new HashMap<>();
List deviceCacheKeyList = new ArrayList<>();
int tenantId = this.getTenantId();
- List existingDevices;
try {
DeviceManagementDAOFactory.beginTransaction();
- existingDevices = deviceDAO.getDevicesByIdentifiers(deviceIdentifiers, tenantId);
- if (existingDevices.size() != deviceIdentifiers.size()) {
- for (Device device : existingDevices) {
- deviceIdentifiers.remove(device.getDeviceIdentifier());
- }
- String msg =
- "Couldn't find device ids for all the requested device identifiers. " +
- "Therefore payload should contain device identifiers which are not in the system. " +
- "Invalid device identifiers are " + deviceIdentifiers.toString();
- log.error(msg);
- DeviceManagementDAOFactory.rollbackTransaction();
- throw new InvalidDeviceException(msg);
- }
+ List existingDevices = deviceDAO.getDevicesByIdentifiers(deviceIdentifiers, tenantId);
+ DeviceCacheKey deviceCacheKey;
for (Device device : existingDevices) {
- if (!device.getEnrolmentInfo().getStatus().equals(EnrolmentInfo.Status.REMOVED)) {
+ if (!EnrolmentInfo.Status.REMOVED.equals(device.getEnrolmentInfo().getStatus())) {
+ DeviceManagementDAOFactory.rollbackTransaction();
String msg = "Device " + device.getDeviceIdentifier() + " of type " + device.getType()
- + " is not dis-enrolled to permanently delete the device";
+ + " is not dis-enrolled to permanently delete the device";
log.error(msg);
- DeviceManagementDAOFactory.rollbackTransaction();
throw new InvalidDeviceException(msg);
}
- DeviceCacheKey deviceCacheKey = new DeviceCacheKey();
+ deviceCacheKey = new DeviceCacheKey();
deviceCacheKey.setDeviceId(device.getDeviceIdentifier());
deviceCacheKey.setDeviceType(device.getType());
deviceCacheKey.setTenantId(tenantId);
deviceCacheKeyList.add(deviceCacheKey);
deviceIds.add(device.getId());
+ validDeviceIdentifiers.add(device.getDeviceIdentifier());
enrollmentIds.add(device.getEnrolmentInfo().getId());
if (deviceIdentifierMap.containsKey(device.getType())) {
deviceIdentifierMap.get(device.getType()).add(device.getDeviceIdentifier());
@@ -573,17 +569,23 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
new ArrayList<>(Arrays.asList(device.getDeviceIdentifier())));
DeviceManager deviceManager = this.getDeviceManager(device.getType());
if (deviceManager == null) {
- if (log.isDebugEnabled()) {
- log.debug("Device Manager associated with the device type '"
- + device.getType() + "' is null. Therefore, not attempting method 'deleteDevice'");
- }
+ log.error("Device Manager associated with the device type '" +device.getType() +
+ "' is null. Therefore, not attempting method 'deleteDevice'");
return false;
}
deviceManagerMap.put(device.getType(), deviceManager);
}
}
+ if (deviceIds.isEmpty()) {
+ String msg = "No device IDs found for the device identifiers '" + deviceIdentifiers + "'";
+ log.error(msg);
+ throw new InvalidDeviceException(msg);
+ }
+ if (log.isDebugEnabled()) {
+ log.debug("Permanently deleting the details of devices : " + validDeviceIdentifiers);
+ }
//deleting device from the core
- deviceDAO.deleteDevices(deviceIdentifiers, deviceIds, enrollmentIds);
+ deviceDAO.deleteDevices(validDeviceIdentifiers, new ArrayList<>(deviceIds), enrollmentIds);
for (Map.Entry entry : deviceManagerMap.entrySet()) {
try {
// deleting device from the plugin level
@@ -600,6 +602,9 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
}
DeviceManagementDAOFactory.commitTransaction();
this.removeDevicesFromCache(deviceCacheKeyList);
+ if (log.isDebugEnabled()) {
+ log.debug("Successfully permanently deleted the details of devices : " + validDeviceIdentifiers);
+ }
return true;
} catch (TransactionManagementException e) {
String msg = "Error occurred while initiating transaction";
@@ -611,6 +616,8 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
"' devices";
log.error(msg, e);
throw new DeviceManagementException(msg, e);
+ } finally {
+ DeviceManagementDAOFactory.closeConnection();
}
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml
index 106a2942b5..dbbd88e2e9 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml
@@ -22,7 +22,7 @@
device-mgt
org.wso2.carbon.devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/dao/DeviceTypePluginDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/dao/DeviceTypePluginDAOImpl.java
index e1427897d2..c7378f1631 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/dao/DeviceTypePluginDAOImpl.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/dao/DeviceTypePluginDAOImpl.java
@@ -220,7 +220,6 @@ public class DeviceTypePluginDAOImpl implements PluginDAO {
public boolean deleteDevices(List deviceIdentifiers) throws DeviceTypeMgtPluginException {
try {
Connection conn = deviceTypeDAOHandler.getConnection();
- boolean status = true;
try (PreparedStatement ps = conn.prepareStatement(deleteDBQueryForDeleteDevice)) {
if (conn.getMetaData().supportsBatchUpdates()) {
for (String deviceId : deviceIdentifiers) {
@@ -228,22 +227,18 @@ public class DeviceTypePluginDAOImpl implements PluginDAO {
ps.addBatch();
}
for (int i : ps.executeBatch()) {
- if (i == 0 || i == Statement.SUCCESS_NO_INFO || i == Statement.EXECUTE_FAILED) {
- status = false;
- break;
+ if (i == Statement.SUCCESS_NO_INFO || i == Statement.EXECUTE_FAILED) {
+ return false;
}
}
} else {
for (String deviceId : deviceIdentifiers) {
ps.setString(1, deviceId);
- if (ps.executeUpdate() == 0) {
- status = false;
- break;
- }
+ ps.executeUpdate();
}
}
}
- return status;
+ return true;
} catch (SQLException e) {
String msg = "Error occurred while deleting the data in "
+ deviceDAODefinition.getDeviceTableName();
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/dao/PropertyBasedPluginDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/dao/PropertyBasedPluginDAOImpl.java
index 7cc32f6315..b60e70c4c2 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/dao/PropertyBasedPluginDAOImpl.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/dao/PropertyBasedPluginDAOImpl.java
@@ -222,7 +222,6 @@ public class PropertyBasedPluginDAOImpl implements PluginDAO {
public boolean deleteDevices(List deviceIdentifiers) throws DeviceTypeMgtPluginException {
try {
Connection conn = deviceTypeDAOHandler.getConnection();
- boolean status = true;
try (PreparedStatement ps = conn.prepareStatement("DELETE FROM DM_DEVICE_PROPERTIES WHERE DEVICE_IDENTIFICATION = ?")) {
if (conn.getMetaData().supportsBatchUpdates()) {
for (String deviceId : deviceIdentifiers) {
@@ -230,22 +229,18 @@ public class PropertyBasedPluginDAOImpl implements PluginDAO {
ps.addBatch();
}
for (int i : ps.executeBatch()) {
- if (i == 0 || i == Statement.SUCCESS_NO_INFO || i == Statement.EXECUTE_FAILED) {
- status = false;
- break;
+ if (i == Statement.SUCCESS_NO_INFO || i == Statement.EXECUTE_FAILED) {
+ return false;
}
}
} else {
for (String deviceId : deviceIdentifiers) {
ps.setString(1, deviceId);
- if (ps.executeUpdate() == 0) {
- status = false;
- break;
- }
+ ps.executeUpdate();
}
}
}
- return status;
+ return true;
} catch (SQLException e) {
String msg = "Error occurred while deleting the data of the devices: '" + deviceIdentifiers + "'of type: "
+ deviceType;
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml
index 607dc3b391..4c88fc1312 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml
@@ -22,7 +22,7 @@
device-mgt
org.wso2.carbon.devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json
index 60757b8461..55cc5f3dd8 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json
@@ -161,6 +161,7 @@
"perm:device:enroll",
"perm:geo-service:analytics-view",
"perm:geo-service:alerts-manage",
+ "perm:devices:permanent-delete",
"appm:read"
],
"isOAuthEnabled": true,
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js
index 25f92f9c7a..344206796c 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js
@@ -623,6 +623,9 @@ var userModule = function () {
if (publicMethods.isAuthorized("/permission/admin/device-mgt/admin/devices/update-enrollment")) {
permissions["UPDATE_ENROLLMENT"] = true;
}
+ if (publicMethods.isAuthorized("/permission/admin/device-mgt/admin/devices/permanent-delete")) {
+ permissions["PERMANENT_DELETE"] = true;
+ }
return permissions;
};
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/public/templates/device-listing.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/public/templates/device-listing.hbs
index c0fe171866..53cb478806 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/public/templates/device-listing.hbs
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/public/templates/device-listing.hbs
@@ -23,7 +23,7 @@
{{#equal enrolmentInfo.status "ACTIVE"}} Active{{/equal}}
{{#equal enrolmentInfo.status "INACTIVE"}} Inactive{{/equal}}
{{#equal enrolmentInfo.status "BLOCKED"}} Blocked{{/equal}}
- {{#equal enrolmentInfo.status "REMOVED"}} Removed{{/equal}}
+ {{#equal enrolmentInfo.status "REMOVED"}} Removed{{/equal}}
{{type}} |
{{enrolmentInfo.ownership}} |
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs
index cb067c464c..3a12ea975e 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs
@@ -218,15 +218,31 @@
data-toggle="modal" data-target="#modalDemo">
-
+
{{#if group}}
Remove from group
{{else}}
- Remove Device
+ Dis-enroll Device
{{/if}}
+
+ {{#if permissions.permanentDelete}}
+
+
+
+
+
+
+ Delete Device
+
+
+ {{/if}}
+
{{#if permissions.updateEnrollment}}
@@ -423,6 +439,58 @@
+
+
+
+
+
+
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.js
index 8976f9f185..6e504b0ea4 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.js
@@ -46,6 +46,9 @@ function onRequest(context) {
if (uiPermissions.UPDATE_ENROLLMENT) {
viewModel.permissions.updateEnrollment = true;
}
+ if (uiPermissions.PERMANENT_DELETE) {
+ viewModel.permissions.permanentDelete = true;
+ }
viewModel.currentUser = currentUser;
var deviceCount = 0;
if (groupId) {
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/public/js/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/public/js/listing.js
index 10c1542695..429682a209 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/public/js/listing.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/public/js/listing.js
@@ -70,7 +70,7 @@ function InitiateViewOption(url) {
var deviceCheckbox = "#ast-container .ctrl-wr-asset .itm-select input[type='checkbox']";
var assetContainer = "#ast-container";
-var deviceListing, currentUser, groupId;
+var deviceListing, currentUser, groupId, hasDeletePermission;
/*
* DOM ready functions.
@@ -87,8 +87,8 @@ $(document).ready(function () {
};
deviceListing = $("#device-listing");
+ hasDeletePermission = $("#permission").data("permission")['PERMANENT_DELETE'];
currentUser = deviceListing.data("current-user");
-
groupId = getParameterByName("groupId");
/* Adding selected class for selected devices */
@@ -320,7 +320,7 @@ function loadDevices(searchType, searchParam) {
html = '
Blocked';
break;
case 'REMOVED' :
- html = '
Removed';
+ html = '
Removed';
break;
case 'UNREACHABLE' :
html = '
Unreachable';
@@ -361,12 +361,12 @@ function loadDevices(searchType, searchParam) {
var portalUrl = $("#device-listing").data("portal-url");
var serverUrl = $("#device-listing").data("server-url");
var userDomain = $("#device-listing").data("userDomain");
+ var statusCode = row.status;
var statURL;
- if (status != 'REMOVED') {
+ if (statusCode != 'REMOVED') {
html = '';
if (analyticsEnabled(row.deviceType)) {
-
// redirecting to respective analytics view depending on device configs
switch (getAnalyticsView(deviceType)) {
case "DAS" : { statURL =portalUrl + "/portal/t/"+ userDomain+ "/dashboards/android-iot/battery?owner=" +currentUser+"&deviceId=";break;}
@@ -405,17 +405,115 @@ function loadDevices(searchType, searchParam) {
+ 'data-deviceid="' + deviceIdentifier + '" data-devicetype="' + deviceType
+ '" data-devicename="' + row.name + '" data-placement="top" data-toggle="tooltip" data-original-title="Remove from group">'
+ '
'
- + ''
+ + '
'
+ '
Remove from group';
} else {
html +=
'
'
+ + ''
+ + ''
+ + 'Dis-enroll';
+ }
+ } else if (statusCode == 'REMOVED' && hasDeletePermission) {
+ html = '';
+
+ if (analyticsEnabled(row.deviceType)) {
+ // redirecting to respective analytics view depending on device configs
+ switch (getAnalyticsView(deviceType)) {
+ case "DAS" : {
+ statURL = portalUrl + "/portal/t/" + userDomain + "/dashboards/android-iot/battery?owner=" + currentUser + "&deviceId=";
+ break;
+ }
+ default : {
+ statURL = context + "/device/" + row.deviceType + "/analytics?deviceId="
+ }
+ }
+
+ html += '' +
+ '' +
+ 'Analytics';
+ }
+
+ if (!groupId && groupingEnabled(row.deviceType)) {
+ html +=
+ '' +
+ '' +
+ 'Group';
+ }
+
+ html +=
+ '
'
+ + ''
+ + ''
+ + 'Edit';
+ var groupOwner = $('#group_owner').text();
+ if (groupId && groupOwner != "wso2.system.user") {
+ html +=
+ '
'
+ + ''
+ + ''
+ + 'Remove from group';
+ } else {
+ html +=
+ ''
+ ''
+ ''
+ 'Delete';
}
+ } else {
+ html = '';
+
+ if (analyticsEnabled(row.deviceType)) {
+ // redirecting to respective analytics view depending on device configs
+ switch (getAnalyticsView(deviceType)) {
+ case "DAS" : {
+ statURL = portalUrl + "/portal/t/" + userDomain + "/dashboards/android-iot/battery?owner=" + currentUser + "&deviceId=";
+ break;
+ }
+ default : {
+ statURL = context + "/device/" + row.deviceType + "/analytics?deviceId="
+ }
+ }
+
+ html += '' +
+ '' +
+ 'Analytics';
+ }
+
+ if (!groupId && groupingEnabled(row.deviceType)) {
+ html +=
+ '' +
+ '' +
+ 'Group';
+ }
+
+ html +=
+ '
'
+ + ''
+ + ''
+ + 'Edit';
}
return html;
}
@@ -423,6 +521,11 @@ function loadDevices(searchType, searchParam) {
];
var fnCreatedRow = function (row, data, dataIndex) {
+ if (data.status != "REMOVED") {
+ $(row).attr('data-type', 'selectable');
+ } else {
+ $(row).attr('data-type', 'non-selectable');
+ }
var model = htmlspecialchars(getPropertyValue(data.properties, 'DEVICE_MODEL'));
var vendor = htmlspecialchars(getPropertyValue(data.properties, 'VENDOR'));
var owner = htmlspecialchars(data.userPattern);
@@ -787,6 +890,60 @@ function attachDeviceEvents() {
});
});
+ /**
+ * Following click function would execute
+ * when a user clicks on "Delete" link
+ * on Device Management page in Entgra MDM Console.
+ */
+ $("a.delete-device-link").click(function () {
+ var deviceIdentifiers = [];
+ var deviceId = $(this).data("deviceid");
+ if (deviceId) {
+ deviceIdentifiers = [deviceId];
+ $(modalPopupContent).html($('#delete-device-modal-content').html());
+ showPopup();
+ } else {
+ var selectedDevices = getSelectedDevices();
+ if (selectedDevices.length == 0) {
+ $(modalPopupContent).html($('#no-device-selected').html());
+ $("a#no-device-selected-link").click(function () {
+ hidePopup();
+ });
+ showPopup();
+ return;
+ } else {
+ var hasEnrolledDevice;
+ for (var i = 0; i < selectedDevices.length; i++) {
+ if (selectedDevices[i].selectability == 'selectable') {
+ hasEnrolledDevice = true;
+ break;
+ } else {
+ deviceIdentifiers.push(selectedDevices[i].id);
+ }
+ }
+ if (hasEnrolledDevice) {
+ $(modalPopupContent).html($('#enrolled-device-delete-content').html());
+ $("a#enrolled-device-delete-link").click(function () {
+ hidePopup();
+ });
+ showPopup();
+ } else {
+ $(modalPopupContent).html($('#delete-device-modal-content').html());
+ showPopup();
+ }
+ }
+ }
+
+
+ $("a#delete-device-yes-link").click(function () {
+ deleteDevices(deviceIdentifiers);
+ });
+
+ $("a#delete-device-cancel-link").click(function () {
+ hidePopup();
+ });
+ });
+
/**
* Following click function would execute
* when a user clicks on "Edit" link
@@ -1100,6 +1257,19 @@ function removeDevices(deviceIdentifiers) {
});
}
+function deleteDevices(deviceIdentifiers) {
+ var serviceURL = "/api/device-mgt/v1.0/admin/devices/permanent-delete";
+ invokerUtil.put(serviceURL, deviceIdentifiers, function (message) {
+ $(modalPopupContent).html($('#delete-device-200-content').html());
+ setTimeout(function () {
+ hidePopup();
+ location.reload(false);
+ }, 2000);
+ }, function (jqXHR) {
+ displayDeviceErrors(jqXHR);
+ });
+}
+
function displayDeviceErrors(jqXHR) {
showPopup();
if (jqXHR.status == 400) {
@@ -1144,7 +1314,8 @@ function getSelectedDevices() {
deviceList.push(
{
"id": $(thisTable.api().row(this).node()).data('deviceid'),
- "type": $(thisTable.api().row(this).node()).data('devicetype')
+ "type": $(thisTable.api().row(this).node()).data('devicetype'),
+ "selectability": $(thisTable.api().row(this).node()).data('type')
}
);
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs
index f78b5f323e..e3f6cdfde9 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs
@@ -92,7 +92,7 @@
data-current="policy-naming" data-next="policy-criteria">Back
Publish
+ data-validate="true">Save and Publish
Save
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.edit/public/js/policy-edit.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.edit/public/js/policy-edit.js
index 4ac5cb8620..7eebf37a1b 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.edit/public/js/policy-edit.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.edit/public/js/policy-edit.js
@@ -148,6 +148,7 @@ $("#policy-name-input").focus(function () {
skipStep["policy-platform"] = function (policyPayloadObj) {
policy["name"] = policyPayloadObj["policyName"];
policy["platform"] = policyPayloadObj["profile"]["deviceType"];
+ policy["policyType"] = policyPayloadObj["policyType"];
var userRoleInput = $("#user-roles-input");
var ownershipInput = $("#ownership-input");
@@ -488,6 +489,7 @@ var updatePolicy = function (policy, state) {
var payload = {
"policyName": policy["policyName"],
"description": policy["description"],
+ "policyType": policy["policyType"],
"compliance": policy["selectedNonCompliantAction"],
"ownershipType": null,
"profile": {
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml
index 7396a3ee39..a20933001a 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml
@@ -23,7 +23,7 @@
device-mgt
org.wso2.carbon.devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt/pom.xml b/components/device-mgt/pom.xml
index 0417b15950..caa4369999 100644
--- a/components/device-mgt/pom.xml
+++ b/components/device-mgt/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../../pom.xml
diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml b/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml
index 42fe8d09b5..cc60c2d0a8 100644
--- a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml
+++ b/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
email-sender
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
diff --git a/components/email-sender/pom.xml b/components/email-sender/pom.xml
index 95978cf734..bac705cbf5 100644
--- a/components/email-sender/pom.xml
+++ b/components/email-sender/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../../pom.xml
diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml
index c8808b9c7c..3ae041230b 100644
--- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml
+++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml
@@ -22,13 +22,13 @@
org.wso2.carbon.devicemgt
identity-extensions
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.oauth.extensions
-
3.2.9-SNAPSHOT
+
4.0.0-SNAPSHOT
bundle
WSO2 Carbon - OAuth Extensions
http://wso2.org
diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml
index 1c69831ef2..fd1a310e2c 100644
--- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml
+++ b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml
@@ -21,7 +21,7 @@
identity-extensions
org.wso2.carbon.devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
4.0.0
diff --git a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml
index 27de3185ad..ea44aa035e 100644
--- a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml
+++ b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
identity-extensions
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
diff --git a/components/identity-extensions/pom.xml b/components/identity-extensions/pom.xml
index 95d30a9dc2..21a8ac5916 100644
--- a/components/identity-extensions/pom.xml
+++ b/components/identity-extensions/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../../pom.xml
diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml
index b4c219f93d..0453f09823 100644
--- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
policy-mgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.complex.policy.decision.point
-
3.2.9-SNAPSHOT
+
4.0.0-SNAPSHOT
bundle
WSO2 Carbon - Policy Decision Point
WSO2 Carbon - Policy Decision Point
diff --git a/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml
index af9f35ceff..58af3499b1 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml
@@ -3,14 +3,14 @@
org.wso2.carbon.devicemgt
policy-mgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.policy.decision.point
-
3.2.9-SNAPSHOT
+
4.0.0-SNAPSHOT
bundle
WSO2 Carbon - Policy Decision Point
WSO2 Carbon - Policy Decision Point
diff --git a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml
index 6a6bbfa399..e336b2606e 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml
@@ -3,7 +3,7 @@
org.wso2.carbon.devicemgt
policy-mgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
@@ -11,7 +11,7 @@
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.policy.information.point
-
3.2.9-SNAPSHOT
+
4.0.0-SNAPSHOT
bundle
WSO2 Carbon - Policy Information Point
WSO2 Carbon - Policy Information Point
diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml
index 0039457254..f0f9609795 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
policy-mgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.policy.mgt.common
-
3.2.9-SNAPSHOT
+
4.0.0-SNAPSHOT
bundle
WSO2 Carbon - Policy Management Common
WSO2 Carbon - Policy Management Common
diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml
index d38319a04c..f2ed81e249 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
policy-mgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.policy.mgt.core
-
3.2.9-SNAPSHOT
+
4.0.0-SNAPSHOT
bundle
WSO2 Carbon - Policy Management Core
WSO2 Carbon - Policy Management Core
diff --git a/components/policy-mgt/pom.xml b/components/policy-mgt/pom.xml
index 3fedb67474..87f692c345 100644
--- a/components/policy-mgt/pom.xml
+++ b/components/policy-mgt/pom.xml
@@ -23,13 +23,13 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../../pom.xml
4.0.0
policy-mgt
-
3.2.9-SNAPSHOT
+
4.0.0-SNAPSHOT
pom
WSO2 Carbon - Policy Management Component
http://wso2.org
diff --git a/components/test-coverage/pom.xml b/components/test-coverage/pom.xml
index d8fb4131cd..5cbf42391c 100644
--- a/components/test-coverage/pom.xml
+++ b/components/test-coverage/pom.xml
@@ -21,7 +21,7 @@
carbon-devicemgt
org.wso2.carbon.devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../../pom.xml
4.0.0
diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml
index e7ceee725a..f74a11703f 100644
--- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml
+++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml
@@ -21,14 +21,14 @@
org.wso2.carbon.devicemgt
webapp-authenticator-framework
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.webapp.authenticator.framework
-
3.2.9-SNAPSHOT
+
4.0.0-SNAPSHOT
bundle
WSO2 Carbon - Web Application Authenticator Framework Bundle
WSO2 Carbon - Web Application Authenticator Framework Bundle
diff --git a/components/webapp-authenticator-framework/pom.xml b/components/webapp-authenticator-framework/pom.xml
index 26612aff4e..bb64faf03f 100644
--- a/components/webapp-authenticator-framework/pom.xml
+++ b/components/webapp-authenticator-framework/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
webapp-authenticator-framework
-
3.2.9-SNAPSHOT
+
4.0.0-SNAPSHOT
pom
WSO2 Carbon - Webapp Authenticator Framework
http://wso2.org
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml
index aa6cde3703..a52a7acf80 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml
@@ -21,14 +21,14 @@
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.application.extension.feature
pom
-
3.2.9-SNAPSHOT
+
4.0.0-SNAPSHOT
WSO2 Carbon - API Management Application Extension Feature
http://wso2.org
This feature contains an implementation of a api application registration, which takes care of subscription
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml
index 2ded629b67..859c57cad9 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.handler.server.feature
pom
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
WSO2 Carbon - Device Management - APIM handler Server Feature
http://wso2.org
This feature contains the handler for the api authentications
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml
index cd91e0c492..0e3a1ebca4 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml
@@ -21,13 +21,13 @@
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.integration.client.feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
pom
WSO2 Carbon - APIM Integration Client Feature
http://wso2.org
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml
index 0f08049cf7..e3aa415528 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml
@@ -21,14 +21,14 @@
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.webapp.publisher.feature
pom
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
WSO2 Carbon - API Management Webapp Publisher Feature
http://wso2.org
This feature contains an implementation of a Tomcat lifecycle listener, which takes care of publishing
diff --git a/features/apimgt-extensions/pom.xml b/features/apimgt-extensions/pom.xml
index 3fd0601189..00db6893b1 100644
--- a/features/apimgt-extensions/pom.xml
+++ b/features/apimgt-extensions/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
pom
WSO2 Carbon - API Management Extensions Feature
http://wso2.org
diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.api.feature/pom.xml b/features/application-mgt/org.wso2.carbon.device.application.mgt.api.feature/pom.xml
index 36358434f4..20af44d5f5 100644
--- a/features/application-mgt/org.wso2.carbon.device.application.mgt.api.feature/pom.xml
+++ b/features/application-mgt/org.wso2.carbon.device.application.mgt.api.feature/pom.xml
@@ -22,16 +22,16 @@
org.wso2.carbon.devicemgt
application-mgt-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.application.mgt.api.feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
pom
WSO2 Carbon - Application Management API Feature
- http://wso2.org
+ https://entgra.io
This feature contains the APIs required for Application Management console UI
diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui.feature/pom.xml b/features/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui.feature/pom.xml
index f496ecb754..205d53788a 100644
--- a/features/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui.feature/pom.xml
+++ b/features/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui.feature/pom.xml
@@ -22,16 +22,16 @@
org.wso2.carbon.devicemgt
application-mgt-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.application.mgt.publisher.ui.feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
pom
WSO2 Carbon - Application Management Publisher UI Feature
- http://wso2.org
+ https://entgra.io
This feature contains Application Management publisher UI
diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/pom.xml b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/pom.xml
index 39dc1dd73f..0a912e203f 100644
--- a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/pom.xml
+++ b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/pom.xml
@@ -22,17 +22,17 @@
org.wso2.carbon.devicemgt
application-mgt-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.application.mgt.server.feature
pom
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
WSO2 Carbon - Application Management Server Feature
- http://wso2.org
+ https://entgra.io
This feature contains the core bundles required for Back-end Application Management functionality
diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.store.ui.feature/pom.xml b/features/application-mgt/org.wso2.carbon.device.application.mgt.store.ui.feature/pom.xml
index 4c3df765b7..f64e6d97b8 100644
--- a/features/application-mgt/org.wso2.carbon.device.application.mgt.store.ui.feature/pom.xml
+++ b/features/application-mgt/org.wso2.carbon.device.application.mgt.store.ui.feature/pom.xml
@@ -23,15 +23,16 @@
org.wso2.carbon.devicemgt
application-mgt-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
+ ../pom.xml
4.0.0
org.wso2.carbon.device.application.mgt.store.ui.feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
pom
WSO2 Carbon - Application Management Store UI Feature
- http://wso2.org
+ https://entgra.io
This feature contains Application Management Store UI
diff --git a/features/application-mgt/pom.xml b/features/application-mgt/pom.xml
index 0365214af1..8ba5775bc3 100644
--- a/features/application-mgt/pom.xml
+++ b/features/application-mgt/pom.xml
@@ -22,16 +22,16 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../../pom.xml
4.0.0
application-mgt-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
pom
WSO2 Carbon - Application Management Feature
- http://wso2.org
+ https://entgra.io
org.wso2.carbon.device.application.mgt.api.feature
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml
index 79a6ba8367..838a8fbfe5 100644
--- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
certificate-mgt-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml
index c8c41d7d26..2863debefb 100644
--- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
certificate-mgt-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml
index a84de6f13c..1d5765d7fb 100644
--- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
certificate-mgt-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.certificate.mgt.server.feature
pom
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
WSO2 Carbon - Certificate Management Server Feature
http://wso2.org
This feature contains the core bundles required for back-end Certificate Management functionality
diff --git a/features/certificate-mgt/pom.xml b/features/certificate-mgt/pom.xml
index c3c1d380a1..072d834cca 100644
--- a/features/certificate-mgt/pom.xml
+++ b/features/certificate-mgt/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
certificate-mgt-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
pom
WSO2 Carbon - Certificate Management Feature
http://wso2.org
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml
index edae990db0..bc49b3bf97 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-extensions-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature
pom
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
WSO2 Carbon - Device Type Deployer Feature
http://wso2.org
WSO2 Carbon - Device Type Deployer Feature
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml
index 1b3b9cc349..9956a10ca0 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-extensions-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature
pom
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
WSO2 Carbon - FCM Based Push Notification Provider Feature
http://wso2.org
WSO2 Carbon - MQTT Based Push Notification Provider Feature
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml
index fea8bc9b02..6b4349375e 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-extensions-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature
pom
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
WSO2 Carbon - MQTT Based Push Notification Provider Feature
http://wso2.org
WSO2 Carbon - MQTT Based Push Notification Provider Feature
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml
index 5473809d76..a7644614d6 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-extensions-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature
pom
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
WSO2 Carbon - MQTT Based Push Notification Provider Feature
http://wso2.org
WSO2 Carbon - MQTT Based Push Notification Provider Feature
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml
index b481e39a0f..9fb62edd53 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-extensions-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature
pom
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
WSO2 Carbon - XMPP Based Push Notification Provider Feature
http://wso2.org
WSO2 Carbon - XMPP Based Push Notification Provider Feature
diff --git a/features/device-mgt-extensions/pom.xml b/features/device-mgt-extensions/pom.xml
index 3ad40122f0..b68bba5f7e 100644
--- a/features/device-mgt-extensions/pom.xml
+++ b/features/device-mgt-extensions/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../../pom.xml
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/pom.xml
index ac77395ce0..fcf28de9bb 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.analytics.feature
pom
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
WSO2 Carbon - Device Management Server Feature
http://wso2.org
This feature contains bundles related to device analytics data publisher and ws proxy
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml
index 8473d376e2..982a6cf729 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml
index ce98c60a9f..9b1230d146 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml
index ae21be6228..59f4eb760d 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml
@@ -4,14 +4,14 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.feature
pom
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
WSO2 Carbon - Device Management Extensions Feature
http://wso2.org
This feature contains common extensions used by key device management functionalities
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml
index 844a6e9c8d..79e5ede3aa 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml
index 7a13b49b5f..9ad2c71ddd 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.server.feature
pom
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
WSO2 Carbon - Device Management Server Feature
http://wso2.org
This feature contains the core bundles required for Back-end Device Management functionality
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml
index d9a783e03b..34115124ab 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
diff --git a/features/device-mgt/pom.xml b/features/device-mgt/pom.xml
index 516c6bc3ca..9f99012d63 100644
--- a/features/device-mgt/pom.xml
+++ b/features/device-mgt/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../../pom.xml
diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml b/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml
index 253d580931..5f1e1bea3d 100644
--- a/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml
+++ b/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
email-sender-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.email.sender.feature
pom
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
WSO2 Carbon - Email Sender Feature
http://wso2.org
This feature contains the core bundles required for email sender related functionality
diff --git a/features/email-sender/pom.xml b/features/email-sender/pom.xml
index 26ab71092d..cdfbb0d458 100644
--- a/features/email-sender/pom.xml
+++ b/features/email-sender/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
email-sender-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
pom
WSO2 Carbon - Email Sender Feature
http://wso2.org
diff --git a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml
index fe79b982ea..a45fc0bdbc 100644
--- a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml
+++ b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml
@@ -23,14 +23,14 @@
org.wso2.carbon.devicemgt
jwt-client-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.identity.jwt.client.extension.feature
pom
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
WSO2 Carbon - JWT Client Feature
http://wso2.org
This feature contains jwt client implementation from which we can get a access token using the jwt
diff --git a/features/jwt-client/pom.xml b/features/jwt-client/pom.xml
index 55fe6cd557..a5912d521e 100644
--- a/features/jwt-client/pom.xml
+++ b/features/jwt-client/pom.xml
@@ -23,13 +23,13 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../../pom.xml
4.0.0
jwt-client-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
pom
WSO2 Carbon - JWT Client Extension Feature
http://wso2.org
diff --git a/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml b/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml
index b94f2303c7..124f360027 100644
--- a/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml
+++ b/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml
@@ -23,14 +23,14 @@
org.wso2.carbon.devicemgt
oauth-extensions-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.oauth.extensions.feature
pom
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
WSO2 Carbon - Device Mgt OAuth Extensions Feature
http://wso2.org
This feature contains devicemgt related OAuth extensions
diff --git a/features/oauth-extensions/pom.xml b/features/oauth-extensions/pom.xml
index f8e109a4cb..7f41d8b145 100644
--- a/features/oauth-extensions/pom.xml
+++ b/features/oauth-extensions/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
oauth-extensions-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
pom
WSO2 Carbon - Device Management OAuth Extensions Feature
http://wso2.org
diff --git a/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml b/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml
index a96cc6661f..8f7da690c1 100644
--- a/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml
+++ b/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml
@@ -23,14 +23,14 @@
org.wso2.carbon.devicemgt
policy-mgt-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.policy.mgt.server.feature
pom
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
WSO2 Carbon - Policy Management Server Feature
http://wso2.org
This feature contains the core bundles required for Back-end Device Management functionality
diff --git a/features/policy-mgt/pom.xml b/features/policy-mgt/pom.xml
index f74c452a67..651eeaca2b 100644
--- a/features/policy-mgt/pom.xml
+++ b/features/policy-mgt/pom.xml
@@ -23,14 +23,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
policy-mgt-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
pom
WSO2 Carbon - Policy Management Feature
http://wso2.org
diff --git a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml
index 03b5ec73fa..099f16dff9 100644
--- a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml
+++ b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
webapp-authenticator-framework-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.webapp.authenticator.framework.server.feature
pom
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
WSO2 Carbon - Webapp Authenticator Framework Server Feature
http://wso2.org
This feature contains the core bundles required for Back-end Device Management functionality
diff --git a/features/webapp-authenticator-framework/pom.xml b/features/webapp-authenticator-framework/pom.xml
index ccba152cfd..050f2e53a3 100644
--- a/features/webapp-authenticator-framework/pom.xml
+++ b/features/webapp-authenticator-framework/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
webapp-authenticator-framework-feature
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
pom
WSO2 Carbon - Webapp Authenticator Framework Feature
http://wso2.org
diff --git a/pom.xml b/pom.xml
index 1a6f503522..fcf9adb12f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
pom
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
WSO2 Carbon - Device Management - Parent
http://wso2.org
WSO2 Connected Device Manager Components
@@ -2093,7 +2093,7 @@
1.2.11.wso2v10
- 3.2.9-SNAPSHOT
+ 4.0.0-SNAPSHOT
4.6.21
@@ -2136,7 +2136,6 @@
2.26.1.wso2v3
-
3.0.0.wso2v1
1.3
2.3.1