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) {
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<div class="control select">
|
||||
<select name="{{id}}">
|
||||
{{#strategies}}
|
||||
<option>{{.}}</option>
|
||||
<option>{{name}}</option>
|
||||
{{/strategies}}
|
||||
</select>
|
||||
</div>
|
||||
@@ -58,6 +58,18 @@
|
||||
</table>
|
||||
<button class="button is-primary" type="submit">Submit</button>
|
||||
</form>
|
||||
<hr>
|
||||
<div class="content">
|
||||
<h2 class="subtitle">These are the different strategies:</h2>
|
||||
<table class="table">
|
||||
{{#strategies}}
|
||||
<tr>
|
||||
<th>{{name}}</th>
|
||||
<td>{{description}}</td>
|
||||
</tr>
|
||||
{{/strategies}}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user