From 0e598aad599b7bc329ac3225827b4e0f90549b6c Mon Sep 17 00:00:00 2001 From: prabathabey Date: Fri, 20 Mar 2015 13:49:37 +0530 Subject: [PATCH] Improving operation management implementation --- .../java/org/wso2/carbon/device/mgt/common/Feature.java | 9 +++++++++ .../mgt/common/operation/mgt/OperationManager.java | 2 ++ .../mgt/core/DeviceManagementServiceProviderImpl.java | 5 +++++ .../mgt/core/operation/mgt/OperationManagerImpl.java | 5 +++++ .../mgt/core/service/DeviceManagementServiceImpl.java | 5 +++++ 5 files changed, 26 insertions(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/Feature.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/Feature.java index 935539620a9..050dff0bcba 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/Feature.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/Feature.java @@ -22,6 +22,7 @@ import java.util.List; public class Feature { private int id; + private String code; private String name; private String description; private String deviceType; @@ -35,6 +36,14 @@ public class Feature { this.id = id; } + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + public String getName() { return name; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java index a804eaa5148..51a7e0ee1ea 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java @@ -56,4 +56,6 @@ public interface OperationManager { */ public List getPendingOperations(DeviceIdentifier deviceId) throws OperationManagementException; + public Operation getPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException; + } \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementServiceProviderImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementServiceProviderImpl.java index 7cabd1002b6..4623d37a122 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementServiceProviderImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementServiceProviderImpl.java @@ -247,4 +247,9 @@ public class DeviceManagementServiceProviderImpl implements DeviceManagementServ return operationManager.getPendingOperations(deviceId); } + @Override + public Operation getPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException { + return null; + } + } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java index 398cd8f1316..63f7b16200f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java @@ -85,6 +85,11 @@ public class OperationManagerImpl implements OperationManager { return null; } + @Override + public Operation getPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException { + return null; + } + private OperationDAO lookupOperationDAO(Operation operation) { if (operation instanceof CommandOperation) { return commandOperationDAO; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementServiceImpl.java index 6cbe38b6eb8..40a11815482 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementServiceImpl.java @@ -127,4 +127,9 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().getPendingOperations(deviceId); } + @Override + public Operation getPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException { + return null; + } + }