Class DefaultExternalTaxesService
- java.lang.Object
-
- de.hybris.platform.commerceservices.externaltax.impl.DefaultExternalTaxesService
-
- All Implemented Interfaces:
ExternalTaxesService
- Direct Known Subclasses:
SapExternalTaxesService
public class DefaultExternalTaxesService extends java.lang.Object implements ExternalTaxesService
BaseExternalTaxesServiceimplementation, to determine if the 3rd party call is necessary and apply the results to the cart.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSESSION_EXTERNAL_TAX_DOCUMENT
-
Constructor Summary
Constructors Constructor Description DefaultExternalTaxesService()
-
Method Summary
-
-
-
Field Detail
-
SESSION_EXTERNAL_TAX_DOCUMENT
public static final java.lang.String SESSION_EXTERNAL_TAX_DOCUMENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
calculateExternalTaxes
public boolean calculateExternalTaxes(AbstractOrderModel abstractOrder)
Description copied from interface:ExternalTaxesServiceCalculate the taxes for order via an external service- Specified by:
calculateExternalTaxesin interfaceExternalTaxesService- Parameters:
abstractOrder- A Hybris cart or order- Returns:
- True if calculation was successful and false otherwise
-
clearTaxValues
protected void clearTaxValues(AbstractOrderModel abstractOrder)
Resets all the tax values for order and its entries- Parameters:
abstractOrder- A hybris cart or order
-
getSessionExternalTaxDocument
protected ExternalTaxDocument getSessionExternalTaxDocument(AbstractOrderModel abstractOrder)
-
saveOrder
protected void saveOrder(AbstractOrderModel abstractOrder)
-
setCalculatedStatus
protected void setCalculatedStatus(AbstractOrderModel order)
-
clearSessionTaxDocument
public void clearSessionTaxDocument()
Description copied from interface:ExternalTaxesServiceRemoves tax document from session if present- Specified by:
clearSessionTaxDocumentin interfaceExternalTaxesService
-
getCalculateExternalTaxesStrategy
protected CalculateExternalTaxesStrategy getCalculateExternalTaxesStrategy()
-
setCalculateExternalTaxesStrategy
public void setCalculateExternalTaxesStrategy(CalculateExternalTaxesStrategy calculateExternalTaxesStrategy)
-
getApplyExternalTaxesStrategy
protected ApplyExternalTaxesStrategy getApplyExternalTaxesStrategy()
-
setApplyExternalTaxesStrategy
public void setApplyExternalTaxesStrategy(ApplyExternalTaxesStrategy applyExternalTaxesStrategy)
-
getDecideExternalTaxesStrategy
protected DecideExternalTaxesStrategy getDecideExternalTaxesStrategy()
-
setDecideExternalTaxesStrategy
public void setDecideExternalTaxesStrategy(DecideExternalTaxesStrategy decideExternalTaxesStrategy)
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getRecalculateExternalTaxesStrategy
protected RecalculateExternalTaxesStrategy getRecalculateExternalTaxesStrategy()
-
setRecalculateExternalTaxesStrategy
public void setRecalculateExternalTaxesStrategy(RecalculateExternalTaxesStrategy recalculateExternalTaxesStrategy)
-
getSessionService
public SessionService getSessionService()
-
setSessionService
public void setSessionService(SessionService sessionService)
-
-