Package sonia.scm.store
Interface ConfigurationStoreFactory
public interface ConfigurationStoreFactory
The ConfigurationStoreFactory can be used to create new or get existing
Note: the default implementation uses the same location as the
You can either create a global
ConfigurationStore
objects.
Note: the default implementation uses the same location as the
ConfigurationEntryStoreFactory
, so be
sure that the store names are unique for all ConfigurationEntryStore
s and ConfigurationStore
s.
You can either create a global
ConfigurationStore
or a ConfigurationStore
for a specific repository.
To create a global ConfigurationStore
call:
configurationStoreFactory
.withType(PersistedType.class)
.withName("name")
.build();
To create a ConfigurationStore
for a specific repository call:
configurationStoreFactory
.withType(PersistedType.class)
.withName("name")
.forRepository(repository)
.build();
-
Method Summary
Modifier and TypeMethodDescription<T> ConfigurationStore<T>
getStore
(TypedStoreParameters<T> storeParameters) Creates a new or gets an existingConfigurationStore
.default <T> TypedStoreParametersBuilder<T,
ConfigurationStore<T>> Use this to create a new or get an existingConfigurationStore
with a floating API.
-
Method Details
-
getStore
Creates a new or gets an existingConfigurationStore
. Instead of calling this method you should use the floating API fromwithType(Class)
.- Parameters:
storeParameters
- The parameters for theConfigurationStore
.- Returns:
- A new or an existing
ConfigurationStore
for the given parameters.
-
withType
Use this to create a new or get an existingConfigurationStore
with a floating API.- Parameters:
type
- The type for theConfigurationStore
.- Returns:
- Floating API to set the name and either specify a repository or directly build a global
ConfigurationStore
.
-