Package liquibase.resource
Class ZipPathHandler
java.lang.Object
liquibase.resource.AbstractPathHandler
liquibase.resource.ZipPathHandler
- All Implemented Interfaces:
Plugin
,PathHandler
PathHandler
that converts the path into a DirectoryResourceAccessor
.-
Field Summary
Fields inherited from interface liquibase.plugin.Plugin
PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED
-
Constructor Summary
-
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) ReturnsPlugin.PRIORITY_SPECIALIZED
for all "jar:file:" or files that end in ".jar" or ".zip"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.
-
Constructor Details
-
ZipPathHandler
public ZipPathHandler()
-
-
Method Details
-
getPriority
ReturnsPlugin.PRIORITY_SPECIALIZED
for all "jar:file:" or files that end in ".jar" or ".zip" -
getResourceAccessor
Description copied from interface:PathHandler
Parse the given path and return aResourceAccessor
for it.- Throws:
FileNotFoundException
- if the path is valid but does not exist
-
getResource
Description copied from interface:PathHandler
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
Description copied from interface:PathHandler
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
-