ro.isdc.wro.extensions.locator
Class WebjarUriLocator

java.lang.Object
  extended by ro.isdc.wro.extensions.locator.WebjarUriLocator
All Implemented Interfaces:
UriLocator

public class WebjarUriLocator
extends Object
implements UriLocator

Locator responsible for locating webjar resources. A webjar resource is a classpath resource respecting a certain standard. Read more about webjars.

This locator uses the following prefix to identify a locator capable of handling webjar resources: webjar:

Since:
1.6.2
Author:
Alex Objelean

Field Summary
static String ALIAS
          Alias used to register this locator with LocatorProvider.
static String PREFIX
          Prefix of the resource uri used to check if the resource can be read by this UriLocator implementation.
 
Constructor Summary
WebjarUriLocator()
           
 
Method Summary
 boolean accept(String uri)
          
static String createUri(String path)
           
 InputStream locate(String uri)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALIAS

public static final String ALIAS
Alias used to register this locator with LocatorProvider.

See Also:
Constant Field Values

PREFIX

public static final String PREFIX
Prefix of the resource uri used to check if the resource can be read by this UriLocator implementation.

Constructor Detail

WebjarUriLocator

public WebjarUriLocator()
Method Detail

createUri

public static String createUri(String path)
Returns:
the uri which is acceptable by this locator.

locate

public InputStream locate(String uri)
                   throws IOException

Specified by:
locate in interface UriLocator
Throws:
IOException

accept

public boolean accept(String uri)

Specified by:
accept in interface UriLocator


Copyright © 2008-2013. All Rights Reserved.