XStream xstream = new XStream();
xstream.setClassLoader(this.getClass().getClassLoader());
xstream.aliasType("templates", ArrayList.class);
xstream.aliasType("template", LdapSchemaTemplate.class);
xstream.aliasType("userAndGroupConfig", CUserAndGroupAuthConfiguration.class);
InputStream stream = null;
try {
stream = getClass().getResourceAsStream(TEMPLATES_RESOURCE);
this.templates = (List<LdapSchemaTemplate>) xstream.fromXML(stream);