mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 08:25:44 +01:00
Describe different migration strategies
This commit is contained in:
@@ -6,14 +6,27 @@ import java.nio.file.Path;
|
|||||||
|
|
||||||
public enum MigrationStrategy {
|
public enum MigrationStrategy {
|
||||||
|
|
||||||
COPY(CopyMigrationStrategy.class),
|
COPY(CopyMigrationStrategy.class,
|
||||||
MOVE(MoveMigrationStrategy.class),
|
"Copy the repository data files to the new native location inside SCM-Manager home directory. " +
|
||||||
INLINE(InlineMigrationStrategy.class);
|
"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.implementationClass = implementationClass;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
}
|
}
|
||||||
|
|
||||||
Instance from(Injector injector) {
|
Instance from(Injector injector) {
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
<div class="control select">
|
<div class="control select">
|
||||||
<select name="{{id}}">
|
<select name="{{id}}">
|
||||||
{{#strategies}}
|
{{#strategies}}
|
||||||
<option>{{.}}</option>
|
<option>{{name}}</option>
|
||||||
{{/strategies}}
|
{{/strategies}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@@ -58,6 +58,18 @@
|
|||||||
</table>
|
</table>
|
||||||
<button class="button is-primary" type="submit">Submit</button>
|
<button class="button is-primary" type="submit">Submit</button>
|
||||||
</form>
|
</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>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user