From bee82d40e2b5a9b4a07322c0313b9e23f2191760 Mon Sep 17 00:00:00 2001 From: manoj Date: Thu, 26 Mar 2015 22:28:14 +0530 Subject: [PATCH] Add payload parameter to update operation --- .../mgt/common/operation/mgt/Operation.java | 19 +++++++++++++++++++ .../operation/mgt/OperationManager.java | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/Operation.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/Operation.java index edbdee5cb5f..bc7507f7a83 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/Operation.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/Operation.java @@ -28,11 +28,16 @@ public class Operation { public enum Type { CONFIG, MESSAGE, INFO, COMMAND } + public enum OperationStatuses { + INPROGRES,PENDING,COMPLETED,ERROR + } private String code; private Properties properties; private Type type; private Long operationId; + private String payLoad; + private OperationStatuses operationStates; @XmlElement public String getCode() { @@ -69,5 +74,19 @@ public class Operation { this.operationId = operationId; } + public String getPayLoad() { + return payLoad; + } + + public void setPayLoad(String payLoad) { + this.payLoad = payLoad; + } + public OperationStatuses getOperationStates() { + return operationStates; + } + + public void setOperationStates(OperationStatuses operationStates) { + this.operationStates = operationStates; + } } \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java index df39d007478..884681fd625 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java @@ -57,6 +57,6 @@ public interface OperationManager { public Operation getPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException; - public Operation updateOperation(Long operationId, DeviceIdentifier deviceIdentifier, String responsePayLoad) + public Operation updateOperation(Long operationId, DeviceIdentifier deviceIdentifier, String payLoad) throws OperationManagementException; } \ No newline at end of file