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