org.broadleafcommerce.vendor.cybersource.service.tax
Class CyberSourceTaxServiceImpl

java.lang.Object
  extended by org.broadleafcommerce.vendor.cybersource.service.AbstractCyberSourceService
      extended by org.broadleafcommerce.vendor.cybersource.service.tax.CyberSourceTaxServiceImpl
All Implemented Interfaces:
ServiceResponseCacheable, ServiceStatusDetectable, CyberSourceService, CyberSourceTaxService

public class CyberSourceTaxServiceImpl
extends AbstractCyberSourceService
implements CyberSourceTaxService, ServiceResponseCacheable

Author:
jfischer

Field Summary
protected  net.sf.ehcache.Cache cache
           
protected  Boolean isCacheEnabled
           
 
Fields inherited from class org.broadleafcommerce.vendor.cybersource.service.AbstractCyberSourceService
failureCount, failureReportingThreshold, idGenerationService, isUp, libVersion, merchantId, serverUrl
 
Constructor Summary
CyberSourceTaxServiceImpl()
           
 
Method Summary
protected  RequestMessage buildRequestMessage(CyberSourceTaxRequest taxRequest)
           
protected  void buildResponse(CyberSourceTaxResponse taxResponse, CyberSourceTaxResponse cachedResponse, CyberSourceTaxRequest taxRequest)
           
protected  void buildResponse(CyberSourceTaxResponse taxResponse, ReplyMessage reply, CyberSourceTaxRequest taxRequest)
           
 void clearCache()
           
 net.sf.ehcache.Cache getCache()
           
 Boolean isCacheEnabled()
           
 boolean isValidService(CyberSourceRequest request)
           
protected  void logReply(ReplyMessage reply)
           
 CyberSourceTaxResponse process(CyberSourceTaxRequest taxRequest)
           
protected  void setBillingInformation(CyberSourceTaxRequest taxRequest, RequestMessage request)
           
 void setIsCacheEnabled(Boolean isCacheEnabled)
           
protected  void setItemInformation(CyberSourceTaxRequest taxRequest, RequestMessage request)
           
protected  void setTaxRates(CyberSourceTaxResponse taxResponse, CyberSourceTaxRequest taxRequest, TaxReplyItem[] replyItems)
           
 
Methods inherited from class org.broadleafcommerce.vendor.cybersource.service.AbstractCyberSourceService
clearStatus, getFailureReportingThreshold, getIdGenerationService, getLibVersion, getMerchantId, getServerUrl, getServiceName, getServiceStatus, incrementFailure, sendRequest, setFailureReportingThreshold, setIdGenerationService, setLibVersion, setMerchantId, setServerUrl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.broadleafcommerce.vendor.cybersource.service.CyberSourceService
getFailureReportingThreshold, getLibVersion, getMerchantId, getServerUrl, getServiceName, getServiceStatus, setFailureReportingThreshold, setLibVersion, setMerchantId, setServerUrl
 

Field Detail

cache

protected net.sf.ehcache.Cache cache

isCacheEnabled

protected Boolean isCacheEnabled
Constructor Detail

CyberSourceTaxServiceImpl

public CyberSourceTaxServiceImpl()
Method Detail

process

public CyberSourceTaxResponse process(CyberSourceTaxRequest taxRequest)
                               throws TaxException
Specified by:
process in interface CyberSourceTaxService
Throws:
TaxException

isValidService

public boolean isValidService(CyberSourceRequest request)
Specified by:
isValidService in interface CyberSourceService

clearCache

public void clearCache()
Specified by:
clearCache in interface ServiceResponseCacheable

getCache

public net.sf.ehcache.Cache getCache()
Specified by:
getCache in interface ServiceResponseCacheable

buildResponse

protected void buildResponse(CyberSourceTaxResponse taxResponse,
                             CyberSourceTaxResponse cachedResponse,
                             CyberSourceTaxRequest taxRequest)
                      throws TaxException
Throws:
TaxException

buildResponse

protected void buildResponse(CyberSourceTaxResponse taxResponse,
                             ReplyMessage reply,
                             CyberSourceTaxRequest taxRequest)

setTaxRates

protected void setTaxRates(CyberSourceTaxResponse taxResponse,
                           CyberSourceTaxRequest taxRequest,
                           TaxReplyItem[] replyItems)

buildRequestMessage

protected RequestMessage buildRequestMessage(CyberSourceTaxRequest taxRequest)

setItemInformation

protected void setItemInformation(CyberSourceTaxRequest taxRequest,
                                  RequestMessage request)

setBillingInformation

protected void setBillingInformation(CyberSourceTaxRequest taxRequest,
                                     RequestMessage request)

logReply

protected void logReply(ReplyMessage reply)

isCacheEnabled

public Boolean isCacheEnabled()

setIsCacheEnabled

public void setIsCacheEnabled(Boolean isCacheEnabled)


Copyright © 2012. All Rights Reserved.