Class IDPSSODescriptorBuilder

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

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

    • IDPSSODescriptorBuilder

      public IDPSSODescriptorBuilder()
      Default constructor.
    • IDPSSODescriptorBuilder

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

      public IDPSSODescriptorBuilder wantAuthnRequestsSigned(Boolean b)
      Assigns the WantAuthnRequestsSigned attribute of the md:IDPSSODescriptor element.
      Parameters:
      b - boolean
      Returns:
      the builder
    • singleSignOnServices

      public IDPSSODescriptorBuilder singleSignOnServices(List<org.opensaml.saml.saml2.metadata.SingleSignOnService> singleSignOnServices)
      Adds md:SingleSignOnService elements to the IDPSSODescriptor.
      Parameters:
      singleSignOnServices - single sign on service objects (cloned before assignment)
      Returns:
      the builder
    • singleSignOnServices

      public IDPSSODescriptorBuilder singleSignOnServices(org.opensaml.saml.saml2.metadata.SingleSignOnService... singleSignOnServices)
      Parameters:
      singleSignOnServices - single sign on service objects (cloned before assignment)
      Returns:
      the builder
    • attributes

      public IDPSSODescriptorBuilder attributes(List<org.opensaml.saml.saml2.core.Attribute> attributes)
      Adds Attribute elements to the IDPSSODescriptor.
      Parameters:
      attributes - the attributes to add
      Returns:
      the builder
    • attributes

      public IDPSSODescriptorBuilder attributes(org.opensaml.saml.saml2.core.Attribute... attributes)
      Parameters:
      attributes - the attributes to add
      Returns:
      the builder
    • getThis

      protected IDPSSODescriptorBuilder 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.IDPSSODescriptor,IDPSSODescriptorBuilder>
      Returns:
      the concrete type of the builder
    • getObjectType

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