Package sonia.scm.store
Class TypedStoreParametersBuilder.OptionalRepositoryBuilder
java.lang.Object
sonia.scm.store.TypedStoreParametersBuilder.OptionalRepositoryBuilder
- Enclosing class:
- TypedStoreParametersBuilder<T,
S>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates or gets the store with the given name and (if specified) the given repository.forNamespace
(String namespace) Use this to create or get a store for a specific namespace.forRepository
(String repositoryId) Use this to create or get a store for a specific repository.forRepository
(Repository repository) Use this to create or get a store for a specific repository.withAdapter
(jakarta.xml.bind.annotation.adapters.XmlAdapter<?, ?> adapter) Sets an instance of anXmlAdapter
.withClassLoader
(ClassLoader classLoader) Sets theClassLoader
which is used as context class loader during marshaling and unmarshalling.
-
Constructor Details
-
OptionalRepositoryBuilder
public OptionalRepositoryBuilder()
-
-
Method Details
-
forRepository
public TypedStoreParametersBuilder<T,S>.OptionalRepositoryBuilder forRepository(Repository repository) Use this to create or get a store for a specific repository. This step is optional. If you want to have a global store, omit this.- Parameters:
repository
- The optional repository for the store.- Returns:
- Floating API to finish the call.
-
forRepository
public TypedStoreParametersBuilder<T,S>.OptionalRepositoryBuilder forRepository(String repositoryId) Use this to create or get a store for a specific repository. This step is optional. If you want to have a global store, omit this.- Parameters:
repositoryId
- The id of the optional repository for the store.- Returns:
- Floating API to finish the call.
-
forNamespace
Use this to create or get a store for a specific namespace. This step is optional. If you want to have a global store, omit this.- Parameters:
namespace
- The name of the optional namespace for the store.- Returns:
- Floating API to finish the call.
- Since:
- 2.44.0
-
withClassLoader
public TypedStoreParametersBuilder<T,S>.OptionalRepositoryBuilder withClassLoader(ClassLoader classLoader) Sets theClassLoader
which is used as context class loader during marshaling and unmarshalling. This is especially useful for storing class objects which come from an unknown source, in this case the UberClassLoader (PluginLoader.getUberClassLoader()
could be used for the store.- Parameters:
classLoader
- classLoader for the context- Returns:
this
-
withAdapter
public TypedStoreParametersBuilder<T,S>.OptionalRepositoryBuilder withAdapter(jakarta.xml.bind.annotation.adapters.XmlAdapter<?, ?> adapter) Sets an instance of anXmlAdapter
.- Parameters:
adapter
- adapter- Returns:
this
-
build
Creates or gets the store with the given name and (if specified) the given repository. If no repository is given, the store will be global.
-