From 25a8f60d7400a6cce2664a5db3d22792669bf569 Mon Sep 17 00:00:00 2001 From: manoj Date: Wed, 15 Jul 2015 12:11:00 +0530 Subject: [PATCH] Retuen int for operations --- .../device/mgt/common/operation/mgt/OperationManager.java | 2 +- .../device/mgt/core/operation/mgt/OperationManagerImpl.java | 4 ++-- .../mgt/core/service/DeviceManagementProviderServiceImpl.java | 2 +- 3 files changed, 4 insertions(+), 4 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 c14f0e0e21..e953e2f1bd 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 @@ -36,7 +36,7 @@ public interface OperationManager { * @throws OperationManagementException If some unusual behaviour is observed while adding the * operation */ - public boolean addOperation(Operation operation, List devices) throws OperationManagementException; + public int addOperation(Operation operation, List devices) throws OperationManagementException; /** * Method to retrieve the list of all operations to a device. 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 da551394e3..99116a4728 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 @@ -74,7 +74,7 @@ public class OperationManagerImpl implements OperationManager { } @Override - public boolean addOperation(Operation operation, + public int addOperation(Operation operation, List deviceIds) throws OperationManagementException { if (log.isDebugEnabled()) { @@ -105,7 +105,7 @@ public class OperationManagerImpl implements OperationManager { } } OperationManagementDAOFactory.commitTransaction(); - return true; + return operationId; } catch (OperationManagementDAOException e) { try { OperationManagementDAOFactory.rollbackTransaction(); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java index dba0685429..f5826d9cdf 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java @@ -495,7 +495,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv } @Override - public boolean addOperation(Operation operation, List devices) throws + public int addOperation(Operation operation, List devices) throws OperationManagementException { return DeviceManagementDataHolder.getInstance().getOperationManager().addOperation(operation, devices); }