Package org.apache.abdera.i18n.templates

Examples of org.apache.abdera.i18n.templates.Template


            list.add(i.next());
        return list;
    }

    public String urlFor(RequestContext request, Object key, Object param) {
        Template template = templates.get(key);
        return template != null ? template.expand(getContext(request, param)) : null;
    }
View Full Code Here


  }
 
  @Test
  public void test18() throws Exception {
    String t = "http://www.google.com/notebook/feeds/{userID}{-prefix|/notebooks/|notebookID}{-opt|/-/|categories}{-listjoin|/|categories}?{-join|&|updated-min,updated-max,alt,start-index,max-results,entryID,orderby}";
    Template template = new Template(t);
    String[] variables = template.getVariables();
    assertEquals(variables[0],"userID");
    assertEquals(variables[1],"notebookID");
    assertEquals(variables[2],"categories");
    assertEquals(variables[3],"updated-min");
    assertEquals(variables[4],"updated-max");
View Full Code Here

  }

  @Test
  public void test19() throws Exception {
    String t = "http://www.google.com/notebook/feeds/{userID}{-prefix|/notebooks/|notebookID}{-opt|/-/|categories}{-listjoin|/|categories}?{-join|&|updated-min,updated-max,alt,start-index,max-results,entryID,orderby}";
    Template template = new Template(t);
    Template t2 = template.clone();
    assertEquals(template,t2);
    assertEquals(template.hashCode(),t2.hashCode());
  }
View Full Code Here

TOP

Related Classes of org.apache.abdera.i18n.templates.Template

Copyright © 2018 www.massapicom. 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.