Package liquibase.resource
Interface PathHandler
- All Superinterfaces:
Plugin
- All Known Implementing Classes:
AbstractPathHandler
,DirectoryPathHandler
,ZipPathHandler
Interface for extensions that can translate path strings into
ResourceAccessor
s and InputStream
s.-
Field Summary
Fields inherited from interface liquibase.plugin.Plugin
PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED
-
Method Summary
Modifier and TypeMethodDescriptioncreateResource
(String path) Creates a new resource at the specified path and returns an OutputStream for writing to it.int
getPriority
(String root) Priority of this parser for the given path.getResource
(String path) Parse the given "absolute" path and return aResource
for it if it exists.getResourceAccessor
(String root) Parse the given path and return aResourceAccessor
for it.
-
Method Details
-
getPriority
Priority of this parser for the given path. The implementation with the highest priority will be used. -
getResourceAccessor
Parse the given path and return aResourceAccessor
for it.- Throws:
IOException
- if the path is invalidFileNotFoundException
- if the path is valid but does not exist
-
getResource
Parse the given "absolute" path and return aResource
for it if it exists.- Returns:
- a Resource even if the resource does not exist. Callers can check
Resource.exists()
to determine if it exists or not - Throws:
IOException
- if the path is invalid
-
createResource
Creates a new resource at the specified path and returns an OutputStream for writing to it.- Throws:
FileAlreadyExistsException
- if the file already existsIOException
- if the path cannot be written to
-