liquibase.integration.commandline
Class CommandLineResourceAccessor
java.lang.Object
liquibase.resource.AbstractResourceAccessor
liquibase.resource.ClassLoaderResourceAccessor
liquibase.integration.commandline.CommandLineResourceAccessor
- All Implemented Interfaces:
- ResourceAccessor
public class CommandLineResourceAccessor
- extends ClassLoaderResourceAccessor
Extension of ClassLoaderResourceAccessor
that adds extra fuzzy searching logic based on
what users may enter that is different than what is exactly correct.
CommandLineResourceAccessor
public CommandLineResourceAccessor(ClassLoader loader)
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.
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 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 false
- Returns:
- null if the root does not exist.
- Throws:
IOException
- if there is an error reading an existing root.
getAlternatePaths
protected List<String> getAlternatePaths(String path)
- Return alternate options for the given path that the user maybe meant. Return in order of likelihood.
Copyright © 2016 Liquibase.org. All rights reserved.