From a6c1a86f97d92a9462a46d761468b5527e5c4895 Mon Sep 17 00:00:00 2001 From: Kaveesha Date: Mon, 20 Apr 2020 14:46:42 +0530 Subject: [PATCH] Add New Classes to get RadioGroup and NotificationList --- .../device/mgt/common/policy/mgt/ui/Item.java | 22 ++++++++--- .../policy/mgt/ui/NotificationList.java | 37 ++++++++++++++++++ .../mgt/common/policy/mgt/ui/RadioGroup.java | 38 +++++++++++++++++++ 3 files changed, 91 insertions(+), 6 deletions(-) create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/policy/mgt/ui/NotificationList.java create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/policy/mgt/ui/RadioGroup.java 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 eccd9717cf7..fd905ff0af3 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 @@ -30,12 +30,13 @@ public class Item { private boolean isRequired; private String subTitle; private ConditionList conditionList; - private Notification notification; private Checkbox checkbox; private Select select; private Input input; private TimeSelector timeSelector; private Table table; + private RadioGroup radioGroup; + private NotificationList notificationList; @XmlElement(name = "Label") public String getLabel() { @@ -92,11 +93,6 @@ public class Item { public void setConditionList(ConditionList conditionList) { this.conditionList = conditionList; } - @XmlElement(name = "Notification") - public Notification getNotification() { return notification; } - - public void setNotification(Notification notification) { this.notification = notification; } - @XmlElement(name = "Checkbox") public Checkbox getCheckbox() { return checkbox; @@ -133,4 +129,18 @@ public class Item { public Table getTable() { return table; } public void setTable(Table table) { this.table = table; } + + @XmlElement(name = "RadioGroup") + public RadioGroup getRadioGroup() { + return radioGroup; + } + + public void setRadioGroup(RadioGroup radioGroup) { + this.radioGroup = radioGroup; + } + + @XmlElement(name = "NotificationList") + public NotificationList getNotificationList() { return notificationList; } + + public void setNotificationList(NotificationList notificationList) { this.notificationList = notificationList; } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/policy/mgt/ui/NotificationList.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/policy/mgt/ui/NotificationList.java new file mode 100644 index 00000000000..cc63fe4a406 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/policy/mgt/ui/NotificationList.java @@ -0,0 +1,37 @@ +/* Copyright (c) 2020, Entgra (Pvt) Ltd. (http://www.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.common.policy.mgt.ui; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import java.util.List; + +@XmlRootElement(name = "NotificationList") +public class NotificationList { + + List notification; + + @XmlElement(name = "Notification") + public List getConditions() { + return notification; + } + + public void setConditions(List notification) { + this.notification = notification; + } +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/policy/mgt/ui/RadioGroup.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/policy/mgt/ui/RadioGroup.java new file mode 100644 index 00000000000..fac9d855253 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/policy/mgt/ui/RadioGroup.java @@ -0,0 +1,38 @@ +/* Copyright (c) 2020, Entgra (Pvt) Ltd. (http://www.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.common.policy.mgt.ui; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import java.util.List; + +@XmlRootElement(name = "RadioGroup") +public class RadioGroup { + private List