Package sonia.scm.store
Interface ConfigurationStoreFactory
public interface ConfigurationStoreFactory
Note: the default implementation uses the same location as the
The ConfigurationStoreFactory can be used to create new or get existing
Call this to create a global
Call this to create a
ConfigurationEntryStoreFactory, so be
sure that the store names are unique for all ConfigurationEntryStores and ConfigurationStores.
The ConfigurationStoreFactory can be used to create new or get existing
ConfigurationStore objects.
You can either create a global ConfigurationStore or a ConfigurationStore for a specific repository.
Call this to create a global
ConfigurationStore:
configurationStoreFactory.withType(PersistedType.class).withName("name").build();
Call this to create a
ConfigurationStore for a specific repository:
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 existingConfigurationStorewith 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
ConfigurationStorefor the given parameters.
-
withType
Use this to create a new or get an existingConfigurationStorewith 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.
-