Class AncillarySearchResponseConverter
java.lang.Object
ma.glasnost.orika.CustomConverter<OfferResponseData,AncillaryResponse>
de.hybris.platform.coretransportocc.mapping.converters.AncillarySearchResponseConverter
- All Implemented Interfaces:
ma.glasnost.orika.Converter<OfferResponseData,,AncillaryResponse> ma.glasnost.orika.MappedTypePair<OfferResponseData,AncillaryResponse>
public class AncillarySearchResponseConverter
extends ma.glasnost.orika.CustomConverter<OfferResponseData,AncillaryResponse>
This is to populate Search Response for the Ancillaries
-
Field Summary
Fields inherited from class ma.glasnost.orika.CustomConverter
destinationType, mapperFacade, sourceType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert(OfferResponseData offerResponseData, ma.glasnost.orika.metadata.Type<? extends AncillaryResponse> type, ma.glasnost.orika.MappingContext mappingContext) Converts the offer response data to AncillarySearchWSResponseDTOgetAncillaries(OfferResponseData offerResponseData) get Ancillariesprotected voidgetAncillariesValidForRoute(List<Ancillary> ancillaryList, OfferGroupData offerGroupData) get Ancillaries Valid For Routeprotected voidgetPassengerDetails(ItineraryData itineraryData, AncillaryDataReference dataReference, List<BasicTraveller> passengers) get Passenger DetailsgetPassengerRefUids(OfferPricingInfoData offerPricingInfoData) get Passenger Ref UidsgetTransportOfferingCodes(OriginDestinationOfferInfoData originDestinationOfferInfoData) get Transport Offering Codesprotected booleanhasDefaultRestriction(TravelRestrictionData travelRestrictionData) Checks if the given restriction has the default valuesprotected voidpopulateAncillaries(List<Ancillary> ancillaryList, OfferGroupData offerGroupData, OriginDestinationOfferInfoData originDestinationOfferInfoData, OfferPricingInfoData offerPricingInfoData) populate Ancillariesprotected AncillaryDataReferencepopulateDataReference(OfferResponseData offerResponseData) populate Data Referenceprotected DiscountpopulateDiscounts(List<DiscountData> discounts) populate Discountsprotected PricepopulatePrice(PriceData baseFare) populate priceprotected List<AncillaryPricesResponse>populatePrices(OriginDestinationOfferInfoData originDestinationOfferInfoData, PassengerFareData passengerFareData) get prices for ancillariespopulateProductCategory(Collection<CategoryData> categoryDataList, OfferGroupData offerGroupData) get Product Categoryprotected BasicProductpopulateProductData(OfferPricingInfoData offerPricingInfoData, OfferGroupData offerGroupData) get product datapopulateTaxes(List<TaxData> taxes) populate taxesprotected voidpopulateTransportOfferingDetails(ItineraryData itineraryData, AncillaryDataReference dataReference, List<Transport> transportList) get Transport Offering DetailsMethods inherited from class ma.glasnost.orika.CustomConverter
canConvert, equals, getAType, getBType, hashCode, setMapperFacade, toString
-
Constructor Details
-
AncillarySearchResponseConverter
public AncillarySearchResponseConverter()
-
-
Method Details
-
convert
public AncillaryResponse convert(OfferResponseData offerResponseData, ma.glasnost.orika.metadata.Type<? extends AncillaryResponse> type, ma.glasnost.orika.MappingContext mappingContext) Converts the offer response data to AncillarySearchWSResponseDTO- Parameters:
offerResponseData- the offerResponseDatatype- the typemappingContext- the mappingContext- Returns:
- AncillarySearchWSResponseDTO
-
getAncillaries
get Ancillaries- Parameters:
offerResponseData- the offer response data- Returns:
- AncillariesWSResponseDTO list
-
getAncillariesValidForRoute
protected void getAncillariesValidForRoute(List<Ancillary> ancillaryList, OfferGroupData offerGroupData) get Ancillaries Valid For Route- Parameters:
ancillaryList- the ancillary listofferGroupData- the offer group data
-
populateAncillaries
protected void populateAncillaries(List<Ancillary> ancillaryList, OfferGroupData offerGroupData, OriginDestinationOfferInfoData originDestinationOfferInfoData, OfferPricingInfoData offerPricingInfoData) populate Ancillaries- Parameters:
ancillaryList- the ancillary listofferGroupData- the offer group dataoriginDestinationOfferInfoData- the origin destination offer info dataofferPricingInfoData- the offer pricing info data
-
getPassengerRefUids
get Passenger Ref Uids- Parameters:
offerPricingInfoData- the offer pricing info data- Returns:
- list of traveller Id
-
populatePrices
protected List<AncillaryPricesResponse> populatePrices(OriginDestinationOfferInfoData originDestinationOfferInfoData, PassengerFareData passengerFareData) get prices for ancillaries- Parameters:
originDestinationOfferInfoData- the origin destination offer info datapassengerFareData- the passenger fare data- Returns:
- AncillaryPricesResponse list
-
getTransportOfferingCodes
protected List<String> getTransportOfferingCodes(OriginDestinationOfferInfoData originDestinationOfferInfoData) get Transport Offering Codes- Parameters:
originDestinationOfferInfoData- the origin destination offer info data- Returns:
- list of transport offering codes
-
populateDiscounts
populate Discounts- Parameters:
discounts- the discounts- Returns:
- DiscountsWSResponseDTO discount
-
populateTaxes
populate taxes- Parameters:
taxes- the taxes- Returns:
- list of TaxesWSResponseDTO
-
populatePrice
populate price- Parameters:
baseFare- the base fare- Returns:
- PricesWSResponseDTO price
-
populateProductData
protected BasicProduct populateProductData(OfferPricingInfoData offerPricingInfoData, OfferGroupData offerGroupData) get product data- Parameters:
offerPricingInfoData- the offer pricing info dataofferGroupData- the offer group data- Returns:
- AncillaryProductWSResponseDTO basic product
-
populateProductCategory
protected List<Category> populateProductCategory(Collection<CategoryData> categoryDataList, OfferGroupData offerGroupData) get Product Category- Parameters:
categoryDataList- the category data listofferGroupData- the offer group data- Returns:
- list of CategoriesWSResponseDTO
-
populateDataReference
populate Data Reference- Parameters:
offerResponseData- the offer response data- Returns:
- DataReferenceWSResponseDTO data reference
-
populateTransportOfferingDetails
protected void populateTransportOfferingDetails(ItineraryData itineraryData, AncillaryDataReference dataReference, List<Transport> transportList) get Transport Offering Details- Parameters:
itineraryData- the itinerary datadataReference- the data referencetransportList- the list of transport offering
-
getPassengerDetails
protected void getPassengerDetails(ItineraryData itineraryData, AncillaryDataReference dataReference, List<BasicTraveller> passengers) get Passenger Details- Parameters:
itineraryData- the itinerary datadataReference- the data referencepassengers- the passengers
-
hasDefaultRestriction
Checks if the given restriction has the default values- Parameters:
travelRestrictionData- the travelRestrictionData- Returns:
- true if has the default restriction values
-