Class DefaultB2BReservationFacade
java.lang.Object
de.hybris.platform.travelb2bfacades.reservation.impl.DefaultB2BReservationFacade
- All Implemented Interfaces:
B2BReservationFacade
Default implementation of
B2BReservationFacade-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckDatesInterval(Date fromDate, Date toDate) Check if fromDate is before toDate.protected SearchPageData<B2BReservationData>convertSearchPageData(SearchPageData<OrderModel> searchPageModelData) Convert search page data search page data.findReservations(SearchStateData searchState, PageableData pageableData, String unitCode, String email, Date fromDate, Date toDate, String costCenterUid, String currency) Deprecated.Deprecated since version 3.0.findReservations(SearchStateData searchState, PageableData pageableData, List<String> unitCodes, String email, Date fromDate, Date toDate, String costCenterUid, String currency) Retrieves a certain number of reservation based on the parameter passed in the method.findTotal(String unitCode, String email, Date fromDate, Date toDate, String costCenter, String currencyIso) Deprecated.Deprecated since version 3.0.findTotal(List<String> unitCodes, String email, Date fromDate, Date toDate, String costCenter, String currencyIso) Returns the total price for all the bookings matching the search parameters.protected B2BReservationPipelineManagerGets b 2 b reservation pipeline manager.retrieves the default unit for the current userprotected de.hybris.platform.commercefacades.product.PriceDataFactoryDeprecated.Deprecated since version 3.0.protected TravelB2BOrderServiceGets travelb 2 b order service.protected TravelCommercePriceFacadeGets travel commerce price facade.protected de.hybris.platform.servicelayer.user.UserServiceGets user service.voidsetB2bReservationPipelineManager(B2BReservationPipelineManager b2bReservationPipelineManager) Sets b 2 b reservation pipeline manager.voidsetPriceDataFactory(de.hybris.platform.commercefacades.product.PriceDataFactory priceDataFactory) Deprecated.Deprecated since version 3.0.protected voidsetSorts(SearchPageData<OrderModel> searchPageData, List<String> sortCodes) Sets the sorting parameters in the searchPageData.voidsetTravelb2bOrderService(TravelB2BOrderService travelb2bOrderService) Sets travelb 2 b order service.voidsetTravelCommercePriceFacade(TravelCommercePriceFacade travelCommercePriceFacade) Sets travel commerce price facade.voidsetUserService(de.hybris.platform.servicelayer.user.UserService userService) Sets user service.booleanvalidateUnit(String unitCode) Validate unit boolean.
-
Constructor Details
-
DefaultB2BReservationFacade
public DefaultB2BReservationFacade()
-
-
Method Details
-
findReservations
@Deprecated public SearchPageData<B2BReservationData> findReservations(SearchStateData searchState, PageableData pageableData, String unitCode, String email, Date fromDate, Date toDate, String costCenterUid, String currency) Deprecated.Deprecated since version 3.0.Description copied from interface:B2BReservationFacadeRetrieves a certain number of reservation based on the parameter passed in the method. b2bUnitCode is mandatory, everything else can be passed as null- Specified by:
findReservationsin interfaceB2BReservationFacade- Parameters:
searchState- the search statepageableData- the pageableDataunitCode- the b2b unit codeemail- the emailfromDate- the from datetoDate- the to datecostCenterUid- the cost centercurrency- the currency- Returns:
-
findReservations
public SearchPageData<B2BReservationData> findReservations(SearchStateData searchState, PageableData pageableData, List<String> unitCodes, String email, Date fromDate, Date toDate, String costCenterUid, String currency) Description copied from interface:B2BReservationFacadeRetrieves a certain number of reservation based on the parameter passed in the method. b2bUnitCode is mandatory, everything else can be passed as null- Specified by:
findReservationsin interfaceB2BReservationFacade- Parameters:
searchState- the search statepageableData- the pageableDataunitCodes- the b2b unit codeemail- the emailfromDate- the from datetoDate- the to datecostCenterUid- the cost centercurrency- the currency- Returns:
- SearchPageData the search results
-
checkDatesInterval
Check if fromDate is before toDate.- Specified by:
checkDatesIntervalin interfaceB2BReservationFacade- Parameters:
fromDate- the date to comparetoDate- the date to be compared with- Returns:
- true if fromDate is before toDate, false otherwise.
-
setSorts
Sets the sorting parameters in the searchPageData.- Parameters:
searchPageData- the searchPagesortCodes- the sort codes
-
convertSearchPageData
protected SearchPageData<B2BReservationData> convertSearchPageData(SearchPageData<OrderModel> searchPageModelData) Convert search page data search page data.- Parameters:
searchPageModelData- the search page model- Returns:
- searchPageData This method converts the list of orderModels in B2BReservationData
-
getDefaultUnit
Description copied from interface:B2BReservationFacaderetrieves the default unit for the current user- Specified by:
getDefaultUnitin interfaceB2BReservationFacade- Returns:
- the default unit
-
validateUnit
Description copied from interface:B2BReservationFacadeValidate unit boolean.- Specified by:
validateUnitin interfaceB2BReservationFacade- Parameters:
unitCode- the unit code validates a certain unit against the current user to make sure he can access the related informations- Returns:
- the boolean
-
findTotal
@Deprecated public PriceData findTotal(String unitCode, String email, Date fromDate, Date toDate, String costCenter, String currencyIso) Deprecated.Deprecated since version 3.0.Description copied from interface:B2BReservationFacadeReturns the total price for all the bookings matching the search parameters. unitId is mandatory, everything else can be passed as null- Specified by:
findTotalin interfaceB2BReservationFacade- Parameters:
unitCode- the b2b unit codeemail- the emailfromDate- the from datetoDate- the to datecostCenter-currencyIso- the currency iso code- Returns:
-
findTotal
public PriceData findTotal(List<String> unitCodes, String email, Date fromDate, Date toDate, String costCenter, String currencyIso) Description copied from interface:B2BReservationFacadeReturns the total price for all the bookings matching the search parameters. unitId is mandatory, everything else can be passed as null- Specified by:
findTotalin interfaceB2BReservationFacade- Parameters:
unitCodes- the b2b unit codeemail- the emailfromDate- the from datetoDate- the to datecostCenter- the cost centercurrencyIso- the currency iso code- Returns:
- SearchPageData the search results
-
getPriceDataFactory
@Deprecated protected de.hybris.platform.commercefacades.product.PriceDataFactory getPriceDataFactory()Deprecated.Deprecated since version 3.0.Gets price data factory.- Returns:
- price data factory
-
setPriceDataFactory
@Deprecated public void setPriceDataFactory(de.hybris.platform.commercefacades.product.PriceDataFactory priceDataFactory) Deprecated.Deprecated since version 3.0.Sets price data factory.- Parameters:
priceDataFactory- the price data factory
-
getTravelb2bOrderService
Gets travelb 2 b order service.- Returns:
- the travelb 2 b order service
-
setTravelb2bOrderService
Sets travelb 2 b order service.- Parameters:
travelb2bOrderService- the travelb 2 b order service
-
getUserService
protected de.hybris.platform.servicelayer.user.UserService getUserService()Gets user service.- Returns:
- the user service
-
setUserService
public void setUserService(de.hybris.platform.servicelayer.user.UserService userService) Sets user service.- Parameters:
userService- the user service
-
getB2bReservationPipelineManager
Gets b 2 b reservation pipeline manager.- Returns:
- the b 2 b reservation pipeline manager
-
setB2bReservationPipelineManager
public void setB2bReservationPipelineManager(B2BReservationPipelineManager b2bReservationPipelineManager) Sets b 2 b reservation pipeline manager.- Parameters:
b2bReservationPipelineManager- the b 2 b reservation pipeline manager
-
getTravelCommercePriceFacade
Gets travel commerce price facade.- Returns:
- the travelCommercePriceFacade
-
setTravelCommercePriceFacade
Sets travel commerce price facade.- Parameters:
travelCommercePriceFacade- the travelCommercePriceFacade to set
-