Merge remote-tracking branch 'upstream/master'

revert-70aa11f8
megala21 7 years ago
commit 6637c63c6b

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -3,7 +3,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<version>3.0.115-SNAPSHOT</version> <version>3.0.116-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

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

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

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

@ -63,7 +63,8 @@ public interface OperationManager {
* @throws OperationManagementException If some unusual behaviour is observed while fetching the * @throws OperationManagementException If some unusual behaviour is observed while fetching the
* operation list. * 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. * 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 * @throws OperationManagementException If some unusual behaviour is observed while fetching the
* operation list. * operation list.
*/ */
List<? extends Operation> getPendingOperations( List<? extends Operation> getPendingOperations(DeviceIdentifier deviceId) throws OperationManagementException;
DeviceIdentifier deviceId) throws OperationManagementException;
Operation getNextPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException; Operation getNextPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException;
void updateOperation(DeviceIdentifier deviceId, Operation operation) throws OperationManagementException; void updateOperation(DeviceIdentifier deviceId, Operation operation) throws OperationManagementException;
void deleteOperation(int operationId) throws OperationManagementException;
Operation getOperationByDeviceAndOperationId(DeviceIdentifier deviceId, int operationId) Operation getOperationByDeviceAndOperationId(DeviceIdentifier deviceId, int operationId)
throws OperationManagementException; throws OperationManagementException;
@ -93,9 +91,8 @@ public interface OperationManager {
Activity getOperationByActivityId(String activity) throws OperationManagementException; Activity getOperationByActivityId(String activity) throws OperationManagementException;
Activity getOperationByActivityIdAndDevice(String activity, DeviceIdentifier deviceId) throws OperationManagementException; Activity getOperationByActivityIdAndDevice(String activity, DeviceIdentifier deviceId)
throws OperationManagementException;
List<Operation> getOperationUpdatedAfter(long timestamp) throws OperationManagementException;
List<Activity> getActivitiesUpdatedAfter(long timestamp) throws OperationManagementException; List<Activity> getActivitiesUpdatedAfter(long timestamp) throws OperationManagementException;
@ -103,12 +100,6 @@ public interface OperationManager {
int getActivityCountUpdatedAfter(long timestamp) throws OperationManagementException; 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. * retrive the push notification strategy.
* @return NotificationStrategy * @return NotificationStrategy

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

@ -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 {
}

@ -105,10 +105,6 @@ public class OperationManagerImpl implements OperationManager {
return notificationStrategy; return notificationStrategy;
} }
public void setNotificationStrategy(NotificationStrategy notificationStrategy) {
this.notificationStrategy = notificationStrategy;
}
public OperationManagerImpl(String deviceType, NotificationStrategy notificationStrategy) { public OperationManagerImpl(String deviceType, NotificationStrategy notificationStrategy) {
this(deviceType); this(deviceType);
this.notificationStrategy = notificationStrategy; this.notificationStrategy = notificationStrategy;
@ -122,7 +118,7 @@ public class OperationManagerImpl implements OperationManager {
log.debug("operation:[" + operation.toString() + "]"); log.debug("operation:[" + operation.toString() + "]");
for (DeviceIdentifier deviceIdentifier : deviceIds) { for (DeviceIdentifier deviceIdentifier : deviceIds) {
log.debug("device identifier id:[" + deviceIdentifier.getId() + "] type:[" + log.debug("device identifier id:[" + deviceIdentifier.getId() + "] type:[" +
deviceIdentifier.getType() + "]"); deviceIdentifier.getType() + "]");
} }
} }
try { try {
@ -137,7 +133,7 @@ public class OperationManagerImpl implements OperationManager {
//Send the operation statuses only for admin triggered operations //Send the operation statuses only for admin triggered operations
String deviceType = validDeviceIds.get(0).getType(); String deviceType = validDeviceIds.get(0).getType();
activity.setActivityStatus(this.getActivityStatus(deviceValidationResult, deviceAuthorizationResult, activity.setActivityStatus(this.getActivityStatus(deviceValidationResult, deviceAuthorizationResult,
deviceType)); deviceType));
return activity; return activity;
} }
@ -160,7 +156,7 @@ public class OperationManagerImpl implements OperationManager {
boolean hasExistingTaskOperation; boolean hasExistingTaskOperation;
int enrolmentId; int enrolmentId;
if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Control.NO_REPEAT == operationDto. if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Control.NO_REPEAT == operationDto.
getControl()) { getControl()) {
isNotRepeated = true; isNotRepeated = true;
} }
@ -177,10 +173,10 @@ public class OperationManagerImpl implements OperationManager {
} }
} else if (isNotRepeated) { } else if (isNotRepeated) {
operationDAO.updateEnrollmentOperationsStatus(enrolmentId, operationCode, operationDAO.updateEnrollmentOperationsStatus(enrolmentId, operationCode,
org.wso2.carbon.device.mgt.core.dto.operation.mgt. org.wso2.carbon.device.mgt.core.dto.operation.mgt.
Operation.Status.PENDING, Operation.Status.PENDING,
org.wso2.carbon.device.mgt.core.dto.operation.mgt. org.wso2.carbon.device.mgt.core.dto.operation.mgt.
Operation.Status.REPEATED); Operation.Status.REPEATED);
operationMappingDAO.addOperationMapping(operationId, enrolmentId, isScheduled); operationMappingDAO.addOperationMapping(operationId, enrolmentId, isScheduled);
} else { } else {
operationMappingDAO.addOperationMapping(operationId, enrolmentId, isScheduled); 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); operationMappingDAO.updateOperationMapping(operationId, enrolmentId, org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.PushNotificationStatus.COMPLETED);
} catch (PushNotificationExecutionFailedException e) { } catch (PushNotificationExecutionFailedException e) {
log.error("Error occurred while sending push notifications to " + log.error("Error occurred while sending push notifications to " +
deviceId.getType() + " device carrying id '" + deviceId.getType() + " device carrying id '" +
deviceId + "'", e); deviceId + "'", e);
// Reschedule if push notification failed. // Reschedule if push notification failed.
operationMappingDAO.updateOperationMapping(operationId, enrolmentId, org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.PushNotificationStatus.SCHEDULED); 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. //Get the device-type from 1st valid DeviceIdentifier. We know the 1st element is definitely there.
String deviceType = validDeviceIds.get(0).getType(); String deviceType = validDeviceIds.get(0).getType();
activity.setActivityStatus(this.getActivityStatus(deviceValidationResult, deviceAuthorizationResult, activity.setActivityStatus(this.getActivityStatus(deviceValidationResult, deviceAuthorizationResult,
deviceType)); deviceType));
} }
return activity; return activity;
} else { } else {
@ -242,7 +238,7 @@ public class OperationManagerImpl implements OperationManager {
//Add the invalid DeviceIds //Add the invalid DeviceIds
for (String id : deviceIdValidationResult.getErrorDeviceIdList()) { for (String id : deviceIdValidationResult.getErrorDeviceIdList()) {
activityStatus = new ActivityStatus(); activityStatus = new ActivityStatus();
activityStatus.setDeviceIdentifier(new DeviceIdentifier(id,deviceType)); activityStatus.setDeviceIdentifier(new DeviceIdentifier(id, deviceType));
activityStatus.setStatus(ActivityStatus.Status.INVALID); activityStatus.setStatus(ActivityStatus.Status.INVALID);
activityStatuses.add(activityStatus); activityStatuses.add(activityStatus);
} }
@ -288,7 +284,7 @@ public class OperationManagerImpl implements OperationManager {
} }
} catch (DeviceAccessAuthorizationException e) { } catch (DeviceAccessAuthorizationException e) {
throw new OperationManagementException("Error occurred while authorizing access to the devices for user :" + throw new OperationManagementException("Error occurred while authorizing access to the devices for user :" +
this.getUser(), e); this.getUser(), e);
} }
deviceIDHolder.setValidDeviceIDList(authorizedDeviceList); deviceIDHolder.setValidDeviceIDList(authorizedDeviceList);
deviceIDHolder.setErrorDeviceIdList(unAuthorizedDeviceList); deviceIDHolder.setErrorDeviceIdList(unAuthorizedDeviceList);
@ -310,8 +306,8 @@ public class OperationManagerImpl implements OperationManager {
if (!isActionAuthorized(deviceId)) { if (!isActionAuthorized(deviceId)) {
throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" + throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" +
deviceId.getType() + "' device, which carries the identifier '" + deviceId.getType() + "' device, which carries the identifier '" +
deviceId.getId() + "'"); deviceId.getId() + "'");
} }
EnrolmentInfo enrolmentInfo = this.getActiveEnrolmentInfo(deviceId); EnrolmentInfo enrolmentInfo = this.getActiveEnrolmentInfo(deviceId);
@ -331,8 +327,8 @@ public class OperationManagerImpl implements OperationManager {
} }
} catch (OperationManagementDAOException e) { } catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while retrieving the list of " + throw new OperationManagementException("Error occurred while retrieving the list of " +
"operations assigned for '" + deviceId.getType() + "operations assigned for '" + deviceId.getType() +
"' device '" + deviceId.getId() + "'", e); "' device '" + deviceId.getId() + "'", e);
} catch (SQLException e) { } catch (SQLException e) {
throw new OperationManagementException( throw new OperationManagementException(
"Error occurred while opening a connection to the data source", e); "Error occurred while opening a connection to the data source", e);
@ -350,15 +346,15 @@ public class OperationManagerImpl implements OperationManager {
String owner = request.getOwner(); String owner = request.getOwner();
if (!isActionAuthorized(deviceId)) { if (!isActionAuthorized(deviceId)) {
throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" + throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" +
deviceId.getType() + "' device, which carries the identifier '" + deviceId.getType() + "' device, which carries the identifier '" +
deviceId.getId() + "' of owner '" + owner + "'" ); deviceId.getId() + "' of owner '" + owner + "'");
} }
EnrolmentInfo enrolmentInfo = this.getEnrolmentInfo(deviceId, owner); EnrolmentInfo enrolmentInfo = this.getEnrolmentInfo(deviceId, owner);
if (enrolmentInfo == null) { if (enrolmentInfo == null) {
throw new OperationManagementException("Device not found for given device " + throw new OperationManagementException("Device not found for given device " +
"Identifier:" + deviceId.getId() + " and given type" + "Identifier:" + deviceId.getId() + " and given type" +
deviceId.getType()); deviceId.getType());
} }
int enrolmentId = enrolmentInfo.getId(); int enrolmentId = enrolmentInfo.getId();
try { try {
@ -376,8 +372,8 @@ public class OperationManagerImpl implements OperationManager {
paginationResult.setRecordsFiltered(count); paginationResult.setRecordsFiltered(count);
} catch (OperationManagementDAOException e) { } catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while retrieving the list of " + throw new OperationManagementException("Error occurred while retrieving the list of " +
"operations assigned for '" + deviceId.getType() + "operations assigned for '" + deviceId.getType() +
"' device '" + deviceId.getId() + "'", e); "' device '" + deviceId.getId() + "'", e);
} catch (SQLException e) { } catch (SQLException e) {
throw new OperationManagementException( throw new OperationManagementException(
"Error occurred while opening a connection to the data source", e); "Error occurred while opening a connection to the data source", e);
@ -390,7 +386,7 @@ public class OperationManagerImpl implements OperationManager {
@Override @Override
public List<? extends Operation> getPendingOperations(DeviceIdentifier deviceId) throws public List<? extends Operation> getPendingOperations(DeviceIdentifier deviceId) throws
OperationManagementException { OperationManagementException {
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("Device identifier id:[" + deviceId.getId() + "] type:[" + deviceId.getType() + "]"); log.debug("Device identifier id:[" + deviceId.getId() + "] type:[" + deviceId.getType() + "]");
} }
@ -399,16 +395,16 @@ public class OperationManagerImpl implements OperationManager {
if (!isActionAuthorized(deviceId)) { if (!isActionAuthorized(deviceId)) {
throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" + throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" +
deviceId.getType() + "' device, which carries the identifier '" + deviceId.getType() + "' device, which carries the identifier '" +
deviceId.getId() + "'"); deviceId.getId() + "'");
} }
// //
EnrolmentInfo enrolmentInfo = this.getActiveEnrolmentInfo(deviceId); EnrolmentInfo enrolmentInfo = this.getActiveEnrolmentInfo(deviceId);
if (enrolmentInfo == null) { if (enrolmentInfo == null) {
throw new OperationManagementException("Device not found for the given device Identifier:" + throw new OperationManagementException("Device not found for the given device Identifier:" +
deviceId.getId() + " and given type:" + deviceId.getId() + " and given type:" +
deviceId.getType()); deviceId.getType());
} }
int enrolmentId = enrolmentInfo.getId(); int enrolmentId = enrolmentInfo.getId();
//Changing the enrollment status & attempt count if the device is marked as inactive or unreachable //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()); Collections.sort(operations, new OperationCreateTimeComparator());
} catch (OperationManagementDAOException e) { } catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while retrieving the list of " + throw new OperationManagementException("Error occurred while retrieving the list of " +
"pending operations assigned for '" + deviceId.getType() + "pending operations assigned for '" + deviceId.getType() +
"' device '" + deviceId.getId() + "'", e); "' device '" + deviceId.getId() + "'", e);
} catch (SQLException e) { } catch (SQLException e) {
throw new OperationManagementException( throw new OperationManagementException(
"Error occurred while opening a connection to the data source", e); "Error occurred while opening a connection to the data source", e);
@ -457,15 +453,15 @@ public class OperationManagerImpl implements OperationManager {
if (!isActionAuthorized(deviceId)) { if (!isActionAuthorized(deviceId)) {
throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" + throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" +
deviceId.getType() + "' device, which carries the identifier '" + deviceId.getType() + "' device, which carries the identifier '" +
deviceId.getId() + "'"); deviceId.getId() + "'");
} }
EnrolmentInfo enrolmentInfo = this.getActiveEnrolmentInfo(deviceId); EnrolmentInfo enrolmentInfo = this.getActiveEnrolmentInfo(deviceId);
if (enrolmentInfo == null) { if (enrolmentInfo == null) {
throw new OperationManagementException("Device not found for given device " + throw new OperationManagementException("Device not found for given device " +
"Identifier:" + deviceId.getId() + " and given type" + "Identifier:" + deviceId.getId() + " and given type" +
deviceId.getType()); deviceId.getType());
} }
int enrolmentId = enrolmentInfo.getId(); int enrolmentId = enrolmentInfo.getId();
//Changing the enrollment status & attempt count if the device is marked as inactive or unreachable //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 { try {
OperationManagementDAOFactory.openConnection(); OperationManagementDAOFactory.openConnection();
org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation dtoOperation = operationDAO.getNextOperation( org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation dtoOperation = operationDAO.getNextOperation(
enrolmentInfo.getId()); enrolmentInfo.getId());
if (dtoOperation != null) { if (dtoOperation != null) {
if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.COMMAND.equals(dtoOperation.getType() 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; org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation commandOperation;
commandOperation = commandOperation =
(org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation) commandOperationDAO. (org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation) commandOperationDAO.
getOperation(dtoOperation.getId()); getOperation(dtoOperation.getId());
dtoOperation.setEnabled(commandOperation.isEnabled()); dtoOperation.setEnabled(commandOperation.isEnabled());
} else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.CONFIG.equals(dtoOperation. } else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.CONFIG.equals(dtoOperation.
getType())) { getType())) {
dtoOperation = configOperationDAO.getOperation(dtoOperation.getId()); dtoOperation = configOperationDAO.getOperation(dtoOperation.getId());
} else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.PROFILE.equals(dtoOperation. } else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.PROFILE.equals(dtoOperation.
getType())) { getType())) {
dtoOperation = profileOperationDAO.getOperation(dtoOperation.getId()); dtoOperation = profileOperationDAO.getOperation(dtoOperation.getId());
} else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.POLICY.equals(dtoOperation. } else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.POLICY.equals(dtoOperation.
getType())) { getType())) {
dtoOperation = policyOperationDAO.getOperation(dtoOperation.getId()); dtoOperation = policyOperationDAO.getOperation(dtoOperation.getId());
} }
operation = OperationDAOUtil.convertOperation(dtoOperation); operation = OperationDAOUtil.convertOperation(dtoOperation);
@ -520,15 +516,15 @@ public class OperationManagerImpl implements OperationManager {
if (!isActionAuthorized(deviceId)) { if (!isActionAuthorized(deviceId)) {
throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" + throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" +
deviceId.getType() + "' device, which carries the identifier '" + deviceId.getType() + "' device, which carries the identifier '" +
deviceId.getId() + "'"); deviceId.getId() + "'");
} }
EnrolmentInfo enrolmentInfo = this.getActiveEnrolmentInfo(deviceId); EnrolmentInfo enrolmentInfo = this.getActiveEnrolmentInfo(deviceId);
if (enrolmentInfo == null) { if (enrolmentInfo == null) {
throw new OperationManagementException( throw new OperationManagementException(
"Device not found for device id:" + deviceId.getId() + " " + "type:" + "Device not found for device id:" + deviceId.getId() + " " + "type:" +
deviceId.getType()); deviceId.getType());
} }
try { try {
@ -537,9 +533,9 @@ public class OperationManagerImpl implements OperationManager {
boolean isUpdated = false; boolean isUpdated = false;
if (operation.getStatus() != null) { if (operation.getStatus() != null) {
isUpdated = operationDAO.updateOperationStatus(enrolmentId, operationId, isUpdated = operationDAO.updateOperationStatus(enrolmentId, operationId,
org.wso2.carbon.device.mgt.core.dto.operation.mgt. org.wso2.carbon.device.mgt.core.dto.operation.mgt.
Operation.Status.valueOf(operation.getStatus(). Operation.Status.valueOf(operation.getStatus().
toString())); toString()));
} }
if (operation.getOperationResponse() != null) { if (operation.getOperationResponse() != null) {
operationDAO.addOperationResponse(enrolmentId, operationId, operation.getOperationResponse()); operationDAO.addOperationResponse(enrolmentId, operationId, operation.getOperationResponse());
@ -549,28 +545,7 @@ public class OperationManagerImpl implements OperationManager {
OperationManagementDAOFactory.rollbackTransaction(); OperationManagementDAOFactory.rollbackTransaction();
throw new OperationManagementException( throw new OperationManagementException(
"Error occurred while updating the operation: " + operationId + " status:" + "Error occurred while updating the operation: " + operationId + " status:" +
operation.getStatus(), e); 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);
} catch (TransactionManagementException e) { } catch (TransactionManagementException e) {
throw new OperationManagementException("Error occurred while initiating a transaction", e); throw new OperationManagementException("Error occurred while initiating a transaction", e);
} finally { } finally {
@ -584,56 +559,57 @@ public class OperationManagerImpl implements OperationManager {
Operation operation = null; Operation operation = null;
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("Operation Id: " + operationId + " Device Type: " + deviceId.getType() + " Device Identifier: " + log.debug("Operation Id: " + operationId + " Device Type: " + deviceId.getType() + " Device Identifier: " +
deviceId.getId()); deviceId.getId());
} }
if (!isActionAuthorized(deviceId)) { if (!isActionAuthorized(deviceId)) {
throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" + throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" +
deviceId.getType() + "' device, which carries the identifier '" + deviceId.getType() + "' device, which carries the identifier '" +
deviceId.getId() + "'"); deviceId.getId() + "'");
} }
EnrolmentInfo enrolmentInfo = this.getActiveEnrolmentInfo(deviceId); EnrolmentInfo enrolmentInfo = this.getActiveEnrolmentInfo(deviceId);
if (enrolmentInfo == null) { if (enrolmentInfo == null) {
throw new OperationManagementException("Device not found for given device identifier: " + throw new OperationManagementException("Device not found for given device identifier: " +
deviceId.getId() + " type: " + deviceId.getType()); deviceId.getId() + " type: " + deviceId.getType());
} }
try { try {
OperationManagementDAOFactory.openConnection(); OperationManagementDAOFactory.openConnection();
org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation dtoOperation = operationDAO. org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation deviceSpecificOperation = operationDAO.
getOperationByDeviceAndId(enrolmentInfo.getId(), getOperationByDeviceAndId(enrolmentInfo.getId(),
operationId); operationId);
if (dtoOperation.getType(). 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)) { equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.COMMAND)) {
org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation commandOperation; org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation commandOperation;
commandOperation = commandOperation =
(org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation) commandOperationDAO. (org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation) commandOperationDAO.
getOperation(dtoOperation.getId()); getOperation(deviceSpecificOperation.getId());
dtoOperation.setEnabled(commandOperation.isEnabled()); 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)) { equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.CONFIG)) {
dtoOperation = configOperationDAO.getOperation(dtoOperation.getId()); dtoOperation = configOperationDAO.getOperation(deviceSpecificOperation.getId());
} else if (dtoOperation.getType().equals( } else if (deviceSpecificOperation.getType().equals(
org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.PROFILE)) { org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.PROFILE)) {
dtoOperation = profileOperationDAO.getOperation(dtoOperation.getId()); dtoOperation = profileOperationDAO.getOperation(deviceSpecificOperation.getId());
} else if (dtoOperation.getType().equals( } else if (deviceSpecificOperation.getType().equals(
org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.POLICY)) { 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) { if (dtoOperation == null) {
throw new OperationManagementException("Operation not found for operation Id:" + operationId + 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) { } catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while retrieving the list of " + throw new OperationManagementException("Error occurred while retrieving the list of " +
"operations assigned for '" + deviceId.getType() + "operations assigned for '" + deviceId.getType() +
"' device '" + deviceId.getId() + "'", e); "' device '" + deviceId.getId() + "'", e);
} catch (SQLException e) { } catch (SQLException e) {
throw new OperationManagementException("Error occurred while opening connection to the data source", throw new OperationManagementException("Error occurred while opening connection to the data source",
e); e);
} finally { } finally {
OperationManagementDAOFactory.closeConnection(); OperationManagementDAOFactory.closeConnection();
} }
@ -649,15 +625,15 @@ public class OperationManagerImpl implements OperationManager {
if (!isActionAuthorized(deviceId)) { if (!isActionAuthorized(deviceId)) {
throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" + throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" +
deviceId.getType() + "' device, which carries the identifier '" + deviceId.getType() + "' device, which carries the identifier '" +
deviceId.getId() + "'"); deviceId.getId() + "'");
} }
EnrolmentInfo enrolmentInfo = this.getActiveEnrolmentInfo(deviceId); EnrolmentInfo enrolmentInfo = this.getActiveEnrolmentInfo(deviceId);
if (enrolmentInfo == null) { if (enrolmentInfo == null) {
throw new OperationManagementException( throw new OperationManagementException(
"Device not found for device id:" + deviceId.getId() + " " + "type:" + "Device not found for device id:" + deviceId.getId() + " " + "type:" +
deviceId.getType()); deviceId.getType());
} }
try { try {
@ -667,14 +643,14 @@ public class OperationManagerImpl implements OperationManager {
org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Status.valueOf(status.toString()); org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Status.valueOf(status.toString());
dtoOperationList.addAll(commandOperationDAO.getOperationsByDeviceAndStatus(enrolmentId, dtoOpStatus)); dtoOperationList.addAll(commandOperationDAO.getOperationsByDeviceAndStatus(enrolmentId, dtoOpStatus));
dtoOperationList.addAll(configOperationDAO.getOperationsByDeviceAndStatus(enrolmentId, dtoOperationList.addAll(configOperationDAO.getOperationsByDeviceAndStatus(enrolmentId,
org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation. org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.
Status.PENDING)); Status.PENDING));
dtoOperationList.addAll(profileOperationDAO.getOperationsByDeviceAndStatus(enrolmentId, dtoOperationList.addAll(profileOperationDAO.getOperationsByDeviceAndStatus(enrolmentId,
org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation. org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.
Status.PENDING)); Status.PENDING));
dtoOperationList.addAll(policyOperationDAO.getOperationsByDeviceAndStatus(enrolmentId, dtoOperationList.addAll(policyOperationDAO.getOperationsByDeviceAndStatus(enrolmentId,
org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation. org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.
Status.PENDING)); Status.PENDING));
Operation operation; Operation operation;
@ -685,9 +661,9 @@ public class OperationManagerImpl implements OperationManager {
} catch (OperationManagementDAOException e) { } catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while retrieving the list of " + throw new OperationManagementException("Error occurred while retrieving the list of " +
"operations assigned for '" + deviceId.getType() + "operations assigned for '" + deviceId.getType() +
"' device '" + "' device '" +
deviceId.getId() + "' and status:" + status.toString(), e); deviceId.getId() + "' and status:" + status.toString(), e);
} catch (SQLException e) { } catch (SQLException e) {
throw new OperationManagementException( throw new OperationManagementException(
"Error occurred while opening a connection to the data source", e); "Error occurred while opening a connection to the data source", e);
@ -703,32 +679,32 @@ public class OperationManagerImpl implements OperationManager {
try { try {
OperationManagementDAOFactory.openConnection(); OperationManagementDAOFactory.openConnection();
org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation dtoOperation = operationDAO.getOperation( org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation dtoOperation = operationDAO.getOperation(
operationId); operationId);
if (dtoOperation == null) { if (dtoOperation == null) {
throw new OperationManagementException("Operation not found for given Id:" + operationId); throw new OperationManagementException("Operation not found for given Id:" + operationId);
} }
if (dtoOperation.getType() 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; org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation commandOperation;
commandOperation = commandOperation =
(org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation) commandOperationDAO. (org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation) commandOperationDAO.
getOperation(dtoOperation.getId()); getOperation(dtoOperation.getId());
dtoOperation.setEnabled(commandOperation.isEnabled()); dtoOperation.setEnabled(commandOperation.isEnabled());
} else if (dtoOperation.getType(). } else if (dtoOperation.getType().
equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.CONFIG)) { equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.CONFIG)) {
dtoOperation = configOperationDAO.getOperation(dtoOperation.getId()); dtoOperation = configOperationDAO.getOperation(dtoOperation.getId());
} else if (dtoOperation.getType().equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type. } else if (dtoOperation.getType().equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.
PROFILE)) { PROFILE)) {
dtoOperation = profileOperationDAO.getOperation(dtoOperation.getId()); dtoOperation = profileOperationDAO.getOperation(dtoOperation.getId());
} else if (dtoOperation.getType().equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type. } else if (dtoOperation.getType().equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.
POLICY)) { POLICY)) {
dtoOperation = policyOperationDAO.getOperation(dtoOperation.getId()); dtoOperation = policyOperationDAO.getOperation(dtoOperation.getId());
} }
operation = OperationDAOUtil.convertOperation(dtoOperation); operation = OperationDAOUtil.convertOperation(dtoOperation);
} catch (OperationManagementDAOException e) { } catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while retrieving the operation with operation Id '" + throw new OperationManagementException("Error occurred while retrieving the operation with operation Id '" +
operationId, e); operationId, e);
} catch (SQLException e) { } catch (SQLException e) {
throw new OperationManagementException("Error occurred while opening a connection to the data source", e); throw new OperationManagementException("Error occurred while opening a connection to the data source", e);
} finally { } finally {
@ -737,62 +713,6 @@ public class OperationManagerImpl implements OperationManager {
return operation; 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 @Override
public Activity getOperationByActivityId(String activity) throws OperationManagementException { public Activity getOperationByActivityId(String activity) throws OperationManagementException {
// This parses the operation id from activity id (ex : ACTIVITY_23) and converts to the integer. // 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); throw new OperationManagementException("Error occurred while opening a connection to the data source.", e);
} catch (OperationManagementDAOException e) { } catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while retrieving the operation with activity Id '" + throw new OperationManagementException("Error occurred while retrieving the operation with activity Id '" +
activity, e); activity, e);
} finally { } finally {
OperationManagementDAOFactory.closeConnection(); OperationManagementDAOFactory.closeConnection();
} }
@ -836,11 +756,6 @@ public class OperationManagerImpl implements OperationManager {
} }
} }
@Override
public List<Operation> getOperationUpdatedAfter(long timestamp) throws OperationManagementException {
return null;
}
@Override @Override
public List<Activity> getActivitiesUpdatedAfter(long timestamp) throws OperationManagementException { public List<Activity> getActivitiesUpdatedAfter(long timestamp) throws OperationManagementException {
try { try {
@ -850,7 +765,7 @@ public class OperationManagerImpl implements OperationManager {
throw new OperationManagementException("Error occurred while opening a connection to the data source.", e); throw new OperationManagementException("Error occurred while opening a connection to the data source.", e);
} catch (OperationManagementDAOException e) { } catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while getting the activity list changed after a " + throw new OperationManagementException("Error occurred while getting the activity list changed after a " +
"given time.", e); "given time.", e);
} finally { } finally {
OperationManagementDAOFactory.closeConnection(); 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); throw new OperationManagementException("Error occurred while opening a connection to the data source.", e);
} catch (OperationManagementDAOException e) { } catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while getting the activity list changed after a " + throw new OperationManagementException("Error occurred while getting the activity list changed after a " +
"given time.", e); "given time.", e);
} finally { } finally {
OperationManagementDAOFactory.closeConnection(); 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); throw new OperationManagementException("Error occurred while opening a connection to the data source.", e);
} catch (OperationManagementDAOException e) { } catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while getting the activity count changed after a " + throw new OperationManagementException("Error occurred while getting the activity count changed after a " +
"given time.", e); "given time.", e);
} finally { } finally {
OperationManagementDAOFactory.closeConnection(); 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) { 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; 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; 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; 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 { } else {
return operationDAO; return operationDAO;
} }
@ -966,8 +887,8 @@ public class OperationManagerImpl implements OperationManager {
enrolmentId = deviceDAO.getEnrolmentByStatus(deviceId, status, tenantId); enrolmentId = deviceDAO.getEnrolmentByStatus(deviceId, status, tenantId);
} catch (DeviceManagementDAOException e) { } catch (DeviceManagementDAOException e) {
throw new OperationManagementException("Error occurred while retrieving metadata of '" + throw new OperationManagementException("Error occurred while retrieving metadata of '" +
deviceId.getType() + "' device carrying the identifier '" + deviceId.getType() + "' device carrying the identifier '" +
deviceId.getId() + "'", e); deviceId.getId() + "'", e);
} catch (SQLException e) { } catch (SQLException e) {
throw new OperationManagementException( throw new OperationManagementException(
"Error occurred while opening a connection to the data source", e); "Error occurred while opening a connection to the data source", e);
@ -995,15 +916,15 @@ public class OperationManagerImpl implements OperationManager {
} }
} catch (DeviceManagementDAOException e) { } catch (DeviceManagementDAOException e) {
throw new OperationManagementException("Error occurred while retrieving enrollment data of '" + throw new OperationManagementException("Error occurred while retrieving enrollment data of '" +
deviceId.getType() + "' device carrying the identifier '" + deviceId.getType() + "' device carrying the identifier '" +
deviceId.getId() + "' of owner '" + owner + "'", e); deviceId.getId() + "' of owner '" + owner + "'", e);
} catch (SQLException e) { } catch (SQLException e) {
throw new OperationManagementException( throw new OperationManagementException(
"Error occurred while opening a connection to the data source", e); "Error occurred while opening a connection to the data source", e);
} catch (DeviceAccessAuthorizationException e) { } catch (DeviceAccessAuthorizationException e) {
throw new OperationManagementException("Error occurred while checking the device access permissions for '" + throw new OperationManagementException("Error occurred while checking the device access permissions for '" +
deviceId.getType() + "' device carrying the identifier '" + deviceId.getType() + "' device carrying the identifier '" +
deviceId.getId() + "' of owner '" + owner + "'", e); deviceId.getId() + "' of owner '" + owner + "'", e);
} finally { } finally {
DeviceManagementDAOFactory.closeConnection(); DeviceManagementDAOFactory.closeConnection();
} }
@ -1018,8 +939,8 @@ public class OperationManagerImpl implements OperationManager {
enrolmentInfo = deviceDAO.getActiveEnrolment(deviceId, tenantId); enrolmentInfo = deviceDAO.getActiveEnrolment(deviceId, tenantId);
} catch (DeviceManagementDAOException e) { } catch (DeviceManagementDAOException e) {
throw new OperationManagementException("Error occurred while retrieving enrollment data of '" + throw new OperationManagementException("Error occurred while retrieving enrollment data of '" +
deviceId.getType() + "' device carrying the identifier '" + deviceId.getType() + "' device carrying the identifier '" +
deviceId.getId() + "'", e); deviceId.getId() + "'", e);
} catch (SQLException e) { } catch (SQLException e) {
throw new OperationManagementException( throw new OperationManagementException(
"Error occurred while opening a connection to the data source", e); "Error occurred while opening a connection to the data source", e);
@ -1040,7 +961,7 @@ public class OperationManagerImpl implements OperationManager {
} catch (DeviceManagementDAOException e) { } catch (DeviceManagementDAOException e) {
DeviceManagementDAOFactory.rollbackTransaction(); DeviceManagementDAOFactory.rollbackTransaction();
throw new OperationManagementException("Error occurred while updating enrollment status of device of " + throw new OperationManagementException("Error occurred while updating enrollment status of device of " +
"enrolment-id '" + enrolmentId + "'", e); "enrolment-id '" + enrolmentId + "'", e);
} catch (TransactionManagementException e) { } catch (TransactionManagementException e) {
throw new OperationManagementException("Error occurred while initiating a transaction", e); throw new OperationManagementException("Error occurred while initiating a transaction", e);
} finally { } finally {
@ -1055,7 +976,7 @@ public class OperationManagerImpl implements OperationManager {
List<MonitoringOperation> monitoringOperations = deviceManagementProviderService.getMonitoringOperationList(deviceType);//Get task list from each device type List<MonitoringOperation> 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())) { if (operation.getCode().equals(op.getTaskName())) {
return true; return true;
} }

@ -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_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 { public final class OperationCodes {

@ -33,12 +33,8 @@ public interface OperationDAO {
void updateOperation(Operation operation) throws OperationManagementDAOException; void updateOperation(Operation operation) throws OperationManagementDAOException;
void deleteOperation(int operationId) throws OperationManagementDAOException;
Operation getOperation(int operationId) throws OperationManagementDAOException; Operation getOperation(int operationId) throws OperationManagementDAOException;
Operation getOperationFromEnrollment(int enrollmentOpMappingId) throws OperationManagementDAOException;
Operation getOperationByDeviceAndId(int enrolmentId, int operationId) throws OperationManagementDAOException; Operation getOperationByDeviceAndId(int enrolmentId, int operationId) throws OperationManagementDAOException;
List<? extends Operation> getOperationsByDeviceAndStatus(int enrolmentId, Operation.Status status) List<? extends Operation> getOperationsByDeviceAndStatus(int enrolmentId, Operation.Status status)
@ -66,24 +62,16 @@ public interface OperationDAO {
void addOperationResponse(int enrolmentId, int operationId, Object operationResponse) void addOperationResponse(int enrolmentId, int operationId, Object operationResponse)
throws OperationManagementDAOException; throws OperationManagementDAOException;
List<OperationResponse> getOperationResponses(int enrolmentId, int operationId) throws OperationManagementDAOException;
Activity getActivity(int operationId) throws OperationManagementDAOException; Activity getActivity(int operationId) throws OperationManagementDAOException;
Activity getActivityByDevice(int operationId, int deviceId) throws OperationManagementDAOException; Activity getActivityByDevice(int operationId, int deviceId) throws OperationManagementDAOException;
int getEnrolmentIdFromMappingId(int enrollmentOpMappingId) throws OperationManagementDAOException;
List<Operation> getOperationsUpdatedAfter(long timestamp) throws OperationManagementDAOException;
List<Activity> getActivitiesUpdatedAfter(long timestamp) throws OperationManagementDAOException; List<Activity> getActivitiesUpdatedAfter(long timestamp) throws OperationManagementDAOException;
List<Activity> getActivitiesUpdatedAfter(long timestamp, int limit, int offset) throws OperationManagementDAOException; List<Activity> getActivitiesUpdatedAfter(long timestamp, int limit, int offset) throws OperationManagementDAOException;
int getActivityCountUpdatedAfter(long timestamp) throws OperationManagementDAOException; int getActivityCountUpdatedAfter(long timestamp) throws OperationManagementDAOException;
boolean resetAttemptCount(int enrolmentId) throws OperationManagementDAOException;
/** /**
* This method provides operation mappings for given status * This method provides operation mappings for given status
* @param opStatus Operation status * @param opStatus Operation status

@ -18,6 +18,7 @@
*/ */
package org.wso2.carbon.device.mgt.core.operation.mgt.dao; 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.dto.operation.mgt.Operation;
import org.wso2.carbon.device.mgt.core.operation.mgt.OperationEnrolmentMapping; import org.wso2.carbon.device.mgt.core.operation.mgt.OperationEnrolmentMapping;
import org.wso2.carbon.device.mgt.core.operation.mgt.OperationMapping; import org.wso2.carbon.device.mgt.core.operation.mgt.OperationMapping;

@ -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 { public CommandOperation getOperation(int id) throws OperationManagementDAOException {
PreparedStatement stmt = null; PreparedStatement stmt = null;
ResultSet rs = null; ResultSet rs = null;

@ -58,22 +58,6 @@ public class ConfigOperationDAOImpl extends GenericOperationDAOImpl {
return operationId; 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 @Override
public void updateOperation(Operation operation) throws OperationManagementDAOException { public void updateOperation(Operation operation) throws OperationManagementDAOException {
PreparedStatement stmt = null; PreparedStatement stmt = null;

@ -249,68 +249,6 @@ public class GenericOperationDAOImpl implements OperationDAO {
} }
} }
@Override
public List<OperationResponse> getOperationResponses(int enrolmentId, int operationId) throws
OperationManagementDAOException {
PreparedStatement stmt = null;
ResultSet rs = null;
List<OperationResponse> 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 @Override
public Activity getActivity(int operationId) throws OperationManagementDAOException { public Activity getActivity(int operationId) throws OperationManagementDAOException {
@ -674,80 +612,6 @@ public class GenericOperationDAOImpl implements OperationDAO {
return 0; 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<Operation> getOperationsUpdatedAfter(long timestamp) throws OperationManagementDAOException {
PreparedStatement stmt = null;
ResultSet rs = null;
List<Operation> 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 @Override
public Operation getOperation(int id) throws OperationManagementDAOException { public Operation getOperation(int id) throws OperationManagementDAOException {
PreparedStatement stmt = null; PreparedStatement stmt = null;
@ -783,49 +647,6 @@ public class GenericOperationDAOImpl implements OperationDAO {
return operation; 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 @Override
public Operation getOperationByDeviceAndId(int enrolmentId, int operationId) throws OperationManagementDAOException { public Operation getOperationByDeviceAndId(int enrolmentId, int operationId) throws OperationManagementDAOException {
PreparedStatement stmt = null; PreparedStatement stmt = null;
@ -833,9 +654,9 @@ public class GenericOperationDAOImpl implements OperationDAO {
Operation operation = null; Operation operation = null;
try { try {
Connection conn = OperationManagementDAOFactory.getConnection(); 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.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 " + "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 " + "DM_ENROLMENT_OP_MAPPING dm where dm.OPERATION_ID = ? AND dm.ENROLMENT_ID = ?) om " +
"ON o.ID = om.OPERATION_ID "; "ON o.ID = om.OPERATION_ID ";
@ -850,6 +671,7 @@ public class GenericOperationDAOImpl implements OperationDAO {
operation.setId(rs.getInt("ID")); operation.setId(rs.getInt("ID"));
operation.setType(Operation.Type.valueOf(rs.getString("TYPE"))); operation.setType(Operation.Type.valueOf(rs.getString("TYPE")));
operation.setCreatedTimeStamp(rs.getTimestamp("CREATED_TIMESTAMP").toString()); operation.setCreatedTimeStamp(rs.getTimestamp("CREATED_TIMESTAMP").toString());
operation.setStatus(Operation.Status.valueOf(rs.getString("STATUS")));
// if (rs.getTimestamp("RECEIVED_TIMESTAMP") == null) { // if (rs.getTimestamp("RECEIVED_TIMESTAMP") == null) {
// operation.setReceivedTimeStamp(""); // operation.setReceivedTimeStamp("");
// } else { // } else {
@ -1176,31 +998,6 @@ public class GenericOperationDAOImpl implements OperationDAO {
return operations; 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 @Override
public Map<Integer, List<OperationMapping>> getOperationMappingsByStatus(Operation.Status opStatus, Operation.PushNotificationStatus pushNotificationStatus, public Map<Integer, List<OperationMapping>> getOperationMappingsByStatus(Operation.Status opStatus, Operation.PushNotificationStatus pushNotificationStatus,
int limit) throws OperationManagementDAOException { int limit) throws OperationManagementDAOException {

@ -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 @Override
public Operation getOperation(int operationId) throws OperationManagementDAOException { public Operation getOperation(int operationId) throws OperationManagementDAOException {
PreparedStatement stmt = null; PreparedStatement stmt = null;

@ -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 { public Operation getOperation(int id) throws OperationManagementDAOException {
PreparedStatement stmt = null; PreparedStatement stmt = null;
ResultSet rs = null; ResultSet rs = 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<DeviceIdentifier> 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<Operation> getOperationUpdatedAfter(long timestamp) throws OperationManagementException {
return this.operationManager.getOperationUpdatedAfter(timestamp);
}
@Override
public List<Activity> getActivitiesUpdatedAfter(long timestamp) throws OperationManagementException {
return this.operationManager.getActivitiesUpdatedAfter(timestamp);
}
@Override
public List<Activity> 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;
}
}

@ -553,8 +553,6 @@ public interface DeviceManagementProviderService {
void updateOperation(DeviceIdentifier deviceId, Operation operation) throws OperationManagementException; void updateOperation(DeviceIdentifier deviceId, Operation operation) throws OperationManagementException;
void deleteOperation(String type, int operationId) throws OperationManagementException;
Operation getOperationByDeviceAndOperationId(DeviceIdentifier deviceId, int operationId) Operation getOperationByDeviceAndOperationId(DeviceIdentifier deviceId, int operationId)
throws OperationManagementException; throws OperationManagementException;

@ -1429,11 +1429,6 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
.updateOperation(deviceId, operation); .updateOperation(deviceId, operation);
} }
@Override
public void deleteOperation(String type, int operationId) throws OperationManagementException {
pluginRepository.getOperationManager(type, this.getTenantId()).deleteOperation(operationId);
}
@Override @Override
public Operation getOperationByDeviceAndOperationId(DeviceIdentifier deviceId, public Operation getOperationByDeviceAndOperationId(DeviceIdentifier deviceId,
int operationId) throws OperationManagementException { int operationId) throws OperationManagementException {

@ -18,8 +18,6 @@
package org.wso2.carbon.device.mgt.core.operation; 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.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; 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.Operation;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; 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.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.TestDeviceManagementService;
import org.wso2.carbon.device.mgt.core.authorization.DeviceAccessAuthorizationServiceImpl; 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.common.TestDataHolder;
import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager; import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager;
import org.wso2.carbon.device.mgt.core.internal.DeviceManagementDataHolder; 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 org.wso2.carbon.utils.multitenancy.MultitenantConstants;
import java.io.InputStream; import java.io.InputStream;
import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; 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_TYPE = "OP_TEST_TYPE";
private static final String DEVICE_ID_PREFIX = "OP-TEST-DEVICE-ID-"; private static final String DEVICE_ID_PREFIX = "OP-TEST-DEVICE-ID-";
@ -80,11 +83,11 @@ public class OperationManagementTests{
private List<DeviceIdentifier> deviceIds = new ArrayList<>(); private List<DeviceIdentifier> deviceIds = new ArrayList<>();
private OperationManager operationMgtService; private OperationManager operationMgtService;
private Activity commandActivity;
@BeforeClass @BeforeClass
public void init() throws Exception { public void init() throws Exception {
DeviceConfigurationManager.getInstance().initConfig(); DeviceConfigurationManager.getInstance().initConfig();
log.info("Initializing");
for (int i = 0; i < NO_OF_DEVICES; i++) { for (int i = 0; i < NO_OF_DEVICES; i++) {
deviceIds.add(new DeviceIdentifier(DEVICE_ID_PREFIX + i, DEVICE_TYPE)); 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!"); 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 { private RegistryService getRegistryService() throws RegistryException {
@ -122,30 +126,57 @@ public class OperationManagementTests{
@Test @Test
public void addCommandOperation() throws DeviceManagementException, OperationManagementException, InvalidDeviceException { 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); 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<DeviceIdentifier> 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") @Test(dependsOnMethods = "addCommandOperation")
public void addPolicyOperation() throws DeviceManagementException, OperationManagementException, InvalidDeviceException { public void addPolicyOperation() throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
Activity activity = this.operationMgtService.addOperation(getOperation(new PolicyOperation(), Operation.Type.POLICY, POLICY_OPERATION_CODE), Activity activity = this.operationMgtService.addOperation(getOperation(new PolicyOperation(), Operation.Type.POLICY, POLICY_OPERATION_CODE),
this.deviceIds); this.deviceIds);
validateOperationResponse(activity); validateOperationResponse(activity, ActivityStatus.Status.PENDING);
} }
@Test(dependsOnMethods = "addPolicyOperation") @Test(dependsOnMethods = "addPolicyOperation")
public void addConfigOperation() throws DeviceManagementException, OperationManagementException, InvalidDeviceException { public void addConfigOperation() throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
Activity activity = this.operationMgtService.addOperation(getOperation(new ConfigOperation(), Operation.Type.CONFIG, CONFIG_OPERATION_CODE), Activity activity = this.operationMgtService.addOperation(getOperation(new ConfigOperation(), Operation.Type.CONFIG, CONFIG_OPERATION_CODE),
this.deviceIds); this.deviceIds);
validateOperationResponse(activity); validateOperationResponse(activity, ActivityStatus.Status.PENDING);
} }
@Test(dependsOnMethods = "addConfigOperation") @Test(dependsOnMethods = "addConfigOperation")
public void addProfileOperation() throws DeviceManagementException, OperationManagementException, InvalidDeviceException { public void addProfileOperation() throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
Activity activity = this.operationMgtService.addOperation(getOperation(new ProfileOperation(), Operation.Type.PROFILE, PROFILE_OPERATION_CODE), Activity activity = this.operationMgtService.addOperation(getOperation(new ProfileOperation(), Operation.Type.PROFILE, PROFILE_OPERATION_CODE),
this.deviceIds); this.deviceIds);
validateOperationResponse(activity); validateOperationResponse(activity, ActivityStatus.Status.PENDING);
} }
private Operation getOperation(Operation operation, Operation.Type type, String code) { private Operation getOperation(Operation operation, Operation.Type type, String code) {
@ -156,11 +187,11 @@ public class OperationManagementTests{
return operation; 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 - " + Assert.assertEquals(activity.getActivityStatus().size(), NO_OF_DEVICES, "The operation reponse for add operation only have - " +
activity.getActivityStatus().size()); activity.getActivityStatus().size());
for (ActivityStatus status : activity.getActivityStatus()) { 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 { try {
this.operationMgtService.getOperations(deviceIdentifier, request); this.operationMgtService.getOperations(deviceIdentifier, request);
} catch (OperationManagementException ex) { } catch (OperationManagementException ex) {
if (ex.getMessage() == null){ if (ex.getMessage() == null) {
Assert.assertTrue(ex.getMessage().contains("User '" + NON_ADMIN_USER + "' is not authorized")); Assert.assertTrue(ex.getMessage().contains("User '" + NON_ADMIN_USER + "' is not authorized"));
} }
} }
@ -219,9 +250,14 @@ public class OperationManagementTests{
@Test(dependsOnMethods = "getPaginatedRequestAsAdmin") @Test(dependsOnMethods = "getPaginatedRequestAsAdmin")
public void updateOperation() throws OperationManagementException { 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); DeviceIdentifier deviceIdentifier = this.deviceIds.get(0);
List operations = this.operationMgtService.getPendingOperations(deviceIdentifier); 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 operation = (Operation) operations.get(0);
operation.setStatus(Operation.Status.COMPLETED); operation.setStatus(Operation.Status.COMPLETED);
operation.setOperationResponse("The operation is successfully completed"); operation.setOperationResponse("The operation is successfully completed");
@ -229,4 +265,110 @@ public class OperationManagementTests{
List pendingOperations = this.operationMgtService.getPendingOperations(deviceIdentifier); List pendingOperations = this.operationMgtService.getPendingOperations(deviceIdentifier);
Assert.assertEquals(pendingOperations.size(), 3); 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<Activity> 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<Activity> 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);
}
} }

@ -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;
}
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -3,13 +3,13 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-feature</artifactId> <artifactId>device-mgt-feature</artifactId>
<version>3.0.115-SNAPSHOT</version> <version>3.0.116-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.analytics.dashboard.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.analytics.dashboard.feature</artifactId>
<version>3.0.115-SNAPSHOT</version> <version>3.0.116-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Device Management Dashboard Analytics Feature</name> <name>WSO2 Carbon - Device Management Dashboard Analytics Feature</name>
<description>WSO2 Carbon - Device Management Dashboard Analytics Feature</description> <description>WSO2 Carbon - Device Management Dashboard Analytics Feature</description>

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

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

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

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

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

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

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

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

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

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

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

@ -23,14 +23,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>oauth-extensions-feature</artifactId> <artifactId>oauth-extensions-feature</artifactId>
<version>3.0.115-SNAPSHOT</version> <version>3.0.116-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.oauth.extensions.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.oauth.extensions.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.115-SNAPSHOT</version> <version>3.0.116-SNAPSHOT</version>
<name>WSO2 Carbon - Device Mgt OAuth Extensions Feature</name> <name>WSO2 Carbon - Device Mgt OAuth Extensions Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains devicemgt related OAuth extensions</description> <description>This feature contains devicemgt related OAuth extensions</description>

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

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

@ -23,14 +23,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.0.115-SNAPSHOT</version> <version>3.0.116-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt-feature</artifactId> <artifactId>policy-mgt-feature</artifactId>
<version>3.0.115-SNAPSHOT</version> <version>3.0.116-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Policy Management Feature</name> <name>WSO2 Carbon - Policy Management Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

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

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

@ -23,7 +23,7 @@
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.115-SNAPSHOT</version> <version>3.0.116-SNAPSHOT</version>
<name>WSO2 Carbon - Device Management - Parent</name> <name>WSO2 Carbon - Device Management - Parent</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>WSO2 Connected Device Manager Components</description> <description>WSO2 Connected Device Manager Components</description>
@ -1833,7 +1833,7 @@
<axiom.wso2.version>1.2.11.wso2v10</axiom.wso2.version> <axiom.wso2.version>1.2.11.wso2v10</axiom.wso2.version>
<!-- Carbon Device Management --> <!-- Carbon Device Management -->
<carbon.device.mgt.version>3.0.115-SNAPSHOT</carbon.device.mgt.version> <carbon.device.mgt.version>3.0.116-SNAPSHOT</carbon.device.mgt.version>
<!-- Carbon Commons --> <!-- Carbon Commons -->
<carbon.commons.version>4.4.8</carbon.commons.version> <carbon.commons.version>4.4.8</carbon.commons.version>

Loading…
Cancel
Save