Class DefaultUserFacade

    • Constructor Detail

      • DefaultUserFacade

        public DefaultUserFacade()
    • Method Detail

      • isAnonymousUser

        public boolean isAnonymousUser()
        Description copied from interface: UserFacade
        Test if the current user is anonymous
        Specified by:
        isAnonymousUser in interface UserFacade
        Returns:
        true if the current user is anonymous
      • isUserExisting

        public boolean isUserExisting​(java.lang.String id)
        Description copied from interface: UserFacade
        Verifies whether the user exists. The given id is used to find the user in matching strategies that use one of the unique identifiers to recognize the user.
        Specified by:
        isUserExisting in interface UserFacade
        Parameters:
        id - - ID used to find the user
        Returns:
        true if the user exists
        See Also:
        DefaultUserMatchingService
      • getUserUID

        public java.lang.String getUserUID​(java.lang.String id)
        Description copied from interface: UserFacade
        Returns the UID of the found user. The user is searched by a matching strategy that uses one of the unique identifiers to recognize the user.
        Specified by:
        getUserUID in interface UserFacade
        Parameters:
        id - one of the unique identifiers used to identify a user
        Returns:
        UID of the found user
        See Also:
        DefaultUserMatchingService
      • setCurrentUser

        public void setCurrentUser​(java.lang.String id)
        Description copied from interface: UserFacade
        Sets current user explicitly. The given id is used to find the user in matching strategies that use one of the unique identifiers to recognize the user.
        Specified by:
        setCurrentUser in interface UserFacade
        Parameters:
        id - - id used to find the user
        See Also:
        DefaultUserMatchingService
      • isAddressBookEmpty

        @Deprecated(since="6.5")
        public boolean isAddressBookEmpty()
        Deprecated.
        Since 6.5. Use CollectionUtils.isEmpty(Collection) with this.getAddressBook() as paramenter instead.
        Description copied from interface: UserFacade
        Test if the address book is empty.
        Specified by:
        isAddressBookEmpty in interface UserFacade
        Returns:
        true if the customer has no addresses
      • getAddressBook

        public java.util.List<AddressData> getAddressBook()
        Description copied from interface: UserFacade
        Get the list of delivery addresses.
        Specified by:
        getAddressBook in interface UserFacade
        Returns:
        the delivery addresses
      • addAddress

        public void addAddress​(AddressData addressData)
        Description copied from interface: UserFacade
        Adds the address for the current user
        Specified by:
        addAddress in interface UserFacade
        Parameters:
        addressData - the address to add
      • editAddress

        public void editAddress​(AddressData addressData)
        Description copied from interface: UserFacade
        Updates the address for the current user
        Specified by:
        editAddress in interface UserFacade
        Parameters:
        addressData - the address to update
      • removeAddress

        public void removeAddress​(AddressData addressData)
        Description copied from interface: UserFacade
        Removes the address for the current user
        Specified by:
        removeAddress in interface UserFacade
        Parameters:
        addressData - the address to remove
      • setDefaultAddress

        public void setDefaultAddress​(AddressData addressData)
        Description copied from interface: UserFacade
        Sets the default address
        Specified by:
        setDefaultAddress in interface UserFacade
        Parameters:
        addressData - the address to make default
      • getAddressForCode

        public AddressData getAddressForCode​(java.lang.String code)
        Description copied from interface: UserFacade
        Returns the address with matching code for the current user
        Specified by:
        getAddressForCode in interface UserFacade
        Parameters:
        code - the address code
        Returns:
        the address
      • isDefaultAddress

        public boolean isDefaultAddress​(java.lang.String addressId)
        Description copied from interface: UserFacade
        Test if the address id matches with the default address id
        Specified by:
        isDefaultAddress in interface UserFacade
        Parameters:
        addressId - the address Id
        Returns:
        true if address id is the default address id
      • getCCPaymentInfos

        public java.util.List<CCPaymentInfoData> getCCPaymentInfos​(boolean saved)
        Description copied from interface: UserFacade
        Returns the current user's Credit Card Payment Infos
        Specified by:
        getCCPaymentInfos in interface UserFacade
        Parameters:
        saved - true to retrieve only saved credit card payment infos
        Returns:
        list of Credit Card Payment Info Data
      • getCCPaymentInfoForCode

        public CCPaymentInfoData getCCPaymentInfoForCode​(java.lang.String code)
        Description copied from interface: UserFacade
        Returns the current user's credit card payment info given it's code
        Specified by:
        getCCPaymentInfoForCode in interface UserFacade
        Parameters:
        code - the code
        Returns:
        the Credit Card Payment Info Data
      • setDefaultPaymentInfo

        public void setDefaultPaymentInfo​(CCPaymentInfoData paymentInfoData)
        Description copied from interface: UserFacade
        Sets the default Payment Info
        Specified by:
        setDefaultPaymentInfo in interface UserFacade
        Parameters:
        paymentInfoData - the paymentInfo to make default
      • removeCCPaymentInfo

        public void removeCCPaymentInfo​(java.lang.String id)
        Description copied from interface: UserFacade
        Removes credit card payment info by id
        Specified by:
        removeCCPaymentInfo in interface UserFacade
        Parameters:
        id - the id
      • updateCCPaymentInfo

        public void updateCCPaymentInfo​(CCPaymentInfoData paymentInfo)
        Description copied from interface: UserFacade
        Updates current users' payment info
        Specified by:
        updateCCPaymentInfo in interface UserFacade
        Parameters:
        paymentInfo - - new payment info data
      • syncSessionLanguage

        public void syncSessionLanguage()
        Description copied from interface: UserFacade
        Sets users preferred language to the current session language
        Specified by:
        syncSessionLanguage in interface UserFacade
      • syncSessionCurrency

        public void syncSessionCurrency()
        Description copied from interface: UserFacade
        Sets users preferred currency to the current session currency
        Specified by:
        syncSessionCurrency in interface UserFacade
      • updateDefaultPaymentInfo

        protected void updateDefaultPaymentInfo​(CustomerModel currentCustomer)
      • getCurrentUserForCheckout

        protected CustomerModel getCurrentUserForCheckout()
      • getUserService

        protected UserService getUserService()
      • setUserService

        public void setUserService​(UserService userService)
      • setCustomerAccountService

        public void setCustomerAccountService​(CustomerAccountService customerAccountService)
      • setCommerceCommonI18NService

        public void setCommerceCommonI18NService​(CommerceCommonI18NService commerceCommonI18NService)
      • getModelService

        protected ModelService getModelService()
      • setModelService

        public void setModelService​(ModelService modelService)
      • setCommonI18NService

        public void setCommonI18NService​(CommonI18NService commonI18NService)
      • getCartService

        protected CartService getCartService()
      • setCartService

        public void setCartService​(CartService cartService)
      • setCheckoutCustomerStrategy

        public void setCheckoutCustomerStrategy​(CheckoutCustomerStrategy checkoutCustomerStrategy)
      • setUserMatchingService

        public void setUserMatchingService​(UserMatchingService userMatchingService)