Class TravelEurope1PriceFactory
java.lang.Object
de.hybris.platform.jalo.Manager
de.hybris.platform.jalo.extension.Extension
de.hybris.platform.jalo.order.price.AbstractPriceFactory
de.hybris.platform.europe1.jalo.GeneratedEurope1PriceFactory
de.hybris.platform.europe1.jalo.Europe1PriceFactory
de.hybris.platform.travelservices.jalo.TravelEurope1PriceFactory
- All Implemented Interfaces:
de.hybris.platform.jalo.extension.ItemLifecycleListener,de.hybris.platform.jalo.order.price.PriceFactory,TravelPriceFactory,Serializable
public class TravelEurope1PriceFactory
extends de.hybris.platform.europe1.jalo.Europe1PriceFactory
implements TravelPriceFactory
Travel price factory for querying price rows and taxes for travel specific search criteria.
The Europe1PriceFactory doesn't support changing the query patters or filtering and is designed to work only for
hybris Products. The Travel accelerator extends the price factory class to provide additional methods required for
travel sector.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.europe1.jalo.Europe1PriceFactory
de.hybris.platform.europe1.jalo.Europe1PriceFactory.CachedTax, de.hybris.platform.europe1.jalo.Europe1PriceFactory.CachedTaxValue, de.hybris.platform.europe1.jalo.Europe1PriceFactory.DiscountRowMatchComparator, de.hybris.platform.europe1.jalo.Europe1PriceFactory.PriceRowInfoComparator, de.hybris.platform.europe1.jalo.Europe1PriceFactory.PriceRowMatchComparator, de.hybris.platform.europe1.jalo.Europe1PriceFactory.TaxRowMatchComparatorNested classes/interfaces inherited from class de.hybris.platform.jalo.extension.Extension
de.hybris.platform.jalo.extension.Extension.RestrictedLanguagesProvider, de.hybris.platform.jalo.extension.Extension.RightsProviderNested classes/interfaces inherited from class de.hybris.platform.jalo.Manager
de.hybris.platform.jalo.Manager.GenericManagerSingletonCreator, de.hybris.platform.jalo.Manager.ManagerSingletonCreator -
Field Summary
Fields inherited from class de.hybris.platform.europe1.jalo.Europe1PriceFactory
MATCH_ANY, MATCH_BY_PRODUCT_ID, USE_FAST_ALGORITHMSFields inherited from class de.hybris.platform.europe1.jalo.GeneratedEurope1PriceFactory
DEFAULT_INITIAL_ATTRIBUTES, PRODUCT2OWNEUROPE1DISCOUNTSOWNEUROPE1DISCOUNTSHANDLER, PRODUCT2OWNEUROPE1PRICESOWNEUROPE1PRICESHANDLER, PRODUCT2OWNEUROPE1TAXESOWNEUROPE1TAXESHANDLER, USER2OWNEUROPE1DISCOUNTSOWNEUROPE1DISCOUNTSHANDLER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<de.hybris.platform.europe1.jalo.TaxRow>filterTaxRows4Price(Collection<de.hybris.platform.europe1.jalo.TaxRow> rows, Date date) Filters tax rows which do not match the given parameters.protected TravelPricingQueryStrategyList<de.hybris.platform.jalo.order.price.PriceInformation>getProductPriceInformations(de.hybris.platform.jalo.product.Product product, Map<String, String> searchCriteria) Implement this to show all prices available for the given product and travel search criteria.Collection<de.hybris.platform.util.TaxValue>getTaxValues(de.hybris.platform.jalo.order.AbstractOrderEntry entry) Method overridden to set order currency in session context.protected de.hybris.platform.servicelayer.time.TimeServiceprotected Collection<de.hybris.platform.europe1.jalo.PriceRow>queryPriceRows4Price(de.hybris.platform.jalo.SessionContext ctx, de.hybris.platform.jalo.product.Product product, de.hybris.platform.jalo.enumeration.EnumerationValue productGroup, de.hybris.platform.jalo.user.User user, de.hybris.platform.jalo.enumeration.EnumerationValue userGroup) Deprecated.since version 5.0 after deprecation of the equivalent superclass methodprotected Collection<de.hybris.platform.europe1.jalo.PriceRow>queryPriceRows4Price(de.hybris.platform.jalo.SessionContext ctx, de.hybris.platform.jalo.product.Product product, de.hybris.platform.jalo.enumeration.EnumerationValue productGroup, de.hybris.platform.jalo.user.User user, de.hybris.platform.jalo.enumeration.EnumerationValue userGroup, Date date, de.hybris.platform.jalo.c2l.Currency currency, boolean giveAwayMode) Runs the query to retrieve prices rows for product and travel search criteria.voidsetPricingQueryStrategy(TravelPricingQueryStrategy pricingQueryStrategy) voidsetTimeService(de.hybris.platform.servicelayer.time.TimeService timeService) protected Collection<de.hybris.platform.europe1.jalo.TaxRow>superQueryTax4Price(de.hybris.platform.jalo.SessionContext ctx, de.hybris.platform.jalo.product.Product product, de.hybris.platform.jalo.enumeration.EnumerationValue productGroup, de.hybris.platform.jalo.user.User user, de.hybris.platform.jalo.enumeration.EnumerationValue userGroup) Runs the query to retrieve tax rows for travel search criteria.Methods inherited from class de.hybris.platform.europe1.jalo.Europe1PriceFactory
adjustDate, appendProductConditions, appendUserConditions, beforeItemCreation, checkAllDiscountRows, checkAllDiscountRows, checkAllGlobalDiscountRows, checkAllGlobalDiscountRows, checkAllPriceRows, checkAllPriceRows, checkAllTaxRows, checkAllTaxRows, checkBeforeItemRemoval, createDiscountRow, createDiscountRow, createEssentialData, createGlobalDiscountRow, createGlobalDiscountRow, createPriceRow, createPriceRow, createPriceRow, createPriceRow, createProductTaxGroup, createProjectData, createTaxRow, createTaxRow, createTaxRow, createUserPriceGroup, createUserTaxGroup, extractProductId, extractProductId, fillTaxCache, filterDiscountRows4Price, filterPriceRows, filterPriceRows4Info, filterPriceRows4Price, getAllPriceInformations, getBasePrice, getCachedTaxes, getCounterpartItem, getCounterpartItem, getCounterpartItem, getDiscountInformations, getDiscountValues, getDiscountValues, getEnumFromContextOrItem, getEnumFromGroups, getEurope1Discounts, getEurope1Discounts, getEurope1Discounts, getEurope1Discounts, getEurope1Prices, getEurope1Prices, getEurope1Taxes, getEurope1Taxes, getInstance, getPDG, getPDG, getPDTRowsQueryBuilderFor, getPPG, getPPG, getPriceInformations, getProductDiscountInformations, getProductDiscountRows, getProductDiscountRows, getProductDiscountRowsFast, getProductPriceInformations, getProductPriceRows, getProductPriceRows, getProductPriceRowsFast, getProductTaxGroup, getProductTaxInformations, getProductTaxRows, getProductTaxRows, getProductTaxRowsFast, getPTG, getPTG, getRealPartOfPriceRows, getSuperCachedTaxes, getTaxInformations, getUDG, getUDG, getUDG, getUPG, getUPG, getUPG, getUserGlobalDiscountRows, getUserPriceGroup, getUserTaxGroup, getUTG, getUTG, getUTG, init, invalidateTaxCache, isCachingTaxes, isCreatorDisabled, matchDiscountRows, matchPriceRowForPrice, matchPriceRowsForInfo, matchTaxRows, notifyItemRemoval, queryDiscounts4Price, queryTax4Price, removeRowsFor, removeRowsFor, removeRowsFor, removeRowsFor, removeRowsFor, removeRowsFor, removeRowsFor, setEurope1Discounts, setEurope1Discounts, setEurope1Discounts, setEurope1Discounts, setEurope1Prices, setEurope1Prices, setEurope1Taxes, setEurope1Taxes, setRetrieveChannelStrategyMethods inherited from class de.hybris.platform.europe1.jalo.GeneratedEurope1PriceFactory
addToOwnEurope1Discounts, addToOwnEurope1Discounts, addToOwnEurope1Discounts, addToOwnEurope1Discounts, addToOwnEurope1Prices, addToOwnEurope1Prices, addToOwnEurope1Taxes, addToOwnEurope1Taxes, createDiscountRow, createDiscountRow, createGlobalDiscountRow, createGlobalDiscountRow, createPriceRow, createPriceRow, createTaxRow, createTaxRow, getDefaultAttributeModes, getEurope1PriceFactory_PDG, getEurope1PriceFactory_PDG, getEurope1PriceFactory_PDG, getEurope1PriceFactory_PDG, getEurope1PriceFactory_PPG, getEurope1PriceFactory_PPG, getEurope1PriceFactory_PPG, getEurope1PriceFactory_PPG, getEurope1PriceFactory_PTG, getEurope1PriceFactory_PTG, getEurope1PriceFactory_PTG, getEurope1PriceFactory_PTG, getEurope1PriceFactory_UDG, getEurope1PriceFactory_UDG, getEurope1PriceFactory_UDG, getEurope1PriceFactory_UDG, getEurope1PriceFactory_UPG, getEurope1PriceFactory_UPG, getEurope1PriceFactory_UPG, getEurope1PriceFactory_UPG, getEurope1PriceFactory_UTG, getEurope1PriceFactory_UTG, getEurope1PriceFactory_UTG, getEurope1PriceFactory_UTG, getName, getOwnEurope1Discounts, getOwnEurope1Discounts, getOwnEurope1Discounts, getOwnEurope1Discounts, getOwnEurope1Prices, getOwnEurope1Prices, getOwnEurope1Taxes, getOwnEurope1Taxes, getUserDiscountGroup, getUserDiscountGroup, getUserPriceGroup, getUserPriceGroup, getUserTaxGroup, getUserTaxGroup, removeFromOwnEurope1Discounts, removeFromOwnEurope1Discounts, removeFromOwnEurope1Discounts, removeFromOwnEurope1Discounts, removeFromOwnEurope1Prices, removeFromOwnEurope1Prices, removeFromOwnEurope1Taxes, removeFromOwnEurope1Taxes, setEurope1PriceFactory_PDG, setEurope1PriceFactory_PDG, setEurope1PriceFactory_PDG, setEurope1PriceFactory_PDG, setEurope1PriceFactory_PPG, setEurope1PriceFactory_PPG, setEurope1PriceFactory_PPG, setEurope1PriceFactory_PPG, setEurope1PriceFactory_PTG, setEurope1PriceFactory_PTG, setEurope1PriceFactory_PTG, setEurope1PriceFactory_PTG, setEurope1PriceFactory_UDG, setEurope1PriceFactory_UDG, setEurope1PriceFactory_UDG, setEurope1PriceFactory_UDG, setEurope1PriceFactory_UPG, setEurope1PriceFactory_UPG, setEurope1PriceFactory_UPG, setEurope1PriceFactory_UPG, setEurope1PriceFactory_UTG, setEurope1PriceFactory_UTG, setEurope1PriceFactory_UTG, setEurope1PriceFactory_UTG, setOwnEurope1Discounts, setOwnEurope1Discounts, setOwnEurope1Discounts, setOwnEurope1Discounts, setOwnEurope1Prices, setOwnEurope1Prices, setOwnEurope1Taxes, setOwnEurope1Taxes, setUserDiscountGroup, setUserDiscountGroup, setUserPriceGroup, setUserPriceGroup, setUserTaxGroup, setUserTaxGroupMethods inherited from class de.hybris.platform.jalo.order.price.AbstractPriceFactory
getAllPriceInformations, getProductDiscountInformations, getProductPriceInformations, getProductTaxInformations, isNetUserMethods inherited from class de.hybris.platform.jalo.extension.Extension
checkBeforeInitialization, createSampleData, getCreatorDescription, getCreatorName, getCreatorParameterDefault, getCreatorParameterNames, getCreatorParameterPossibleValues, getRemote, notifyInitializationEnd, notifyInitializationStart, onFirstSessionCreation, writeReplaceMethods inherited from class de.hybris.platform.jalo.Manager
afterItemCreation, destroy, extractNonRequiredRemoteFromItem, extractRequiredRemoteFromItem, getAllValuesSessionContext, getAttribute, getAttributeMap, getFirstItemByAttribute, getFirstItemByAttribute, getRemoteManagerClass, getSession, getSingletonManagerInstance, getTenant, getTransientObject, getTransientObjectMap, setAttribute, setTenant, setTransientObject, wrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.jalo.order.price.PriceFactory
getAllPriceInformations, getBasePrice, getDiscountValues, getDiscountValues, getProductDiscountInformations, getProductPriceInformations, getProductTaxInformations, isNetUser
-
Constructor Details
-
TravelEurope1PriceFactory
public TravelEurope1PriceFactory()
-
-
Method Details
-
getTimeService
protected de.hybris.platform.servicelayer.time.TimeService getTimeService()- Returns:
- timeService
-
setTimeService
public void setTimeService(de.hybris.platform.servicelayer.time.TimeService timeService) - Parameters:
timeService- the timeService to set
-
getPricingQueryStrategy
-
setPricingQueryStrategy
- Parameters:
pricingQueryStrategy-
-
getProductPriceInformations
public List<de.hybris.platform.jalo.order.price.PriceInformation> getProductPriceInformations(de.hybris.platform.jalo.product.Product product, Map<String, String> searchCriteria) throws de.hybris.platform.jalo.order.price.JaloPriceFactoryExceptionDescription copied from interface:TravelPriceFactoryImplement this to show all prices available for the given product and travel search criteria.- Specified by:
getProductPriceInformationsin interfaceTravelPriceFactory- Parameters:
product- the productsearchCriteria- the map with travel specific search criteria- Returns:
- a list of
PriceInformationobjects - Throws:
de.hybris.platform.jalo.order.price.JaloPriceFactoryException- if price calculation error occured
-
queryPriceRows4Price
@Deprecated protected Collection<de.hybris.platform.europe1.jalo.PriceRow> queryPriceRows4Price(de.hybris.platform.jalo.SessionContext ctx, de.hybris.platform.jalo.product.Product product, de.hybris.platform.jalo.enumeration.EnumerationValue productGroup, de.hybris.platform.jalo.user.User user, de.hybris.platform.jalo.enumeration.EnumerationValue userGroup) Deprecated.since version 5.0 after deprecation of the equivalent superclass methodRuns the query to retrieve prices rows for product and travel search criteria. If there are no price rows returned, the default query to fetch the price rows is being invoked. Please note that this method may return more rows than allowed so make sure they're filtered afterwards!- Overrides:
queryPriceRows4Pricein classde.hybris.platform.europe1.jalo.Europe1PriceFactory- Parameters:
ctx-product- the product to get prices forproductGroup- the product group to get prices foruser- the user to get prices foruserGroup- the user price group to get prices for- Throws:
de.hybris.platform.jalo.order.price.JaloPriceFactoryException
-
queryPriceRows4Price
protected Collection<de.hybris.platform.europe1.jalo.PriceRow> queryPriceRows4Price(de.hybris.platform.jalo.SessionContext ctx, de.hybris.platform.jalo.product.Product product, de.hybris.platform.jalo.enumeration.EnumerationValue productGroup, de.hybris.platform.jalo.user.User user, de.hybris.platform.jalo.enumeration.EnumerationValue userGroup, Date date, de.hybris.platform.jalo.c2l.Currency currency, boolean giveAwayMode) Runs the query to retrieve prices rows for product and travel search criteria. If there are no price rows returned, the default query to fetch the price rows is being invoked. This method overrides the superclass method introduced with Hybris Commerce Platform 6.7, keeping the previous travel accelerator functionality- Overrides:
queryPriceRows4Pricein classde.hybris.platform.europe1.jalo.Europe1PriceFactory- Parameters:
ctx-product- the product to get prices forproductGroup- the product group to get prices foruser- the user to get prices foruserGroup- the user price group to get prices for- Throws:
de.hybris.platform.jalo.order.price.JaloPriceFactoryException
-
getTaxValues
public Collection<de.hybris.platform.util.TaxValue> getTaxValues(de.hybris.platform.jalo.order.AbstractOrderEntry entry) throws de.hybris.platform.jalo.order.price.JaloPriceFactoryException Method overridden to set order currency in session context. This currency will be used when filtering tax rows based on currency. Please note that hybris OOTB code for taxes doesn't handle filtering tax rows based on order currency (price rows implementation handles this though).- Specified by:
getTaxValuesin interfacede.hybris.platform.jalo.order.price.PriceFactory- Overrides:
getTaxValuesin classde.hybris.platform.europe1.jalo.Europe1PriceFactory- Parameters:
entry-- Returns:
- collection of TaxValues
- Throws:
de.hybris.platform.jalo.order.price.JaloPriceFactoryException
-
superQueryTax4Price
protected Collection<de.hybris.platform.europe1.jalo.TaxRow> superQueryTax4Price(de.hybris.platform.jalo.SessionContext ctx, de.hybris.platform.jalo.product.Product product, de.hybris.platform.jalo.enumeration.EnumerationValue productGroup, de.hybris.platform.jalo.user.User user, de.hybris.platform.jalo.enumeration.EnumerationValue userGroup) Runs the query to retrieve tax rows for travel search criteria.- Overrides:
superQueryTax4Pricein classde.hybris.platform.europe1.jalo.Europe1PriceFactory- Parameters:
ctx-product- the product to get prices forproductGroup- the product group to get prices foruser- the user to get prices foruserGroup- the user price group to get prices for
-
filterTaxRows4Price
protected List<de.hybris.platform.europe1.jalo.TaxRow> filterTaxRows4Price(Collection<de.hybris.platform.europe1.jalo.TaxRow> rows, Date date) Filters tax rows which do not match the given parameters. This method has been Overridden to provide additional logic to filter on Currency as well as DateRange as filtering on Currency is not provided in the out of the box functionality. We require this additional filter as we are getting TaxRows for all Currencies and we are only interested in the TaxRows for the selected Currency.- Overrides:
filterTaxRows4Pricein classde.hybris.platform.europe1.jalo.Europe1PriceFactory- Parameters:
rows- the query result rowsdate- the requested date
-