Class ExtensionsBuilder

java.lang.Object
se.swedenconnect.opensaml.common.builder.AbstractSAMLObjectBuilder<org.opensaml.saml.saml2.metadata.Extensions>
se.swedenconnect.opensaml.saml2.metadata.build.ExtensionsBuilder
All Implemented Interfaces:
SAMLObjectBuilder<org.opensaml.saml.saml2.metadata.Extensions>

public class ExtensionsBuilder extends AbstractSAMLObjectBuilder<org.opensaml.saml.saml2.metadata.Extensions>
Builder for metadata Extensions objects.
Author:
Martin Lindström (martin@idsec.se)
  • Constructor Details

    • ExtensionsBuilder

      public ExtensionsBuilder()
      Default constructor.
    • ExtensionsBuilder

      public ExtensionsBuilder(org.opensaml.saml.saml2.metadata.Extensions 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

    • builder

      public static ExtensionsBuilder builder()
      Creates a builder instance.
      Returns:
      a builder instance
    • extensions

      public ExtensionsBuilder extensions(List<org.opensaml.core.xml.XMLObject> extensions)
      Adds the extensions (overwrites any previous extensions).
      Parameters:
      extensions - the extension objects
      Returns:
      the builder
    • extensions

      public ExtensionsBuilder extensions(org.opensaml.core.xml.XMLObject... extensions)
      Parameters:
      extensions - the extension objects
      Returns:
      the builder
    • extension

      public ExtensionsBuilder extension(org.opensaml.core.xml.XMLObject... extension)
      Adds one, or more, extensions to this Extensions object.
      Parameters:
      extension - the extension(s) to add
      Returns:
      the builder
    • getObjectType

      protected Class<org.opensaml.saml.saml2.metadata.Extensions> getObjectType()
      Returns the object type.
      Specified by:
      getObjectType in class AbstractSAMLObjectBuilder<org.opensaml.saml.saml2.metadata.Extensions>
      Returns:
      the object type