Class TypedStoreParametersBuilder.OptionalRepositoryBuilder

java.lang.Object
sonia.scm.store.TypedStoreParametersBuilder.OptionalRepositoryBuilder
Enclosing class:
TypedStoreParametersBuilder<T,S>

public class TypedStoreParametersBuilder.OptionalRepositoryBuilder extends Object
  • Constructor Details

    • OptionalRepositoryBuilder

      public OptionalRepositoryBuilder()
  • Method Details

    • forRepository

      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 the ClassLoader 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 an XmlAdapter.
      Parameters:
      adapter - adapter
      Returns:
      this
    • build

      public S 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.