Merge branch 'master' into 'master'

Update policy UI bean classes to get table element in policy-UI

See merge request entgra/carbon-device-mgt!526
4.x.x
Dharmakeerthi Lasantha 5 years ago
commit ebbae0a6eb

@ -18,6 +18,7 @@
package org.wso2.carbon.device.mgt.common.policy.mgt.ui; package org.wso2.carbon.device.mgt.common.policy.mgt.ui;
import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "Column") @XmlRootElement(name = "Column")
@ -25,6 +26,10 @@ public class Column {
private String name; private String name;
private String valueType; private String valueType;
private String key;
private String value;
private Select select;
private Input input;
@XmlAttribute(name = "name", required = true) @XmlAttribute(name = "name", required = true)
public String getName() { return name; } public String getName() { return name; }
@ -35,4 +40,40 @@ public class Column {
public String getValueType() { return valueType; } public String getValueType() { return valueType; }
public void setValueType(String valueType) { this.valueType = valueType; } public void setValueType(String valueType) { this.valueType = valueType; }
@XmlElement(name = "Key")
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
@XmlElement(name = "Value")
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
@XmlElement(name = "Select")
public Select getSelect() {
return select;
}
public void setSelect(Select select) {
this.select = select;
}
@XmlElement(name = "Input")
public Input getInput() {
return input;
}
public void setInput(Input input) {
this.input = input;
}
} }

@ -0,0 +1,31 @@
/* 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.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "RowValidation")
public class RowValidation {
private String functionName;
@XmlAttribute(name = "functionName", required = true)
public String getName() { return functionName; }
public void setName(String functionName) { this.functionName = functionName; }
}

@ -26,10 +26,24 @@ import java.util.List;
public class Table { public class Table {
List<Column> columns; List<Column> columns;
TableValidation tableValidation;
RowValidation rowValidation;
@XmlElementWrapper(name = "Columns") @XmlElementWrapper(name = "Columns")
@XmlElement(name = "Column") @XmlElement(name = "Column")
public List<Column> getColumns() { return columns; } public List<Column> getColumns() { return columns; }
public void setColumns(List<Column> columns) { this.columns = columns; } public void setColumns(List<Column> columns) { this.columns = columns; }
@XmlElement(name = "TableValidation")
public TableValidation getTableValidation() { return tableValidation; }
public void setTableValidation(TableValidation tableValidation) { this.tableValidation = tableValidation; }
@XmlElement(name = "RowValidation")
public RowValidation getRowValidation() { return rowValidation; }
public void setRowValidation(RowValidation rowValidation) { this.rowValidation = rowValidation; }
} }

@ -0,0 +1,31 @@
/* 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.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "TableValidation")
public class TableValidation {
private String functionName;
@XmlAttribute(name = "functionName", required = true)
public String getFunctionName() { return functionName; }
public void setFunctionName(String functionName) { this.functionName = functionName; }
}
Loading…
Cancel
Save