Interface AddressService

All Known Implementing Classes:
AddressServiceImpl

public interface AddressService
  • Method Details

    • saveAddress

      Address saveAddress(Address address)
    • readAddressById

      Address readAddressById(Long addressId)
    • create

      Address create()
    • delete

      void delete(Address address)
    • verifyAddress

      List<Address> verifyAddress(Address address) throws AddressVerificationException
      Verifies the address and returns a collection of addresses. If the address was invalid but close to a match, this method should return a list of one or more addresses that may be valid. If the address is valid, implementations should return the valid address in the list. Implementations may set the tokenized address, zip four, and verification level. If the address could not be validated, implementors should throw an AddressValidationException.

      For example, an address may be close, but missing zip four. This service should return the address in question with zip four populated.

      Parameters:
      address -
      Returns:
      Throws:
      AddressVerificationException
    • copyAddress

      Address copyAddress(Address orig)
      Returns a new address instance with the given properties on the originating address minus any default or active values set
      Parameters:
      orig - - the address to copy
      Returns:
    • copyAddress

      Address copyAddress(Address dest, Address orig)
      Copies properties from the originating address to the destination address minus any default or active values
      Parameters:
      dest - - the address
      orig - - the address
      Returns:
    • populateAddressISOCountrySub

      void populateAddressISOCountrySub(Address address)
      Convenience method that attempts to pre-populate the ISO Country Subdivision on an address. Strategy attempts to identify the ISO subdivision based on the contents of the "friendly" state/province/region attribute and the ISO alpha-2 country code already populated on the passed in address. It will attempt to look for the "alternate abbreviation" first, and if not found will check the "name" next.
      Parameters:
      address -