Examples of aliasType()


Examples of com.thoughtworks.xstream.XStream.aliasType()

        // We use DomDriver because the standard XPP driver has issues with attributes.
        XStream xstream = new XStream(/*new DomDriver()*/);
        xstream.registerConverter(ROLEMAPCONVERTER);
        xstream.registerConverter(ROLECONVERTER);
        xstream.registerConverter(DICTCONVERTER);
        xstream.aliasType("roles", Map.class);
        try {
            Map<String, RoleImpl> fromXML = (Map<String, RoleImpl>) xstream.fromXML(input);
            m_roles.putAll(fromXML);
        }
        catch (StreamException e) {
View Full Code Here

Examples of com.thoughtworks.xstream.XStream.aliasType()

    private void write(OutputStream out) throws IOException {
        XStream xstream = new XStream(new DomDriver());
        xstream.registerConverter(ROLEMAPCONVERTER);
        xstream.registerConverter(ROLECONVERTER);
        xstream.registerConverter(DICTCONVERTER);
        xstream.aliasType("roles", Map.class);
        xstream.toXML(m_roles, out);
        try {
            out.close();
        }
        catch (IOException e) {
View Full Code Here

Examples of com.thoughtworks.xstream.XStream.aliasType()

  public List<LdapSchemaTemplate> getSchemaTemplates() {
    if (this.templates == null) {
      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 {
View Full Code Here

Examples of com.thoughtworks.xstream.XStream.aliasType()

    if (this.templates == null) {
      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);
View Full Code Here

Examples of com.thoughtworks.xstream.XStream.aliasType()

      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);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.