Class AbstractSSODescriptorBuilder<T extends org.opensaml.saml.saml2.metadata.SSODescriptor,B extends AbstractSAMLObjectBuilder<T>>

java.lang.Object
se.swedenconnect.opensaml.common.builder.AbstractSAMLObjectBuilder<T>
se.swedenconnect.opensaml.saml2.metadata.build.AbstractSSODescriptorBuilder<T,B>
All Implemented Interfaces:
SAMLObjectBuilder<T>
Direct Known Subclasses:
IDPSSODescriptorBuilder, SPSSODescriptorBuilder

public abstract class AbstractSSODescriptorBuilder<T extends org.opensaml.saml.saml2.metadata.SSODescriptor,B extends AbstractSAMLObjectBuilder<T>> extends AbstractSAMLObjectBuilder<T>
Abstract base class for building a SSODescriptor.
Author:
Martin Lindström (martin@idsec.se)
  • Constructor Details

    • AbstractSSODescriptorBuilder

      public AbstractSSODescriptorBuilder()
      Default constructor.
    • AbstractSSODescriptorBuilder

      public AbstractSSODescriptorBuilder(T template, boolean clone)
      Constructor setting up the builder with a template object. Users of the instance may now change, add or delete, the elements and attributes of the template object using the assignment methods of the builder.

      The clone parameter tells whether the object should be cloned or not. If set to true, any modifications will have no effect on the passed object.

      Parameters:
      template - the template object
      clone - whether the template object should be cloned
  • Method Details

    • keyDescriptors

      public B keyDescriptors(List<org.opensaml.saml.saml2.metadata.KeyDescriptor> keyDescriptors)
      Adds the key descriptor elements.
      Parameters:
      keyDescriptors - the key descriptors
      Returns:
      the builder
    • keyDescriptors

      public B keyDescriptors(org.opensaml.saml.saml2.metadata.KeyDescriptor... keyDescriptors)
      Parameters:
      keyDescriptors - the key descriptors
      Returns:
      the builder
    • extensions

      public B extensions(org.opensaml.saml.saml2.metadata.Extensions extensions)
      Assigns metadata extensions.
      Parameters:
      extensions - the metadata extensions.
      Returns:
      the builder
    • getExtensionsBuilder

      public ExtensionsBuilder getExtensionsBuilder()
      Based on the contents of this object, an ExtensionsBuilder is returned. If the object holds an Extensions object, this is fed to the builder (but not cloned).
      Returns:
      an ExtensionsBuilder
    • nameIDFormats

      public B nameIDFormats(List<String> nameIDFormats)
      Assigns the md:NameIDFormat elements.
      Parameters:
      nameIDFormats - the nameID format strings
      Returns:
      the builder
    • nameIDFormats

      public B nameIDFormats(String... nameIDFormats)
      Parameters:
      nameIDFormats - the nameID format strings
      Returns:
      the builder
    • singleLogoutServices

      public B singleLogoutServices(List<org.opensaml.saml.saml2.metadata.SingleLogoutService> singleLogoutServices)
      Adds md:SingleLogoutService elements to the SSODescriptor.
      Parameters:
      singleLogoutServices - single logout service objects (cloned before assignment)
      Returns:
      the builder
    • singleLogoutServices

      public B singleLogoutServices(org.opensaml.saml.saml2.metadata.SingleLogoutService... singleLogoutServices)
      Parameters:
      singleLogoutServices - single logout service objects (cloned before assignment)
      Returns:
      the builder
    • getThis

      protected abstract B getThis()
      In order for us to be able to make chaining calls we need to return the concrete type of the builder.
      Returns:
      the concrete type of the builder