From 301a7e7009bd69a8303290bc69b5f005ed181fcf Mon Sep 17 00:00:00 2001 From: shamalka Date: Thu, 16 Dec 2021 01:08:50 +0530 Subject: [PATCH] Add additional attributes to policy UI beans --- .../carbon/device/mgt/common/policy/mgt/ui/Column.java | 10 ++++++++++ .../carbon/device/mgt/common/policy/mgt/ui/Item.java | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/policy/mgt/ui/Column.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/policy/mgt/ui/Column.java index 4ecdb313ae..34e8bc1c86 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/policy/mgt/ui/Column.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/policy/mgt/ui/Column.java @@ -32,6 +32,7 @@ public class Column { private Input input; private Upload upload; private Checkbox checkbox; + private boolean isRequired; @XmlAttribute(name = "name", required = true) public String getName() { return name; } @@ -96,4 +97,13 @@ public class Column { public void setCheckbox(Checkbox checkbox) { this.checkbox = checkbox; } + + @XmlElement(name = "RequiredItem") + public boolean isRequired() { + return isRequired; + } + + public void setRequired(boolean required) { + isRequired = required; + } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/policy/mgt/ui/Item.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/policy/mgt/ui/Item.java index 43927eb876..aac25bc0d2 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/policy/mgt/ui/Item.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/policy/mgt/ui/Item.java @@ -31,6 +31,7 @@ public class Item { private String key; private String value; private boolean isRequired; + private boolean isNoneEmptyTable; private String subTitle; private List conditions; private Checkbox checkbox; @@ -103,6 +104,15 @@ public class Item { isRequired = required; } + @XmlElement(name = "NoneEmptyTable") + public boolean isNoneEmptyTable() { + return isNoneEmptyTable; + } + + public void setNoneEmptyTable(boolean noneEmptyTable) { + isNoneEmptyTable = noneEmptyTable; + } + @XmlElement(name = "SubTitle") public String getSubTitle() { return subTitle; }