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
ConstructorDescriptionConcernedRecipientImpl
(Entity selectedEntity, RecipientParameters parameters, AddressService addressService, DefaultDisplayService defaultDisplayService) Creates a new instance ofConcernedRecipientImpl
for theselectedEntity
with all itsEffectiveRecipient
s arranged as list ofCommunicationTarget
based on theRecipientParameters
. -
Method Summary
Modifier and TypeMethodDescriptionReturns a simple representation of theConcernedRecipientImpl
to be used in client UI.Returns the Entity wrapped by thisConcernedRecipientImpl
.Returns theRecipientParameters
defining how theEffectiveRecipient
s for thisConcernedRecipient
have to be resolved.Returns the entity selected in the UI which led to theconcernedEntity
.Returns allCommunicationTarget
s evaluated for thisConcernedRecipient
sboolean
boolean
isPerson()
boolean
isValid()
Checks if thisConcernedRecipient
contains at least one validEffectiveRecipient
.
-
Constructor Details
-
ConcernedRecipientImpl
public ConcernedRecipientImpl(Entity selectedEntity, RecipientParameters parameters, AddressService addressService, DefaultDisplayService defaultDisplayService) throws NoEntityToLoadException Creates a new instance ofConcernedRecipientImpl
for theselectedEntity
with all itsEffectiveRecipient
s arranged as list ofCommunicationTarget
based on theRecipientParameters
.- Parameters:
selectedEntity
- theEntity
selected in the clientparameters
- theRecipientParameters
to evaluate the rightEntity
to getdefaultDisplayService
- theDefaultDisplayService
- Throws:
NoEntityToLoadException
-
-
Method Details
-
isValid
public boolean isValid()Description copied from interface:ConcernedRecipient
Checks if thisConcernedRecipient
contains at least one validEffectiveRecipient
.- Specified by:
isValid
in interfaceConcernedRecipient
- Returns:
true
if valid,false
otherwise- See Also:
-
isPerson
public boolean isPerson()Description copied from interface:ConcernedRecipient
- Specified by:
isPerson
in interfaceConcernedRecipient
- Returns:
true
if based onUser
,false
otherwise
-
isAddress
public boolean isAddress()Description copied from interface:ConcernedRecipient
- Specified by:
isAddress
in interfaceConcernedRecipient
- Returns:
true
if based onUser
,false
otherwise
-
getSelectedEntity
Returns the entity selected in the UI which led to theconcernedEntity
.- Specified by:
getSelectedEntity
in interfaceConcernedRecipient
- Returns:
- the selected entity
-
getConcernedEntity
- Specified by:
getConcernedEntity
in interfaceConcernedRecipient
- Returns:
- the selected entity
-
getTargets
Description copied from interface:ConcernedRecipient
Returns allCommunicationTarget
s evaluated for thisConcernedRecipient
s- Specified by:
getTargets
in interfaceConcernedRecipient
- Returns:
- the list of
CommunicationTarget
s - See Also:
-
getParameters
Description copied from interface:ConcernedRecipient
Returns theRecipientParameters
defining how theEffectiveRecipient
s for thisConcernedRecipient
have to be resolved.- Specified by:
getParameters
in interfaceConcernedRecipient
- Returns:
- the
RecipientParameters
-
getClientRepresentation
Returns a simple representation of theConcernedRecipientImpl
to be used in client UI.- Specified by:
getClientRepresentation
in interfaceConcernedRecipient
- Returns:
- the simple
ConcernedRecipientImpl
representation
-