mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
Describe different migration strategies
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user