|
|
@ -143,6 +143,9 @@ public class OperationManagerImpl implements OperationManager {
|
|
|
|
public Operation getNextPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException {
|
|
|
|
public Operation getNextPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
Operation operation = operationDAO.getNextOperation(deviceId);
|
|
|
|
Operation operation = operationDAO.getNextOperation(deviceId);
|
|
|
|
|
|
|
|
if (operation instanceof ProfileOperation){
|
|
|
|
|
|
|
|
operation = profileOperationDAO.getNextOperation(deviceId);
|
|
|
|
|
|
|
|
}
|
|
|
|
return operation;
|
|
|
|
return operation;
|
|
|
|
} catch (OperationManagementDAOException e) {
|
|
|
|
} catch (OperationManagementDAOException e) {
|
|
|
|
throw new OperationManagementException("Error occurred while retrieving next pending operation", e);
|
|
|
|
throw new OperationManagementException("Error occurred while retrieving next pending operation", e);
|
|
|
@ -152,8 +155,8 @@ public class OperationManagerImpl implements OperationManager {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void updateOperation(int operationId, Operation.Status operationStatus)
|
|
|
|
public void updateOperation(int operationId, Operation.Status operationStatus)
|
|
|
|
throws OperationManagementException {
|
|
|
|
throws OperationManagementException {
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
Operation operation = operationDAO.getOperation(operationId);
|
|
|
|
Operation operation = operationDAO.getOperation(operationId);
|
|
|
|
operation.setStatus(operationStatus);
|
|
|
|
operation.setStatus(operationStatus);
|
|
|
|
OperationManagementDAOFactory.beginTransaction();
|
|
|
|
OperationManagementDAOFactory.beginTransaction();
|
|
|
|