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