Top Description Fields Methods
liquibase.resource

public Interface PathHandler

extends Plugin
Known Direct Implementers
liquibase.resource.AbstractPathHandler
Imports
liquibase.plugin.Plugin, java.io.FileNotFoundException, .IOException, .OutputStream

Interface for extensions that can translate path strings into ResourceAccessors and java.io.InputStreams.

Field Summary

Inherited from liquibase.plugin.Plugin:
PRIORITY_DATABASEPRIORITY_DEFAULTPRIORITY_NOT_APPLICABLEPRIORITY_SPECIALIZED

Method Summary

Modifier and TypeMethod and Description
public OutputStream
createResource(String path)

Creates a new resource at the specified path and returns an OutputStream for writing to it.

public int
getPriority(String root)

Priority of this parser for the given path.

public Resource

Returns:

a Resource even if the resource does not exist. Callers can check Resource#exists() to determine if it exists or not
getResource
(String path)

Parse the given "absolute" path and return a liquibase.resource.Resource for it if it exists.

public ResourceAccessor
getResourceAccessor(String root)

Parse the given path and return a ResourceAccessor for it.

Method Detail

createResourceback to summary
public OutputStream createResource(String path) throws IOException

Creates a new resource at the specified path and returns an OutputStream for writing to it.

Exceptions
IOException:
if the path cannot be written to
FileAlreadyExistsException:
if the file already exists
getPriorityback to summary
public int getPriority(String root)

Priority of this parser for the given path. The implementation with the highest priority will be used.

getResourceback to summary
public Resource getResource(String path) throws IOException

Parse the given "absolute" path and return a liquibase.resource.Resource for it if it exists.

Returns:Resource

a Resource even if the resource does not exist. Callers can check Resource#exists() to determine if it exists or not

Exceptions
IOException:
if the path is invalid
getResourceAccessorback to summary
public ResourceAccessor getResourceAccessor(String root) throws IOException, FileNotFoundException

Parse the given path and return a ResourceAccessor for it.

Exceptions
IOException:
if the path is invalid
FileNotFoundException:
if the path is valid but does not exist