com.ibm.commerce.inventory.beans.commands
Class ProductAvailabilityDataBeanCmdImpl
- java.lang.Object
-
- com.ibm.websphere.command.TargetableCommandImpl
-
- com.ibm.websphere.command.CacheableCommandImpl
-
- com.ibm.commerce.command.MeasuredCacheableCommandImpl
-
- com.ibm.commerce.command.AbstractECTargetableCommand
-
- com.ibm.commerce.command.DataBeanCommandImpl
-
- com.ibm.commerce.inventory.beans.commands.ProductAvailabilityDataBeanCmdImpl
-
- All Implemented Interfaces:
- DataBeanCommand, ECCommand, ECTargetableCommand, com.ibm.commerce.command.TargetableECCommand, ProductAvailabilityDataBeanCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable
public class ProductAvailabilityDataBeanCmdImpl extends DataBeanCommandImpl implements ProductAvailabilityDataBeanCmd
This is the default implementation of theProductAvailabilityDataBeanCmd
task command.Input parameters:
Name Description ProductAvailabilityDataBean
a databean represents the productAvailability Output parameters:
Name Description AvailableDate
available date FormattedTotalQuantityOnHand
total quantity of the product ExpectedInventory
expected inventory Behaviour:
- check whether the local inventory cache has cached the availability of the product
- makes the
GetProductAvailability
outbound service request - set the AvailableDate and FormattedTotalQuantityOnHand
Task commands called:
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.ibm.commerce.command.DataBeanCommandImpl
emptyString, EURO_CODE
-
Fields inherited from interface com.ibm.commerce.inventory.beans.commands.ProductAvailabilityDataBeanCmd
defaultCommandClassName, NAME
-
-
Constructor Summary
Constructors Constructor and Description ProductAvailabilityDataBeanCmdImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
checkExternalInventory()
Check external inventory.void
checkLocalExpectedInventory()
This method checks the local expected inventory cachevoid
checkLocalOnHandInventory()
This method checks the local onhand inventory cachejava.sql.Timestamp
getAvailableDate()
This method gets the available datejava.util.List
getExpectedInventory()
This method gets the expected inventoryFormattedQuantityAmountDataBean
getFormattedTotalQuantityOnHand()
This method gets the formatted total on hand quantityjava.util.List
getFulfillmentCenterInventory()
This method gets the fulfillment center inventoryInventoryClientFacadeImpl
getInventoryClientFacade()
This method gets the inventory client facade.java.lang.String
getInventoryStatus()
This method gets the inventory statusQuantityAmount
getTotalQuantityOnHand()
This method gets the total onhand quantityvoid
performExecute()
This method performs the main logic of the task commandvoid
reset()
This method resets the command fields.void
setFulfillmentCenterIds(java.lang.Integer[] argFulfillmentCenterIds)
This method sets the fulfillment center Idsvoid
setRequestProperties(TypedProperty val)
This method sets the request propertiesvoid
setSKU(java.lang.String argSku)
This method sets the skuvoid
validateParameters()
Validate the parameters for the command.-
Methods inherited from class com.ibm.commerce.command.DataBeanCommandImpl
getDataBean, populateDataBeanCommand, setDataBean
-
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
-
Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
-
Methods inherited from class com.ibm.websphere.command.TargetableCommandImpl
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.commerce.command.DataBeanCommand
getDataBean, setDataBean
-
Methods inherited from interface com.ibm.websphere.command.TargetableCommand
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
-
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
-
-
-
-
Method Detail
-
getInventoryClientFacade
public InventoryClientFacadeImpl getInventoryClientFacade()
This method gets the inventory client facade.- Returns:
- InventoryClientFacadeImpl an InventoryClientFacadeImpl instance.
-
checkLocalExpectedInventory
public void checkLocalExpectedInventory() throws ECException, java.lang.NumberFormatException, javax.naming.NamingException, java.sql.SQLException
This method checks the local expected inventory cache- Parameters:
foundCatEntryAB
- the catentry to check- Throws:
ECException
java.lang.NumberFormatException
javax.naming.NamingException
java.sql.SQLException
-
checkLocalOnHandInventory
public void checkLocalOnHandInventory() throws ECSystemException, ECApplicationException, java.lang.NumberFormatException, javax.naming.NamingException, java.sql.SQLException
This method checks the local onhand inventory cache- Throws:
ECSystemException
ECApplicationException
java.lang.NumberFormatException
javax.naming.NamingException
java.sql.SQLException
-
getInventoryStatus
public java.lang.String getInventoryStatus()
This method gets the inventory status- Returns:
- inventory status
-
setSKU
public void setSKU(java.lang.String argSku)
This method sets the sku- Parameters:
argSku
- Sku to set
-
setFulfillmentCenterIds
public void setFulfillmentCenterIds(java.lang.Integer[] argFulfillmentCenterIds)
This method sets the fulfillment center Ids- Parameters:
argFulfillmentCenterIds
- FulfillmentCenterIds to check
-
getFulfillmentCenterInventory
public java.util.List getFulfillmentCenterInventory()
This method gets the fulfillment center inventory- Returns:
- list FulfillmentCenterInventory
-
getTotalQuantityOnHand
public QuantityAmount getTotalQuantityOnHand()
This method gets the total onhand quantity- Returns:
- QuantityAmount the total onhand quantity
-
getAvailableDate
public java.sql.Timestamp getAvailableDate()
This method gets the available date- Returns:
- Timestamp the available date
-
getExpectedInventory
public java.util.List getExpectedInventory()
This method gets the expected inventory- Returns:
- list the expected inventory
-
getFormattedTotalQuantityOnHand
public FormattedQuantityAmountDataBean getFormattedTotalQuantityOnHand()
This method gets the formatted total on hand quantity- Returns:
- FormattedQuantityAmountDataBean
-
performExecute
public void performExecute() throws ECException
This method performs the main logic of the task command- Specified by:
performExecute
in interfaceECCommand
- Specified by:
performExecute
in interfacecom.ibm.websphere.command.TargetableCommand
- Overrides:
performExecute
in classAbstractECTargetableCommand
- Throws:
ECException
- com.ibm.commerce.exception.ECException In case of any ECException
-
checkExternalInventory
public void checkExternalInventory() throws ECApplicationException
Check external inventory.- Throws:
ECApplicationException
-
setRequestProperties
public void setRequestProperties(TypedProperty val)
This method sets the request properties- Specified by:
setRequestProperties
in interfaceDataBeanCommand
- Overrides:
setRequestProperties
in classDataBeanCommandImpl
- Parameters:
val
- TypedProperty
-
reset
public void reset()
This method resets the command fields.
After this method is invoked, and proper attributes are set, the command can be executed again.
- Specified by:
reset
in interfacecom.ibm.websphere.command.Command
- Overrides:
reset
in classAbstractECTargetableCommand
-
validateParameters
public void validateParameters() throws ECException
Validate the parameters for the command.- Specified by:
validateParameters
in interfaceECCommand
- Overrides:
validateParameters
in classAbstractECTargetableCommand
- Throws:
ECException
-
-