Interface UserAddressServiceLocal

    • Method Detail

      • appendValidations

        void appendValidations​(Validator validator,
                               AddressDTO address,
                               ConfigurationAccessor configuration,
                               boolean nameRequired)
        Append validation of address fields to the given validator
      • cleanDisabledAddressFields

        void cleanDisabledAddressFields​(IAddress address,
                                        ConfigurationAccessor configuration)
        Sets null to the disabled address fields according to the given configuration
      • count

        int count​(User user)
        Count the addresses of the given user (hidden or not).
      • getAddresses

        List<UserAddressVO> getAddresses​(User user,
                                         boolean visibleOnly,
                                         boolean locatedOnly)
        Returns all the user addresses or only the visible or located ones
      • getDefaultUserAddress

        UserAddress getDefaultUserAddress​(User user)
        Returns the user default address or null if none exists
      • getSearchByDistanceData

        SearchByDistanceData getSearchByDistanceData()
        Returns data for the logged user to search by distance
      • getValidator

        Validator getValidator​(AddressDTO address,
                               Group group,
                               boolean nameRequired)
        Get a validator to validate in other services
      • listByUser

        List<UserAddress> listByUser​(User user)
        Returns the addresses of the given user. If the logged user can not view hidden profile fields then only visible addresses are returned.
      • maxAddressesReached

        boolean maxAddressesReached​(User user)
        Returns whether the given has reached the limit of allowed addresses
      • removeAll

        void removeAll​(User user)
        Removes all addresses of the given user
        Parameters:
        user -