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