package org.allcolor.services.servlet;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
@XStreamAlias("services")
public class ServiceXmlList implements Serializable, Cloneable {
/**
*
*/
private static final long serialVersionUID = 3578597241907077289L;
@XStreamImplicit(itemFieldName = "service")
private List<ServiceXml> list = new ArrayList<ServiceXml>(0);
@XStreamAsAttribute
public final String xmlns = "http://www.allcolor.org/xmlns/service";
public List<ServiceXml> getList() {
return this.list;
}
public void setList(final List<ServiceXml> list) {
this.list = list;
}
public void setServicesProperties(final Properties servicesProperties) {
try {
if (this.list == null) {
this.list = new ArrayList<ServiceXml>(0);
}
for (final Map.Entry<Object, Object> entry : servicesProperties
.entrySet()) {
try {
final ServiceXml sxml = new ServiceXml((String) entry
.getKey(), (String) entry.getValue(),
(String) entry.getKey());
this.list.add(sxml);
} catch (final Exception ignore) {
}
}
} catch (final Exception e) {
//
}
}
}
|