mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Refactored OperationMgr code
This commit is contained in:
parent
675843d7f7
commit
551d77bd62
@ -415,31 +415,24 @@ public class OperationManagerImpl implements OperationManager {
|
||||
|
||||
try {
|
||||
OperationManagementDAOFactory.openConnection();
|
||||
org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation dtoOperation = operationDAO.
|
||||
getNextOperation(
|
||||
enrolmentId);
|
||||
org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation dtoOperation = operationDAO.getNextOperation(
|
||||
enrolmentId);
|
||||
if (dtoOperation != null) {
|
||||
if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.COMMAND.
|
||||
equals(dtoOperation
|
||||
.getType())) {
|
||||
if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.COMMAND.equals(dtoOperation.getType()
|
||||
)) {
|
||||
org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation commandOperation;
|
||||
commandOperation =
|
||||
(org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation) commandOperationDAO.
|
||||
getOperation(
|
||||
dtoOperation
|
||||
.getId());
|
||||
getOperation(dtoOperation.getId());
|
||||
dtoOperation.setEnabled(commandOperation.isEnabled());
|
||||
} else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.CONFIG.
|
||||
equals(dtoOperation
|
||||
.getType())) {
|
||||
} else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.CONFIG.equals(dtoOperation.
|
||||
getType())) {
|
||||
dtoOperation = configOperationDAO.getOperation(dtoOperation.getId());
|
||||
} else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.PROFILE.
|
||||
equals(dtoOperation
|
||||
.getType())) {
|
||||
} else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.PROFILE.equals(dtoOperation.
|
||||
getType())) {
|
||||
dtoOperation = profileOperationDAO.getOperation(dtoOperation.getId());
|
||||
} else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.POLICY.
|
||||
equals(dtoOperation
|
||||
.getType())) {
|
||||
} else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.POLICY.equals(dtoOperation.
|
||||
getType())) {
|
||||
dtoOperation = policyOperationDAO.getOperation(dtoOperation.getId());
|
||||
}
|
||||
operation = OperationDAOUtil.convertOperation(dtoOperation);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user