Class SPSSODescriptorBuilder

java.lang.Object
se.swedenconnect.opensaml.common.builder.AbstractSAMLObjectBuilder<org.opensaml.saml.saml2.metadata.SPSSODescriptor>
se.swedenconnect.opensaml.saml2.metadata.build.AbstractSSODescriptorBuilder<org.opensaml.saml.saml2.metadata.SPSSODescriptor,SPSSODescriptorBuilder>
se.swedenconnect.opensaml.saml2.metadata.build.SPSSODescriptorBuilder
All Implemented Interfaces:
SAMLObjectBuilder<org.opensaml.saml.saml2.metadata.SPSSODescriptor>

public class SPSSODescriptorBuilder extends AbstractSSODescriptorBuilder<org.opensaml.saml.saml2.metadata.SPSSODescriptor,SPSSODescriptorBuilder>
A builder for SPSSODescriptor objects.
Author:
Martin Lindström (martin@idsec.se)
  • Constructor Details

    • SPSSODescriptorBuilder

      public SPSSODescriptorBuilder()
      Default constructor.
    • SPSSODescriptorBuilder

      public SPSSODescriptorBuilder(org.opensaml.saml.saml2.metadata.SPSSODescriptor 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 SPSSODescriptorBuilder builder()
      Utility method that creates a SPSSODescriptorBuilder instance.
      Returns:
      a SPSSODescriptorBuilder instance
    • authnRequestsSigned

      public SPSSODescriptorBuilder authnRequestsSigned(Boolean b)
      Assigns the AuthnRequestsSigned attribute of the md:SPSSODescriptor element.
      Parameters:
      b - boolean (if null, the attribute is not set)
      Returns:
      the builder
    • wantAssertionsSigned

      public SPSSODescriptorBuilder wantAssertionsSigned(Boolean b)
      Assigns the WantAssertionsSigned attribute of the md:SPSSODescriptor element.
      Parameters:
      b - whether assertions should be signed
      Returns:
      the builder
    • assertionConsumerServices

      public SPSSODescriptorBuilder assertionConsumerServices(List<org.opensaml.saml.saml2.metadata.AssertionConsumerService> assertionConsumerServices)
      Adds md:AssertionConsumerService elements to the SPSSODescriptor.
      Parameters:
      assertionConsumerServices - assertion consumer service objects (cloned before assignment)
      Returns:
      the builder
    • assertionConsumerServices

      public SPSSODescriptorBuilder assertionConsumerServices(org.opensaml.saml.saml2.metadata.AssertionConsumerService... assertionConsumerServices)
      Parameters:
      assertionConsumerServices - assertion consumer service objects (cloned before assignment)
      Returns:
      the builder
    • attributeConsumingServices

      public SPSSODescriptorBuilder attributeConsumingServices(List<org.opensaml.saml.saml2.metadata.AttributeConsumingService> attributeConsumingServices)
      Adds md:AttributeConsumingService elements to the SPSSODescriptor.
      Parameters:
      attributeConsumingServices - attribute consumer service objects (cloned before assignment)
      Returns:
      the builder
    • attributeConsumingServices

      public SPSSODescriptorBuilder attributeConsumingServices(org.opensaml.saml.saml2.metadata.AttributeConsumingService... attributeConsumingServices)
      Parameters:
      attributeConsumingServices - attribute consumer service objects (cloned before assignment)
      Returns:
      the builder
    • getThis

      protected SPSSODescriptorBuilder getThis()
      In order for us to be able to make chaining calls we need to return the concrete type of the builder.
      Specified by:
      getThis in class AbstractSSODescriptorBuilder<org.opensaml.saml.saml2.metadata.SPSSODescriptor,SPSSODescriptorBuilder>
      Returns:
      the concrete type of the builder
    • getObjectType

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