Package org.flywaydb.core.api
Class Location
java.lang.Object
org.flywaydb.core.api.Location
- All Implemented Interfaces:
Comparable<Location>
A location to load migrations from.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanstatic Locationstatic LocationfromWildcardPath(String prefix, String rootPath, String wildcardPath, Pattern pathRegex) getPath()Deprecated.Use the root path instead.getPathRelativeToThis(String path) Returns the path relative to this location.The first folder in the path.inthashCode()booleanisAwsS3()Deprecated.booleanDeprecated.booleanDeprecated.booleanisGCS()Deprecated.booleanisParentOf(Location other) Deprecated.booleanmatchesPath(String path) Deprecated.toString()
-
Field Details
-
FILESYSTEM_PREFIX
Deprecated.The prefix for filesystem locations.- See Also:
-
-
Constructor Details
-
Location
Deprecated.
-
-
Method Details
-
fromPath
-
fromWildcardPath
-
matchesPath
Deprecated.- Returns:
- Whether the given path matches this locations regex. Will always return true when the location did not contain any wildcards.
-
getPathRelativeToThis
Returns the path relative to this location. If the location path contains wildcards, the returned path will be relative to the last non-wildcard folder in the path. -
isClassPath
Deprecated.Checks whether this denotes a location on the classpath.- Returns:
trueif it does,falseif it doesn't.
-
isFileSystem
Deprecated.Checks whether this denotes a location on the filesystem.- Returns:
trueif it does,falseif it doesn't.
-
isAwsS3
Deprecated.Checks whether this denotes a location in AWS S3.- Returns:
trueif it does,falseif it doesn't;
-
isGCS
Deprecated.Checks whether this denotes a location in Google cloud storage.- Returns:
trueif it does,falseif it doesn't;
-
isParentOf
Deprecated.Checks whether this location is a parent of this other location.- Parameters:
other- The other location.- Returns:
trueif it is,falseif it isn't.
-
getPath
Deprecated.Use the root path instead. This path will not be a genuine path for wildcard locations, whereas the root path is always a path.- Returns:
- The path part of the location.
- See Also:
-
getDescriptor
- Returns:
- The complete location descriptor.
-
compareTo
- Specified by:
compareToin interfaceComparable<Location>
-
toString
-
equals
-
hashCode
public int hashCode() -
getPrefix
- Returns:
- The prefix part of the location. Can be either classpath: or filesystem:.
-
getRootPath
The first folder in the path. This will equal rawPath if the path does not contain any wildcards- Returns:
- The root part of the path part of the location.
-
getPathRegex
- Returns:
- The regex that matches wildcards in the original path. Null if the original path did not contain any wildcards.
-