org.unitils.dbmaintainer.locator
Class ClassPathResourceLocator

java.lang.Object
  extended by org.unitils.dbmaintainer.locator.ClassPathResourceLocator
Direct Known Subclasses:
ClassPathDataLocator, ClassPathScriptLocator

public abstract class ClassPathResourceLocator
extends Object

Abstract class to locate resources on the classpath. Will also look in jars that are in the classpath.

Since:
1.0.2
Author:
tdr

Field Summary
protected  List<URL> resourceList
           
 
Constructor Summary
ClassPathResourceLocator()
           
 
Method Summary
 List<URL> loadResources(String path, Boolean isConcreteResource)
          Load resources from the classpath.
protected  List<URL> searchResources(URL url)
          Will use the Spring PathMatchingResourcePatternResolver to find a resource that corresponds to the url.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resourceList

protected List<URL> resourceList
Constructor Detail

ClassPathResourceLocator

public ClassPathResourceLocator()
Method Detail

loadResources

public List<URL> loadResources(String path,
                               Boolean isConcreteResource)
Load resources from the classpath. if isConcreteResource set to true we search for a concrete resource. then no deeper directory are attempted to search.

Parameters:
path -
isConcreteResource -
Returns:
List

searchResources

protected List<URL> searchResources(URL url)
                             throws IOException
Will use the Spring PathMatchingResourcePatternResolver to find a resource that corresponds to the url.

Parameters:
url -
Returns:
List
Throws:
IOException


Copyright © 2014. All Rights Reserved.