mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-18 03:01:05 +01:00
Refactor the repository store implementation in order to store repositories in specific paths.
This commit is contained in:
@@ -79,7 +79,7 @@ public class JAXBConfigurationEntryStoreFactory
|
||||
{
|
||||
this.keyGenerator = keyGenerator;
|
||||
directory = new File(context.getBaseDirectory(),
|
||||
StoreConstants.CONFIGDIRECTORY_NAME);
|
||||
StoreConstants.CONFIG_DIRECTORY_NAME);
|
||||
IOUtil.mkdirs(directory);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ import sonia.scm.util.IOUtil;
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* JAXB implementation of {@link JAXBConfigurationStoreFactory}.
|
||||
* JAXB implementation of {@link ConfigurationStoreFactory}.
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
*/
|
||||
@@ -63,7 +63,7 @@ public class JAXBConfigurationStoreFactory implements ConfigurationStoreFactory
|
||||
*/
|
||||
@Inject
|
||||
public JAXBConfigurationStoreFactory(SCMContextProvider context) {
|
||||
configDirectory = new File(context.getBaseDirectory(), StoreConstants.CONFIGDIRECTORY_NAME);
|
||||
configDirectory = new File(context.getBaseDirectory(), StoreConstants.CONFIG_DIRECTORY_NAME);
|
||||
IOUtil.mkdirs(configDirectory);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,12 +37,14 @@ package sonia.scm.store;
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
*/
|
||||
public interface StoreConstants
|
||||
public class StoreConstants
|
||||
{
|
||||
|
||||
/** Field description */
|
||||
public static final String CONFIGDIRECTORY_NAME = "config";
|
||||
private StoreConstants() { }
|
||||
|
||||
public static final String CONFIG_DIRECTORY_NAME = "config";
|
||||
|
||||
public static final String REPOSITORY_METADATA = "metadata";
|
||||
|
||||
/** Field description */
|
||||
public static final String FILE_EXTENSION = ".xml";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user