Package liquibase.resource
Class SearchPathResourceAccessor
- java.lang.Object
-
- liquibase.AbstractExtensibleObject
-
- liquibase.resource.AbstractResourceAccessor
-
- liquibase.resource.CompositeResourceAccessor
-
- liquibase.resource.SearchPathResourceAccessor
-
- All Implemented Interfaces:
AutoCloseable
,Cloneable
,ExtensibleObject
,ResourceAccessor
public class SearchPathResourceAccessor extends CompositeResourceAccessor
This should generally be the overallResourceAccessor
used by integrations. It aggregates integration-specific resource accessors with the standardGlobalConfiguration.SEARCH_PATH
setting to create the overall "search path" for Liquibase.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface liquibase.resource.ResourceAccessor
ResourceAccessor.NotFoundResource, ResourceAccessor.SearchOptions
-
-
Constructor Summary
Constructors Constructor Description SearchPathResourceAccessor(String searchPath, ResourceAccessor... defaultAccessors)
Creates itself with the given searchPath value.SearchPathResourceAccessor(ResourceAccessor... defaultAccessors)
CallsSearchPathResourceAccessor(String, ResourceAccessor...)
with the current value ofGlobalConfiguration.SEARCH_PATH
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchPathResourceAccessor
addResourceAccessor(String root)
Adds the given root as a new resource accessor, usingPathHandlerFactory
to find the rightPathHandler
.-
Methods inherited from class liquibase.resource.CompositeResourceAccessor
addResourceAccessor, close, describeLocations, getAll, removeResourceAccessor, search, search
-
Methods inherited from class liquibase.AbstractExtensibleObject
clone, describe, equals, get, get, get, getAttributes, getFieldValue, getObjectMetaData, getValuePath, has, hashCode, set, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface liquibase.resource.ResourceAccessor
get, getExisting, list, openStream, openStreams
-
-
-
-
Constructor Detail
-
SearchPathResourceAccessor
public SearchPathResourceAccessor(ResourceAccessor... defaultAccessors)
CallsSearchPathResourceAccessor(String, ResourceAccessor...)
with the current value ofGlobalConfiguration.SEARCH_PATH
.
-
SearchPathResourceAccessor
public SearchPathResourceAccessor(String searchPath, ResourceAccessor... defaultAccessors)
Creates itself with the given searchPath value. If any of the paths inGlobalConfiguration.SEARCH_PATH
are invalid, an error is logged but no exception is thrown from this method.- Parameters:
defaultAccessors
- Only uses these accessors if searchPath is null.
-
-
Method Detail
-
addResourceAccessor
public SearchPathResourceAccessor addResourceAccessor(String root) throws IOException
Adds the given root as a new resource accessor, usingPathHandlerFactory
to find the rightPathHandler
.- Throws:
IOException
-
-