com.ibm.commerce.me.commands
Class CheckBatchOrderRequestCmdImpl
java.lang.Object
|
+--CacheableCommandImpl
|
+--com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.TaskCommandImpl
|
+--com.ibm.commerce.me.commands.CheckBatchOrderRequestCmdImpl
- All Implemented Interfaces:
-
CheckBatchOrderRequestCmd,
ECCommand,
ECTargetableCommand,
TaskCommand
- public class CheckBatchOrderRequestCmdImpl
- extends
TaskCommandImpl
- implements
CheckBatchOrderRequestCmd
This is a task command checks whether the OrderRequest message from
Procurement system is a duplicate of a previous request.
- See Also:
- Serialized
Form
Method Summary |
int |
getErrorCode()
Gets the errorCode |
Status |
getStatus()
Gets the status of execution of this command |
void |
performExecute()
The business logic for this task command. |
void |
setMessageId(java.lang.String messageId)
Sets the MessageId |
void |
validateParameters()
Check whether all the required parameters are
available. |
Methods inherited from class
com.ibm.commerce.command.
AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
isReadyToCallExecute,
reset,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
CheckBatchOrderRequestCmdImpl
public CheckBatchOrderRequestCmdImpl()
- CheckPurchaseOrderCmdImpl default constructor
getErrorCode
public int getErrorCode()
- Gets the errorCode
-
- Specified by:
-
getErrorCode
in interface
CheckBatchOrderRequestCmd
-
- Returns:
- Status code indicating the reason of failure
getStatus
public Status getStatus()
- Gets the status of execution of this command
-
- Specified by:
-
getStatus
in interface
CheckBatchOrderRequestCmd
-
- Returns:
- Status objec encapsulating the execution result. This can be either
Status.STATUS_OK or Status created by
ErrorConstants.DUPLICATE_ORDER
public void performExecute()
throws ECException
- The business logic for this task command. To see the details of the logic
see the comments for the class. This methods uses the
OrderMessagingExtensionAccessBean to find any order having the provided payload
Id. If any entries are found, create a Status class instance using
ErrorConstants.DUPLICATE_ORDER as status code. If the ejb catches any
exception, ECException is thrown.
-
- Specified by:
-
performExecute
in interface
ECCommand
- Overrides:
-
performExecute
in class
AbstractECTargetableCommand
-
- Throws:
ECException.
-
ECException
setMessageId
public void setMessageId(java.lang.String messageId)
- Sets the MessageId
-
- Specified by:
-
setMessageId
in interface
CheckBatchOrderRequestCmd
-
- Parameters:
messageId
- PayloadId used to check for duplicate
orders
validateParameters
public void validateParameters()
throws ECException
- Check whether all the required parameters are available. This method only
sets the checkParametersOk field to true if messagId (payloadId) is not null.
The actual checking of this parameter is done in performExecute
-
- Specified by:
-
validateParameters
in interface
ECCommand
- Overrides:
-
validateParameters
in class
AbstractECTargetableCommand
-
- Throws:
ECException