com.ibm.commerce.order.commands
Class OrderDisplayCmdImpl
java.lang.Object
OrderPrepareBaseImpl
com.ibm.commerce.order.commands.OrderDisplayCmdImpl
- All Implemented Interfaces:
- AccCommand, ControllerCommand, ECCommand, OrderDisplayCmd, Protectable
- public class OrderDisplayCmdImpl
- extends OrderPrepareBaseImpl
- implements OrderDisplayCmd
Default implementation of the OrderDisplay controller command.
Displays the contents of the specified orders. If order reference numbers are not specified, displays the list of orders that match the status input parameter. If the status parameter is not specified, it defaults to "P'.
If any of the Orders are not locked, calls the OrderPrepare controller command to prepare them.
Sets the "viewTaskName" response property to "OrderDisplayPendingView", if the status input parameter is "P", "I", "E", or unspecified. Otherwise sets it to "OrderDisplayCompletedView" (unless it is "X", which is not allowed).
This command calls the following TaskCommands:
This command uses the following AccessBeans:
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
COPYRIGHT
IBM Copyright notice field. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.commerce.command.ControllerCommand |
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRequestProperties, setRetriable, setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- IBM Copyright notice field.
- See Also:
- Constant Field Values
OrderDisplayCmdImpl
public OrderDisplayCmdImpl()
performExecute
public void performExecute()
throws ECException
- Executes the main business logic of the command.
Behaviour:
- Check that the specified Orders exist.
- If any of the specified Orders are not locked, and the status input parameter specifies "P", "I", or "E", call the OrderPrepare controller command to prepare them.
- Set the "viewTaskName" response property to "OrderDisplayPendingView", if the status input parameter is "P", "I", "E", or unspecified. Otherwise set it to "OrderDisplayCompletedView".
- Add response properties whose values are the identifiers of the Orders to be displayed, and whose names are specified by the outOrderName input parameter.
-
- Specified by:
- performExecute in interface ECCommand
-
- Throws:
- ECApplicationException - There is no current user in the command context. The _ERR_DIDNT_LOGON message is passed
- ECApplicationException - No Orders exist with the specified status. The _ERR_FINDING_ORDER message is passed. Exception data is also passed as the following name value pairs: (errorCode, 230).
- ECSystemException - an unexpected exception occurred. One of the following messages is passed: ECMessage._ERR_CREATE_EXCEPTION, ECMessage._ERR_FINDER_EXCEPTION, ECMessage._ERR_NAMING_EXCEPTION, ECMessage._ERR_REMOTE_EXCEPTION. The String representation of the exception is passed as a message parameter.
- ECException -
- See Also:
- ECCommand.performExecute()
validateParameters
public void validateParameters()
throws ECException
- Validates the input parameters.
- Calls CommandContext.getNonNullStore() to ensure that the storeId parameter is known.
- Checks that the status input parameter value is not "X".
- If the status input parameter specifies "P", checks that the orderId input parameter specifies only numeric Order identifiers or one of the following abbreviations:
- "*" - all pending Orders
- "." - all current pending Orders
- ".t" - all current template Orders
- "*t" - all template Orders.
- Calls the findOrders(Long,String,Integer) protected method to determine a list of Orders.
-
- Specified by:
- validateParameters in interface ECCommand
-
- Throws:
- ECApplicationException - The ECMessage._ERR_CMD_INVALID_PARAM message is passed, with the name of the invalid property name.
- ECApplicationException - The ECMessage._ERR_BAD_MISSING_CMD_PARAMETER message is passed, with the name of the invalid or missing property name.
- ECApplicationException - The ECMessage._ERR_INVALID_ORDER_REFNUM message is passed, with the invalid value for the orderId parameter.
- ECApplicationException - The ECMessage._ERR_ORDER_WRONG_STATUS message is passed, with the Order identifier, the value of its status attribute, and "P" (the expected status value).
- ECSystemException - an unexpected exception occurred. One of the following messages is passed: ECMessage._ERR_CREATE_EXCEPTION, ECMessage._ERR_FINDER_EXCEPTION, ECMessage._ERR_NAMING_EXCEPTION, ECMessage._ERR_REMOTE_EXCEPTION. The String representation of the exception is passed as a message parameter.
- ECException -
- See Also:
- ECCommand.validateParameters()
Feedback
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.