com.ibm.commerce.messaging.commands
Class OrderStatusCmdImpl
com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.messaging.commands.OrderStatusCmdImpl
- All Implemented Interfaces:
- AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, OrderStatusCmd, Protectable
- Direct Known Subclasses:
- OrderConfirmCmdImpl, OrderInvoiceCmdImpl, OrderShippingCmdImpl
- public class OrderStatusCmdImpl
- extends ControllerCommandImpl
- implements OrderStatusCmd
The implementation of the OrderStatus command (see interface for a detailed
description of the OrderStatus command)
Method Summary |
boolean |
checkOrderStatusSequence(OrderFulfillmentStatusAccessBean orderStatusAB)
Verifies that the sequence information of the order status to update does not
conflict with the sequence information with the order status that is currently in
the ORDSTAT table. |
void |
createOrderStatus()
Creates a new entry in the ORDSTAT table based the the given information that is
received through the request properties. |
boolean |
doPostProcess(TypedProperty aRequestProperty)
Performs a verification check after the command executes. |
boolean |
doPreProcess(TypedProperty aRequestProperty)
Performs a verification check before the command executes. |
boolean |
doProcess(TypedProperty aRequestProperty)
Determine whether this order is new or not. |
java.lang.Long[] |
getResourceOwners()
This method returns the Organization unit reference numbers for all the resources accessed by this command
It will return null if no resource if being accessed by this command. |
AccessVector |
getResources()
Gets the access vector accessed by this command. |
boolean |
isReadyToCallExecute()
Indicates whether the command is ready to execute. |
void |
performExecute()
Performs a pre condition check on the request properties and if the
pre condition check is ok, the business logic will be performed followed
by a post condition check to ensure integrity is maintained. |
void |
propertySet(OrderFulfillmentStatusAccessBean ab,
TypedProperty aProp)
Fills the OrderFulfillmentStatusAccessBean object with the values that are found
in the request properties. |
void |
reset()
An Empty method. |
void |
setRequestProperties(TypedProperty aRequestProperties)
Binds the parameters received by the request properties to variables that are used
for determining the order to updated. |
void |
updateOrder(OrderAccessBean abOrder)
Updates the ORDSTAT table with the information given by the request properties. |
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl |
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties |
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters |
Methods inherited from interface com.ibm.commerce.command.ControllerCommand |
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- The internal copyright field.
iMerchantOrderNumber
protected java.lang.String iMerchantOrderNumber
iOrderId
protected java.lang.Long iOrderId
osItems
protected java.util.Vector osItems
osProp
protected TypedProperty osProp
OrderStatusCmdImpl
public OrderStatusCmdImpl()
checkOrderStatusSequence
public boolean checkOrderStatusSequence(OrderFulfillmentStatusAccessBean orderStatusAB)
throws ECException
- Verifies that the sequence information of the order status to update does not
conflict with the sequence information with the order status that is currently in
the ORDSTAT table. If the new sequence is okay, the method will return true, else the
method will return false.
- Parameters:
orderStatusAB
- com.ibm.commerce.messaging.ejb.objects.OrderFulfillmentStatusAccessBean- Returns:
- boolean
- Throws:
ECException
-
createOrderStatus
public void createOrderStatus()
throws ECException
- Creates a new entry in the ORDSTAT table based the the given information that is
received through the request properties. ECException will be thrown if there
is any problems with the update.
- Throws:
ECException
-
doPostProcess
public boolean doPostProcess(TypedProperty aRequestProperty)
throws ECException
- Performs a verification check after the command executes.
- Specified by:
doPostProcess
in interface OrderStatusCmd
- Parameters:
aRequestProperty
- com.ibm.commerce.datatype.TypedProperty- Returns:
- boolean
- Throws:
ECException
-
doPreProcess
public boolean doPreProcess(TypedProperty aRequestProperty)
throws ECException
- Performs a verification check before the command executes.
- Specified by:
doPreProcess
in interface OrderStatusCmd
- Parameters:
aRequestProperty
- com.ibm.commerce.datatype.TypedProperty- Returns:
- boolean
- Throws:
ECException
-
doProcess
public boolean doProcess(TypedProperty aRequestProperty)
throws ECException
- Determine whether this order is new or not. If so, will add a new entry
to the ORDSTAT table providing a WCS Order does exist. Else, an
existing entry in the ORDSTAT table will be updated providing the sequence found
in the request properties does not conflict with the sequence information found
in the ORDSTAT table for the entry to be updated. Updating will depend on
where versioning equals "TRUE". Versioning will update and version the entry
and a new entry will be created in the ORDSTAT table with the information found
in the request properties. No versioning only consists of updating the entry.
After the order status is created or updated, the order items in the status
message will be updated. The method will return false or throw an ECException if there
is a problem with the given information or the update. If there are no problems, the
method will return true.
- Specified by:
doProcess
in interface OrderStatusCmd
- Parameters:
aRequestProperty
- com.ibm.commerce.datatype.TypedProperty- Returns:
- boolean
- Throws:
ECException
-
getResourceOwners
public java.lang.Long[] getResourceOwners()
throws ECException
- This method returns the Organization unit reference numbers for all the resources accessed by this command
It will return null if no resource if being accessed by this command.
- Specified by:
getResourceOwners
in interface AccCommand
- Overrides:
getResourceOwners
in class ControllerCommandImpl
- Returns:
- Long[] - an array of all organization unit reference numbers
getResources
public AccessVector getResources()
throws ECException
- Description copied from interface:
ECCommand
- Gets the access vector accessed by this command.
The default implementation returns null indicating that no protectable resource is
accessed by this command. It is the responsibilities of the command writer to
return the protectable primary resource(s) and the corresponding actions accessed
by this command.
- Specified by:
getResources
in interface ECCommand
- Overrides:
getResources
in class AbstractECTargetableCommand
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Returns:
- AccessVector - a vector of resource action pairs
isReadyToCallExecute
public boolean isReadyToCallExecute()
- Indicates whether the command is ready to execute.
- Overrides:
isReadyToCallExecute
in class AbstractECTargetableCommand
- Returns:
- boolean
performExecute
public void performExecute()
throws ECException
- Performs a pre condition check on the request properties and if the
pre condition check is ok, the business logic will be performed followed
by a post condition check to ensure integrity is maintained.
If either of the 3 steps fail, an ECException will be thrown.
- Specified by:
performExecute
in interface ECCommand
- Overrides:
performExecute
in class AbstractECTargetableCommand
- Throws:
ECException
-
propertySet
public void propertySet(OrderFulfillmentStatusAccessBean ab,
TypedProperty aProp)
throws ECException
- Fills the OrderFulfillmentStatusAccessBean object with the values that are found
in the request properties. If values found in the request properties conflict with
the allowed values for the OrderFulfillmentStatusAccessBean, an ECException is
thrown.
- Parameters:
ab
- com.ibm.commerce.messaging.ejb.objects.OrderFulfillmentStatusAccessBeanaProp
- com.ibm.commerce.datatype.TypedProperty- Throws:
ECException
-
reset
public void reset()
- An Empty method.
- Overrides:
reset
in class AbstractECTargetableCommand
setRequestProperties
public void setRequestProperties(TypedProperty aRequestProperties)
throws ECException
- Binds the parameters received by the request properties to variables that are used
for determining the order to updated. Also, a validation check is performed on
some of the given parameters and if this check fails, an ECException is thrown.
- Specified by:
setRequestProperties
in interface ControllerCommand
- Overrides:
setRequestProperties
in class ControllerCommandImpl
- Parameters:
aRequestProperty
- com.ibm.commerce.datatype.TypedProperty- Throws:
ECException
-
updateOrder
public void updateOrder(OrderAccessBean abOrder)
throws ECException
- Updates the ORDSTAT table with the information given by the request properties.
- Parameters:
abOrder
- com.ibm.commerce.order.objects.OrderAccessBean- Throws:
ECException
-