© 2001 BEA Systems, Inc.

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

java.lang.Object
  |
  +--com.beasys.commerce.foundation.pipeline.CommercePipelineComponent
        |
        +--com.beasys.commerce.ebusiness.tax.pipeline.TaxPC
All Implemented Interfaces:
PipelineComponent
Direct Known Subclasses:
TaxCalculateAndCommitLineLevelPC, TaxVerifyShippingAddressPC

public abstract class TaxPC
extends CommercePipelineComponent

The TaxPC is the base class for all tax pipeline components, it defines helper methods that acquire a handle to the Tax Calculator service and verify that the required attributes are available prior to the execution of business logic.


Constructor Summary
TaxPC()
          TaxPC is the abstract base class for tax pipeline components The noargs constructor does nothing.
 
Method Summary
protected  java.lang.String getMessageBundleName()
           
protected  TaxCalculator getTaxCalculator()
           
protected  java.lang.String getTaxCalculatorJndiName()
          Get the name of the TaxCalculator Session EJB.
protected  boolean isDefined(PipelineSession pipelineSession, java.lang.String attrib)
          Checks that a required attribute is present in the pipeline session.
protected  java.lang.Object requireDefined(PipelineSession pipelineSession, java.lang.String attrib)
          Checks that a required attribute is present in the pipeline session.
protected  void throwFatal(java.lang.String message)
          Throws a PipelineFatalException exception
protected  void throwFatal(java.lang.String message, java.lang.Exception e)
          Throws a PipelineFatalException exception
protected  void throwFatal(java.lang.String message, java.lang.String param)
          Throws a PipelineFatalException exception
 
Methods inherited from class com.beasys.commerce.foundation.pipeline.CommercePipelineComponent
getConnection, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.beasys.commerce.foundation.pipeline.PipelineComponent
process
 

Constructor Detail

TaxPC

public TaxPC()
TaxPC is the abstract base class for tax pipeline components The noargs constructor does nothing.
Method Detail

getTaxCalculatorJndiName

protected java.lang.String getTaxCalculatorJndiName()
                                             throws PipelineFatalException
Get the name of the TaxCalculator Session EJB. It does this based on the property "tax.calculator.jndi.name" in the weblogiccommerce.properties file
Returns:
the JNDI name of the TaxCalculator to be used by the tax pipeline components.

getTaxCalculator

protected TaxCalculator getTaxCalculator()
                                  throws PipelineFatalException
Returns:
the TaxCalculator instance to be used by the tax pipeline components.

getMessageBundleName

protected java.lang.String getMessageBundleName()
Returns:
the name of the message bundle used when reporting errors.

throwFatal

protected void throwFatal(java.lang.String message,
                          java.lang.String param)
                   throws PipelineFatalException
Throws a PipelineFatalException exception
Parameters:
message - the identifier of the message in the message bundle
param - the parameter for a parameterized message

throwFatal

protected void throwFatal(java.lang.String message)
                   throws PipelineFatalException
Throws a PipelineFatalException exception
Parameters:
message - the identifier of the message in the message bundle

throwFatal

protected void throwFatal(java.lang.String message,
                          java.lang.Exception e)
                   throws PipelineFatalException
Throws a PipelineFatalException exception
Parameters:
message - the identifier of the message in the message bundle
e - the exception that should be embedded

isDefined

protected boolean isDefined(PipelineSession pipelineSession,
                            java.lang.String attrib)
Checks that a required attribute is present in the pipeline session.
Parameters:
pipelineSession - the PipelineSession object
attrib - the name of an attribute
Returns:
true is the attribute is defined in the pipeline session

requireDefined

protected java.lang.Object requireDefined(PipelineSession pipelineSession,
                                          java.lang.String attrib)
                                   throws PipelineFatalException
Checks that a required attribute is present in the pipeline session. If the parameter is present it is returned, otherwise an exception is thrown.
Parameters:
pipelineSession - the PipelineSession object
attrib - the name of an attribute
Returns:
the value of the attribute

© 2001 BEA Systems, Inc.

Copyright © 2001 BEA Systems, Inc. All Rights Reserved