Package org.apache.wicket.core.util.resource.locator

Examples of org.apache.wicket.core.util.resource.locator.ResourceNameIterator


        {
          path = packageName + "/" + path;
        }

        // Iterator over all the combinations
        ResourceNameIterator iter = newResourceNameIterator(path, locale, style, variation);
        while (iter.hasNext())
        {
          String newPath = iter.next();

          Properties props = propertiesFactory.load(clazz, newPath);
          if (props != null)
          {
            // Lookup the value
View Full Code Here


    {
      // Create the base path
      String path = clazz.getName().replace('.', '/');

      // Iterator over all the combinations
      ResourceNameIterator iter = newResourceNameIterator(path, locale, style, variation);
      while (iter.hasNext())
      {
        String newPath = iter.next();

        Properties props = propertiesFactory.load(clazz, newPath);
        if (props != null)
        {
          // Lookup the value
View Full Code Here

    String style = null;
    String var = "var";
    Locale locale = Locale.getDefault();
    Iterable<String> extensions = null;
    boolean strict = false;
    Iterator<String> iterator = new ResourceNameIterator(path, style, var, locale, extensions, strict);
    HashSet<String> variations = new HashSet<String>();
    while (iterator.hasNext())
    {
      assertTrue(variations.add(iterator.next()));
    }
    assertEquals(6, variations.size());
  }
View Full Code Here

   *
   */
  @Test
  public void noTrailingDotWhenNoExtension()
  {
    Iterator<String> iterator = new ResourceNameIterator("foo", null, null, null, null, false);

    assertTrue(iterator.hasNext());

    assertEquals("foo", iterator.next());

    assertFalse(iterator.hasNext());
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.core.util.resource.locator.ResourceNameIterator

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.