mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Add set control based on operation information
This commit is contained in:
parent
bd477c348f
commit
fbe3ffe7ef
@ -22,7 +22,11 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationResponse;
|
||||
import org.wso2.carbon.device.mgt.core.DeviceManagementConstants;
|
||||
import org.wso2.carbon.device.mgt.core.dto.operation.mgt.*;
|
||||
import org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation;
|
||||
import org.wso2.carbon.device.mgt.core.dto.operation.mgt.ConfigOperation;
|
||||
import org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation;
|
||||
import org.wso2.carbon.device.mgt.core.dto.operation.mgt.PolicyOperation;
|
||||
import org.wso2.carbon.device.mgt.core.dto.operation.mgt.ProfileOperation;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
@ -32,6 +36,7 @@ import java.sql.SQLException;
|
||||
|
||||
public class OperationDAOUtil {
|
||||
private static final Log log = LogFactory.getLog(OperationDAOUtil.class);
|
||||
|
||||
public static Operation convertOperation(org.wso2.carbon.device.mgt.common.operation.mgt.Operation operation) {
|
||||
|
||||
Operation dtoOperation = null;
|
||||
@ -70,6 +75,10 @@ public class OperationDAOUtil {
|
||||
dtoOperation.setReceivedTimeStamp(operation.getReceivedTimeStamp());
|
||||
dtoOperation.setProperties(operation.getProperties());
|
||||
|
||||
if (operation.getControl() != null) {
|
||||
dtoOperation.setControl(Operation.Control.valueOf(operation.getControl().toString()));
|
||||
}
|
||||
|
||||
return dtoOperation;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user