Interface PriceListService<P extends PriceList>
- All Superinterfaces:
 com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>,com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
- All Known Implementing Classes:
 DefaultPriceListService
PriceLists. Backed by a
 PriceListRepository.- Author:
 - Chad Harchar (charchar), Nathan Moore (nathanmoore)
 - See Also:
 
- 
Method Summary
Modifier and TypeMethodDescriptioncom.broadleafcommerce.pricing.client.domain.PriceListRefconvertPriceListToPriceListRef(PriceList priceList) Create a lightweight PriceListRef from a PriceList object.readAllByCurrencyIn(List<javax.money.CurrencyUnit> currencies, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all price lists targeting the given currency.org.springframework.data.domain.Page<P>readAllByIds(Iterable<String> id, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) org.springframework.data.domain.Page<P>readAllByName(String name, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) readAllByPriceRefs(Collection<com.broadleafcommerce.pricing.client.domain.PriceListRef> priceListRefs, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Returns list of PriceLists for the provided priceListRefs.org.springframework.data.domain.Page<P>readAllByType(String type, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) org.springframework.data.domain.Page<P>readAllByTypeAndName(String type, String name, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) readAllByUserTargetsIn(Iterable<UserTarget> userTargets, List<javax.money.CurrencyUnit> currencies, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all price lists wherePriceList.getUserTargets()intersects with the providedUserTargets.Returns the fields that the PriceModifier components can use for calculations.List<com.broadleafcommerce.pricing.client.domain.PriceListRef>retrievePriceListRefsForPriceContext(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext) Retrieves allPriceListRefsthat apply to a givenPriceContext.retrievePriceListsForPriceContext(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext) Retrieves allPriceListRefsthat apply to a givenPriceContext.Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService
create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSortMethods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService
readAll, readAll, readAll, readAll 
- 
Method Details
- 
readAllByType
 - 
readAllByTypeAndName
@NonNull org.springframework.data.domain.Page<P> readAllByTypeAndName(@NonNull String type, @NonNull String name, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)  - 
readAllByName
 - 
readAllByPriceRefs
@NonNull List<P> readAllByPriceRefs(Collection<com.broadleafcommerce.pricing.client.domain.PriceListRef> priceListRefs, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Returns list of PriceLists for the provided priceListRefs.- Parameters:
 priceListRefs-context-- Returns:
 
 - 
readAllByUserTargetsIn
@NonNull List<P> readAllByUserTargetsIn(@NonNull Iterable<UserTarget> userTargets, @NonNull List<javax.money.CurrencyUnit> currencies, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all price lists wherePriceList.getUserTargets()intersects with the providedUserTargets.- Parameters:
 userTargets- users the returnedPriceListshould targetcurrencies- the list ofCurrencyUnits by which to filtercontextInfo- Context information regarding the current API request- Returns:
 - all 
PriceLists targeting the providedUserTargets. 
 - 
readAllByCurrencyIn
@NonNull List<P> readAllByCurrencyIn(@NonNull List<javax.money.CurrencyUnit> currencies, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all price lists targeting the given currency.- Parameters:
 currencies- the list ofCurrencyUnits by which to filtercontextInfo- Context information regarding the current API request- Returns:
 - all 
PriceLists targeting the provided currency 
 - 
readAllByIds
 - 
retrievePriceListRefsForPriceContext
@NonNull List<com.broadleafcommerce.pricing.client.domain.PriceListRef> retrievePriceListRefsForPriceContext(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @Nullable com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext) Retrieves all
PriceListRefsthat apply to a givenPriceContext.This method will look first for any customer- or account-specific
PriceListssince these will trump any others (seePriceList.getUserTargets(). Then, it will filter byPriceList.getCurrency(). If none, then it will filter first on currency then onPriceList.getPriceContextCriteria(). In all cases, if applicable, it will filter and sort on priority. - 
retrievePriceListsForPriceContext
@NonNull List<P> retrievePriceListsForPriceContext(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @Nullable com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext) Retrieves all
PriceListRefsthat apply to a givenPriceContext.This method will look first for any customer- or account-specific
PriceListssince these will trump any others (seePriceList.getUserTargets(). Then, it will filter byPriceList.getCurrency(). If none, then it will filter first on currency then onPriceList.getPriceContextCriteria(). In all cases, if applicable, it will filter and sort on priority. - 
readAllModifiableFieldsForType
Returns the fields that the PriceModifier components can use for calculations.- Parameters:
 type-- Returns:
 
 - 
convertPriceListToPriceListRef
com.broadleafcommerce.pricing.client.domain.PriceListRef convertPriceListToPriceListRef(PriceList priceList) Create a lightweight PriceListRef from a PriceList object.- Parameters:
 priceList-- Returns:
 
 - 
readModifiableFieldsForType
 
 -