de.agilecoders.wicket.webjars.util.file
Class WebjarsResourceFinder

java.lang.Object
  extended by de.agilecoders.wicket.webjars.util.file.WebjarsResourceFinder
All Implemented Interfaces:
org.apache.wicket.util.file.IResourceFinder

public class WebjarsResourceFinder
extends Object
implements org.apache.wicket.util.file.IResourceFinder

Knows how to find webjars resources.

Author:
miha

Constructor Summary
WebjarsResourceFinder(IWebjarsSettings settings)
          Construct.
 
Method Summary
 boolean equals(Object o)
           
 org.apache.wicket.util.resource.IResourceStream find(Class<?> clazz, String pathName)
          Looks for a given path name along the webjars root path
 int hashCode()
           
protected  IFullPathProvider newFullPathProvider()
           
protected  org.apache.wicket.util.resource.IResourceStream newResourceStream(String webjarsPath)
          creates a new IResourceStream for given resource path with should be loaded by given class loader.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebjarsResourceFinder

public WebjarsResourceFinder(IWebjarsSettings settings)
Construct.

Parameters:
settings - the webjars settings to use
Method Detail

newFullPathProvider

protected IFullPathProvider newFullPathProvider()
Returns:
new resource locator instance

find

public org.apache.wicket.util.resource.IResourceStream find(Class<?> clazz,
                                                            String pathName)
Looks for a given path name along the webjars root path

Specified by:
find in interface org.apache.wicket.util.file.IResourceFinder
Parameters:
clazz - The class requesting the resource stream
pathName - The filename with possible path
Returns:
The resource stream

newResourceStream

protected org.apache.wicket.util.resource.IResourceStream newResourceStream(String webjarsPath)
creates a new IResourceStream for given resource path with should be loaded by given class loader.

Parameters:
webjarsPath - The resource to load
Returns:
new IResourceStream instance that represents the content of given resource path or null if resource wasn't found

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2016 agilecoders.de. All Rights Reserved.