Class ContactPersonBuilder
- java.lang.Object
-
- se.litsec.opensaml.core.AbstractSAMLObjectBuilder<ContactPerson>
-
- se.litsec.opensaml.saml2.metadata.build.ContactPersonBuilder
-
- All Implemented Interfaces:
SAMLObjectBuilder<ContactPerson>
public class ContactPersonBuilder extends AbstractSAMLObjectBuilder<ContactPerson>
A builder forContactPerson
elements.- Author:
- Martin Lindström (martin.lindstrom@litsec.se)
-
-
Constructor Summary
Constructors Constructor Description ContactPersonBuilder()
Default constructor.ContactPersonBuilder(ContactPerson template)
Creates a builder from an object template.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ContactPersonBuilder
builder()
Creates a builder instance.static ContactPersonBuilder
builder(ContactPerson template)
Creates a builder instance.ContactPersonBuilder
company(String company)
Assigns theCompany
element.ContactPersonBuilder
emailAddresses(String... emailAddresses)
ContactPersonBuilder
emailAddresses(List<String> emailAddresses)
Assigns theEmailAddress
elements.protected Class<ContactPerson>
getObjectType()
Returns the object type.ContactPersonBuilder
givenName(String givenName)
Assigns theGivenName
element.ContactPersonBuilder
surname(String surname)
Assigns theSurName
element.ContactPersonBuilder
telephoneNumbers(String... telephoneNumbers)
ContactPersonBuilder
telephoneNumbers(List<String> telephoneNumbers)
Assigns theTelephoneNumber
elements.ContactPersonBuilder
type(ContactPersonTypeEnumeration type)
Assigns the type of contact person.-
Methods inherited from class se.litsec.opensaml.core.AbstractSAMLObjectBuilder
build, getDefaultElementName, object
-
-
-
-
Constructor Detail
-
ContactPersonBuilder
public ContactPersonBuilder()
Default constructor.
-
ContactPersonBuilder
public ContactPersonBuilder(ContactPerson template) throws MarshallingException, UnmarshallingException
Creates a builder from an object template.- Parameters:
template
- the object template- Throws:
MarshallingException
- for marshalling errorsUnmarshallingException
- for unmarshalling errors
-
-
Method Detail
-
builder
public static ContactPersonBuilder builder()
Creates a builder instance.- Returns:
- a builder instance
-
builder
public static ContactPersonBuilder builder(ContactPerson template) throws MarshallingException, UnmarshallingException
Creates a builder instance.- Parameters:
template
- the object template- Returns:
- a builder instance
- Throws:
MarshallingException
- for marshalling errorsUnmarshallingException
- for unmarshalling errors
-
type
public ContactPersonBuilder type(ContactPersonTypeEnumeration type)
Assigns the type of contact person.- Parameters:
type
- the type- Returns:
- the builder
-
company
public ContactPersonBuilder company(String company)
Assigns theCompany
element.- Parameters:
company
- the company- Returns:
- the builder
-
givenName
public ContactPersonBuilder givenName(String givenName)
Assigns theGivenName
element.- Parameters:
givenName
- the name- Returns:
- the builder
-
surname
public ContactPersonBuilder surname(String surname)
Assigns theSurName
element.- Parameters:
surname
- the name- Returns:
- the builder
-
emailAddresses
public ContactPersonBuilder emailAddresses(List<String> emailAddresses)
Assigns theEmailAddress
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:
emailAddresses(List)
-
telephoneNumbers
public ContactPersonBuilder telephoneNumbers(List<String> telephoneNumbers)
Assigns theTelephoneNumber
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:
telephoneNumbers(List)
-
getObjectType
protected Class<ContactPerson> getObjectType()
Returns the object type.- Specified by:
getObjectType
in classAbstractSAMLObjectBuilder<ContactPerson>
- Returns:
- the object type
-
-