diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml
index d5c2766a43..87138472f1 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml
@@ -22,13 +22,13 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.annotations
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
bundle
WSO2 Carbon - API Management Annotations
WSO2 Carbon - API Management Custom Annotation Module
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml
index 051ac32205..a5ea1473b4 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml
@@ -21,12 +21,12 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
org.wso2.carbon.apimgt.application.extension.api
war
WSO2 Carbon - API Application Management API
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml
index 5f3e19d568..de626a0ad4 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml
@@ -22,12 +22,12 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
org.wso2.carbon.apimgt.application.extension
bundle
WSO2 Carbon - API Application Management
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml
index e3e7eef722..aaaea2199c 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml
@@ -21,13 +21,13 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.handlers
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
bundle
WSO2 Carbon - API Security Handler Component
WSO2 Carbon - API Management Security Handler Module
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml
index 6749f7ff0e..b326d19092 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml
@@ -13,13 +13,13 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.integration.client
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
bundle
WSO2 Carbon - API Management Integration Client
WSO2 Carbon - API Management Integration Client
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml
index ef3584f53a..4f227c0aa7 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml
@@ -13,13 +13,13 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.integration.generated.client
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
bundle
WSO2 Carbon - API Management Integration Generated Client
WSO2 Carbon - API Management Integration Client
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml
index b21008f191..1a26aa9c22 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml
@@ -22,13 +22,13 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.webapp.publisher
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
bundle
WSO2 Carbon - API Management Webapp Publisher
WSO2 Carbon - API Management Webapp Publisher
diff --git a/components/apimgt-extensions/pom.xml b/components/apimgt-extensions/pom.xml
index 6d26a0450e..d70f2f12d9 100644
--- a/components/apimgt-extensions/pom.xml
+++ b/components/apimgt-extensions/pom.xml
@@ -22,13 +22,13 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../../pom.xml
4.0.0
apimgt-extensions
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
pom
WSO2 Carbon - API Management Extensions Component
http://wso2.org
diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml
index f25b0669d5..dc62d2a9a7 100644
--- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml
+++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml
@@ -22,7 +22,7 @@
certificate-mgt
org.wso2.carbon.devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml
index a4f4e15a56..9eac2b94e8 100644
--- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml
+++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml
@@ -22,7 +22,7 @@
certificate-mgt
org.wso2.carbon.devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml
index 33ef9a193b..e42e9148d2 100644
--- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml
+++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml
@@ -21,13 +21,13 @@
org.wso2.carbon.devicemgt
certificate-mgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.certificate.mgt.core
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
bundle
WSO2 Carbon - Certificate Management Core
WSO2 Carbon - Certificate Management Core
diff --git a/components/certificate-mgt/pom.xml b/components/certificate-mgt/pom.xml
index 28792d3b75..2ad66b3822 100644
--- a/components/certificate-mgt/pom.xml
+++ b/components/certificate-mgt/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
certificate-mgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
pom
WSO2 Carbon - Certificate Management Component
http://wso2.org
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml
index 68ceec0503..a22e293c67 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml
@@ -22,7 +22,7 @@
device-mgt-extensions
org.wso2.carbon.devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml
index 911ccdbb22..3c4ac1e3e3 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml
@@ -22,7 +22,7 @@
device-mgt-extensions
org.wso2.carbon.devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml
index 33bbb6e9d1..3518f35a7d 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml
@@ -22,7 +22,7 @@
device-mgt-extensions
org.wso2.carbon.devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml
index ae334ca5b2..e2cabe4447 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml
@@ -22,7 +22,7 @@
device-mgt-extensions
org.wso2.carbon.devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml
index c7aa8f7e20..aa66a3794a 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml
@@ -22,7 +22,7 @@
device-mgt-extensions
org.wso2.carbon.devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml
index 23d2d23bd8..646cbfd8d0 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml
@@ -22,7 +22,7 @@
device-mgt-extensions
org.wso2.carbon.devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt-extensions/pom.xml b/components/device-mgt-extensions/pom.xml
index 1c82894448..c67a45ca4c 100644
--- a/components/device-mgt-extensions/pom.xml
+++ b/components/device-mgt-extensions/pom.xml
@@ -22,7 +22,7 @@
carbon-devicemgt
org.wso2.carbon.devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../../pom.xml
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml
index 1ba5791914..5e6e781cb8 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml
@@ -3,7 +3,7 @@
org.wso2.carbon.devicemgt
device-mgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml
index a6cc75e8bd..78d90ea2d1 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml
index e1a252787f..5c11739867 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml
@@ -22,7 +22,7 @@
device-mgt
org.wso2.carbon.devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
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 44aea9f224..baad8f1b19 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java
index 8de9f3199e..9c79e58adf 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java
@@ -63,7 +63,8 @@ public interface OperationManager {
* @throws OperationManagementException If some unusual behaviour is observed while fetching the
* operation list.
*/
- PaginationResult getOperations(DeviceIdentifier deviceId, PaginationRequest request) throws OperationManagementException;
+ PaginationResult getOperations(DeviceIdentifier deviceId, PaginationRequest request)
+ throws OperationManagementException;
/**
* Method to retrieve the list of available operations to a device.
@@ -73,15 +74,12 @@ public interface OperationManager {
* @throws OperationManagementException If some unusual behaviour is observed while fetching the
* operation list.
*/
- List extends Operation> getPendingOperations(
- DeviceIdentifier deviceId) throws OperationManagementException;
+ List extends Operation> getPendingOperations(DeviceIdentifier deviceId) throws OperationManagementException;
Operation getNextPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException;
void updateOperation(DeviceIdentifier deviceId, Operation operation) throws OperationManagementException;
- void deleteOperation(int operationId) throws OperationManagementException;
-
Operation getOperationByDeviceAndOperationId(DeviceIdentifier deviceId, int operationId)
throws OperationManagementException;
@@ -93,9 +91,8 @@ public interface OperationManager {
Activity getOperationByActivityId(String activity) throws OperationManagementException;
- Activity getOperationByActivityIdAndDevice(String activity, DeviceIdentifier deviceId) throws OperationManagementException;
-
- List getOperationUpdatedAfter(long timestamp) throws OperationManagementException;
+ Activity getOperationByActivityIdAndDevice(String activity, DeviceIdentifier deviceId)
+ throws OperationManagementException;
List getActivitiesUpdatedAfter(long timestamp) throws OperationManagementException;
@@ -103,12 +100,6 @@ public interface OperationManager {
int getActivityCountUpdatedAfter(long timestamp) throws OperationManagementException;
- /**
- * Operation manger implementation can have a push notification stratergy
- * @param notificationStrategy eg: mqtt/xmpp
- */
- void setNotificationStrategy(NotificationStrategy notificationStrategy);
-
/**
* retrive the push notification strategy.
* @return NotificationStrategy
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 f5193fe978..fc1752ea00 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagementServiceProvider.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagementServiceProvider.java
deleted file mode 100644
index 844abe6801..0000000000
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagementServiceProvider.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- *
- * WSO2 Inc. licenses this file to you under the Apache License,
- * Version 2.0 (the "License"); you may not use this file except
- * in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.wso2.carbon.device.mgt.core.operation.mgt;
-
-public interface OperationManagementServiceProvider {
-}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java
index c22f3de950..8f6c3e29db 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java
@@ -105,10 +105,6 @@ public class OperationManagerImpl implements OperationManager {
return notificationStrategy;
}
- public void setNotificationStrategy(NotificationStrategy notificationStrategy) {
- this.notificationStrategy = notificationStrategy;
- }
-
public OperationManagerImpl(String deviceType, NotificationStrategy notificationStrategy) {
this(deviceType);
this.notificationStrategy = notificationStrategy;
@@ -122,7 +118,7 @@ public class OperationManagerImpl implements OperationManager {
log.debug("operation:[" + operation.toString() + "]");
for (DeviceIdentifier deviceIdentifier : deviceIds) {
log.debug("device identifier id:[" + deviceIdentifier.getId() + "] type:[" +
- deviceIdentifier.getType() + "]");
+ deviceIdentifier.getType() + "]");
}
}
try {
@@ -137,7 +133,7 @@ public class OperationManagerImpl implements OperationManager {
//Send the operation statuses only for admin triggered operations
String deviceType = validDeviceIds.get(0).getType();
activity.setActivityStatus(this.getActivityStatus(deviceValidationResult, deviceAuthorizationResult,
- deviceType));
+ deviceType));
return activity;
}
@@ -160,7 +156,7 @@ public class OperationManagerImpl implements OperationManager {
boolean hasExistingTaskOperation;
int enrolmentId;
if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Control.NO_REPEAT == operationDto.
- getControl()) {
+ getControl()) {
isNotRepeated = true;
}
@@ -177,10 +173,10 @@ public class OperationManagerImpl implements OperationManager {
}
} else if (isNotRepeated) {
operationDAO.updateEnrollmentOperationsStatus(enrolmentId, operationCode,
- org.wso2.carbon.device.mgt.core.dto.operation.mgt.
- Operation.Status.PENDING,
- org.wso2.carbon.device.mgt.core.dto.operation.mgt.
- Operation.Status.REPEATED);
+ org.wso2.carbon.device.mgt.core.dto.operation.mgt.
+ Operation.Status.PENDING,
+ org.wso2.carbon.device.mgt.core.dto.operation.mgt.
+ Operation.Status.REPEATED);
operationMappingDAO.addOperationMapping(operationId, enrolmentId, isScheduled);
} else {
operationMappingDAO.addOperationMapping(operationId, enrolmentId, isScheduled);
@@ -200,8 +196,8 @@ public class OperationManagerImpl implements OperationManager {
operationMappingDAO.updateOperationMapping(operationId, enrolmentId, org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.PushNotificationStatus.COMPLETED);
} catch (PushNotificationExecutionFailedException e) {
log.error("Error occurred while sending push notifications to " +
- deviceId.getType() + " device carrying id '" +
- deviceId + "'", e);
+ deviceId.getType() + " device carrying id '" +
+ deviceId + "'", e);
// Reschedule if push notification failed.
operationMappingDAO.updateOperationMapping(operationId, enrolmentId, org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.PushNotificationStatus.SCHEDULED);
}
@@ -219,7 +215,7 @@ public class OperationManagerImpl implements OperationManager {
//Get the device-type from 1st valid DeviceIdentifier. We know the 1st element is definitely there.
String deviceType = validDeviceIds.get(0).getType();
activity.setActivityStatus(this.getActivityStatus(deviceValidationResult, deviceAuthorizationResult,
- deviceType));
+ deviceType));
}
return activity;
} else {
@@ -242,7 +238,7 @@ public class OperationManagerImpl implements OperationManager {
//Add the invalid DeviceIds
for (String id : deviceIdValidationResult.getErrorDeviceIdList()) {
activityStatus = new ActivityStatus();
- activityStatus.setDeviceIdentifier(new DeviceIdentifier(id,deviceType));
+ activityStatus.setDeviceIdentifier(new DeviceIdentifier(id, deviceType));
activityStatus.setStatus(ActivityStatus.Status.INVALID);
activityStatuses.add(activityStatus);
}
@@ -288,7 +284,7 @@ public class OperationManagerImpl implements OperationManager {
}
} catch (DeviceAccessAuthorizationException e) {
throw new OperationManagementException("Error occurred while authorizing access to the devices for user :" +
- this.getUser(), e);
+ this.getUser(), e);
}
deviceIDHolder.setValidDeviceIDList(authorizedDeviceList);
deviceIDHolder.setErrorDeviceIdList(unAuthorizedDeviceList);
@@ -310,8 +306,8 @@ public class OperationManagerImpl implements OperationManager {
if (!isActionAuthorized(deviceId)) {
throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" +
- deviceId.getType() + "' device, which carries the identifier '" +
- deviceId.getId() + "'");
+ deviceId.getType() + "' device, which carries the identifier '" +
+ deviceId.getId() + "'");
}
EnrolmentInfo enrolmentInfo = this.getActiveEnrolmentInfo(deviceId);
@@ -331,8 +327,8 @@ public class OperationManagerImpl implements OperationManager {
}
} catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while retrieving the list of " +
- "operations assigned for '" + deviceId.getType() +
- "' device '" + deviceId.getId() + "'", e);
+ "operations assigned for '" + deviceId.getType() +
+ "' device '" + deviceId.getId() + "'", e);
} catch (SQLException e) {
throw new OperationManagementException(
"Error occurred while opening a connection to the data source", e);
@@ -350,15 +346,15 @@ public class OperationManagerImpl implements OperationManager {
String owner = request.getOwner();
if (!isActionAuthorized(deviceId)) {
throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" +
- deviceId.getType() + "' device, which carries the identifier '" +
- deviceId.getId() + "' of owner '" + owner + "'" );
+ deviceId.getType() + "' device, which carries the identifier '" +
+ deviceId.getId() + "' of owner '" + owner + "'");
}
EnrolmentInfo enrolmentInfo = this.getEnrolmentInfo(deviceId, owner);
if (enrolmentInfo == null) {
throw new OperationManagementException("Device not found for given device " +
- "Identifier:" + deviceId.getId() + " and given type" +
- deviceId.getType());
+ "Identifier:" + deviceId.getId() + " and given type" +
+ deviceId.getType());
}
int enrolmentId = enrolmentInfo.getId();
try {
@@ -376,8 +372,8 @@ public class OperationManagerImpl implements OperationManager {
paginationResult.setRecordsFiltered(count);
} catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while retrieving the list of " +
- "operations assigned for '" + deviceId.getType() +
- "' device '" + deviceId.getId() + "'", e);
+ "operations assigned for '" + deviceId.getType() +
+ "' device '" + deviceId.getId() + "'", e);
} catch (SQLException e) {
throw new OperationManagementException(
"Error occurred while opening a connection to the data source", e);
@@ -390,7 +386,7 @@ public class OperationManagerImpl implements OperationManager {
@Override
public List extends Operation> getPendingOperations(DeviceIdentifier deviceId) throws
- OperationManagementException {
+ OperationManagementException {
if (log.isDebugEnabled()) {
log.debug("Device identifier id:[" + deviceId.getId() + "] type:[" + deviceId.getType() + "]");
}
@@ -399,16 +395,16 @@ public class OperationManagerImpl implements OperationManager {
if (!isActionAuthorized(deviceId)) {
throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" +
- deviceId.getType() + "' device, which carries the identifier '" +
- deviceId.getId() + "'");
+ deviceId.getType() + "' device, which carries the identifier '" +
+ deviceId.getId() + "'");
}
//
EnrolmentInfo enrolmentInfo = this.getActiveEnrolmentInfo(deviceId);
if (enrolmentInfo == null) {
throw new OperationManagementException("Device not found for the given device Identifier:" +
- deviceId.getId() + " and given type:" +
- deviceId.getType());
+ deviceId.getId() + " and given type:" +
+ deviceId.getType());
}
int enrolmentId = enrolmentInfo.getId();
//Changing the enrollment status & attempt count if the device is marked as inactive or unreachable
@@ -437,8 +433,8 @@ public class OperationManagerImpl implements OperationManager {
Collections.sort(operations, new OperationCreateTimeComparator());
} catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while retrieving the list of " +
- "pending operations assigned for '" + deviceId.getType() +
- "' device '" + deviceId.getId() + "'", e);
+ "pending operations assigned for '" + deviceId.getType() +
+ "' device '" + deviceId.getId() + "'", e);
} catch (SQLException e) {
throw new OperationManagementException(
"Error occurred while opening a connection to the data source", e);
@@ -457,15 +453,15 @@ public class OperationManagerImpl implements OperationManager {
if (!isActionAuthorized(deviceId)) {
throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" +
- deviceId.getType() + "' device, which carries the identifier '" +
- deviceId.getId() + "'");
+ deviceId.getType() + "' device, which carries the identifier '" +
+ deviceId.getId() + "'");
}
EnrolmentInfo enrolmentInfo = this.getActiveEnrolmentInfo(deviceId);
if (enrolmentInfo == null) {
throw new OperationManagementException("Device not found for given device " +
- "Identifier:" + deviceId.getId() + " and given type" +
- deviceId.getType());
+ "Identifier:" + deviceId.getId() + " and given type" +
+ deviceId.getType());
}
int enrolmentId = enrolmentInfo.getId();
//Changing the enrollment status & attempt count if the device is marked as inactive or unreachable
@@ -479,23 +475,23 @@ public class OperationManagerImpl implements OperationManager {
try {
OperationManagementDAOFactory.openConnection();
org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation dtoOperation = operationDAO.getNextOperation(
- enrolmentInfo.getId());
+ enrolmentInfo.getId());
if (dtoOperation != null) {
if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.COMMAND.equals(dtoOperation.getType()
)) {
org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation commandOperation;
commandOperation =
(org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation) commandOperationDAO.
- getOperation(dtoOperation.getId());
+ getOperation(dtoOperation.getId());
dtoOperation.setEnabled(commandOperation.isEnabled());
} else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.CONFIG.equals(dtoOperation.
- getType())) {
+ getType())) {
dtoOperation = configOperationDAO.getOperation(dtoOperation.getId());
} else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.PROFILE.equals(dtoOperation.
- getType())) {
+ getType())) {
dtoOperation = profileOperationDAO.getOperation(dtoOperation.getId());
} else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.POLICY.equals(dtoOperation.
- getType())) {
+ getType())) {
dtoOperation = policyOperationDAO.getOperation(dtoOperation.getId());
}
operation = OperationDAOUtil.convertOperation(dtoOperation);
@@ -520,15 +516,15 @@ public class OperationManagerImpl implements OperationManager {
if (!isActionAuthorized(deviceId)) {
throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" +
- deviceId.getType() + "' device, which carries the identifier '" +
- deviceId.getId() + "'");
+ deviceId.getType() + "' device, which carries the identifier '" +
+ deviceId.getId() + "'");
}
EnrolmentInfo enrolmentInfo = this.getActiveEnrolmentInfo(deviceId);
if (enrolmentInfo == null) {
throw new OperationManagementException(
"Device not found for device id:" + deviceId.getId() + " " + "type:" +
- deviceId.getType());
+ deviceId.getType());
}
try {
@@ -537,9 +533,9 @@ public class OperationManagerImpl implements OperationManager {
boolean isUpdated = false;
if (operation.getStatus() != null) {
isUpdated = operationDAO.updateOperationStatus(enrolmentId, operationId,
- org.wso2.carbon.device.mgt.core.dto.operation.mgt.
- Operation.Status.valueOf(operation.getStatus().
- toString()));
+ org.wso2.carbon.device.mgt.core.dto.operation.mgt.
+ Operation.Status.valueOf(operation.getStatus().
+ toString()));
}
if (operation.getOperationResponse() != null) {
operationDAO.addOperationResponse(enrolmentId, operationId, operation.getOperationResponse());
@@ -549,28 +545,7 @@ public class OperationManagerImpl implements OperationManager {
OperationManagementDAOFactory.rollbackTransaction();
throw new OperationManagementException(
"Error occurred while updating the operation: " + operationId + " status:" +
- operation.getStatus(), e);
- } catch (TransactionManagementException e) {
- throw new OperationManagementException("Error occurred while initiating a transaction", e);
- } finally {
- OperationManagementDAOFactory.closeConnection();
- }
- }
-
- @Override
- public void deleteOperation(int operationId) throws OperationManagementException {
- try {
- OperationManagementDAOFactory.beginTransaction();
- org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation operation =
- operationDAO.getOperation(operationId);
- if (operation == null) {
- throw new OperationManagementException("Operation not found for operation id : " + operationId);
- }
- lookupOperationDAO(operation).deleteOperation(operationId);
- OperationManagementDAOFactory.commitTransaction();
- } catch (OperationManagementDAOException e) {
- OperationManagementDAOFactory.rollbackTransaction();
- throw new OperationManagementException("Error occurred while deleting the operation: " + operationId, e);
+ operation.getStatus(), e);
} catch (TransactionManagementException e) {
throw new OperationManagementException("Error occurred while initiating a transaction", e);
} finally {
@@ -584,56 +559,57 @@ public class OperationManagerImpl implements OperationManager {
Operation operation = null;
if (log.isDebugEnabled()) {
log.debug("Operation Id: " + operationId + " Device Type: " + deviceId.getType() + " Device Identifier: " +
- deviceId.getId());
+ deviceId.getId());
}
if (!isActionAuthorized(deviceId)) {
throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" +
- deviceId.getType() + "' device, which carries the identifier '" +
- deviceId.getId() + "'");
+ deviceId.getType() + "' device, which carries the identifier '" +
+ deviceId.getId() + "'");
}
EnrolmentInfo enrolmentInfo = this.getActiveEnrolmentInfo(deviceId);
if (enrolmentInfo == null) {
throw new OperationManagementException("Device not found for given device identifier: " +
- deviceId.getId() + " type: " + deviceId.getType());
+ deviceId.getId() + " type: " + deviceId.getType());
}
try {
OperationManagementDAOFactory.openConnection();
- org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation dtoOperation = operationDAO.
- getOperationByDeviceAndId(enrolmentInfo.getId(),
- operationId);
- if (dtoOperation.getType().
+ org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation deviceSpecificOperation = operationDAO.
+ getOperationByDeviceAndId(enrolmentInfo.getId(),
+ operationId);
+ org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation dtoOperation = deviceSpecificOperation;
+ if (deviceSpecificOperation.getType().
equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.COMMAND)) {
org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation commandOperation;
commandOperation =
(org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation) commandOperationDAO.
- getOperation(dtoOperation.getId());
+ getOperation(deviceSpecificOperation.getId());
dtoOperation.setEnabled(commandOperation.isEnabled());
- } else if (dtoOperation.getType().
+ } else if (deviceSpecificOperation.getType().
equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.CONFIG)) {
- dtoOperation = configOperationDAO.getOperation(dtoOperation.getId());
- } else if (dtoOperation.getType().equals(
+ dtoOperation = configOperationDAO.getOperation(deviceSpecificOperation.getId());
+ } else if (deviceSpecificOperation.getType().equals(
org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.PROFILE)) {
- dtoOperation = profileOperationDAO.getOperation(dtoOperation.getId());
- } else if (dtoOperation.getType().equals(
+ dtoOperation = profileOperationDAO.getOperation(deviceSpecificOperation.getId());
+ } else if (deviceSpecificOperation.getType().equals(
org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.POLICY)) {
- dtoOperation = policyOperationDAO.getOperation(dtoOperation.getId());
+ dtoOperation = policyOperationDAO.getOperation(deviceSpecificOperation.getId());
}
-
if (dtoOperation == null) {
throw new OperationManagementException("Operation not found for operation Id:" + operationId +
- " device id:" + deviceId.getId());
+ " device id:" + deviceId.getId());
}
- operation = OperationDAOUtil.convertOperation(dtoOperation);
+ dtoOperation.setStatus(deviceSpecificOperation.getStatus());
+ operation = OperationDAOUtil.convertOperation(deviceSpecificOperation);
} catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while retrieving the list of " +
- "operations assigned for '" + deviceId.getType() +
- "' device '" + deviceId.getId() + "'", e);
+ "operations assigned for '" + deviceId.getType() +
+ "' device '" + deviceId.getId() + "'", e);
} catch (SQLException e) {
throw new OperationManagementException("Error occurred while opening connection to the data source",
- e);
+ e);
} finally {
OperationManagementDAOFactory.closeConnection();
}
@@ -649,15 +625,15 @@ public class OperationManagerImpl implements OperationManager {
if (!isActionAuthorized(deviceId)) {
throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" +
- deviceId.getType() + "' device, which carries the identifier '" +
- deviceId.getId() + "'");
+ deviceId.getType() + "' device, which carries the identifier '" +
+ deviceId.getId() + "'");
}
EnrolmentInfo enrolmentInfo = this.getActiveEnrolmentInfo(deviceId);
if (enrolmentInfo == null) {
throw new OperationManagementException(
"Device not found for device id:" + deviceId.getId() + " " + "type:" +
- deviceId.getType());
+ deviceId.getType());
}
try {
@@ -667,14 +643,14 @@ public class OperationManagerImpl implements OperationManager {
org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Status.valueOf(status.toString());
dtoOperationList.addAll(commandOperationDAO.getOperationsByDeviceAndStatus(enrolmentId, dtoOpStatus));
dtoOperationList.addAll(configOperationDAO.getOperationsByDeviceAndStatus(enrolmentId,
- org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.
- Status.PENDING));
+ org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.
+ Status.PENDING));
dtoOperationList.addAll(profileOperationDAO.getOperationsByDeviceAndStatus(enrolmentId,
- org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.
- Status.PENDING));
+ org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.
+ Status.PENDING));
dtoOperationList.addAll(policyOperationDAO.getOperationsByDeviceAndStatus(enrolmentId,
- org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.
- Status.PENDING));
+ org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.
+ Status.PENDING));
Operation operation;
@@ -685,9 +661,9 @@ public class OperationManagerImpl implements OperationManager {
} catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while retrieving the list of " +
- "operations assigned for '" + deviceId.getType() +
- "' device '" +
- deviceId.getId() + "' and status:" + status.toString(), e);
+ "operations assigned for '" + deviceId.getType() +
+ "' device '" +
+ deviceId.getId() + "' and status:" + status.toString(), e);
} catch (SQLException e) {
throw new OperationManagementException(
"Error occurred while opening a connection to the data source", e);
@@ -703,32 +679,32 @@ public class OperationManagerImpl implements OperationManager {
try {
OperationManagementDAOFactory.openConnection();
org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation dtoOperation = operationDAO.getOperation(
- operationId);
+ operationId);
if (dtoOperation == null) {
throw new OperationManagementException("Operation not found for given Id:" + operationId);
}
if (dtoOperation.getType()
- .equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.COMMAND)) {
+ .equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.COMMAND)) {
org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation commandOperation;
commandOperation =
(org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation) commandOperationDAO.
- getOperation(dtoOperation.getId());
+ getOperation(dtoOperation.getId());
dtoOperation.setEnabled(commandOperation.isEnabled());
} else if (dtoOperation.getType().
equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.CONFIG)) {
dtoOperation = configOperationDAO.getOperation(dtoOperation.getId());
} else if (dtoOperation.getType().equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.
- PROFILE)) {
+ PROFILE)) {
dtoOperation = profileOperationDAO.getOperation(dtoOperation.getId());
} else if (dtoOperation.getType().equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.
- POLICY)) {
+ POLICY)) {
dtoOperation = policyOperationDAO.getOperation(dtoOperation.getId());
}
operation = OperationDAOUtil.convertOperation(dtoOperation);
} catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while retrieving the operation with operation Id '" +
- operationId, e);
+ operationId, e);
} catch (SQLException e) {
throw new OperationManagementException("Error occurred while opening a connection to the data source", e);
} finally {
@@ -737,62 +713,6 @@ public class OperationManagerImpl implements OperationManager {
return operation;
}
- // @Override
- // public Operation getOperationByActivityId(String activity) throws OperationManagementException {
- // // This parses the operation id from activity id (ex : ACTIVITY_23) and converts to the integer.
- // Operation operation;
- // int enrollmentOpMappingId = Integer.parseInt(
- // activity.replace(DeviceManagementConstants.OperationAttributes.ACTIVITY, ""));
- // if (enrollmentOpMappingId == 0) {
- // throw new IllegalArgumentException("Operation ID cannot be null or zero (0).");
- // }
- // try {
- // OperationManagementDAOFactory.openConnection();
- // org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation dtoOperation =
- // operationDAO.getOperationFromEnrollment(enrollmentOpMappingId);
- //
- // if (dtoOperation == null) {
- // throw new OperationManagementException("Operation not found for given activity Id:" + activity);
- // }
- // org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Status status = dtoOperation.getStatus();
- // if (dtoOperation.getType().equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.COMMAND)) {
- // org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation commandOperation;
- // commandOperation =
- // (org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation) commandOperationDAO.
- // getOperation(dtoOperation.getId());
- // dtoOperation.setEnabled(commandOperation.isEnabled());
- // } else if (dtoOperation.getType().
- // equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.CONFIG)) {
- // dtoOperation = configOperationDAO.getOperation(dtoOperation.getId());
- // } else if (dtoOperation.getType().equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.
- // PROFILE)) {
- // dtoOperation = profileOperationDAO.getOperation(dtoOperation.getId());
- // } else if (dtoOperation.getType().equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.
- // POLICY)) {
- // dtoOperation = policyOperationDAO.getOperation(dtoOperation.getId());
- // }
- // operation = OperationDAOUtil.convertOperation(dtoOperation);
- // int enrolmentId = operationDAO.getEnrolmentIdFromMappingId(enrollmentOpMappingId);
- // if (enrolmentId != 0) {
- // operation.setResponses(operationDAO.getOperationResponses(enrolmentId, operation.getId()));
- // }
- //
- // operation.setStatus(Operation.Status.valueOf(status.toString()));
- // operation.setActivityId(activity);
- //
- // } catch (SQLException e) {
- // throw new OperationManagementException("Error occurred while opening a connection to the data source", e);
- // } catch (OperationManagementDAOException e) {
- // throw new OperationManagementException("Error occurred while retrieving the operation with activity Id '" +
- // activity, e);
- // } finally {
- // OperationManagementDAOFactory.closeConnection();
- // }
- //
- // // return this.getOperation(operationId);
- // return operation;
- // }
-
@Override
public Activity getOperationByActivityId(String activity) throws OperationManagementException {
// This parses the operation id from activity id (ex : ACTIVITY_23) and converts to the integer.
@@ -808,7 +728,7 @@ public class OperationManagerImpl implements OperationManager {
throw new OperationManagementException("Error occurred while opening a connection to the data source.", e);
} catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while retrieving the operation with activity Id '" +
- activity, e);
+ activity, e);
} finally {
OperationManagementDAOFactory.closeConnection();
}
@@ -836,11 +756,6 @@ public class OperationManagerImpl implements OperationManager {
}
}
- @Override
- public List getOperationUpdatedAfter(long timestamp) throws OperationManagementException {
- return null;
- }
-
@Override
public List getActivitiesUpdatedAfter(long timestamp) throws OperationManagementException {
try {
@@ -850,7 +765,7 @@ public class OperationManagerImpl implements OperationManager {
throw new OperationManagementException("Error occurred while opening a connection to the data source.", e);
} catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while getting the activity list changed after a " +
- "given time.", e);
+ "given time.", e);
} finally {
OperationManagementDAOFactory.closeConnection();
}
@@ -866,7 +781,7 @@ public class OperationManagerImpl implements OperationManager {
throw new OperationManagementException("Error occurred while opening a connection to the data source.", e);
} catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while getting the activity list changed after a " +
- "given time.", e);
+ "given time.", e);
} finally {
OperationManagementDAOFactory.closeConnection();
}
@@ -881,7 +796,7 @@ public class OperationManagerImpl implements OperationManager {
throw new OperationManagementException("Error occurred while opening a connection to the data source.", e);
} catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while getting the activity count changed after a " +
- "given time.", e);
+ "given time.", e);
} finally {
OperationManagementDAOFactory.closeConnection();
}
@@ -904,12 +819,18 @@ public class OperationManagerImpl implements OperationManager {
private OperationDAO lookupOperationDAO(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation operation) {
- if (operation instanceof org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation) {
+ if (operation instanceof org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation ||
+ operation.getType().equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.COMMAND)) {
return commandOperationDAO;
- } else if (operation instanceof org.wso2.carbon.device.mgt.core.dto.operation.mgt.ProfileOperation) {
+ } else if (operation instanceof org.wso2.carbon.device.mgt.core.dto.operation.mgt.ProfileOperation ||
+ operation.getType().equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.PROFILE)) {
return profileOperationDAO;
- } else if (operation instanceof org.wso2.carbon.device.mgt.core.dto.operation.mgt.ConfigOperation) {
+ } else if (operation instanceof org.wso2.carbon.device.mgt.core.dto.operation.mgt.ConfigOperation ||
+ operation.getType().equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.CONFIG)) {
return configOperationDAO;
+ } else if (operation instanceof org.wso2.carbon.device.mgt.core.dto.operation.mgt.PolicyOperation ||
+ operation.getType().equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.POLICY)) {
+ return policyOperationDAO;
} else {
return operationDAO;
}
@@ -966,8 +887,8 @@ public class OperationManagerImpl implements OperationManager {
enrolmentId = deviceDAO.getEnrolmentByStatus(deviceId, status, tenantId);
} catch (DeviceManagementDAOException e) {
throw new OperationManagementException("Error occurred while retrieving metadata of '" +
- deviceId.getType() + "' device carrying the identifier '" +
- deviceId.getId() + "'", e);
+ deviceId.getType() + "' device carrying the identifier '" +
+ deviceId.getId() + "'", e);
} catch (SQLException e) {
throw new OperationManagementException(
"Error occurred while opening a connection to the data source", e);
@@ -995,15 +916,15 @@ public class OperationManagerImpl implements OperationManager {
}
} catch (DeviceManagementDAOException e) {
throw new OperationManagementException("Error occurred while retrieving enrollment data of '" +
- deviceId.getType() + "' device carrying the identifier '" +
- deviceId.getId() + "' of owner '" + owner + "'", e);
+ deviceId.getType() + "' device carrying the identifier '" +
+ deviceId.getId() + "' of owner '" + owner + "'", e);
} catch (SQLException e) {
throw new OperationManagementException(
"Error occurred while opening a connection to the data source", e);
} catch (DeviceAccessAuthorizationException e) {
throw new OperationManagementException("Error occurred while checking the device access permissions for '" +
- deviceId.getType() + "' device carrying the identifier '" +
- deviceId.getId() + "' of owner '" + owner + "'", e);
+ deviceId.getType() + "' device carrying the identifier '" +
+ deviceId.getId() + "' of owner '" + owner + "'", e);
} finally {
DeviceManagementDAOFactory.closeConnection();
}
@@ -1018,8 +939,8 @@ public class OperationManagerImpl implements OperationManager {
enrolmentInfo = deviceDAO.getActiveEnrolment(deviceId, tenantId);
} catch (DeviceManagementDAOException e) {
throw new OperationManagementException("Error occurred while retrieving enrollment data of '" +
- deviceId.getType() + "' device carrying the identifier '" +
- deviceId.getId() + "'", e);
+ deviceId.getType() + "' device carrying the identifier '" +
+ deviceId.getId() + "'", e);
} catch (SQLException e) {
throw new OperationManagementException(
"Error occurred while opening a connection to the data source", e);
@@ -1040,7 +961,7 @@ public class OperationManagerImpl implements OperationManager {
} catch (DeviceManagementDAOException e) {
DeviceManagementDAOFactory.rollbackTransaction();
throw new OperationManagementException("Error occurred while updating enrollment status of device of " +
- "enrolment-id '" + enrolmentId + "'", e);
+ "enrolment-id '" + enrolmentId + "'", e);
} catch (TransactionManagementException e) {
throw new OperationManagementException("Error occurred while initiating a transaction", e);
} finally {
@@ -1055,7 +976,7 @@ public class OperationManagerImpl implements OperationManager {
List monitoringOperations = deviceManagementProviderService.getMonitoringOperationList(deviceType);//Get task list from each device type
- for(MonitoringOperation op : monitoringOperations){
+ for (MonitoringOperation op : monitoringOperations) {
if (operation.getCode().equals(op.getTaskName())) {
return true;
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationMgtConstants.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationMgtConstants.java
index cd39b73060..b0bd195dee 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationMgtConstants.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationMgtConstants.java
@@ -26,8 +26,6 @@ public class OperationMgtConstants {
}
public static final String DEVICE_ID_NOT_FOUND = "Device not found for device id: %s";
- public static final String DEVICE_ID_SERVICE_NOT_FOUND =
- "Issue in retrieving device management service instance for device found at %s";
}
public final class OperationCodes {
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/OperationDAO.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/OperationDAO.java
index dc9b6dfb9a..58b0083b05 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/OperationDAO.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/OperationDAO.java
@@ -33,12 +33,8 @@ public interface OperationDAO {
void updateOperation(Operation operation) throws OperationManagementDAOException;
- void deleteOperation(int operationId) throws OperationManagementDAOException;
-
Operation getOperation(int operationId) throws OperationManagementDAOException;
- Operation getOperationFromEnrollment(int enrollmentOpMappingId) throws OperationManagementDAOException;
-
Operation getOperationByDeviceAndId(int enrolmentId, int operationId) throws OperationManagementDAOException;
List extends Operation> getOperationsByDeviceAndStatus(int enrolmentId, Operation.Status status)
@@ -66,24 +62,16 @@ public interface OperationDAO {
void addOperationResponse(int enrolmentId, int operationId, Object operationResponse)
throws OperationManagementDAOException;
- List getOperationResponses(int enrolmentId, int operationId) throws OperationManagementDAOException;
-
Activity getActivity(int operationId) throws OperationManagementDAOException;
Activity getActivityByDevice(int operationId, int deviceId) throws OperationManagementDAOException;
- int getEnrolmentIdFromMappingId(int enrollmentOpMappingId) throws OperationManagementDAOException;
-
- List getOperationsUpdatedAfter(long timestamp) throws OperationManagementDAOException;
-
List getActivitiesUpdatedAfter(long timestamp) throws OperationManagementDAOException;
List getActivitiesUpdatedAfter(long timestamp, int limit, int offset) throws OperationManagementDAOException;
int getActivityCountUpdatedAfter(long timestamp) throws OperationManagementDAOException;
- boolean resetAttemptCount(int enrolmentId) throws OperationManagementDAOException;
-
/**
* This method provides operation mappings for given status
* @param opStatus Operation status
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/OperationMappingDAO.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/OperationMappingDAO.java
index b28b773d7b..aa5d9b7bea 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/OperationMappingDAO.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/OperationMappingDAO.java
@@ -18,6 +18,7 @@
*/
package org.wso2.carbon.device.mgt.core.operation.mgt.dao;
+import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation;
import org.wso2.carbon.device.mgt.core.operation.mgt.OperationEnrolmentMapping;
import org.wso2.carbon.device.mgt.core.operation.mgt.OperationMapping;
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/CommandOperationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/CommandOperationDAOImpl.java
index fcf57ab022..ac64d6550c 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/CommandOperationDAOImpl.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/CommandOperationDAOImpl.java
@@ -70,22 +70,6 @@ public class CommandOperationDAOImpl extends GenericOperationDAOImpl {
}
}
- @Override
- public void deleteOperation(int id) throws OperationManagementDAOException {
- PreparedStatement stmt = null;
- try {
- super.deleteOperation(id);
- Connection connection = OperationManagementDAOFactory.getConnection();
- stmt = connection.prepareStatement("DELETE FROM DM_COMMAND_OPERATION WHERE OPERATION_ID = ?");
- stmt.setInt(1, id);
- stmt.executeUpdate();
- } catch (SQLException e) {
- throw new OperationManagementDAOException("Error occurred while deleting operation metadata", e);
- } finally {
- OperationManagementDAOUtil.cleanupResources(stmt);
- }
- }
-
public CommandOperation getOperation(int id) throws OperationManagementDAOException {
PreparedStatement stmt = null;
ResultSet rs = null;
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ConfigOperationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ConfigOperationDAOImpl.java
index 82beb1b5f0..052a9aeccb 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ConfigOperationDAOImpl.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ConfigOperationDAOImpl.java
@@ -58,22 +58,6 @@ public class ConfigOperationDAOImpl extends GenericOperationDAOImpl {
return operationId;
}
- @Override
- public void deleteOperation(int id) throws OperationManagementDAOException {
- PreparedStatement stmt = null;
- try {
- super.deleteOperation(id);
- Connection connection = OperationManagementDAOFactory.getConnection();
- stmt = connection.prepareStatement("DELETE FROM DM_CONFIG_OPERATION WHERE OPERATION_ID = ?") ;
- stmt.setInt(1, id);
- stmt.executeUpdate();
- } catch (SQLException e) {
- throw new OperationManagementDAOException("Error occurred while deleting operation metadata", e);
- } finally {
- OperationManagementDAOUtil.cleanupResources(stmt);
- }
- }
-
@Override
public void updateOperation(Operation operation) throws OperationManagementDAOException {
PreparedStatement stmt = null;
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java
index 7e174ec714..7ab5a4bd94 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java
@@ -249,68 +249,6 @@ public class GenericOperationDAOImpl implements OperationDAO {
}
}
- @Override
- public List getOperationResponses(int enrolmentId, int operationId) throws
- OperationManagementDAOException {
-
- PreparedStatement stmt = null;
- ResultSet rs = null;
- List responces = new ArrayList<>();
- try {
- Connection conn = OperationManagementDAOFactory.getConnection();
- String sql = "SELECT * FROM DM_DEVICE_OPERATION_RESPONSE WHERE ENROLMENT_ID = ? AND OPERATION_ID = ?";
- stmt = conn.prepareStatement(sql);
- stmt.setInt(1, enrolmentId);
- stmt.setInt(2, operationId);
- rs = stmt.executeQuery();
-
- while (rs.next()) {
- OperationResponse response = new OperationResponse();
- response.setReceivedTimeStamp(rs.getTimestamp("RECEIVED_TIMESTAMP").toString());
- ByteArrayInputStream bais = null;
- ObjectInputStream ois = null;
- byte[] contentBytes;
- try {
- contentBytes = (byte[]) rs.getBytes("OPERATION_RESPONSE");
- bais = new ByteArrayInputStream(contentBytes);
- ois = new ObjectInputStream(bais);
- response.setResponse(ois.readObject().toString());
-
- } finally {
- if (bais != null) {
- try {
- bais.close();
- } catch (IOException e) {
- log.warn("Error occurred while closing ByteArrayOutputStream", e);
- }
- }
- if (ois != null) {
- try {
- ois.close();
- } catch (IOException e) {
- log.warn("Error occurred while closing ObjectOutputStream", e);
- }
- }
- }
- responces.add(response);
- }
-
- } catch (SQLException e) {
- throw new OperationManagementDAOException("SQL Error occurred while retrieving the operation responses for " +
- "operation id " + operationId + " and enrolment id " + enrolmentId, e);
- } catch (ClassNotFoundException e) {
- throw new OperationManagementDAOException("Error occurred while converting the operation responses to string" +
- " for operation id " + operationId + " and enrolment id " + enrolmentId, e);
- } catch (IOException e) {
- throw new OperationManagementDAOException("Error occurred while converting the operation responses to string" +
- " for operation id " + operationId + " and enrolment id " + enrolmentId, e);
- } finally {
- OperationManagementDAOUtil.cleanupResources(stmt, rs);
- }
-
- return responces;
- }
-
@Override
public Activity getActivity(int operationId) throws OperationManagementDAOException {
@@ -674,80 +612,6 @@ public class GenericOperationDAOImpl implements OperationDAO {
return 0;
}
- @Override
- public int getEnrolmentIdFromMappingId(int enrollmentOpMappingId) throws OperationManagementDAOException {
- PreparedStatement stmt = null;
- ResultSet rs = null;
- try {
- Connection conn = OperationManagementDAOFactory.getConnection();
- String sql = "SELECT * FROM DM_ENROLMENT_OP_MAPPING WHERE ID = ?";
- stmt = conn.prepareStatement(sql);
- stmt.setInt(1, enrollmentOpMappingId);
- rs = stmt.executeQuery();
-
- if (rs.next()) {
- return rs.getInt("ENROLMENT_ID");
- }
-
- } catch (SQLException e) {
- throw new OperationManagementDAOException("SQL Error occurred while retrieving the enrolment id " +
- " for the mapping id '" + enrollmentOpMappingId, e);
- } finally {
- OperationManagementDAOUtil.cleanupResources(stmt, rs);
- }
- return -1;
- }
-
- @Override
- public List getOperationsUpdatedAfter(long timestamp) throws OperationManagementDAOException {
-
- PreparedStatement stmt = null;
- ResultSet rs = null;
- List operations = new ArrayList<>();
- try {
- Connection conn = OperationManagementDAOFactory.getConnection();
- String sql = "SELECT o.ID, o.TYPE, o.CREATED_TIMESTAMP, o.RECEIVED_TIMESTAMP, OPERATION_CODE " +
- "FROM DM_OPERATION AS o \n" +
- "INNER JOIN DM_ENROLMENT_OP_MAPPING AS eom ON eom.OPERATION_ID=o.ID WHERE eom.UPDATED_TIMESTAMP = ?";
- stmt = conn.prepareStatement(sql);
- stmt.setLong(1, timestamp);
- rs = stmt.executeQuery();
-
- if (rs.next()) {
- Operation operation = new Operation();
- operation.setId(rs.getInt("ID"));
- operation.setType(Operation.Type.valueOf(rs.getString("TYPE")));
- operation.setCreatedTimeStamp(rs.getTimestamp("CREATED_TIMESTAMP").toString());
- operation.setCode(rs.getString("OPERATION_CODE"));
-
- operations.add(operation);
- }
-
- } catch (SQLException e) {
- throw new OperationManagementDAOException("Error occurred while retrieving the operations updated " +
- "after a given time", e);
- } finally {
- OperationManagementDAOUtil.cleanupResources(stmt, rs);
- }
- return operations;
- }
-
-
- @Override
- public void deleteOperation(int id) throws OperationManagementDAOException {
- PreparedStatement stmt = null;
- try {
- Connection connection = OperationManagementDAOFactory.getConnection();
- stmt = connection.prepareStatement("DELETE FROM DM_OPERATION WHERE ID = ?");
- stmt.setInt(1, id);
- stmt.executeUpdate();
- } catch (SQLException e) {
- throw new OperationManagementDAOException("Error occurred while deleting operation metadata", e);
- } finally {
- OperationManagementDAOUtil.cleanupResources(stmt);
- }
- }
-
@Override
public Operation getOperation(int id) throws OperationManagementDAOException {
PreparedStatement stmt = null;
@@ -783,49 +647,6 @@ public class GenericOperationDAOImpl implements OperationDAO {
return operation;
}
- @Override
- public Operation getOperationFromEnrollment(int enrollmentOpMappingId) throws OperationManagementDAOException {
- PreparedStatement stmt = null;
- ResultSet rs = null;
- Operation operation = null;
- try {
- Connection conn = OperationManagementDAOFactory.getConnection();
- String sql = "SELECT o.ID, TYPE, o.CREATED_TIMESTAMP, o.RECEIVED_TIMESTAMP, OPERATION_CODE, \n" +
- " om.STATUS, om.UPDATED_TIMESTAMP FROM DM_OPERATION o \n" +
- "INNER JOIN (SELECT * FROM DM_ENROLMENT_OP_MAPPING dm WHERE dm.ID = ? ) om \n" +
- "ON o.ID = om.OPERATION_ID ORDER BY o.CREATED_TIMESTAMP DESC ";
- stmt = conn.prepareStatement(sql);
- stmt.setInt(1, enrollmentOpMappingId);
- rs = stmt.executeQuery();
-
- if (rs.next()) {
- operation = new Operation();
- operation.setId(rs.getInt("ID"));
- operation.setType(Operation.Type.valueOf(rs.getString("TYPE")));
- operation.setCreatedTimeStamp(rs.getTimestamp("CREATED_TIMESTAMP").toString());
-// if (rs.getTimestamp("RECEIVED_TIMESTAMP") == null) {
-// operation.setReceivedTimeStamp("");
-// } else {
-// operation.setReceivedTimeStamp(rs.getTimestamp("RECEIVED_TIMESTAMP").toString());
-// }
- if (rs.getLong("UPDATED_TIMESTAMP") == 0) {
- operation.setReceivedTimeStamp("");
- } else {
- operation.setReceivedTimeStamp(
- new java.sql.Timestamp((rs.getLong("UPDATED_TIMESTAMP") * 1000)).toString());
- }
- operation.setCode(rs.getString("OPERATION_CODE"));
- operation.setStatus(Operation.Status.valueOf(rs.getString("STATUS")));
- OperationDAOUtil.setActivityId(operation, rs.getInt("ID"));
- }
- } catch (SQLException e) {
- throw new OperationManagementDAOException("SQL error occurred while retrieving the operation .", e);
- } finally {
- OperationManagementDAOUtil.cleanupResources(stmt, rs);
- }
- return operation;
- }
-
@Override
public Operation getOperationByDeviceAndId(int enrolmentId, int operationId) throws OperationManagementDAOException {
PreparedStatement stmt = null;
@@ -833,9 +654,9 @@ public class GenericOperationDAOImpl implements OperationDAO {
Operation operation = null;
try {
Connection conn = OperationManagementDAOFactory.getConnection();
- String sql = "SELECT o.ID, o.TYPE, o.CREATED_TIMESTAMP, o.RECEIVED_TIMESTAMP, o.STATUS, o.OPERATION_CODE, " +
+ String sql = "SELECT o.ID, o.TYPE, o.CREATED_TIMESTAMP, o.RECEIVED_TIMESTAMP, om.STATUS, o.OPERATION_CODE, " +
"om.ID AS OM_MAPPING_ID, " +
- "om.UPDATED_TIMESTAMP FROM (SELECT ID, TYPE, CREATED_TIMESTAMP, RECEIVED_TIMESTAMP, STATUS," +
+ "om.UPDATED_TIMESTAMP FROM (SELECT ID, TYPE, CREATED_TIMESTAMP, RECEIVED_TIMESTAMP," +
"OPERATION_CODE FROM DM_OPERATION WHERE id = ?) o INNER JOIN (SELECT * FROM " +
"DM_ENROLMENT_OP_MAPPING dm where dm.OPERATION_ID = ? AND dm.ENROLMENT_ID = ?) om " +
"ON o.ID = om.OPERATION_ID ";
@@ -850,6 +671,7 @@ public class GenericOperationDAOImpl implements OperationDAO {
operation.setId(rs.getInt("ID"));
operation.setType(Operation.Type.valueOf(rs.getString("TYPE")));
operation.setCreatedTimeStamp(rs.getTimestamp("CREATED_TIMESTAMP").toString());
+ operation.setStatus(Operation.Status.valueOf(rs.getString("STATUS")));
// if (rs.getTimestamp("RECEIVED_TIMESTAMP") == null) {
// operation.setReceivedTimeStamp("");
// } else {
@@ -1176,31 +998,6 @@ public class GenericOperationDAOImpl implements OperationDAO {
return operations;
}
- @Override
- public boolean resetAttemptCount(int enrolmentId) throws OperationManagementDAOException {
- boolean status = false;
- Connection conn;
- PreparedStatement stmt = null;
- Timestamp currentTimestamp = new Timestamp(Calendar.getInstance().getTime().getTime());
- int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();
- try {
- conn = OperationManagementDAOFactory.getConnection();
- String query = "UPDATE DM_POLICY_COMPLIANCE_STATUS SET ATTEMPTS = 0, LAST_REQUESTED_TIME = ? " +
- "WHERE ENROLMENT_ID = ? AND TENANT_ID = ?";
- stmt = conn.prepareStatement(query);
- stmt.setTimestamp(1, currentTimestamp);
- stmt.setInt(2, enrolmentId);
- stmt.setInt(3, tenantId);
- stmt.executeUpdate();
- status = true;
- } catch (SQLException e) {
- throw new OperationManagementDAOException("Unable to reset the attempt count in database.", e);
- } finally {
- OperationManagementDAOUtil.cleanupResources(stmt, null);
- }
- return status;
- }
-
@Override
public Map> getOperationMappingsByStatus(Operation.Status opStatus, Operation.PushNotificationStatus pushNotificationStatus,
int limit) throws OperationManagementDAOException {
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/PolicyOperationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/PolicyOperationDAOImpl.java
index 4c0243ac80..f24cfb3ae3 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/PolicyOperationDAOImpl.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/PolicyOperationDAOImpl.java
@@ -122,22 +122,6 @@ public class PolicyOperationDAOImpl extends GenericOperationDAOImpl {
}
}
- @Override
- public void deleteOperation(int operationId) throws OperationManagementDAOException {
- PreparedStatement stmt = null;
- try {
- super.deleteOperation(operationId);
- Connection connection = OperationManagementDAOFactory.getConnection();
- stmt = connection.prepareStatement("DELETE FROM DM_POLICY_OPERATION WHERE OPERATION_ID=?");
- stmt.setInt(1, operationId);
- stmt.executeUpdate();
- } catch (SQLException e) {
- throw new OperationManagementDAOException("Error occurred while deleting operation metadata", e);
- } finally {
- OperationManagementDAOUtil.cleanupResources(stmt);
- }
- }
-
@Override
public Operation getOperation(int operationId) throws OperationManagementDAOException {
PreparedStatement stmt = null;
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ProfileOperationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ProfileOperationDAOImpl.java
index 931cc079f4..78b88f9855 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ProfileOperationDAOImpl.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ProfileOperationDAOImpl.java
@@ -123,22 +123,6 @@ public class ProfileOperationDAOImpl extends GenericOperationDAOImpl {
}
}
- @Override
- public void deleteOperation(int id) throws OperationManagementDAOException {
- PreparedStatement stmt = null;
- try {
- super.deleteOperation(id);
- Connection connection = OperationManagementDAOFactory.getConnection();
- stmt = connection.prepareStatement("DELETE FROM DM_PROFILE_OPERATION WHERE OPERATION_ID=?");
- stmt.setInt(1, id);
- stmt.executeUpdate();
- } catch (SQLException e) {
- throw new OperationManagementDAOException("Error occurred while deleting operation metadata", e);
- } finally {
- OperationManagementDAOUtil.cleanupResources(stmt);
- }
- }
-
public Operation getOperation(int id) throws OperationManagementDAOException {
PreparedStatement stmt = null;
ResultSet rs = null;
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/push/notification/mgt/PushNotificationBasedOperationManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/push/notification/mgt/PushNotificationBasedOperationManager.java
deleted file mode 100644
index 79ffacb370..0000000000
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/push/notification/mgt/PushNotificationBasedOperationManager.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- *
- * WSO2 Inc. licenses this file to you under the Apache License,
- * Version 2.0 (the "License"); you may not use this file except
- * in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.wso2.carbon.device.mgt.core.push.notification.mgt;
-
-import org.wso2.carbon.device.mgt.common.*;
-import org.wso2.carbon.device.mgt.common.operation.mgt.Activity;
-import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
-import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
-import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManager;
-import org.wso2.carbon.device.mgt.common.push.notification.NotificationContext;
-import org.wso2.carbon.device.mgt.common.push.notification.NotificationStrategy;
-import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationExecutionFailedException;
-
-import java.util.List;
-
-public class PushNotificationBasedOperationManager implements OperationManager {
-
- private OperationManager operationManager;
- private NotificationStrategy notificationProvider;
-
- public PushNotificationBasedOperationManager(
- OperationManager operationManager, NotificationStrategy notificationProvider) {
- this.operationManager = operationManager;
- this.notificationProvider = notificationProvider;
- }
-
- @Override
- public Activity addOperation(Operation operation,
- List devices) throws OperationManagementException, InvalidDeviceException {
- Activity activity = this.operationManager.addOperation(operation, devices);
- for (DeviceIdentifier deviceId : devices) {
- try {
- this.notificationProvider.execute(new NotificationContext(deviceId, operation));
- } catch (PushNotificationExecutionFailedException e) {
- throw new OperationManagementException("Error occurred while sending push notification to device", e);
- }
- }
- return activity;
- }
-
- @Override
- public List extends Operation> getOperations(
- DeviceIdentifier deviceId) throws OperationManagementException {
- return this.operationManager.getOperations(deviceId);
- }
-
- @Override
- public PaginationResult getOperations(DeviceIdentifier deviceId,
- PaginationRequest request) throws OperationManagementException {
- return this.operationManager.getOperations(deviceId, request);
- }
-
- @Override
- public List extends Operation> getPendingOperations(
- DeviceIdentifier deviceId) throws OperationManagementException {
- return this.operationManager.getPendingOperations(deviceId);
- }
-
- @Override
- public Operation getNextPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException {
- return this.operationManager.getNextPendingOperation(deviceId);
- }
-
- @Override
- public void updateOperation(DeviceIdentifier deviceId,
- Operation operation) throws OperationManagementException {
- this.operationManager.updateOperation(deviceId, operation);
- }
-
- @Override
- public void deleteOperation(int operationId) throws OperationManagementException {
- this.operationManager.deleteOperation(operationId);
- }
-
- @Override
- public Operation getOperationByDeviceAndOperationId(
- DeviceIdentifier deviceId, int operationId) throws OperationManagementException {
- return this.operationManager.getOperationByDeviceAndOperationId(deviceId, operationId);
- }
-
- @Override
- public List extends Operation> getOperationsByDeviceAndStatus(
- DeviceIdentifier deviceId,
- Operation.Status status) throws OperationManagementException {
- try {
- return this.operationManager.getOperationsByDeviceAndStatus(deviceId, status);
- } catch (DeviceManagementException e) {
- throw new OperationManagementException("Error occurred while retrieving the list of operations by " +
- "device and status", e);
- }
- }
-
- @Override
- public Operation getOperation(int operationId) throws OperationManagementException {
- return this.operationManager.getOperation(operationId);
- }
-
- @Override
- public Activity getOperationByActivityId(String activity) throws OperationManagementException {
- return this.operationManager.getOperationByActivityId(activity);
- }
-
- @Override
- public Activity getOperationByActivityIdAndDevice(String activity, DeviceIdentifier deviceId) throws OperationManagementException {
- return this.operationManager.getOperationByActivityIdAndDevice(activity, deviceId);
- }
-
- @Override
- public List getOperationUpdatedAfter(long timestamp) throws OperationManagementException {
- return this.operationManager.getOperationUpdatedAfter(timestamp);
- }
-
- @Override
- public List getActivitiesUpdatedAfter(long timestamp) throws OperationManagementException {
- return this.operationManager.getActivitiesUpdatedAfter(timestamp);
- }
-
- @Override
- public List getActivitiesUpdatedAfter(long timestamp, int limit, int offset) throws OperationManagementException {
- return this.operationManager.getActivitiesUpdatedAfter(timestamp, limit, offset);
- }
-
- @Override
- public int getActivityCountUpdatedAfter(long timestamp) throws OperationManagementException {
- return this.operationManager.getActivityCountUpdatedAfter(timestamp);
- }
-
- @Override
- public void setNotificationStrategy(NotificationStrategy notificationStrategy) {
-
- }
-
- @Override
- public NotificationStrategy getNotificationStrategy() {
- return notificationProvider;
- }
-
-}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java
index ffd559b1ad..151a774554 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java
@@ -553,8 +553,6 @@ public interface DeviceManagementProviderService {
void updateOperation(DeviceIdentifier deviceId, Operation operation) throws OperationManagementException;
- void deleteOperation(String type, int operationId) throws OperationManagementException;
-
Operation getOperationByDeviceAndOperationId(DeviceIdentifier deviceId, int operationId)
throws OperationManagementException;
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 e91d5eb5ce..a6c077b8fc 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
@@ -1429,11 +1429,6 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
.updateOperation(deviceId, operation);
}
- @Override
- public void deleteOperation(String type, int operationId) throws OperationManagementException {
- pluginRepository.getOperationManager(type, this.getTenantId()).deleteOperation(operationId);
- }
-
@Override
public Operation getOperationByDeviceAndOperationId(DeviceIdentifier deviceId,
int operationId) throws OperationManagementException {
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/OperationManagementTests.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/OperationManagementTests.java
index 81cc2c4738..c99ab40ff1 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/OperationManagementTests.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/OperationManagementTests.java
@@ -18,8 +18,6 @@
package org.wso2.carbon.device.mgt.core.operation;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@@ -35,9 +33,10 @@ import org.wso2.carbon.device.mgt.common.operation.mgt.ActivityStatus;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManager;
+import org.wso2.carbon.device.mgt.common.push.notification.NotificationStrategy;
+import org.wso2.carbon.device.mgt.core.DeviceManagementConstants;
import org.wso2.carbon.device.mgt.core.TestDeviceManagementService;
import org.wso2.carbon.device.mgt.core.authorization.DeviceAccessAuthorizationServiceImpl;
-import org.wso2.carbon.device.mgt.core.common.BaseDeviceManagementTest;
import org.wso2.carbon.device.mgt.core.common.TestDataHolder;
import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager;
import org.wso2.carbon.device.mgt.core.internal.DeviceManagementDataHolder;
@@ -59,13 +58,17 @@ import org.wso2.carbon.user.core.service.RealmService;
import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
import java.io.InputStream;
+import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
+import java.util.TimeZone;
-public class OperationManagementTests{
- private static final Log log = LogFactory.getLog(OperationManagementTests.class);
+/**
+ * This is the testcase which covers the methods from {@link OperationManager}
+ */
+public class OperationManagementTests {
private static final String DEVICE_TYPE = "OP_TEST_TYPE";
private static final String DEVICE_ID_PREFIX = "OP-TEST-DEVICE-ID-";
@@ -80,11 +83,11 @@ public class OperationManagementTests{
private List deviceIds = new ArrayList<>();
private OperationManager operationMgtService;
+ private Activity commandActivity;
@BeforeClass
public void init() throws Exception {
DeviceConfigurationManager.getInstance().initConfig();
- log.info("Initializing");
for (int i = 0; i < NO_OF_DEVICES; i++) {
deviceIds.add(new DeviceIdentifier(DEVICE_ID_PREFIX + i, DEVICE_TYPE));
}
@@ -107,7 +110,8 @@ public class OperationManagementTests{
throw new Exception("Incorrect device with ID - " + device.getDeviceIdentifier() + " returned!");
}
}
- this.operationMgtService = new OperationManagerImpl(DEVICE_TYPE);
+ NotificationStrategy notificationStrategy = new TestNotificationStrategy();
+ this.operationMgtService = new OperationManagerImpl(DEVICE_TYPE, notificationStrategy);
}
private RegistryService getRegistryService() throws RegistryException {
@@ -122,30 +126,57 @@ public class OperationManagementTests{
@Test
public void addCommandOperation() throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
- Activity activity = this.operationMgtService.addOperation(getOperation(new CommandOperation(), Operation.Type.COMMAND, COMMAND_OPERATON_CODE),
+ this.commandActivity = this.operationMgtService.addOperation(getOperation(new CommandOperation(), Operation.Type.COMMAND, COMMAND_OPERATON_CODE),
this.deviceIds);
- validateOperationResponse(activity);
+ validateOperationResponse(this.commandActivity, ActivityStatus.Status.PENDING);
+ }
+
+ @Test(expectedExceptions = InvalidDeviceException.class)
+ public void addEmptyDevicesCommandOperation() throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
+ this.operationMgtService.addOperation(getOperation(new CommandOperation(), Operation.Type.COMMAND, COMMAND_OPERATON_CODE),
+ new ArrayList<>());
+ }
+
+ @Test(expectedExceptions = InvalidDeviceException.class)
+ public void addNonInitializedDevicesCommandOperation() throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
+ DeviceIdentifier deviceIdentifier = new DeviceIdentifier();
+ List deviceIdentifiers = new ArrayList<>();
+ deviceIdentifiers.add(deviceIdentifier);
+ this.operationMgtService.addOperation(getOperation(new CommandOperation(), Operation.Type.COMMAND, COMMAND_OPERATON_CODE),
+ deviceIdentifiers);
+ }
+
+ @Test
+ public void addNonAdminUserDevicesCommandOperation() throws DeviceManagementException, OperationManagementException,
+ InvalidDeviceException {
+ PrivilegedCarbonContext.startTenantFlow();
+ PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantId(MultitenantConstants.SUPER_TENANT_ID, true);
+ PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(NON_ADMIN_USER);
+ Activity activity = this.operationMgtService.addOperation(getOperation(new CommandOperation(), Operation.Type.COMMAND, COMMAND_OPERATON_CODE),
+ deviceIds);
+ PrivilegedCarbonContext.endTenantFlow();
+ validateOperationResponse(activity, ActivityStatus.Status.UNAUTHORIZED);
}
@Test(dependsOnMethods = "addCommandOperation")
public void addPolicyOperation() throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
Activity activity = this.operationMgtService.addOperation(getOperation(new PolicyOperation(), Operation.Type.POLICY, POLICY_OPERATION_CODE),
this.deviceIds);
- validateOperationResponse(activity);
+ validateOperationResponse(activity, ActivityStatus.Status.PENDING);
}
@Test(dependsOnMethods = "addPolicyOperation")
public void addConfigOperation() throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
Activity activity = this.operationMgtService.addOperation(getOperation(new ConfigOperation(), Operation.Type.CONFIG, CONFIG_OPERATION_CODE),
this.deviceIds);
- validateOperationResponse(activity);
+ validateOperationResponse(activity, ActivityStatus.Status.PENDING);
}
@Test(dependsOnMethods = "addConfigOperation")
public void addProfileOperation() throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
Activity activity = this.operationMgtService.addOperation(getOperation(new ProfileOperation(), Operation.Type.PROFILE, PROFILE_OPERATION_CODE),
this.deviceIds);
- validateOperationResponse(activity);
+ validateOperationResponse(activity, ActivityStatus.Status.PENDING);
}
private Operation getOperation(Operation operation, Operation.Type type, String code) {
@@ -156,11 +187,11 @@ public class OperationManagementTests{
return operation;
}
- private void validateOperationResponse(Activity activity) {
+ private void validateOperationResponse(Activity activity, ActivityStatus.Status expectedStatus) {
Assert.assertEquals(activity.getActivityStatus().size(), NO_OF_DEVICES, "The operation reponse for add operation only have - " +
activity.getActivityStatus().size());
for (ActivityStatus status : activity.getActivityStatus()) {
- Assert.assertEquals(status.getStatus(), ActivityStatus.Status.PENDING);
+ Assert.assertEquals(status.getStatus(), expectedStatus);
}
}
@@ -209,7 +240,7 @@ public class OperationManagementTests{
try {
this.operationMgtService.getOperations(deviceIdentifier, request);
} catch (OperationManagementException ex) {
- if (ex.getMessage() == null){
+ if (ex.getMessage() == null) {
Assert.assertTrue(ex.getMessage().contains("User '" + NON_ADMIN_USER + "' is not authorized"));
}
}
@@ -219,9 +250,14 @@ public class OperationManagementTests{
@Test(dependsOnMethods = "getPaginatedRequestAsAdmin")
public void updateOperation() throws OperationManagementException {
+ //This is required to introduce a delay for the update operation of the device.
+ try {
+ Thread.sleep(2000);
+ } catch (InterruptedException ignored) {
+ }
DeviceIdentifier deviceIdentifier = this.deviceIds.get(0);
List operations = this.operationMgtService.getPendingOperations(deviceIdentifier);
- Assert.assertTrue(operations!= null && operations.size()==4);
+ Assert.assertTrue(operations != null && operations.size() == 4);
Operation operation = (Operation) operations.get(0);
operation.setStatus(Operation.Status.COMPLETED);
operation.setOperationResponse("The operation is successfully completed");
@@ -229,4 +265,110 @@ public class OperationManagementTests{
List pendingOperations = this.operationMgtService.getPendingOperations(deviceIdentifier);
Assert.assertEquals(pendingOperations.size(), 3);
}
+
+ @Test(dependsOnMethods = "updateOperation")
+ public void getNextPendingOperation() throws OperationManagementException {
+ DeviceIdentifier deviceIdentifier = this.deviceIds.get(0);
+ Operation operation = this.operationMgtService.getNextPendingOperation(deviceIdentifier);
+ Assert.assertTrue(operation.getType().equals(Operation.Type.POLICY));
+ }
+
+ @Test(dependsOnMethods = "getNextPendingOperation")
+ public void getOperationByDeviceAndOperationId() throws OperationManagementException {
+ DeviceIdentifier deviceIdentifier = this.deviceIds.get(0);
+ String operationId = this.commandActivity.getActivityId().
+ replace(DeviceManagementConstants.OperationAttributes.ACTIVITY, "");
+ Operation operation = this.operationMgtService.getOperationByDeviceAndOperationId(deviceIdentifier,
+ Integer.parseInt(operationId));
+ Assert.assertTrue(operation.getStatus().equals(Operation.Status.COMPLETED));
+ Assert.assertTrue(operation.getType().equals(Operation.Type.COMMAND));
+ }
+
+ @Test(dependsOnMethods = "getOperationByDeviceAndOperationId")
+ public void getOperationsByDeviceAndStatus() throws OperationManagementException, DeviceManagementException {
+ DeviceIdentifier deviceIdentifier = this.deviceIds.get(0);
+ List operation = this.operationMgtService.getOperationsByDeviceAndStatus(deviceIdentifier, Operation.Status.PENDING);
+ Assert.assertEquals(operation.size(), 3);
+ }
+
+ @Test(dependsOnMethods = "getOperationsByDeviceAndStatus")
+ public void getOperation() throws OperationManagementException, DeviceManagementException {
+ String operationId = this.commandActivity.getActivityId().
+ replace(DeviceManagementConstants.OperationAttributes.ACTIVITY, "");
+ Operation operation = this.operationMgtService.getOperation(Integer.parseInt(operationId));
+ Assert.assertEquals(operation.getType(), Operation.Type.COMMAND);
+ }
+
+ @Test(dependsOnMethods = "getOperation")
+ public void getOperationActivity() throws OperationManagementException {
+ Activity activity = this.operationMgtService.getOperationByActivityId(commandActivity.getActivityId());
+ Assert.assertEquals(activity.getType(), Activity.Type.COMMAND);
+ Assert.assertEquals(activity.getActivityStatus().size(), this.deviceIds.size());
+ Assert.assertEquals(activity.getActivityStatus().get(0).getStatus(), ActivityStatus.Status.COMPLETED);
+ for (int i = 1; i < this.deviceIds.size(); i++) {
+ Assert.assertEquals(activity.getActivityStatus().get(i).getStatus(), ActivityStatus.Status.PENDING);
+ }
+ }
+
+ @Test(dependsOnMethods = "getOperationActivity")
+ public void getOperationByActivityIdAndDevice() throws OperationManagementException {
+ Activity activity = this.operationMgtService.
+ getOperationByActivityIdAndDevice(this.commandActivity.getActivityId(), this.deviceIds.get(0));
+ Assert.assertEquals(activity.getType(), Activity.Type.COMMAND);
+ Assert.assertEquals(activity.getActivityStatus().size(), 1);
+ Assert.assertEquals(activity.getActivityStatus().get(0).getStatus(), ActivityStatus.Status.COMPLETED);
+ }
+
+ @Test(dependsOnMethods = "updateOperation")
+ public void getOperationUpdatedAfterWithLimitAndOffet() throws OperationManagementException, ParseException {
+ String timestamp = this.commandActivity.getCreatedTimeStamp();
+ SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM dd hh:mm:ss Z yyyy");
+ dateFormat.setTimeZone(TimeZone.getTimeZone("IST"));
+ Date date = dateFormat.parse(timestamp);
+ List operations = this.operationMgtService.getActivitiesUpdatedAfter(date.getTime() / 1000, 10, 0);
+ Assert.assertTrue(operations != null && operations.size() == 1,
+ "The operations updated after the created should be 1");
+ Activity operation = operations.get(0);
+ Assert.assertTrue(operation.getActivityStatus() != null && operation.getActivityStatus().size() == 1,
+ "The operation should be having the activity status of atleast one device");
+ Assert.assertEquals(operation.getActivityStatus().get(0).getDeviceIdentifier().getId(),
+ deviceIds.get(0).getId());
+ Assert.assertEquals(operation.getActivityStatus().get(0).getDeviceIdentifier().getType(),
+ deviceIds.get(0).getType());
+ }
+
+ @Test(dependsOnMethods = "updateOperation")
+ public void getOperationUpdatedAfter() throws OperationManagementException, ParseException {
+ String timestamp = this.commandActivity.getCreatedTimeStamp();
+ SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM dd hh:mm:ss Z yyyy");
+ dateFormat.setTimeZone(TimeZone.getTimeZone("IST"));
+ Date date = dateFormat.parse(timestamp);
+ List operations = this.operationMgtService.getActivitiesUpdatedAfter(date.getTime() / 1000);
+ Assert.assertTrue(operations != null && operations.size() == 1,
+ "The operations updated after the created should be 1");
+ Activity operation = operations.get(0);
+ Assert.assertTrue(operation.getActivityStatus() != null && operation.getActivityStatus().size() == 1,
+ "The operation should be having the activity status of atleast one device");
+ Assert.assertEquals(operation.getActivityStatus().get(0).getDeviceIdentifier().getId(),
+ deviceIds.get(0).getId());
+ Assert.assertEquals(operation.getActivityStatus().get(0).getDeviceIdentifier().getType(),
+ deviceIds.get(0).getType());
+ }
+
+ @Test(dependsOnMethods = "getOperationUpdatedAfter")
+ public void getActivityCountUpdatedAfter() throws OperationManagementException, ParseException {
+ String timestamp = this.commandActivity.getCreatedTimeStamp();
+ SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM dd hh:mm:ss Z yyyy");
+ dateFormat.setTimeZone(TimeZone.getTimeZone("IST"));
+ Date date = dateFormat.parse(timestamp);
+ int activityCount = this.operationMgtService.getActivityCountUpdatedAfter(date.getTime() / 1000);
+ Assert.assertTrue(activityCount == 1,
+ "The activities updated after the created should be 1");
+ }
+
+ @Test
+ public void getNotificationStrategy() {
+ Assert.assertTrue(this.operationMgtService.getNotificationStrategy() != null);
+ }
+
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/TestNotificationStrategy.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/TestNotificationStrategy.java
new file mode 100644
index 0000000000..28afa2da1f
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/TestNotificationStrategy.java
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+* WSO2 Inc. licenses this file to you under the Apache License,
+* Version 2.0 (the "License"); you may not use this file except
+* in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.wso2.carbon.device.mgt.core.operation;
+
+import org.wso2.carbon.device.mgt.common.push.notification.NotificationContext;
+import org.wso2.carbon.device.mgt.common.push.notification.NotificationStrategy;
+import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig;
+import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationExecutionFailedException;
+
+public class TestNotificationStrategy implements NotificationStrategy {
+
+ @Override
+ public void init() {
+
+ }
+
+ @Override
+ public void execute(NotificationContext ctx) throws PushNotificationExecutionFailedException {
+
+ }
+
+ @Override
+ public NotificationContext buildContext() {
+ return null;
+ }
+
+ @Override
+ public void undeploy() {
+
+ }
+
+ @Override
+ public PushNotificationConfig getConfig() {
+ return null;
+ }
+}
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 4cb30e4de5..58b1f600a7 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
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 29097d0a50..74e7593d4e 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
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 b05db9d6e3..e59a3b0347 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt/pom.xml b/components/device-mgt/pom.xml
index c5256932de..1549da7d83 100644
--- a/components/device-mgt/pom.xml
+++ b/components/device-mgt/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-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 2a9b39a992..7ea82f9e4b 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
diff --git a/components/email-sender/pom.xml b/components/email-sender/pom.xml
index 4d788c5633..3fa86c49c6 100644
--- a/components/email-sender/pom.xml
+++ b/components/email-sender/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-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 d311cb6eea..5bb7bf0fac 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.oauth.extensions
- 3.0.115-SNAPSHOT
+ 3.0.116-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 41918d73c2..c90b82dc37 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.0.115-SNAPSHOT
+ 3.0.116-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 6b879bfae0..5648839757 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
diff --git a/components/identity-extensions/pom.xml b/components/identity-extensions/pom.xml
index 5e3f39f99a..f950428c7b 100644
--- a/components/identity-extensions/pom.xml
+++ b/components/identity-extensions/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-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 f26b522c1d..47ef6e6824 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.complex.policy.decision.point
- 3.0.115-SNAPSHOT
+ 3.0.116-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 9165a0c8df..1a97bac216 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.policy.decision.point
- 3.0.115-SNAPSHOT
+ 3.0.116-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 ad9309d956..6e84ad6cab 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
@@ -11,7 +11,7 @@
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.policy.information.point
- 3.0.115-SNAPSHOT
+ 3.0.116-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 eb6ad3f4f8..3a99e23bf2 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.policy.mgt.common
- 3.0.115-SNAPSHOT
+ 3.0.116-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 d71a8a2744..3def28f676 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.policy.mgt.core
- 3.0.115-SNAPSHOT
+ 3.0.116-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 00434beb70..ae8ffa0946 100644
--- a/components/policy-mgt/pom.xml
+++ b/components/policy-mgt/pom.xml
@@ -23,13 +23,13 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../../pom.xml
4.0.0
policy-mgt
- 3.0.115-SNAPSHOT
+ 3.0.116-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 b51fc5cc9f..dbf37a7ec9 100644
--- a/components/test-coverage/pom.xml
+++ b/components/test-coverage/pom.xml
@@ -21,7 +21,7 @@
carbon-devicemgt
org.wso2.carbon.devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-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 9118025d84..d2a6a8920d 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.webapp.authenticator.framework
- 3.0.115-SNAPSHOT
+ 3.0.116-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 ad52910f03..87c67e4c75 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
webapp-authenticator-framework
- 3.0.115-SNAPSHOT
+ 3.0.116-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 e7c6ff2026..abcfc9d03b 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.application.extension.feature
pom
- 3.0.115-SNAPSHOT
+ 3.0.116-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 f2818cff2c..eb31a11749 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.handler.server.feature
pom
- 3.0.115-SNAPSHOT
+ 3.0.116-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 5b1b53d785..3e71b4b7f0 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.integration.client.feature
- 3.0.115-SNAPSHOT
+ 3.0.116-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 a3c098a703..f8836ce856 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.webapp.publisher.feature
pom
- 3.0.115-SNAPSHOT
+ 3.0.116-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 8a5ff55dfd..45bb7689a3 100644
--- a/features/apimgt-extensions/pom.xml
+++ b/features/apimgt-extensions/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
pom
WSO2 Carbon - API Management Extensions Feature
http://wso2.org
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 834b62d2c5..a649e842be 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.0.115-SNAPSHOT
+ 3.0.116-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 0d1075561c..c482f92e88 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.0.115-SNAPSHOT
+ 3.0.116-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 8b7bdf728e..9e9a58415c 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.certificate.mgt.server.feature
pom
- 3.0.115-SNAPSHOT
+ 3.0.116-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 846ae3f266..85b250673a 100644
--- a/features/certificate-mgt/pom.xml
+++ b/features/certificate-mgt/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
certificate-mgt-feature
- 3.0.115-SNAPSHOT
+ 3.0.116-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 55ee459452..370b6f67cb 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature
pom
- 3.0.115-SNAPSHOT
+ 3.0.116-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 65b256bde2..2b4abe7a8b 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature
pom
- 3.0.115-SNAPSHOT
+ 3.0.116-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 dc46549cfc..9f39fd7f7a 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature
pom
- 3.0.115-SNAPSHOT
+ 3.0.116-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 258907a6c6..c131049e16 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature
pom
- 3.0.115-SNAPSHOT
+ 3.0.116-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 8c02456c24..71f0bf253d 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature
pom
- 3.0.115-SNAPSHOT
+ 3.0.116-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 66fcb63dfc..18d81fb83e 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../../pom.xml
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml
index 7fa1f091eb..b014451509 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml
@@ -3,13 +3,13 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.analytics.dashboard.feature
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
pom
WSO2 Carbon - Device Management Dashboard Analytics Feature
WSO2 Carbon - Device Management Dashboard Analytics Feature
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml
index ec55f16f82..d423f1789e 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.analytics.data.publisher.feature
pom
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
WSO2 Carbon - Device Management Server Feature
http://wso2.org
This feature contains bundles related to device analytics data publisher
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 b1854928d9..7a1a19856f 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.0.115-SNAPSHOT
+ 3.0.116-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 30d1c65dd5..7d4eb8ab6c 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.feature
pom
- 3.0.115-SNAPSHOT
+ 3.0.116-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 77ae93c168..0c9592b7af 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.0.115-SNAPSHOT
+ 3.0.116-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 210d760e5f..a27e5b1527 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.server.feature
pom
- 3.0.115-SNAPSHOT
+ 3.0.116-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 fb01bc31f6..d194bd0850 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
diff --git a/features/device-mgt/pom.xml b/features/device-mgt/pom.xml
index 41154c7573..c040c45f61 100644
--- a/features/device-mgt/pom.xml
+++ b/features/device-mgt/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-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 762d25747e..fc6b8ff765 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.email.sender.feature
pom
- 3.0.115-SNAPSHOT
+ 3.0.116-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 97b184a916..add18c3b55 100644
--- a/features/email-sender/pom.xml
+++ b/features/email-sender/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
email-sender-feature
- 3.0.115-SNAPSHOT
+ 3.0.116-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 1ffa238ff9..b4e7e5da5c 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.identity.jwt.client.extension.feature
pom
- 3.0.115-SNAPSHOT
+ 3.0.116-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 ca9604c881..f75da061ef 100644
--- a/features/jwt-client/pom.xml
+++ b/features/jwt-client/pom.xml
@@ -23,13 +23,13 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../../pom.xml
4.0.0
jwt-client-feature
- 3.0.115-SNAPSHOT
+ 3.0.116-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 a1c7045ded..ed23f8d678 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.oauth.extensions.feature
pom
- 3.0.115-SNAPSHOT
+ 3.0.116-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 51a5f737df..8f71424b71 100644
--- a/features/oauth-extensions/pom.xml
+++ b/features/oauth-extensions/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
oauth-extensions-feature
- 3.0.115-SNAPSHOT
+ 3.0.116-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 a128a7529e..34971471c3 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.policy.mgt.server.feature
pom
- 3.0.115-SNAPSHOT
+ 3.0.116-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 c51f85ab08..7d5f658fe9 100644
--- a/features/policy-mgt/pom.xml
+++ b/features/policy-mgt/pom.xml
@@ -23,14 +23,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
policy-mgt-feature
- 3.0.115-SNAPSHOT
+ 3.0.116-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 cabea2b24e..efaba75433 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.webapp.authenticator.framework.server.feature
pom
- 3.0.115-SNAPSHOT
+ 3.0.116-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 ee627f9daa..da15c1a633 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.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
webapp-authenticator-framework-feature
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
pom
WSO2 Carbon - Webapp Authenticator Framework Feature
http://wso2.org
diff --git a/pom.xml b/pom.xml
index 595af10314..7605ee88d8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
pom
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
WSO2 Carbon - Device Management - Parent
http://wso2.org
WSO2 Connected Device Manager Components
@@ -1833,7 +1833,7 @@
1.2.11.wso2v10
- 3.0.115-SNAPSHOT
+ 3.0.116-SNAPSHOT
4.4.8