public abstract class AbstractPathResourceAccessor extends AbstractResourceAccessor
ResourceAccessor.NotFoundResource| Constructor and Description |
|---|
AbstractPathResourceAccessor() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Resource |
createResource(Path file,
String pathToAdd) |
List<String> |
describeLocations()
Returns a description of the places this classloader will look for paths.
|
List<Resource> |
getAll(String path)
Returns all
Resources at the given path. |
protected abstract Path |
getRootPath() |
List<Resource> |
search(String startPath,
boolean recursive)
Returns the path to all resources contained in the given path.
|
String |
toString() |
clone, describe, equals, get, get, get, getAttributes, getFieldValue, getObjectMetaData, getValuePath, has, hashCode, setfinalize, getClass, notify, notifyAll, wait, wait, waitget, getExisting, list, openStream, openStreamscloseprotected abstract Path getRootPath()
public String toString()
toString in class AbstractExtensibleObjectpublic List<String> describeLocations()
ResourceAccessorpublic List<Resource> getAll(String path) throws IOException
ResourceAccessorResources at the given path.
For many resource accessors (such as a file system), only one resource can exist at a given spot,
but some accessors (such as CompositeResourceAccessor or ClassLoaderResourceAccessor) can have multiple resources for a single path.
If the resourceAccessor returns multiple values, the returned List should be considered sorted for that resource accessor.
For example, ClassLoaderResourceAccessor returns them in order based on the configured classloader.
Order is important to pay attention to, because users may set GlobalConfiguration.DUPLICATE_FILE_MODE to pick the "best" file which is defined as
"the first file from this function".
IOException - if there is an unexpected error determining what is at the pathpublic List<Resource> search(String startPath, boolean recursive) throws IOException
ResourceAccessorstartPath - The path to lookup resources in.recursive - Set to true and will return paths to contents in subdirectories as well.IOException - if there is an error searching the system.Copyright © 2023 Liquibase.org. All rights reserved.