Retuen int for operations

revert-70aa11f8
manoj 10 years ago
parent 27279426f0
commit 25a8f60d74

@ -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<DeviceIdentifier> devices) throws OperationManagementException;
public int addOperation(Operation operation, List<DeviceIdentifier> devices) throws OperationManagementException;
/**
* Method to retrieve the list of all operations to a device.

@ -74,7 +74,7 @@ public class OperationManagerImpl implements OperationManager {
}
@Override
public boolean addOperation(Operation operation,
public int addOperation(Operation operation,
List<DeviceIdentifier> 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();

@ -495,7 +495,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
}
@Override
public boolean addOperation(Operation operation, List<DeviceIdentifier> devices) throws
public int addOperation(Operation operation, List<DeviceIdentifier> devices) throws
OperationManagementException {
return DeviceManagementDataHolder.getInstance().getOperationManager().addOperation(operation, devices);
}

Loading…
Cancel
Save