Class ConcernedRecipientImpl
java.lang.Object
ch.tocco.nice2.optional.address.impl.recipient.ConcernedRecipientImpl
- All Implemented Interfaces:
ConcernedRecipient
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.optional.address.api.recipient.ConcernedRecipient
ConcernedRecipient.ClientRepresentation -
Constructor Summary
ConstructorsConstructorDescriptionConcernedRecipientImpl(Entity selectedEntity, RecipientParameters parameters, AddressService addressService, DefaultDisplayService defaultDisplayService) Creates a new instance ofConcernedRecipientImplfor theselectedEntitywith all itsEffectiveRecipients arranged as list ofCommunicationTargetbased on theRecipientParameters. -
Method Summary
Modifier and TypeMethodDescriptionReturns a simple representation of theConcernedRecipientImplto be used in client UI.Returns the Entity wrapped by thisConcernedRecipientImpl.Returns theRecipientParametersdefining how theEffectiveRecipients for thisConcernedRecipienthave to be resolved.Returns the entity selected in the UI which led to theconcernedEntity.Returns allCommunicationTargets evaluated for thisConcernedRecipientsbooleanbooleanisPerson()booleanisValid()Checks if thisConcernedRecipientcontains at least one validEffectiveRecipient.
-
Constructor Details
-
ConcernedRecipientImpl
public ConcernedRecipientImpl(Entity selectedEntity, RecipientParameters parameters, AddressService addressService, DefaultDisplayService defaultDisplayService) throws NoEntityToLoadException Creates a new instance ofConcernedRecipientImplfor theselectedEntitywith all itsEffectiveRecipients arranged as list ofCommunicationTargetbased on theRecipientParameters.- Parameters:
selectedEntity- theEntityselected in the clientparameters- theRecipientParametersto evaluate the rightEntityto getdefaultDisplayService- theDefaultDisplayService- Throws:
NoEntityToLoadException
-
-
Method Details
-
isValid
public boolean isValid()Description copied from interface:ConcernedRecipientChecks if thisConcernedRecipientcontains at least one validEffectiveRecipient.- Specified by:
isValidin interfaceConcernedRecipient- Returns:
trueif valid,falseotherwise- See Also:
-
isPerson
public boolean isPerson()Description copied from interface:ConcernedRecipient- Specified by:
isPersonin interfaceConcernedRecipient- Returns:
trueif based onUser,falseotherwise
-
isAddress
public boolean isAddress()Description copied from interface:ConcernedRecipient- Specified by:
isAddressin interfaceConcernedRecipient- Returns:
trueif based onUser,falseotherwise
-
getSelectedEntity
Returns the entity selected in the UI which led to theconcernedEntity.- Specified by:
getSelectedEntityin interfaceConcernedRecipient- Returns:
- the selected entity
-
getConcernedEntity
- Specified by:
getConcernedEntityin interfaceConcernedRecipient- Returns:
- the selected entity
-
getTargets
Description copied from interface:ConcernedRecipientReturns allCommunicationTargets evaluated for thisConcernedRecipients- Specified by:
getTargetsin interfaceConcernedRecipient- Returns:
- the list of
CommunicationTargets - See Also:
-
getParameters
Description copied from interface:ConcernedRecipientReturns theRecipientParametersdefining how theEffectiveRecipients for thisConcernedRecipienthave to be resolved.- Specified by:
getParametersin interfaceConcernedRecipient- Returns:
- the
RecipientParameters
-
getClientRepresentation
Returns a simple representation of theConcernedRecipientImplto be used in client UI.- Specified by:
getClientRepresentationin interfaceConcernedRecipient- Returns:
- the simple
ConcernedRecipientImplrepresentation
-