Create explicit method to create new repository locations

This commit is contained in:
René Pfeuffer
2019-06-05 14:27:35 +02:00
parent c7875e7f78
commit b274952fa9
10 changed files with 57 additions and 14 deletions

View File

@@ -24,7 +24,7 @@ class CopyMigrationStrategy extends BaseMigrationStrategy {
@Override
public Path migrate(String id, String name, String type) {
Path repositoryBasePath = locationResolver.forClass(Path.class).getLocation(id);
Path repositoryBasePath = locationResolver.forClass(Path.class).createLocation(id);
Path targetDataPath = repositoryBasePath
.resolve(RepositoryDirectoryHandler.REPOSITORIES_NATIVE_DIRECTORY);
Path sourceDataPath = getSourceDataPath(name, type);

View File

@@ -28,7 +28,7 @@ class MoveMigrationStrategy extends BaseMigrationStrategy {
@Override
public Path migrate(String id, String name, String type) {
Path repositoryBasePath = locationResolver.forClass(Path.class).getLocation(id);
Path repositoryBasePath = locationResolver.forClass(Path.class).createLocation(id);
Path targetDataPath = repositoryBasePath
.resolve(RepositoryDirectoryHandler.REPOSITORIES_NATIVE_DIRECTORY);
Path sourceDataPath = getSourceDataPath(name, type);