com.ibm.commerce.requisitionlist.commands
Class RequisitionListCreateCmdImpl
com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.requisitionlist.commands.RequisitionListBaseCmdImpl
|
+--com.ibm.commerce.requisitionlist.commands.RequisitionListCreateCmdImpl
- All Implemented Interfaces:
- AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, RequisitionListCreateCmd
- public class RequisitionListCreateCmdImpl
- extends RequisitionListBaseCmdImpl
- implements RequisitionListCreateCmd
Create an empty requisition list.
Method Summary |
protected void |
action()
The main action of the command. |
java.lang.Long |
getRequisitionListId()
Returns the newly created requisition list id. |
AccessVector |
getResources()
It returns the store access bean. |
void |
performExecute()
The main execution of the command. |
void |
setName(java.lang.String name)
Specifies the name of the created requisition list. |
void |
setStatus(java.lang.String status)
Specifies the status of the created requisition list. |
protected void |
updateResponseView()
Sets the response view - Redirect View. |
void |
validateParameters()
Validate the input parameters. |
Methods inherited from class com.ibm.commerce.requisitionlist.commands.RequisitionListBaseCmdImpl |
copyOrder, copyOrder, copyOrderAccessBean, copyOrderItemAccessBean, copyOrderPayInfo, getName, getOrderId, getStatus, reset, setDefaultRequisitionListStatus, setOrderId, setRequestProperties, setRequisitionListId |
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, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Methods inherited from interface com.ibm.commerce.command.ControllerCommand |
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, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties |
RequisitionListCreateCmdImpl
public RequisitionListCreateCmdImpl()
action
protected void action()
throws java.sql.SQLException,
javax.ejb.CreateException,
javax.ejb.FinderException,
javax.naming.NamingException,
java.rmi.RemoteException,
ECException
- The main action of the command.
It uses OrderAccessBean to create a new requisition list.
getRequisitionListId
public java.lang.Long getRequisitionListId()
- Description copied from interface:
RequisitionListCreateCmd
- Returns the newly created requisition list id.
- Specified by:
getRequisitionListId
in interface RequisitionListCreateCmd
- Overrides:
getRequisitionListId
in class RequisitionListBaseCmdImpl
getResources
public AccessVector getResources()
throws ECException
- It returns the store access bean.
- 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
performExecute
public void performExecute()
throws ECException
- The main execution of the command.
It calls the follwoing methods:
- setDefaultRequisitionListStatus()
- action()
- updateResponseView()
- Specified by:
performExecute
in interface ECCommand
- Overrides:
performExecute
in class AbstractECTargetableCommand
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Throws:
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.
setName
public void setName(java.lang.String name)
- Description copied from interface:
RequisitionListCreateCmd
- Specifies the name of the created requisition list.
- Specified by:
setName
in interface RequisitionListCreateCmd
- Overrides:
setName
in class RequisitionListBaseCmdImpl
setStatus
public void setStatus(java.lang.String status)
- Description copied from interface:
RequisitionListCreateCmd
- Specifies the status of the created requisition list.
If it is not specified, the default value is 'Y', a shareable requisition list.
- Specified by:
setStatus
in interface RequisitionListCreateCmd
- Overrides:
setStatus
in class RequisitionListBaseCmdImpl
updateResponseView
protected void updateResponseView()
- Sets the response view - Redirect View.
It also sets the output parameter requisitionListId.
- Overrides:
updateResponseView
in class RequisitionListBaseCmdImpl
validateParameters
public void validateParameters()
throws ECException
- Validate the input parameters.
It checks the following mandatory parameters:
It also checks the validation of the follwoing parameter values:
Exception:
- It throws an ECApplicationException with the message key _ERR_BAD_MISSING_CMD_PARAMETER, if the input parameter storeId is not found.
- It throws an ECApplicationException with the message key _ERR_INVALID_INPUT, if the input parameter status is not 'Y' or 'Z'.
- Specified by:
validateParameters
in interface ECCommand
- Overrides:
validateParameters
in class AbstractECTargetableCommand
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Throws:
ECException.
-