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 -
Method Summary
Modifier and TypeMethodDescriptioncreateGuestCustomer(String email, String lastName) This method creates a GuestCustomer and returns the Uid.Gets address book.protected de.hybris.platform.servicelayer.config.ConfigurationServiceprotected TravelCustomerAccountServiceThis 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.TimeServicebooleanChecks if current user is a B2b customer.protected booleanisDefaultAddress(AddressModel defaultAddress, AddressData addressData) Is default address boolean.protected Collection<SavedSearchModel>removeElapsedSearches(Collection<SavedSearchModel> savedSearches, CustomerModel customerModel) voidremoveOldSavedSearches(Collection<SavedSearchModel> savedSearches, CustomerModel customerModel, int number) This method removes n-number of old searches, based on creation time, saved by current customer.booleanremoveSavedSearch(String savedSearchID) This method removes search saved by current customer based on search reference ID.voidremoveSavedSearch(String savedSearchID, String userId) This method removes search saved by current customer based on search reference ID.booleansaveCustomerSearch(SavedSearchData savedSearchData) This method saves search made by Customer.voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) voidsetCustomerAccountService(TravelCustomerAccountService customerAccountService) voidsetSavedSearchConverter(de.hybris.platform.servicelayer.dto.converter.Converter<SavedSearchModel, SavedSearchData> savedSearchConverter) voidsetSavedSearchReverseConverter(de.hybris.platform.servicelayer.dto.converter.Converter<SavedSearchData, SavedSearchModel> savedSearchReverseConverter) voidsetTimeService(de.hybris.platform.servicelayer.time.TimeService timeService) voidvalidateUser(String userId) Checks if current user's uid is same as userid and if current user is not an anonymous userMethods 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, validateDataBeforeUpdateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:TravelCustomerFacadeThis method creates a GuestCustomer and returns the Uid.- Specified by:
createGuestCustomerin interfaceTravelCustomerFacade- 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
Description copied from interface:TravelCustomerFacadeThis method saves search made by Customer.- Specified by:
saveCustomerSearchin interfaceTravelCustomerFacade- Parameters:
savedSearchData- SavedSearchData holding information about the Fare-Search made by customer.- Returns:
- a boolean true(SUCCESS)/ false(FAILURE).
-
getCustomerSearches
Description copied from interface:TravelCustomerFacadeThis method is used to get the list of searches saved by current customer.- Specified by:
getCustomerSearchesin interfaceTravelCustomerFacade- Returns:
- a List of SavedSearchData.
-
removeSavedSearch
Description copied from interface:TravelCustomerFacadeThis method removes search saved by current customer based on search reference ID.- Specified by:
removeSavedSearchin interfaceTravelCustomerFacade- Parameters:
savedSearchID- the saved search id- Returns:
- a boolean true(SUCCESS)/ false(FAILURE).
-
removeSavedSearch
Description copied from interface:TravelCustomerFacadeThis method removes search saved by current customer based on search reference ID.- Specified by:
removeSavedSearchin interfaceTravelCustomerFacade- Parameters:
savedSearchID- the saved search iduserId- the user id
-
removeOldSavedSearches
public void removeOldSavedSearches(Collection<SavedSearchModel> savedSearches, CustomerModel customerModel, int number) Description copied from interface:TravelCustomerFacadeThis method removes n-number of old searches, based on creation time, saved by current customer.- Specified by:
removeOldSavedSearchesin interfaceTravelCustomerFacade- 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:TravelCustomerFacadeChecks if current user is a B2b customer.- Specified by:
isCurrentUserB2bCustomerin interfaceTravelCustomerFacade- Returns:
- true, if current user is B2b customer
-
validateUser
Description copied from interface:TravelCustomerFacadeChecks if current user's uid is same as userid and if current user is not an anonymous user- Specified by:
validateUserin interfaceTravelCustomerFacade- Parameters:
userId- the user id
-
getAddressBook
Description copied from interface:TravelCustomerFacadeGets address book.- Specified by:
getAddressBookin interfaceTravelCustomerFacade- Returns:
- the address book
-
isDefaultAddress
Is default address boolean.- Parameters:
defaultAddress- the default addressaddressData- the address data- Returns:
- the boolean
-
getCustomerAccountService
- Overrides:
getCustomerAccountServicein classde.hybris.platform.commercefacades.customer.impl.DefaultCustomerFacade
-
setCustomerAccountService
- 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
-