Class ContactPersonBuilder

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

public class ContactPersonBuilder extends AbstractSAMLObjectBuilder<org.opensaml.saml.saml2.metadata.ContactPerson>
A builder for ContactPerson elements.
Author:
Martin Lindström (martin@idsec.se)
  • Constructor Details

    • ContactPersonBuilder

      public ContactPersonBuilder()
      Default constructor.
    • ContactPersonBuilder

      public ContactPersonBuilder(org.opensaml.saml.saml2.metadata.ContactPerson template) throws org.opensaml.core.xml.io.MarshallingException, org.opensaml.core.xml.io.UnmarshallingException
      Creates a builder from an object template.
      Parameters:
      template - the object template
      Throws:
      org.opensaml.core.xml.io.MarshallingException - for marshalling errors
      org.opensaml.core.xml.io.UnmarshallingException - for unmarshalling errors
  • Method Details

    • builder

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

      public static ContactPersonBuilder builder(org.opensaml.saml.saml2.metadata.ContactPerson template) throws org.opensaml.core.xml.io.MarshallingException, org.opensaml.core.xml.io.UnmarshallingException
      Creates a builder instance.
      Parameters:
      template - the object template
      Returns:
      a builder instance
      Throws:
      org.opensaml.core.xml.io.MarshallingException - for marshalling errors
      org.opensaml.core.xml.io.UnmarshallingException - for unmarshalling errors
    • type

      public ContactPersonBuilder type(org.opensaml.saml.saml2.metadata.ContactPersonTypeEnumeration type)
      Assigns the type of contact person.
      Parameters:
      type - the type
      Returns:
      the builder
    • company

      public ContactPersonBuilder company(String company)
      Assigns the Company element.
      Parameters:
      company - the company
      Returns:
      the builder
    • givenName

      public ContactPersonBuilder givenName(String givenName)
      Assigns the GivenName element.
      Parameters:
      givenName - the name
      Returns:
      the builder
    • surname

      public ContactPersonBuilder surname(String surname)
      Assigns the SurName element.
      Parameters:
      surname - the name
      Returns:
      the builder
    • emailAddresses

      public ContactPersonBuilder emailAddresses(List<String> emailAddresses)
      Assigns the EmailAddress elements.
      Parameters:
      emailAddresses - the email addresses
      Returns:
      the builder
    • emailAddresses

      public ContactPersonBuilder emailAddresses(String... emailAddresses)
      Parameters:
      emailAddresses - the email addresses
      Returns:
      the builder
      See Also:
    • telephoneNumbers

      public ContactPersonBuilder telephoneNumbers(List<String> telephoneNumbers)
      Assigns the TelephoneNumber elements.
      Parameters:
      telephoneNumbers - the numbers to assign
      Returns:
      the builder
    • telephoneNumbers

      public ContactPersonBuilder telephoneNumbers(String... telephoneNumbers)
      Parameters:
      telephoneNumbers - the numbers to assign
      Returns:
      the builder
      See Also:
    • getObjectType

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