public class CompositeResourceAccessor extends Object implements ResourceAccessor
ResourceAccessor
that will search in a list of other ResourceAccessors until it finds
one that has a resource of the appropriate name and path.Constructor and Description |
---|
CompositeResourceAccessor(List<ResourceAccessor> resourceAccessors) |
CompositeResourceAccessor(ResourceAccessor... resourceAccessors) |
Modifier and Type | Method and Description |
---|---|
Set<InputStream> |
getResourcesAsStream(String path)
Return an InputStream for each resource mapped by the given path.
|
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() |
String |
toString() |
public CompositeResourceAccessor(List<ResourceAccessor> resourceAccessors)
public CompositeResourceAccessor(ResourceAccessor... resourceAccessors)
public Set<InputStream> getResourcesAsStream(String path) throws IOException
ResourceAccessor
getResourcesAsStream
in interface ResourceAccessor
IOException
- if there is an error reading an existing path.public Set<String> list(String relativeTo, String path, boolean includeFiles, boolean includeDirectories, boolean recursive) throws IOException
ResourceAccessor
list
in interface ResourceAccessor
includeFiles
- Set to false to exclude files in the returned set. Defaults to trueincludeDirectories
- Set to false to exclude directories in the returned set. Defaults to truerecursive
- Set to true and will return paths to contents in sub directories as well. Defaults to falseIOException
- if there is an error reading an existing root.public ClassLoader toClassLoader()
toClassLoader
in interface ResourceAccessor
Copyright © 2018 Liquibase.org. All rights reserved.