liquibase.integration.spring
Class SpringLiquibase.SpringResourceOpener

java.lang.Object
  extended by liquibase.resource.AbstractResourceAccessor
      extended by liquibase.resource.ClassLoaderResourceAccessor
          extended by liquibase.integration.spring.SpringLiquibase.SpringResourceOpener
All Implemented Interfaces:
ResourceAccessor
Enclosing class:
SpringLiquibase

public class SpringLiquibase.SpringResourceOpener
extends ClassLoaderResourceAccessor


Constructor Summary
SpringLiquibase.SpringResourceOpener(String parentFile)
           
 
Method Summary
 org.springframework.core.io.Resource getResource(String file)
           
 Set<InputStream> getResourcesAsStream(String path)
          Return an InputStream for each resource mapped by the given path.
protected  void init()
           
 boolean isPrefixPresent(String file)
           
 Set<String> list(String relativeTo, String path, boolean includeFiles, boolean includeDirectories, boolean recursive)
          Returns the path to all resources contained in the given root.
 ClassLoader toClassLoader()
           
 
Methods inherited from class liquibase.resource.ClassLoaderResourceAccessor
toString
 
Methods inherited from class liquibase.resource.AbstractResourceAccessor
addRootPath, convertToPath, convertToPath, getContents, getRootPaths, isCaseSensitive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SpringLiquibase.SpringResourceOpener

public SpringLiquibase.SpringResourceOpener(String parentFile)
Method Detail

init

protected void init()
Overrides:
init in class AbstractResourceAccessor

list

public Set<String> list(String relativeTo,
                        String path,
                        boolean includeFiles,
                        boolean includeDirectories,
                        boolean recursive)
                 throws IOException
Description copied from interface: ResourceAccessor
Returns the path to all resources contained in the given root. The passed root is not included in the returned set.

Specified by:
list in interface ResourceAccessor
Overrides:
list in class ClassLoaderResourceAccessor
includeFiles - Set to false to exclude files in the returned set. Defaults to true
includeDirectories - Set to false to exclude directories in the returned set. Defaults to true
recursive - Set to true and will return paths to contents in sub directories as well. Defaults to false
Returns:
null if the root does not exist.
Throws:
IOException - if there is an error reading an existing root.

getResourcesAsStream

public Set<InputStream> getResourcesAsStream(String path)
                                      throws IOException
Description copied from interface: ResourceAccessor
Return an InputStream for each resource mapped by the given path. The path is often a URL but does not have to be.

Specified by:
getResourcesAsStream in interface ResourceAccessor
Overrides:
getResourcesAsStream in class ClassLoaderResourceAccessor
Returns:
null if the resource does not exist.
Throws:
IOException - if there is an error reading an existing path.

getResource

public org.springframework.core.io.Resource getResource(String file)

isPrefixPresent

public boolean isPrefixPresent(String file)

toClassLoader

public ClassLoader toClassLoader()
Specified by:
toClassLoader in interface ResourceAccessor
Overrides:
toClassLoader in class ClassLoaderResourceAccessor


Copyright © 2016 Liquibase.org. All rights reserved.