Package org.apache.wicket.request.resource.caching

Examples of org.apache.wicket.request.resource.caching.FilenameWithVersionResourceCachingStrategy.decorateUrl()


    assertEquals("test-version-foobar.js", url.getFileName());
    strategy.undecorateUrl(url);
    assertEquals("test.js", url.getFileName());

    url = new ResourceUrl("test", params);
    strategy.decorateUrl(url, resource);
    assertEquals("test-version-foobar", url.getFileName());
    strategy.undecorateUrl(url);
    assertEquals("test", url.getFileName());

    // this behavior is o.k. since a browser could request an
View Full Code Here


    // check a version that contains a dot which also marks the filename
    // extension
    strategy = new FilenameWithVersionResourceCachingStrategy("-version-",
      new StaticResourceVersion("1.0.4-beta"));
    url = new ResourceUrl("test.txt", params);
    strategy.decorateUrl(url, resource);
    assertEquals("test-version-1.0.4-beta.txt", url.getFileName());
  }

  /**
   * A resource version that allows any of: alpha, digit, dash and dot charcters
View Full Code Here

    IResourceCachingStrategy strategy = new FilenameWithVersionResourceCachingStrategy(
      "-version-", new StaticResourceVersion("foobar"));

    INamedParameters params = new PageParameters();
    ResourceUrl url = new ResourceUrl("test.js", params);
    strategy.decorateUrl(url, resource);
    assertEquals("test-version-foobar.js", url.getFileName());
    strategy.undecorateUrl(url);
    assertEquals("test.js", url.getFileName());

    url = new ResourceUrl("test", params);
View Full Code Here

    assertEquals("test-version-foobar.js", url.getFileName());
    strategy.undecorateUrl(url);
    assertEquals("test.js", url.getFileName());

    url = new ResourceUrl("test", params);
    strategy.decorateUrl(url, resource);
    assertEquals("test-version-foobar", url.getFileName());
    strategy.undecorateUrl(url);
    assertEquals("test", url.getFileName());

    // this behavior is o.k. since a browser could request an
View Full Code Here

    // check a version that contains a dot which also marks the filename extension
    strategy = new FilenameWithVersionResourceCachingStrategy("-version-",
      new StaticResourceVersion("1.0.4-beta"));
    url = new ResourceUrl("test.txt", params);
    strategy.decorateUrl(url, resource);
    assertEquals("test-version-1.0.4-beta.txt", url.getFileName());
  }

  /**
   * Tests <a href="https://issues.apache.org/jira/browse/WICKET-3918">WICKET-3918</a>.
View Full Code Here

    IResourceCachingStrategy strategy = new FilenameWithVersionResourceCachingStrategy(
      "-version-", new StaticResourceVersion("foobar"));

    INamedParameters params = new PageParameters();
    ResourceUrl url = new ResourceUrl("test.js", params);
    strategy.decorateUrl(url, resource);
    assertEquals("test-version-foobar.js", url.getFileName());
    strategy.undecorateUrl(url);
    assertEquals("test.js", url.getFileName());

    url = new ResourceUrl("test", params);
View Full Code Here

    assertEquals("test-version-foobar.js", url.getFileName());
    strategy.undecorateUrl(url);
    assertEquals("test.js", url.getFileName());

    url = new ResourceUrl("test", params);
    strategy.decorateUrl(url, resource);
    assertEquals("test-version-foobar", url.getFileName());
    strategy.undecorateUrl(url);
    assertEquals("test", url.getFileName());

    // this behavior is o.k. since a browser could request an
View Full Code Here

    // check a version that contains a dot which also marks the filename extension
    strategy = new FilenameWithVersionResourceCachingStrategy("-version-",
      new StaticResourceVersion("1.0.4-beta"));
    url = new ResourceUrl("test.txt", params);
    strategy.decorateUrl(url, resource);
    assertEquals("test-version-1.0.4-beta.txt", url.getFileName());
  }

  /**
   *
 
View Full Code Here

    IResourceCachingStrategy strategy = new FilenameWithVersionResourceCachingStrategy(
      "-version-", new StaticResourceVersion("foobar"));

    INamedParameters params = new PageParameters();
    ResourceUrl url = new ResourceUrl("test.js", params);
    strategy.decorateUrl(url, resource);
    assertEquals("test-version-foobar.js", url.getFileName());
    strategy.undecorateUrl(url);
    assertEquals("test.js", url.getFileName());

    url = new ResourceUrl("test", params);
View Full Code Here

    assertEquals("test-version-foobar.js", url.getFileName());
    strategy.undecorateUrl(url);
    assertEquals("test.js", url.getFileName());

    url = new ResourceUrl("test", params);
    strategy.decorateUrl(url, resource);
    assertEquals("test-version-foobar", url.getFileName());
    strategy.undecorateUrl(url);
    assertEquals("test", url.getFileName());

    // this behavior is o.k. since a browser could request an
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.