Examples of IResourceStreamLocator


Examples of org.apache.wicket.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, "txt");
    String path = getPath(resource);
    path = Strings.beforeLastPathComponent(path, '/') + "/sourcePath";

    // and execute
View Full Code Here

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

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

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

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

   * @throws IOException
   */
  public final void testFileDocument() 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.util.resource.locator.IResourceStreamLocator

    // TODO we need to expose this functionality for any class not just for
    // markupcontainers in markupcache so we don't have to replicate this
    // logic here

    // Get locator to search for the resource
    final IResourceStreamLocator locator = Application.get()
      .getResourceSettings()
      .getResourceStreamLocator();

    final String style = owner.getStyle();
    final String variation = owner.getVariation();
    final Locale locale = owner.getLocale();

    MarkupResourceStream markupResourceStream = null;
    Class<?> containerClass = getClass();

    while (!(containerClass.equals(MarkupComponentBorder.class)))
    {
      String path = containerClass.getName().replace('.', '/');
      IResourceStream resourceStream = locator.locate(containerClass, path, style, variation,
        locale, markupType.getExtension(), false);

      // Did we find it already?
      if (resourceStream != null)
      {
View Full Code Here

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

   * @throws IOException
   */
  public final void testFileDocument() 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.util.resource.locator.IResourceStreamLocator

    }
  }

  private StreamInfo lookupStream(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 null;
View Full Code Here

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

   */
  public IResourceStream getMarkupResourceStream(final MarkupContainer container,
      Class containerClass)
  {
    // Get locator to search for the resource
    final IResourceStreamLocator locator = Application.get().getResourceSettings()
        .getResourceStreamLocator();

    String style = container.getStyle();
    Locale locale = container.getLocale();
    String ext = container.getMarkupType();

    // Markup is associated with the containers class. Walk up the class
    // hierarchy up to MarkupContainer to find the containers markup
    // resource.
    while (containerClass != MarkupContainer.class)
    {
      String path = containerClass.getName().replace('.', '/');
      IResourceStream resourceStream = locator.locate(container.getClass(), path, style,
          locale, ext);

      // Did we find it already?
      if (resourceStream != null)
      {
View Full Code Here

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

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

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

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

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

Examples of org.apache.wicket.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, "txt");
    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.