From bb1a3f6230267bfd840a1f933c73ea9f884b96ba Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Thu, 17 Oct 2019 13:34:14 +0530 Subject: [PATCH] Add correctiveAction to policy wrapper bean class --- .../device/mgt/jaxrs/beans/PolicyWrapper.java | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/PolicyWrapper.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/PolicyWrapper.java index a5306c825f..92e07aeab1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/PolicyWrapper.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/PolicyWrapper.java @@ -14,6 +14,23 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. + * + * + * Copyright (c) 2019, Entgra (Pvt) Ltd. (http://entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.wso2.carbon.device.mgt.jaxrs.beans; @@ -21,6 +38,7 @@ package org.wso2.carbon.device.mgt.jaxrs.beans; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; +import org.wso2.carbon.device.mgt.common.policy.mgt.CorrectiveAction; import org.wso2.carbon.device.mgt.common.policy.mgt.DeviceGroupWrapper; import javax.validation.constraints.NotNull; @@ -108,6 +126,12 @@ public class PolicyWrapper { @NotNull private String policyType; + @ApiModelProperty( + name = "correctiveActions", + value = "List of corrective actions to be applied when the policy is violated" + ) + private List correctiveActions; + public String getPolicyType() { return policyType; } @@ -196,4 +220,11 @@ public class PolicyWrapper { this.deviceGroups = deviceGroups; } + public List getCorrectiveActions() { + return correctiveActions; + } + + public void setCorrectiveActions(List correctiveActions) { + this.correctiveActions = correctiveActions; + } }