Merge pull request #6 from milanperera/master

Fixed a bug in add operation function
revert-70aa11f8
kasundananjaya 10 years ago
commit 2c1178011b

@ -20,6 +20,7 @@ package org.wso2.carbon.device.mgt.core.operation.mgt;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -39,7 +40,7 @@ public class ConfigOperation extends Operation {
properties.add(new Property(name, value, type)); properties.add(new Property(name, value, type));
} }
public class Property { public class Property implements Serializable {
private String name; private String name;
private Object value; private Object value;
private Class<?> type; private Class<?> type;

@ -76,6 +76,8 @@ public class OperationManagerImpl implements OperationManager {
OperationManagementDAOFactory.beginTransaction(); OperationManagementDAOFactory.beginTransaction();
org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation operationDto = org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation operationDto =
OperationDAOUtil.convertOperation(operation); OperationDAOUtil.convertOperation(operation);
operationDto.setStatus(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Status.PENDING);
int operationId = this.lookupOperationDAO(operation).addOperation(operationDto); int operationId = this.lookupOperationDAO(operation).addOperation(operationDto);
org.wso2.carbon.device.mgt.common.Device device; org.wso2.carbon.device.mgt.common.Device device;

Loading…
Cancel
Save