Class AbstractSettings.AbstractBuilder<T extends AbstractSettings,B extends AbstractSettings.AbstractBuilder<T,B>>

java.lang.Object
se.swedenconnect.spring.saml.idp.settings.AbstractSettings.AbstractBuilder<T,B>
Direct Known Subclasses:
AssertionSettings.Builder, CredentialSettings.Builder, EndpointSettings.Builder, IdentityProviderSettings.Builder, MetadataProviderSettings.Builder, MetadataProviderSettings.HttpProxySettings.Builder, MetadataSettings.Builder, MetadataSettings.ContactPersonSettings.Builder, MetadataSettings.EncryptionMethodSettings.Builder, MetadataSettings.OrganizationSettings.Builder, MetadataSettings.SigningMethodSettings.Builder, MetadataSettings.UIInfoSettings.Builder, MetadataSettings.UIInfoSettings.LogoSettings.Builder
Enclosing class:
AbstractSettings

protected abstract static class AbstractSettings.AbstractBuilder<T extends AbstractSettings,B extends AbstractSettings.AbstractBuilder<T,B>> extends Object
A builder for subclasses of AbstractSettings.
  • Constructor Details

    • AbstractBuilder

      protected AbstractBuilder()
      Constructor.
  • Method Details

    • setting

      public B setting(String name, Object value)
      Assigns a configuration setting.
      Parameters:
      name - the setting name
      value - the setting value
      Returns:
      the builder
    • settings

      public B settings(Consumer<Map<String,Object>> settingsConsumer)
      A Consumer of the configuration settings Map allowing the ability to add, replace, or remove.
      Parameters:
      settingsConsumer - a Consumer of the configuration settings Map
      Returns:
      the builder
    • build

      public final T build()
      Builds the settings object and applies default values to those settings that are mandatory and has not been assigned.
      Returns:
      the settings object
    • applyDefaultSettings

      protected abstract void applyDefaultSettings()
      Is invoked by build() to apply default values to those settings that are mandatory and has not been assigned.
    • buildObject

      protected abstract T buildObject()
      Is invoked by build() and builds the settings object.
      Returns:
      the settings object
    • getSettings

      protected final Map<String,Object> getSettings()
      Gets the settings as a map.
      Returns:
      a map of the settings
    • getThis

      protected final B getThis()
      Gets the builder.
      Returns:
      the builder