Package ro.isdc.wro.model.resource.locator

Examples of ro.isdc.wro.model.resource.locator.UrlUriLocator


        map.put(alias, new JSMinProcessor());
      }

      @Override
      protected void contributeLocators(final Map<String, UriLocator> map) {
        map.put(alias, new UrlUriLocator());
      }
    };
    final Properties configProperties = new Properties();
    configProperties.setProperty(ConfigurableProcessorsFactory.PARAM_PRE_PROCESSORS, alias);
    configProperties.setProperty(ConfigurableProcessorsFactory.PARAM_POST_PROCESSORS, alias);
View Full Code Here


  /**
   * @return {@link UriLocator} responsible for resolving external resources.
   */
  protected UriLocator newExternalResourceLocator() {
    return new UrlUriLocator().setEnableWildcards(false);
  }
View Full Code Here

   * @return the {@link UriLocator} responsible for locating resources when dispatcher fails. No wildcard handling is
   *         required.
   * @VisibleForTesting
   */
  UriLocator createExternalResourceLocator() {
    final UrlUriLocator locator = new UrlUriLocator();
    locator.setEnableWildcards(false);
    locator.setTimeout(timeout);
    return locator;
  }
View Full Code Here

        new ServletContextUriLocator().setLocatorStrategy(LocatorStrategy.DISPATCHER_FIRST));
    map.put(ServletContextUriLocator.ALIAS_SERVLET_CONTEXT_FIRST,
        new ServletContextUriLocator().setLocatorStrategy(LocatorStrategy.SERVLET_CONTEXT_FIRST));
    map.put(ServletContextUriLocator.ALIAS_SERVLET_CONTEXT_ONLY,
        new ServletContextUriLocator().setLocatorStrategy(LocatorStrategy.SERVLET_CONTEXT_ONLY));
    map.put(UrlUriLocator.ALIAS, new UrlUriLocator());
    return map;
  }
View Full Code Here

          return super.locate(uri);
        } catch (final Exception e) {
          return new ClasspathUriLocator().locate(PROXY_RESOURCE_PATH + "test1.png");
        }
      }
    }).addLocator(new UrlUriLocator() {
      @Override
      public InputStream locate(final String uri)
          throws IOException {
        // avoid external connections
        if (uri.startsWith("http")) {
View Full Code Here

  private UriLocator locator;
  private Injector injector;
  @Before
  public void setUp() {
    Context.set(Context.standaloneContext());
    locator = new UrlUriLocator();
    injector = WroTestUtils.createInjector();
    injector.inject(locator);
  }
View Full Code Here

  protected UriLocatorFactory newUriLocatorFactory()
  {
    SimpleUriLocatorFactory uriLocatorFactory= (SimpleUriLocatorFactory) super.newUriLocatorFactory();
    uriLocatorFactory.addLocator(new ClasspathUriLocator());
    uriLocatorFactory.addLocator(new ServletContextUriLocator());
    uriLocatorFactory.addLocator(new UrlUriLocator());
    return uriLocatorFactory;
  }
View Full Code Here

  public UriLocatorFactory wroUriLocatorFactory(
      final ServletContext servletContext) {
    return new SimpleUriLocatorFactory()
        .addUriLocator(new ServletContextUriLocator(servletContext))
        .addUriLocator(new ClasspathUriLocator())
        .addUriLocator(new UrlUriLocator());
  }
View Full Code Here

TOP

Related Classes of ro.isdc.wro.model.resource.locator.UrlUriLocator

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.