Class DefaultTravelCustomerFacade

java.lang.Object
de.hybris.platform.commercefacades.customer.impl.DefaultCustomerFacade
de.hybris.platform.travelfacades.facades.customer.impl.DefaultTravelCustomerFacade
All Implemented Interfaces:
de.hybris.platform.commercefacades.customer.CustomerFacade, TravelCustomerFacade
Direct Known Subclasses:
DefaultShoppingTravelCustomerFacade

public class DefaultTravelCustomerFacade extends de.hybris.platform.commercefacades.customer.impl.DefaultCustomerFacade implements TravelCustomerFacade
Implementation class for TravelCustomerFacade interface.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    createGuestCustomer(String email, String lastName)
    This method creates a GuestCustomer and returns the Uid.
    Gets address book.
    protected de.hybris.platform.servicelayer.config.ConfigurationService
     
     
    This method is used to get the list of searches saved by current customer.
    protected de.hybris.platform.servicelayer.dto.converter.Converter<SavedSearchModel,SavedSearchData>
     
    protected de.hybris.platform.servicelayer.dto.converter.Converter<SavedSearchData,SavedSearchModel>
     
    protected de.hybris.platform.servicelayer.time.TimeService
     
    boolean
    Checks if current user is a B2b customer.
    protected boolean
    isDefaultAddress(AddressModel defaultAddress, AddressData addressData)
    Is default address boolean.
     
    void
    removeOldSavedSearches(Collection<SavedSearchModel> savedSearches, CustomerModel customerModel, int number)
    This method removes n-number of old searches, based on creation time, saved by current customer.
    boolean
    removeSavedSearch(String savedSearchID)
    This method removes search saved by current customer based on search reference ID.
    void
    removeSavedSearch(String savedSearchID, String userId)
    This method removes search saved by current customer based on search reference ID.
    boolean
    This method saves search made by Customer.
    void
    setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService)
     
    void
     
    void
    setSavedSearchConverter(de.hybris.platform.servicelayer.dto.converter.Converter<SavedSearchModel,SavedSearchData> savedSearchConverter)
     
    void
    setSavedSearchReverseConverter(de.hybris.platform.servicelayer.dto.converter.Converter<SavedSearchData,SavedSearchModel> savedSearchReverseConverter)
     
    void
    setTimeService(de.hybris.platform.servicelayer.time.TimeService timeService)
     
    void
    Checks if current user's uid is same as userid and if current user is not an anonymous user

    Methods inherited from class de.hybris.platform.commercefacades.customer.impl.DefaultCustomerFacade

    changeGuestToCustomer, changePassword, changeUid, closeAccount, createGuestUserForAnonymousCheckout, forgottenPassword, generateGUID, getAddressConverter, getAddressReversePopulator, getBaseSiteService, getBaseStoreService, getBusinessProcessService, getCartCleanStrategy, getCartService, getCommerceCartService, getCommonI18NService, getCreditCardPaymentInfoConverter, getCurrentCustomer, getCurrentCustomerUid, getCurrentSessionCustomer, getCurrentUser, getCustomerConverter, getCustomerNameStrategy, getCustomerReversePopulator, getEventService, getModelService, getOrderFacade, getPasswordEncoderService, getSessionService, getStoreSessionFacade, getTitleConverter, getUserFacade, getUserForUID, getUserMatchingService, getUserService, initializeCommerceEvent, loginSuccess, nextDummyCustomerData, publishLoginSuccessEvent, register, rememberMeLoginSuccessWithUrlEncoding, setAddressConverter, setAddressReversePopulator, setBaseSiteService, setBaseStoreService, setBusinessProcessService, setCartCleanStrategy, setCartService, setCommerceCartService, setCommonI18NService, setCommonPropertiesForRegister, setCreditCardPaymentInfoConverter, setCustomerAccountService, setCustomerConverter, setCustomerNameStrategy, setCustomerReversePopulator, setEventService, setModelService, setOrderFacade, setPassword, setPasswordEncoderService, setSessionService, setStoreSessionFacade, setTitleConverter, setTitleForRegister, setUidForRegister, setUserFacade, setUserMatchingService, setUserService, updateCartWithGuestForAnonymousCheckout, updateFullProfile, updatePassword, updateProfile, updateSessionCurrency, updateSessionLanguage, validateDataBeforeUpdate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface de.hybris.platform.commercefacades.customer.CustomerFacade

    changeGuestToCustomer, changePassword, changeUid, closeAccount, createGuestUserForAnonymousCheckout, forgottenPassword, generateGUID, getCurrentCustomer, getCurrentCustomerUid, getUserForUID, loginSuccess, nextDummyCustomerData, publishLoginSuccessEvent, register, rememberMeLoginSuccessWithUrlEncoding, setPassword, updateCartWithGuestForAnonymousCheckout, updateFullProfile, updatePassword, updateProfile
  • Constructor Details

    • DefaultTravelCustomerFacade

      public DefaultTravelCustomerFacade()
  • Method Details

    • createGuestCustomer

      public String createGuestCustomer(String email, String lastName) throws de.hybris.platform.commerceservices.customer.DuplicateUidException
      Description copied from interface: TravelCustomerFacade
      This method creates a GuestCustomer and returns the Uid.
      Specified by:
      createGuestCustomer in interface TravelCustomerFacade
      Parameters:
      email - String representing the email id of the customer.
      lastName - String representing the lastName of the guest customer.
      Returns:
      a String
      Throws:
      de.hybris.platform.commerceservices.customer.DuplicateUidException - the duplicate uid exception
    • saveCustomerSearch

      public boolean saveCustomerSearch(SavedSearchData savedSearchData)
      Description copied from interface: TravelCustomerFacade
      This method saves search made by Customer.
      Specified by:
      saveCustomerSearch in interface TravelCustomerFacade
      Parameters:
      savedSearchData - SavedSearchData holding information about the Fare-Search made by customer.
      Returns:
      a boolean true(SUCCESS)/ false(FAILURE).
    • getCustomerSearches

      public List<SavedSearchData> getCustomerSearches()
      Description copied from interface: TravelCustomerFacade
      This method is used to get the list of searches saved by current customer.
      Specified by:
      getCustomerSearches in interface TravelCustomerFacade
      Returns:
      a List of SavedSearchData.
    • removeSavedSearch

      public boolean removeSavedSearch(String savedSearchID)
      Description copied from interface: TravelCustomerFacade
      This method removes search saved by current customer based on search reference ID.
      Specified by:
      removeSavedSearch in interface TravelCustomerFacade
      Parameters:
      savedSearchID - the saved search id
      Returns:
      a boolean true(SUCCESS)/ false(FAILURE).
    • removeSavedSearch

      public void removeSavedSearch(String savedSearchID, String userId)
      Description copied from interface: TravelCustomerFacade
      This method removes search saved by current customer based on search reference ID.
      Specified by:
      removeSavedSearch in interface TravelCustomerFacade
      Parameters:
      savedSearchID - the saved search id
      userId - the user id
    • removeOldSavedSearches

      public void removeOldSavedSearches(Collection<SavedSearchModel> savedSearches, CustomerModel customerModel, int number)
      Description copied from interface: TravelCustomerFacade
      This method removes n-number of old searches, based on creation time, saved by current customer.
      Specified by:
      removeOldSavedSearches in interface TravelCustomerFacade
      Parameters:
      savedSearches - Collection of SavedSearchModel- representation of all the searches saved against Customer.
      customerModel - Object of CustomerModel representing current customer.
      number - Number of saved searches to be removed.
    • removeElapsedSearches

      protected Collection<SavedSearchModel> removeElapsedSearches(Collection<SavedSearchModel> savedSearches, CustomerModel customerModel)
    • isCurrentUserB2bCustomer

      public boolean isCurrentUserB2bCustomer()
      Description copied from interface: TravelCustomerFacade
      Checks if current user is a B2b customer.
      Specified by:
      isCurrentUserB2bCustomer in interface TravelCustomerFacade
      Returns:
      true, if current user is B2b customer
    • validateUser

      public void validateUser(String userId)
      Description copied from interface: TravelCustomerFacade
      Checks if current user's uid is same as userid and if current user is not an anonymous user
      Specified by:
      validateUser in interface TravelCustomerFacade
      Parameters:
      userId - the user id
    • getAddressBook

      public List<AddressData> getAddressBook()
      Description copied from interface: TravelCustomerFacade
      Gets address book.
      Specified by:
      getAddressBook in interface TravelCustomerFacade
      Returns:
      the address book
    • isDefaultAddress

      protected boolean isDefaultAddress(AddressModel defaultAddress, AddressData addressData)
      Is default address boolean.
      Parameters:
      defaultAddress - the default address
      addressData - the address data
      Returns:
      the boolean
    • getCustomerAccountService

      protected TravelCustomerAccountService getCustomerAccountService()
      Overrides:
      getCustomerAccountService in class de.hybris.platform.commercefacades.customer.impl.DefaultCustomerFacade
    • setCustomerAccountService

      public void setCustomerAccountService(TravelCustomerAccountService customerAccountService)
      Parameters:
      customerAccountService - the customerAccountService to set
    • getTimeService

      protected de.hybris.platform.servicelayer.time.TimeService getTimeService()
      Returns:
      the timeService
    • setTimeService

      public void setTimeService(de.hybris.platform.servicelayer.time.TimeService timeService)
      Parameters:
      timeService - the timeService to set
    • getConfigurationService

      protected de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService()
    • setConfigurationService

      public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService)
      Parameters:
      configurationService - the configurationService to set
    • getSavedSearchConverter

      protected de.hybris.platform.servicelayer.dto.converter.Converter<SavedSearchModel,SavedSearchData> getSavedSearchConverter()
    • setSavedSearchConverter

      public void setSavedSearchConverter(de.hybris.platform.servicelayer.dto.converter.Converter<SavedSearchModel,SavedSearchData> savedSearchConverter)
      Parameters:
      savedSearchConverter - the savedSearchConverter to set
    • getSavedSearchReverseConverter

      protected de.hybris.platform.servicelayer.dto.converter.Converter<SavedSearchData,SavedSearchModel> getSavedSearchReverseConverter()
    • setSavedSearchReverseConverter

      public void setSavedSearchReverseConverter(de.hybris.platform.servicelayer.dto.converter.Converter<SavedSearchData,SavedSearchModel> savedSearchReverseConverter)
      Parameters:
      savedSearchReverseConverter - the savedSearchReverseConverter to set