Class CommunicationTarget
java.lang.Object
ch.tocco.nice2.optional.address.api.recipient.CommunicationTarget
CommunicationTarget
is the actual target for the communication based on an address
or emailAddress
.
When redirecting a letter for a ConcernedRecipient
to various EffectiveRecipient
s, like sending a letter
for a student (concerned) to his mother and father (effectives), they may live at the same address
.
Therefore, the CommunicationTarget
gets created based on that address
, having mother and parent set as
EffectiveRecipient
s. This way, only one letter can be sent, targeting both EffectiveRecipient
.-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionCommunicationTarget
(CommunicationType type, EffectiveRecipient effectiveRecipient, ConcernedRecipient concernedRecipient) Creates a new instance ofCommunicationTarget
, setting the relevant targetaddress
oremailAddress
which will further be used for validation/evaluation/communication depending on the givenCommunicationType
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRecipient
(EffectiveRecipient effectiveRecipient) void
addRecipients
(List<EffectiveRecipient> effectiveRecipients) boolean
contains
(EffectiveRecipient effectiveRecipient) boolean
Equals if same communication type and either address or emailAddress are the same.@Nullable Entity
@Nullable String
getType()
int
hashCode()
-
Constructor Details
-
CommunicationTarget
public CommunicationTarget(CommunicationType type, EffectiveRecipient effectiveRecipient, ConcernedRecipient concernedRecipient) Creates a new instance ofCommunicationTarget
, setting the relevant targetaddress
oremailAddress
which will further be used for validation/evaluation/communication depending on the givenCommunicationType
.- Parameters:
type
- theCommunicationType
of thisCommunicationTarget
effectiveRecipient
- theEffectiveRecipient
used for initializationconcernedRecipient
- theConcernedRecipient
for which thisCommunicationTarget
is created
-
-
Method Details
-
addRecipients
-
addRecipient
-
getRecipients
-
contains
-
getType
-
getAddress
-
getEmailAddress
-
getConcernedRecipient
-
equals
Equals if same communication type and either address or emailAddress are the same. -
hashCode
public int hashCode() -
getClientRepresentation
-