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 EffectiveRecipients, 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
EffectiveRecipients. This way, only one letter can be sent, targeting both EffectiveRecipient.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCommunicationTarget(CommunicationType type, EffectiveRecipient effectiveRecipient, ConcernedRecipient concernedRecipient) Creates a new instance ofCommunicationTarget, setting the relevant targetaddressoremailAddresswhich will further be used for validation/evaluation/communication depending on the givenCommunicationType. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRecipient(EffectiveRecipient effectiveRecipient) voidaddRecipients(List<EffectiveRecipient> effectiveRecipients) booleancontains(EffectiveRecipient effectiveRecipient) booleanEquals if same communication type and either address or emailAddress are the same.@Nullable Entity@Nullable StringgetType()inthashCode()
-
Constructor Details
-
CommunicationTarget
public CommunicationTarget(CommunicationType type, EffectiveRecipient effectiveRecipient, ConcernedRecipient concernedRecipient) Creates a new instance ofCommunicationTarget, setting the relevant targetaddressoremailAddresswhich will further be used for validation/evaluation/communication depending on the givenCommunicationType.- Parameters:
type- theCommunicationTypeof thisCommunicationTargeteffectiveRecipient- theEffectiveRecipientused for initializationconcernedRecipient- theConcernedRecipientfor which thisCommunicationTargetis 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
-