Top Description Fields Constructors Methods
liquibase.integration.spring

pack-priv Class SpringResource

extends AbstractResource
Class Inheritance
Imports
liquibase.exception.UnexpectedLiquibaseException, liquibase.resource.OpenOptions, org.springframework.core.io.Resource, .WritableResource, java.io.IOException, .InputStream, .OutputStream, java.net.URI

liquibase.resource.Resource implementation around a Resource

Field Summary

Modifier and TypeField and Description
private final Resource

Constructor Summary

AccessConstructor and Description
public
SpringResource(String path, URI uri, Resource resource)

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
isWritable()

Overrides liquibase.resource.AbstractResource.isWritable.

Implements liquibase.resource.Resource.isWritable.

Return true if the resource can be written to

public InputStream
openInputStream()

Implements liquibase.resource.Resource.openInputStream.

Opens an input stream to read from this resource.

public OutputStream
public Resource
resolve(String other)

Implements liquibase.resource.Resource.resolve.

Resolve the given path against this resource.

public Resource
resolveSibling(String other)

Implements liquibase.resource.Resource.resolveSibling.

Resolves the given path against this resource's parent path.

Inherited from liquibase.resource.AbstractResource:
equalsgetPathgetUrihashCoderesolvePathresolveSiblingPathtoString

Field Detail

resourceback to summary
private final Resource resource

Constructor Detail

SpringResourceback to summary
public SpringResource(String path, URI uri, Resource resource)

Method Detail

existsback to summary
public boolean exists()

Implements liquibase.resource.Resource.exists.

Returns:boolean

Doc from liquibase.resource.Resource.exists.

true if the resource defined by this object currently exists.

Annotations
@Override
isWritableback to summary
public boolean isWritable()

Overrides liquibase.resource.AbstractResource.isWritable.

Implements liquibase.resource.Resource.isWritable.

Doc from liquibase.resource.Resource.isWritable.

Return true if the resource can be written to

Annotations
@Override
openInputStreamback to summary
public InputStream openInputStream() throws IOException

Implements liquibase.resource.Resource.openInputStream.

Doc from liquibase.resource.Resource.openInputStream.

Opens an input stream to read from this resource.

Annotations
@Override
Exceptions
IOException:
if there is an error reading from the resource, including if the resource does not exist or cannot be read.
openOutputStreamback to summary
public OutputStream openOutputStream(OpenOptions openOptions) throws IOException

Overrides liquibase.resource.AbstractResource.openOutputStream.

Implements liquibase.resource.Resource.openOutputStream.

Doc from liquibase.resource.Resource.openOutputStream.

Opens an output stream given the passed OpenOptions. Cannot pass a null OpenOptions value

Annotations
@Override
resolveback to summary
public Resource resolve(String other)

Implements liquibase.resource.Resource.resolve.

Doc from liquibase.resource.Resource.resolve.

Resolve the given path against this resource. If other is an empty path then this method trivially returns this path. Otherwise this method considers this resource to be a directory and resolves the given path against this resource. Even if "other" begins with a `/`, the returned resource should be relative to this resource.

Annotations
@Override
resolveSiblingback to summary
public Resource resolveSibling(String other)

Implements liquibase.resource.Resource.resolveSibling.

Doc from liquibase.resource.Resource.resolveSibling.

Resolves the given path against this resource's parent path. This is useful where a file name needs to be replaced with another file name. For example, suppose that the name separator is "/" and a path represents "dir1/dir2/foo", then invoking this method with the Path "bar" will result in the Path "dir1/dir2/bar". If other is an empty path then this method returns this path's parent. Even if "other" begins with a `/`, the returned resource should be relative to this resource.

Annotations
@Override