Examples of decorateUrl()


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

    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

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

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

    // 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

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

    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

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

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

    // 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

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

    IResourceCachingStrategy strategy = new FilenameWithVersionResourceCachingStrategy(
      "-version-", new AlphaDigitResourceVersion("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

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

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

    // 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

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

    IResourceCachingStrategy strategy = new FilenameWithVersionResourceCachingStrategy(
      "-version-", new AlphaDigitResourceVersion("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
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.