Interface AddressService
- All Known Implementing Classes:
AddressServiceImpl
public interface AddressService
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
static enum
-
Method Summary
Modifier and TypeMethodDescriptiongetAddressAsString
(AddressData data, AddressService.AddressLook look, @Nullable AddressService.AddressType type) This method implements all the logic to generate an address from a basic set of fields required for address generation.getAddressAsString
(Entity entity, @Nullable AddressService.AddressType type, AddressService.AddressLook look) Get a string containing the address for the provided entitygetAddressAsString
(Entity entity, AddressService.AddressType type, AddressService.AddressLook look, String billingAddressAddition) getAddressAsString
(Iterable<Entity> entity, @Nullable AddressService.AddressType type, AddressService.AddressLook look) getAddressAsStringForUser
(Entity entity, AddressService.AddressType addressType, @Nullable AddressService.AddressLook look) getAddressData
(Entity entity, AddressService.AddressType type, AddressService.AddressLook look) Gets a populatedAddressData
object for the given entity, address type and address look.getAddressDataProvider
(String entityName) @Nullable Entity
getAddressForUser
(Entity userEntity, AddressService.AddressType addressType) Get an Address entity for the provided User entitygetAddressWithAltUser
(Entity address, Entity user, AddressService.AddressType addressType, AddressService.AddressLook look, @Nullable String billingAddressAdditionUser, @Nullable String billingAddressAdditionOther) getFullName
(Entity userEntity) getFullName
(Entity userEntity, boolean withTitle) getSalutation
(Entity entity) Get a string containing the salutation line for the provided entitygetSalutation
(Entity entity, @Nullable Entity sender) getSalutation
(Iterable<Entity> users, @Nullable Entity sender) Returns the salutation string for a list of users.boolean
isCasualForm
(@Nullable Entity sender, Entity recipient) boolean
isPoliteForm
(@Nullable Entity sender, Entity recipient) @Nullable Entity
resolveAddressAddressAcceptor
(@Nullable Entity address, AddressService.AddressType addressType) Get the address that is linked as "recipient" of the parameter address using Address_address with the appropriate "Acceptor" for a given AddressType.retrieveAddressUser
(Entity user, Entity address)
-
Method Details
-
getAddressAsString
String getAddressAsString(Entity entity, @Nullable @Nullable AddressService.AddressType type, AddressService.AddressLook look) Get a string containing the address for the provided entity- Parameters:
entity
- entity containing the address information to printtype
- type enum - see enum for detailslook
- look enum - see enum for details- Returns:
- the address string
-
getAddressAsString
String getAddressAsString(Iterable<Entity> entity, @Nullable @Nullable AddressService.AddressType type, AddressService.AddressLook look) - Parameters:
entity
- multiple `User` entities that are all linked to the same address- Returns:
- an address block, where the fullnames of the persons are concatenated
-
getAddressAsString
String getAddressAsString(Entity entity, AddressService.AddressType type, AddressService.AddressLook look, String billingAddressAddition) -
getAddressForUser
@Nullable @Nullable Entity getAddressForUser(Entity userEntity, AddressService.AddressType addressType) Get an Address entity for the provided User entity- Parameters:
userEntity
- the user entityaddressType
- type enum - see enum for details- Returns:
- an Address entity
-
resolveAddressAddressAcceptor
@Nullable @Nullable Entity resolveAddressAddressAcceptor(@Nullable @Nullable Entity address, AddressService.AddressType addressType) Get the address that is linked as "recipient" of the parameter address using Address_address with the appropriate "Acceptor" for a given AddressType. If the input address is null, null is returned.- Parameters:
address
- the address to resolveaddressType
- the address type used to select the proper Acceptor- Returns:
- either the input address or the linked address if available.
-
getSalutation
Returns the salutation string for a list of users. The user entities must be linked to the same address.- Parameters:
sender
- optional sender, used to inspect person-to-person salutation
-
getAddressData
AddressData getAddressData(Entity entity, @Nullable AddressService.AddressType type, @Nullable AddressService.AddressLook look) Gets a populatedAddressData
object for the given entity, address type and address look. -
getAddressAsString
String getAddressAsString(AddressData data, AddressService.AddressLook look, @Nullable @Nullable AddressService.AddressType type) This method implements all the logic to generate an address from a basic set of fields required for address generation.- Returns:
- the generated address as a String
-
getSalutation
Get a string containing the salutation line for the provided entity- Parameters:
entity
- entity containing the salutation information- Returns:
- the salutation string
-
getSalutation
-
getAddressDataProvider
-
getAddressAsStringForUser
String getAddressAsStringForUser(Entity entity, AddressService.AddressType addressType, @Nullable @Nullable AddressService.AddressLook look) -
getAddressWithAltUser
String getAddressWithAltUser(Entity address, Entity user, AddressService.AddressType addressType, AddressService.AddressLook look, @Nullable @Nullable String billingAddressAdditionUser, @Nullable @Nullable String billingAddressAdditionOther) -
retrieveAddressUser
-
isPoliteForm
-
isCasualForm
-
getFullName
-
getFullName
-