Package org.flywaydb.core.api.locations
Class LocationParser
java.lang.Object
org.flywaydb.core.api.locations.LocationParser
Parses location descriptors (e.g. `filesystem:migrations`) Note that a location is no longer just a place to read
migrations from, but an abstraction for any resource or resource folder It can be used for different configurations -
e.g. where to read migrations from, where to read callbacks from, where to write output files to
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LocationparseLocation(String descriptor) Parses a location descriptor as provided in flyway configuration Validates that the location type, as defined by the prefix, can be handled Handles wildcard location parsing Normalizes the location path For a known location with no wildcards, the location can instead be constructed directly usingLocation.fromPath(String, String)static LocationparseLocation(String descriptor, String defaultPrefix, org.flywaydb.core.internal.scanner.ReadOnlyLocationHandler... additionalLocationHandlers)
-
Constructor Details
-
LocationParser
public LocationParser()
-
-
Method Details
-
parseLocation
Parses a location descriptor as provided in flyway configuration Validates that the location type, as defined by the prefix, can be handled Handles wildcard location parsing Normalizes the location path For a known location with no wildcards, the location can instead be constructed directly usingLocation.fromPath(String, String)- Parameters:
descriptor- the descriptor to parse (e.g. `filesystem:migrations`)- Returns:
- the parsed location - the prefix will always be set, and the path will be normalized
-
parseLocation
-