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

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


  /**
   * @return {@link ServletContextUriLocator} or a derivate locator which will be responsible for locating resources
   *         starting with '/' character. Ex: /static/resource.js
   */
  protected ServletContextUriLocator newServletContextUriLocator() {
    return new ServletContextUriLocator();
  }
View Full Code Here


   * {@inheritDoc}
   */
  public Map<String, UriLocator> provideLocators() {
    final Map<String, UriLocator> map = new TreeMap<String, UriLocator>();
    map.put(ClasspathUriLocator.ALIAS, new ClasspathUriLocator());
    map.put(ServletContextUriLocator.ALIAS, new ServletContextUriLocator());
    map.put(ServletContextUriLocator.ALIAS_DISPATCHER_FIRST,
        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 a locator factory which handles absolute url locations and failed servletContext relative url's by serving
   *         proxy resources from classpath. This is useful to make test pass without internet connection.
   */
  private UriLocatorFactory createLocatorFactory() {
    final UriLocatorFactory locatorFactory = new SimpleUriLocatorFactory().addLocator(new ServletContextUriLocator() {
      @Override
      public InputStream locate(final String uri)
          throws IOException {
        try {
          return super.locate(uri);
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

TOP

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

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.