Class CompositeCurrencyContextProvider
java.lang.Object
com.broadleafcommerce.data.tracking.core.mapping.money.CompositeCurrencyContextProvider
- All Implemented Interfaces:
CurrencyContextProvider<Object>
public class CompositeCurrencyContextProvider
extends Object
implements CurrencyContextProvider<Object>
A currency resolver that allows for a configurable set of
CurrencyContextProvider
s- Author:
- Phillip Verheyden (phillipuniverse)
-
Constructor Summary
ConstructorDescriptionCompositeCurrencyContextProvider
(List<CurrencyContextProvider<?>> currencyProviders) -
Method Summary
Modifier and TypeMethodDescriptioncom.broadleafcommerce.money.CurrencyContext
getContext
(Object source, ContextInfo contextInfo) Get the currency from a source objectprotected com.broadleafcommerce.money.CurrencyContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.money.CurrencyContextProvider
canHandle
-
Constructor Details
-
CompositeCurrencyContextProvider
-
-
Method Details
-
getContext
public com.broadleafcommerce.money.CurrencyContext getContext(@NonNull Object source, @Nullable ContextInfo contextInfo) Description copied from interface:CurrencyContextProvider
Get the currency from a source object- Specified by:
getContext
in interfaceCurrencyContextProvider<Object>
- Parameters:
source
- what to use in the consideration of a currency- Returns:
- a
CurrencyUnit
or null if not handled.
-
getDefaultCurrency
protected com.broadleafcommerce.money.CurrencyContext getDefaultCurrency()
-