Examples of IResourceStreamLocator


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

    {
      return minifiedName;
    }

    String name = getMinifiedName();
    IResourceStreamLocator locator = Application.get()
        .getResourceSettings()
        .getResourceStreamLocator();
    String absolutePath = Packages.absolutePath(getScope(), name);
    IResourceStream stream = locator.locate(getScope(), absolutePath, getStyle(),
        getVariation(), getLocale(), null, true);

    minifiedName = stream != null ? name : NO_MINIFIED_NAME;
    MINIFIED_NAMES_CACHE.put(this, minifiedName);
    if (minifiedName == NO_MINIFIED_NAME && log.isDebugEnabled())
View Full Code Here

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

    this.compress = compress;
  }

  private IResourceStream internalGetResourceStream(final String style, final Locale locale)
  {
    IResourceStreamLocator resourceStreamLocator = Application.get()
        .getResourceSettings()
        .getResourceStreamLocator();
    IResourceStream resourceStream = resourceStreamLocator.locate(getScope(), absolutePath, style, variation, locale, null, false);

    Class<?> realScope = getScope();
    String realPath = absolutePath;
    if (resourceStream instanceof IFixedLocationResourceStream)
    {
View Full Code Here

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

    return resource;
  }

  private ResourceReference.UrlAttributes getUrlAttributes(Locale locale, String style, String variation)
  {
    IResourceStreamLocator locator = Application.get()
      .getResourceSettings()
      .getResourceStreamLocator();

    String absolutePath = Packages.absolutePath(getScope(), getName());

    IResourceStream stream = locator.locate(getScope(), absolutePath, style, variation, locale,
      null, false);

    if (stream == null)
      return new ResourceReference.UrlAttributes(null, null, null);
View Full Code Here

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

    this.compress = compress;
  }

  private IResourceStream internalGetResourceStream(final String style, final Locale locale)
  {
    IResourceStreamLocator resourceStreamLocator = Application.get()
        .getResourceSettings()
        .getResourceStreamLocator();
    IResourceStream resourceStream = resourceStreamLocator.locate(getScope(), absolutePath, style, variation, locale, null, false);

    String realPath = absolutePath;
    if (resourceStream instanceof IFixedLocationResourceStream)
    {
      realPath = ((IFixedLocationResourceStream)resourceStream).locationAsString();
View Full Code Here

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

   * @throws IOException
   */
  @Test
  public void fileDocument() throws ParseException, ResourceStreamNotFoundException, IOException
  {
    IResourceStreamLocator locator = new ResourceStreamLocator();
    MarkupResourceStream resource = newMarkupResourceStream(locator, getClass(), "1", null,
      null, "html");

    MarkupParser parser = new MarkupParser(resource);
    parser.setWicketNamespace("wcn");
View Full Code Here

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

    this.compress = compress;
  }

  private IResourceStream internalGetResourceStream(final String style, final Locale locale)
  {
    IResourceStreamLocator resourceStreamLocator = Application.get()
        .getResourceSettings()
        .getResourceStreamLocator();
    IResourceStream resourceStream = resourceStreamLocator.locate(getScope(), absolutePath, style, variation, locale, null, false);

    Class<?> realScope = getScope();
    String realPath = absolutePath;
    if (resourceStream instanceof IFixedLocationResourceStream)
    {
View Full Code Here

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

    return resource;
  }

  private UrlAttributes getUrlAttributes(Locale locale, String style, String variation)
  {
    IResourceStreamLocator locator = Application.get()
      .getResourceSettings()
      .getResourceStreamLocator();

    String absolutePath = Packages.absolutePath(getScope(), getName());

    IResourceStream stream = locator.locate(getScope(), absolutePath, style, variation, locale,
      null, false);

    if (stream == null)
      return new UrlAttributes(null, null, null);
View Full Code Here

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

    {
      return minifiedName;
    }

    String name = getMinifiedName();
    IResourceStreamLocator locator = Application.get()
        .getResourceSettings()
        .getResourceStreamLocator();
    String absolutePath = Packages.absolutePath(getScope(), name);
    IResourceStream stream = locator.locate(getScope(), absolutePath, getStyle(),
        getVariation(), getLocale(), null, true);

    minifiedName = stream != null ? name : NO_MINIFIED_NAME;
    MINIFIED_NAMES_CACHE.put(this, minifiedName);
    if (minifiedName == NO_MINIFIED_NAME && log.isDebugEnabled())
View Full Code Here

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

   * @param extension
   */
  public void createAndTestResource(Path sourcePath, String style, String variation,
    Locale locale, String extension)
  {
    IResourceStreamLocator locator = new ResourceStreamLocator(sourcePath);
    IResourceStream resource = locator.locate(this.getClass(), this.getClass()
      .getName()
      .replace('.', '/'), style, variation, locale, "txt", false);
    compareFilename(resource, extension);
  }
View Full Code Here

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

  {
    // Execute without source path
    executeMultiple(new Path());

    // Determine source path
    IResourceStreamLocator locator = new ResourceStreamLocator();
    IResourceStream resource = locator.locate(getClass(),
      this.getClass().getName().replace('.', '/'), null, null, null, "txt", false);
    String path = getPath(resource);
    path = Strings.beforeLastPathComponent(path, '/') + "/sourcePath";

    // and execute
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.