From 103a83d4255eace2b20252640ab4384facb23c4b Mon Sep 17 00:00:00 2001 From: prabathabey Date: Fri, 27 Mar 2015 13:24:20 +0530 Subject: [PATCH] Adding the remaining interface methods that are required to support the complete set of operation management related tasks --- .../device/mgt/common/operation/mgt/OperationManager.java | 7 ++++--- .../mgt/core/DeviceManagementServiceProviderImpl.java | 2 +- .../mgt/core/operation/mgt/OperationManagerImpl.java | 3 ++- .../device/mgt/core/operation/mgt/dao/OperationDAO.java | 2 ++ .../operation/mgt/dao/impl/CommandOperationDAOImpl.java | 5 +++++ .../operation/mgt/dao/impl/ConfigOperationDAOImpl.java | 5 +++++ .../operation/mgt/dao/impl/SimpleOperationDAOImpl.java | 5 +++++ .../mgt/core/service/DeviceManagementServiceImpl.java | 2 +- 8 files changed, 25 insertions(+), 6 deletions(-) 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 884681fd625..ba36f1eb6c7 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 @@ -55,8 +55,9 @@ public interface OperationManager { */ public List getPendingOperations(DeviceIdentifier deviceId) throws OperationManagementException; - public Operation getPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException; + public Operation getNextPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException; + + public Operation updateOperation(Long operationId, DeviceIdentifier deviceIdentifier, + String payLoad) throws OperationManagementException; - public Operation updateOperation(Long operationId, DeviceIdentifier deviceIdentifier, String payLoad) - 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 4c1b60cd38b..65508d0fa44 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 @@ -356,7 +356,7 @@ public class DeviceManagementServiceProviderImpl implements DeviceManagementServ } @Override - public Operation getPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException { + public Operation getNextPendingOperation(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 ec0b99a55a0..08ab0c6d9e5 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 @@ -99,7 +99,7 @@ public class OperationManagerImpl implements OperationManager { } @Override - public Operation getPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException { + public Operation getNextPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException { return null; } @@ -118,4 +118,5 @@ public class OperationManagerImpl implements OperationManager { return simpleOperationDAO; } } + } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/OperationDAO.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/OperationDAO.java index e834c756f98..597962d19e2 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/OperationDAO.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/OperationDAO.java @@ -34,4 +34,6 @@ public interface OperationDAO { List getOperations() throws OperationManagementDAOException; + List getOperations(String status) throws OperationManagementDAOException; + } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/CommandOperationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/CommandOperationDAOImpl.java index c892315d034..6a004fe914c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/CommandOperationDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/CommandOperationDAOImpl.java @@ -74,4 +74,9 @@ public class CommandOperationDAOImpl extends AbstractOperationDAO { return null; } + @Override + public List getOperations(String status) throws OperationManagementDAOException { + 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/dao/impl/ConfigOperationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ConfigOperationDAOImpl.java index 2a7e71f424a..e95ef93ef75 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ConfigOperationDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ConfigOperationDAOImpl.java @@ -52,4 +52,9 @@ public class ConfigOperationDAOImpl extends AbstractOperationDAO { return null; } + @Override + public List getOperations(String status) throws OperationManagementDAOException { + 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/dao/impl/SimpleOperationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/SimpleOperationDAOImpl.java index 09f53bb3b56..f9a11f04aef 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/SimpleOperationDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/SimpleOperationDAOImpl.java @@ -46,4 +46,9 @@ public class SimpleOperationDAOImpl extends AbstractOperationDAO { return null; } + @Override + public List getOperations(String status) throws OperationManagementDAOException { + return null; + } + } 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 15bdeaa59ff..fc2da462a68 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 @@ -131,7 +131,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { } @Override - public Operation getPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException { + public Operation getNextPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException { return null; }