Interface INotificationRecipientBuilder
public interface INotificationRecipientBuilder
Builder tool used to produce notification recipient.
A builder instance can only produce one recipient instance safely. So, to produce multiple recipient instance you need to retrieve multiple builder instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Produces a notification recipient with the information previously fed using "with..." methodsFeeds the e-mail and returns the builderwithExternalID
(String externalID) Feeds the externalID and returns the builderwithFirstName
(String firstName) Feeds the firstName and returns the builderwithFullName
(String fullName) Feeds the fullName and returns the builderFeeds every data that can be found in the IUser and returns the builderwithIUserProtocolURI
(String iUserProtocolURI) Feeds the IUser's protocolURI and returns the builderwithLanguageCode
(String languageCode) Feeds the languageCode and returns the builderwithLastName
(String lastName) Feeds the lastName and returns the builderFeeds the login and returns the builderwithMobilePhoneNumber
(String mobilePhoneNumber) Feeds the mobile phone number and returns the builderwithPhoneNumber
(String phoneNumber) Feeds the phone number and returns the builderFeeds the sex and returns the builderFeeds the title and returns the builder
-
Method Details
-
withFirstName
Feeds the firstName and returns the builder- Parameters:
firstName
- the firstName to feed- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if firstName is null or blank
-
withLastName
Feeds the lastName and returns the builder- Parameters:
lastName
- the lastName to feed- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if lastName is null or blank
-
withFullName
Feeds the fullName and returns the builder- Parameters:
fullName
- the fullName to feed- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if fullName is null or blank
-
withTitle
Feeds the title and returns the builder- Parameters:
title
- the title to feed- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if title is null or blank
-
withSex
Feeds the sex and returns the builder- Parameters:
sex
- the sex to feed- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if sex is null or blank
-
withIUserProtocolURI
Feeds the IUser's protocolURI and returns the builder- Parameters:
iUserProtocolURI
- the IUser's protocolURI to feed- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if iUserProtocolURI is null or blank
-
withLogin
Feeds the login and returns the builder- Parameters:
login
- the login to feed- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if login is null or blank
-
withExternalID
Feeds the externalID and returns the builder- Parameters:
externalID
- the externalID to feed- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if externalID is null or blank
-
withLanguageCode
Feeds the languageCode and returns the builder- Parameters:
languageCode
- the languageCode to feed- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if languageCode is null or blank
-
withEmail
Feeds the e-mail and returns the builder- Parameters:
email
- the e-mail to feed- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if email is null, blank or invalid
-
withPhoneNumber
Feeds the phone number and returns the builder- Parameters:
phoneNumber
- the phone number to feed- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if phoneNumber is null or blank
-
withMobilePhoneNumber
Feeds the mobile phone number and returns the builder- Parameters:
mobilePhoneNumber
- the mobile phone number to feed- Returns:
- the builder
- Throws:
IllegalArgumentException
- - if mobilePhoneNumber is null or blank
-
withIUser
Feeds every data that can be found in the IUser and returns the builder- Parameters:
iUser
- the IUser to use to feed data- Returns:
- the builder
- Throws:
NullPointerException
- - if iUser is null
-
build
Produces a notification recipient with the information previously fed using "with..." methods- Returns:
- the produced notification recipient
- Throws:
NotificationRecipientException
- - If builder hasn't enough data to produce a notification recipient (use with methods before)
-