Describe different migration strategies

This commit is contained in:
René Pfeuffer
2019-06-06 12:52:23 +02:00
parent 1065899e99
commit 748043f537
2 changed files with 31 additions and 6 deletions

View File

@@ -6,14 +6,27 @@ import java.nio.file.Path;
public enum MigrationStrategy {
COPY(CopyMigrationStrategy.class),
MOVE(MoveMigrationStrategy.class),
INLINE(InlineMigrationStrategy.class);
COPY(CopyMigrationStrategy.class,
"Copy the repository data files to the new native location inside SCM-Manager home directory. " +
"This will keep the original directory."),
MOVE(MoveMigrationStrategy.class,
"Move the repository data files to the new native location inside SCM-Manager home directory. " +
"The original directory will be deleted."),
INLINE(InlineMigrationStrategy.class,
"Use the current directory where the repository data files are stored, but modify the directory " +
"structure so that it can be used for SCM-Manager v2. The repository data files will be moved to a new " +
"subdirectory 'data' inside the current directory.");
private Class<? extends Instance> implementationClass;
private final Class<? extends Instance> implementationClass;
private final String description;
MigrationStrategy(Class<? extends Instance> implementationClass) {
MigrationStrategy(Class<? extends Instance> implementationClass, String description) {
this.implementationClass = implementationClass;
this.description = description;
}
public String getDescription() {
return description;
}
Instance from(Injector injector) {