Class ShippingTaxAddressSourceHandler
java.lang.Object
com.broadleafcommerce.cartoperation.service.fulfillment.address.ShippingTaxAddressSourceHandler
- All Implemented Interfaces:
TaxAddressSourceHandler,org.springframework.core.Ordered
Populates the tax address from the shipping address.
- Author:
- Marie Standeven (marieStandeven)
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionShippingTaxAddressSourceHandler(com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptioncom.broadleafcommerce.tax.domain.TaxAddressbuildTaxAddressFromSource(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.cart.client.domain.FulfillmentGroup fulfillmentGroup, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Populates the tax address from the source specified by the value ofFulfillmentGroup.getTaxAddressSource().booleancanHandle(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.cart.client.domain.FulfillmentGroup fulfillmentGroup) Return true if this TaxAddressSourceHandler can handle the passed in request, i.e.intgetOrder()protected com.broadleafcommerce.common.extension.TypeFactoryvoidsetOrder(int order) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.cartoperation.service.fulfillment.address.TaxAddressSourceHandler
canHandle, populateTaxAddressFromAddress
-
Constructor Details
-
ShippingTaxAddressSourceHandler
public ShippingTaxAddressSourceHandler(com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
canHandle
public boolean canHandle(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.cart.client.domain.FulfillmentGroup fulfillmentGroup) Description copied from interface:TaxAddressSourceHandlerReturn true if this TaxAddressSourceHandler can handle the passed in request, i.e. this TaxAddressSourceHandler can populate the tax address.- Specified by:
canHandlein interfaceTaxAddressSourceHandler- Parameters:
cart- The cart with items to be taxedfulfillmentGroup- The fulfillment group to be taxed.- Returns:
trueif this TaxAddressSourceHandler can handle the passed in request
-
buildTaxAddressFromSource
public com.broadleafcommerce.tax.domain.TaxAddress buildTaxAddressFromSource(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.cart.client.domain.FulfillmentGroup fulfillmentGroup, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:TaxAddressSourceHandlerPopulates the tax address from the source specified by the value ofFulfillmentGroup.getTaxAddressSource(). For example, if the source isDefaultAddressSource.PAYMENT_ADDRESS, then the tax address will be populated by the billing address from the cart payment.- Specified by:
buildTaxAddressFromSourcein interfaceTaxAddressSourceHandler- Parameters:
cart- The cart with items to be taxedfulfillmentGroup- The fulfillment group to be taxed.contextInfo- Context information around sandbox and multitenant state.- Returns:
- The populated tax address
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory() -
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
setOrder
public void setOrder(int order)
-