Class PackageBaseController
java.lang.Object
de.hybris.platform.coreairlinecommonsocc.controllers.AirlineBaseController
de.hybris.platform.coreairlinepackagesocc.controllers.PackageBaseController
- Direct Known Subclasses:
PackageCartsController,PackageSearchController
Base controller for packages. It defines the common methods to be used by all package controllers.
-
Field Summary
Fields inherited from class de.hybris.platform.coreairlinecommonsocc.controllers.AirlineBaseController
BASIC_FIELD_SET, DEFAULT_CURRENT_PAGE, DEFAULT_PAGE_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AddPackageRequestDatacreateAddPackageRequestData(AddSolutionRequestData addSolutionRequestData, AddRoomStayData addRoomStayData) Creates add package to cart request data.protected CriterionDatacreateCriterionData(PackageSearchRequest packageSearchRequest) Creates criterion data.protected PackageSearchRequestDatacreatePackageSearchRequestData(PackageSearchRequest packageSearchRequest) Creates package search request data.protected PackageSolutioncreatePackageSolution(String accommodationOfferingCode, List<Integer> solutions) Creates package solution.protected AccommodationHelperGets accommodation helper.protected TravelLocationFacadeGets location facade.protected List<PackageSolution>getPackageSolutions(List<PropertyData> paginatedProperties, FlightSearchResponseData flightSearchResponseData) Gets a list of package solutions.protected List<PropertyData>getPaginateProperties(List<PropertyData> searchResponseProperties, Integer currentPage, Integer pageSize) Paginates response properties with the currentPage and pageSize.protected PaginationWsDTOpopulatePaginationDate(Integer currentPage, Integer pageSize, Integer currentPageSize, Integer totalCount) Populates pagination data.Methods inherited from class de.hybris.platform.coreairlinecommonsocc.controllers.AirlineBaseController
createPaginationData, getAbsoluteLocationURL, getDataMapper, getErrorCode, getErrorCodeResolver, handleAccessDeniedException, handleMissingRequestHeaderException, handleTravelModelNotFoundException, sanitize, validate, validate
-
Constructor Details
-
PackageBaseController
public PackageBaseController()
-
-
Method Details
-
createPackageSearchRequestData
protected PackageSearchRequestData createPackageSearchRequestData(PackageSearchRequest packageSearchRequest) Creates package search request data.- Parameters:
packageSearchRequest- the package search request- Returns:
- package search request data
-
createCriterionData
Creates criterion data.- Parameters:
packageSearchRequest- the package search request- Returns:
- the criterion data
-
populatePaginationDate
protected PaginationWsDTO populatePaginationDate(Integer currentPage, Integer pageSize, Integer currentPageSize, Integer totalCount) Populates pagination data.- Parameters:
currentPage- the current pagepageSize- the page sizecurrentPageSize- the current page sizetotalCount- the total count- Returns:
- the pagination data
-
getPaginateProperties
protected List<PropertyData> getPaginateProperties(List<PropertyData> searchResponseProperties, Integer currentPage, Integer pageSize) Paginates response properties with the currentPage and pageSize.- Parameters:
searchResponseProperties- the search response propertiescurrentPage- the current pagepageSize- the page size- Returns:
- the paginated properties
-
getPackageSolutions
protected List<PackageSolution> getPackageSolutions(List<PropertyData> paginatedProperties, FlightSearchResponseData flightSearchResponseData) Gets a list of package solutions.- Parameters:
paginatedProperties- the paginated propertiesflightSearchResponseData- the flight search response data- Returns:
- the package solutions
-
createPackageSolution
protected PackageSolution createPackageSolution(String accommodationOfferingCode, List<Integer> solutions) Creates package solution.- Parameters:
accommodationOfferingCode- the accommodation offering codesolutions- the solutions- Returns:
- the package solution
-
createAddPackageRequestData
protected AddPackageRequestData createAddPackageRequestData(AddSolutionRequestData addSolutionRequestData, AddRoomStayData addRoomStayData) Creates add package to cart request data.- Parameters:
addSolutionRequestData- the add solution request dataaddRoomStayData- the add room stay data- Returns:
- the add package request data
-
getLocationFacade
Gets location facade.- Returns:
- the location facade
-
getAccommodationHelper
Gets accommodation helper.- Returns:
- the accommodation helper
-