Class AddressServiceImpl

java.lang.Object
org.broadleafcommerce.profile.core.service.AddressServiceImpl
All Implemented Interfaces:
AddressService

@Service("blAddressService") public class AddressServiceImpl extends Object implements AddressService
  • Field Details

  • Constructor Details

    • AddressServiceImpl

      public AddressServiceImpl()
  • Method Details

    • saveAddress

      @Transactional("blTransactionManager") public Address saveAddress(Address address)
      Specified by:
      saveAddress in interface AddressService
    • readAddressById

      public Address readAddressById(Long addressId)
      Specified by:
      readAddressById in interface AddressService
    • create

      @Transactional("blTransactionManager") public Address create()
      Specified by:
      create in interface AddressService
    • delete

      @Transactional("blTransactionManager") public void delete(Address address)
      Specified by:
      delete in interface AddressService
    • verifyAddress

      public List<Address> verifyAddress(Address address) throws AddressVerificationException
      Description copied from interface: AddressService
      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.

      Specified by:
      verifyAddress in interface AddressService
      Returns:
      Throws:
      AddressVerificationException
    • copyAddress

      public Address copyAddress(Address orig)
      Description copied from interface: AddressService
      Returns a new address instance with the given properties on the originating address minus any default or active values set
      Specified by:
      copyAddress in interface AddressService
      Parameters:
      orig - - the address to copy
      Returns:
    • copyAddress

      public Address copyAddress(Address dest, Address orig)
      Description copied from interface: AddressService
      Copies properties from the originating address to the destination address minus any default or active values
      Specified by:
      copyAddress in interface AddressService
      Parameters:
      dest - - the address
      orig - - the address
      Returns:
    • populateAddressISOCountrySub

      public void populateAddressISOCountrySub(Address address)
      Description copied from interface: AddressService
      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.
      Specified by:
      populateAddressISOCountrySub in interface AddressService
    • setMustValidateAddresses

      public void setMustValidateAddresses(boolean mustValidateAddresses)
      Default is false. If set to true, the verifyAddress method will throw an exception if there are no providers to handle the request.
      Parameters:
      mustValidateAddresses -