Package ac.simons.neo4j.migrations.core
Class AbstractResourceBasedMigrationProvider
java.lang.Object
ac.simons.neo4j.migrations.core.AbstractResourceBasedMigrationProvider
- All Implemented Interfaces:
Ordered
,ResourceBasedMigrationProvider
- Direct Known Subclasses:
MarkdownBasedMigrationProvider
public abstract class AbstractResourceBasedMigrationProvider
extends Object
implements ResourceBasedMigrationProvider
A utility class to avoid duplication of common characteristics of
migration providers
.- Since:
- 1.9.0
- Author:
- Michael J. Simons
-
Field Summary
Fields inherited from interface ac.simons.neo4j.migrations.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractResourceBasedMigrationProvider
(int order, String extension, boolean supportsArbitraryResourceNames) The given parameters are all required. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ac.simons.neo4j.migrations.core.ResourceBasedMigrationProvider
handle
-
Constructor Details
-
AbstractResourceBasedMigrationProvider
protected AbstractResourceBasedMigrationProvider(int order, String extension, boolean supportsArbitraryResourceNames) The given parameters are all required.- Parameters:
order
- The order in which this provider should be consultedextension
- The file extension that this provider can deal withsupportsArbitraryResourceNames
- A flag if arbitrary resource names are supported in contrast to names that matchMigrationVersion.VERSION_PATTERN
-
-
Method Details
-
getOrder
public final int getOrder() -
getExtension
- Specified by:
getExtension
in interfaceResourceBasedMigrationProvider
- Returns:
- the file extension this resource based migration provider deals with
-
supportsArbitraryResourceNames
public final boolean supportsArbitraryResourceNames()Description copied from interface:ResourceBasedMigrationProvider
Return true if the provider has different ways how to map from file / resource names to a validversion
.- Specified by:
supportsArbitraryResourceNames
in interfaceResourceBasedMigrationProvider
- Returns:
- true if this provider can deal with non versioned file names
-