Interface AddressService

All Known Implementing Classes:

public interface AddressService
  • 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
      entity - entity containing the address information to print
      type - type enum - see enum for details
      look - look enum - see enum for details
      the address string
    • getAddressAsString

      String getAddressAsString(Iterable<Entity> entity, @Nullable @Nullable AddressService.AddressType type, AddressService.AddressLook look)
      entity - multiple `User` entities that are all linked to the same address
      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
      userEntity - the user entity
      addressType - type enum - see enum for details
      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.
      address - the address to resolve
      addressType - the address type used to select the proper Acceptor
      either the input address or the linked address if available.
    • getSalutation

      String getSalutation(Iterable<Entity> users, @Nullable @Nullable Entity sender)
      Returns the salutation string for a list of users. The user entities must be linked to the same address.
      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 populated AddressData 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.
      the generated address as a String
    • getSalutation

      String getSalutation(Entity entity)
      Get a string containing the salutation line for the provided entity
      entity - entity containing the salutation information
      the salutation string
    • getSalutation

      String getSalutation(Entity entity, @Nullable @Nullable Entity sender)
    • getAddressDataProvider

      AddressDataProvider getAddressDataProvider(String entityName)
    • 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

      Optional<Entity> retrieveAddressUser(Entity user, Entity address)
    • isPoliteForm

      boolean isPoliteForm(@Nullable @Nullable Entity sender, Entity recipient)
    • isCasualForm

      boolean isCasualForm(@Nullable @Nullable Entity sender, Entity recipient)
    • getFullName

      String getFullName(Entity userEntity, boolean withTitle)
    • getFullName

      String getFullName(Entity userEntity)