© 2001 BEA Systems, Inc.

com.beasys.commerce.ebusiness.tax.pipeline
Class TaxPipelineService

java.lang.Object
  |
  +--com.beasys.commerce.ebusiness.tax.pipeline.TaxPipelineService

public class TaxPipelineService
extends java.lang.Object

The TaxPipeLineService class provides helper methods to load the tax parameters and update the shopping cart's tax information.


Field Summary
static java.lang.String VERAZIP_RETURN_LIST_ON_ZIP_FAILURE
           
 
Constructor Summary
TaxPipelineService()
           
 
Method Summary
 TaxLineList getTaxLineList(ShoppingCart shoppingCart)
          Returns a TaxLineList from the ShoppingCartLines in the ShoppingCart
 TaxParameters getTaxParameters(Address shippingAddress, boolean commit)
          Returns the TaxParameters for the shipping address.
 TaxParameters getTaxParameters(Address shippingAddress, boolean commit, boolean returnTransaction)
          Returns the TaxParameters for the shipping address.
static void initialize()
          Read the (static) tax parameters from commerce property file.
 ShoppingCart updateShoppingCart(TaxResult taxResult, ShoppingCart shoppingCart)
          Writes the TaxResult information into the ShoppingCart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERAZIP_RETURN_LIST_ON_ZIP_FAILURE

public static final java.lang.String VERAZIP_RETURN_LIST_ON_ZIP_FAILURE
Constructor Detail

TaxPipelineService

public TaxPipelineService()
Method Detail

initialize

public static void initialize()
                       throws java.lang.ExceptionInInitializerError
Read the (static) tax parameters from commerce property file. These parameters are read once at start-up and define the merchant's location and tax details.

getTaxParameters

public TaxParameters getTaxParameters(Address shippingAddress,
                                      boolean commit)
Returns the TaxParameters for the shipping address.
Parameters:
commit - whether the tax parameters should include the commit option.
Returns:
a populated TaxParameters object created based on the shipping address and the merchants parameters.

getTaxParameters

public TaxParameters getTaxParameters(Address shippingAddress,
                                      boolean commit,
                                      boolean returnTransaction)
Returns the TaxParameters for the shipping address.
Parameters:
commit - whether the tax parameters should include the commit option.
returnTransaction - true if the transaction is a return and not a credit
Returns:
a populated TaxParameters object created based on the shipping address and the merchants parameters.

getTaxLineList

public TaxLineList getTaxLineList(ShoppingCart shoppingCart)
Returns a TaxLineList from the ShoppingCartLines in the ShoppingCart
Parameters:
shoppingCart - the user's shopping cart
Returns:
the tax calculated per-item for the shopping cart

updateShoppingCart

public ShoppingCart updateShoppingCart(TaxResult taxResult,
                                       ShoppingCart shoppingCart)
Writes the TaxResult information into the ShoppingCart
Parameters:
taxResult - the calculated tax for the shopping cart
shoppingCart - the user's shopping cart
Returns:
the updated shopping cart that includes the tax

© 2001 BEA Systems, Inc.

Copyright © 2001 BEA Systems, Inc. All Rights Reserved