com.ibm.commerce.taxation.commands
Class ResolveTaxJurisdictionCmdImpl
java.lang.Object
|
+--com.ibm.commerce.command.AbstractECCommand
|
+--com.ibm.commerce.command.TaskCommandImpl
|
+--com.ibm.commerce.taxation.commands.ResolveTaxJurisdictionCmdImpl
- All Implemented Interfaces:
- ECCommand, ResolveTaxJurisdictionCmd, TaskCommand
- public class ResolveTaxJurisdictionCmdImpl
- extends TaskCommandImpl
- implements ResolveTaxJurisdictionCmd
This is the default implementation of the ResolveTaxJurisdiction task commands.
An address is said to fall in a jurisdiction if its zipcode falls in the zipcode range
of the jurisdiction and the two have the same city, state, and country. Geocode too!
A NULL jurisdiction field is wildcard.
Methods inherited from class com.ibm.commerce.command.AbstractECCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
ResolveTaxJurisdictionCmdImpl
public ResolveTaxJurisdictionCmdImpl()
betterMatch
protected JurisdictionAccessBean betterMatch(AddressAccessBean address,
JurisdictionAccessBean jurisdiction1,
JurisdictionAccessBean jurisdiction2)
throws javax.ejb.CreateException,
javax.ejb.FinderException,
javax.naming.NamingException,
java.rmi.RemoteException
- Searches for the appropriate jurisdiction address.
- Parameters:
address
- the access bean of the address.jurisdiction1
- the access bean of the first jurisdiction address.jurisdiction2
- the access bean of the second jurisdiction address.
- Returns:
- The more appropriate jurisdiction address.
getJurisdiction
public JurisdictionAccessBean getJurisdiction()
- Returns the jurisdiction access bean.
- Specified by:
getJurisdiction
in interface ResolveTaxJurisdictionCmd
- Returns:
- The access bean of the jurisdiction.
getJurisdictionId
public java.lang.Integer getJurisdictionId()
- Returns the reference number of the jurisdiction.
- Specified by:
getJurisdictionId
in interface ResolveTaxJurisdictionCmd
- Returns:
- The reference number of the jurisdiction.
performExecute
public void performExecute()
throws ECException
- Executes main business logic of the command.
- Specified by:
performExecute
in interface ECCommand
- Overrides:
performExecute
in class AbstractECCommand
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Throws:
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.
setAddress
public void setAddress(AddressAccessBean aAddressAB)
- Sets the address access bean.
- Specified by:
setAddress
in interface ResolveTaxJurisdictionCmd
- Parameters:
aAddressAB
- the access bean of the address.
setAddressId
public void setAddressId(java.lang.Long aAddressId)
- Sets the address id.
- Specified by:
setAddressId
in interface ResolveTaxJurisdictionCmd
- Parameters:
aAddressId
- the reference number of the address.
setDisplayOnly
public void setDisplayOnly(boolean aDisplayOnly)
- Sets the display flag to indicate that it is for product display.
- Specified by:
setDisplayOnly
in interface ResolveTaxJurisdictionCmd
- Parameters:
aDisplayOnly
- the product display flag.
validateParameters
public void validateParameters()
throws ECException
- Checks mandatory parameters.
- Specified by:
validateParameters
in interface ECCommand
- Overrides:
validateParameters
in class AbstractECCommand
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Throws:
ECException.
-