Class ContactPersonBuilder
java.lang.Object
se.swedenconnect.opensaml.common.builder.AbstractSAMLObjectBuilder<ContactPerson>
se.swedenconnect.opensaml.saml2.metadata.build.ContactPersonBuilder
- All Implemented Interfaces:
SAMLObjectBuilder<ContactPerson>
A builder for
ContactPerson elements.- Author:
- Martin Lindström (martin@idsec.se)
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.ContactPersonBuilder(ContactPerson template) Creates a builder from an object template. -
Method Summary
Modifier and TypeMethodDescriptionstatic ContactPersonBuilderbuilder()Creates a builder instance.static ContactPersonBuilderbuilder(ContactPerson template) Creates a builder instance.Assigns theCompanyelement.emailAddresses(String... emailAddresses) emailAddresses(List<String> emailAddresses) Assigns theEmailAddresselements.protected Class<ContactPerson> Returns the object type.Assigns theGivenNameelement.Assigns theSurNameelement.telephoneNumbers(String... telephoneNumbers) telephoneNumbers(List<String> telephoneNumbers) Assigns theTelephoneNumberelements.Assigns the type of contact person.Methods inherited from class se.swedenconnect.opensaml.common.builder.AbstractSAMLObjectBuilder
build, getDefaultElementName, object
-
Constructor Details
-
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 Details
-
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
Assigns the type of contact person.- Parameters:
type- the type- Returns:
- the builder
-
company
Assigns theCompanyelement.- Parameters:
company- the company- Returns:
- the builder
-
givenName
Assigns theGivenNameelement.- Parameters:
givenName- the name- Returns:
- the builder
-
surname
Assigns theSurNameelement.- Parameters:
surname- the name- Returns:
- the builder
-
emailAddresses
Assigns theEmailAddresselements.- Parameters:
emailAddresses- the email addresses- Returns:
- the builder
-
emailAddresses
- Parameters:
emailAddresses- the email addresses- Returns:
- the builder
- See Also:
-
telephoneNumbers
Assigns theTelephoneNumberelements.- Parameters:
telephoneNumbers- the numbers to assign- Returns:
- the builder
-
telephoneNumbers
- Parameters:
telephoneNumbers- the numbers to assign- Returns:
- the builder
- See Also:
-
getObjectType
Returns the object type.- Specified by:
getObjectTypein classAbstractSAMLObjectBuilder<ContactPerson>- Returns:
- the object type
-