use of org.glassfish.admin.rest.utils.xml.XmlObject in project Payara by payara.
the class ActionReportXmlProvider method getXml.
protected XmlArray getXml(Collection c) {
XmlArray result = new XmlArray("list");
Iterator i = c.iterator();
while (i.hasNext()) {
Object item = i.next();
Object obj = getXmlObject(item);
if (!(obj instanceof XmlObject)) {
obj = new XmlObject(obj.getClass().getSimpleName(), obj);
}
result.put((XmlObject) obj);
}
return result;
}
use of org.glassfish.admin.rest.utils.xml.XmlObject in project Payara by payara.
the class ActionReportXmlProvider method getExtraProperties.
protected XmlMap getExtraProperties(XmlObject object, Properties props) {
XmlMap extraProperties = new XmlMap("extraProperties");
for (Map.Entry<Object, Object> entry : props.entrySet()) {
String key = entry.getKey().toString();
Object value = getXmlObject(entry.getValue());
if (value != null) {
extraProperties.put(key, value);
}
}
return extraProperties;
}