java.lang.ObjectCacheableCommandImpl
com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.command.ControllerCommandImpl
com.ibm.commerce.requisitionlist.commands.RequisitionListBaseCmdImpl
com.ibm.commerce.requisitionlist.commands.RequisitionListDisplayCmdImpl
Display one or more requisition lists. This command uses the following AccessBeans:
Field Summary | |
static java.lang.String | COPYRIGHT IBM copyright notice field. |
protected java.lang.String[] | iOutRequisitionListId The output of the requisition list ids. |
protected java.lang.String[] | iRequisitionListStoreId The id of the store where the requisition lists are in. |
Fields inherited from class com.ibm.commerce.requisitionlist.commands.RequisitionListBaseCmdImpl |
iOrderId, iRequisitionListId, iRequisitionListName, iRequisitionListStatus |
Fields inherited from class com.ibm.commerce.command.ControllerCommandImpl |
requestProperties, responseProperties, retriable, viewReqProperties |
Fields inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.requisitionlist.commands.RequisitionListDisplayCmd |
ALL_STORE_ID, defaultCommandClassName, NAME |
Constructor Summary | |
RequisitionListDisplayCmdImpl() |
Method Summary | |
protected void | action() The main action of the command. |
void | checkIsAllowed(AccessVector resource, java.lang.String action) Check if the access control by calling checkIsAllowed() in the super classes |
protected java.util.Enumeration | findRequisitionListByStatus(java.lang.String status) Find the requisition lists based on the status. |
protected java.util.Enumeration | findRequisitionListByStatusAndStore(java.lang.String status, java.lang.Integer storeId) Find the requisition lists based on the status and storeId. |
java.lang.String[] | getOutRequisitionListId() Return the output requisition list ids. |
protected java.lang.String[] | getRequisitionListStoreId() Return the id of the store. |
void | performExecute() The main execution of the command. |
void | reset() Reset all instance variables. |
protected void | setOutRequisitionListId(java.lang.String[] id) Set an array of output requisition list ids. |
void | setRequestProperties(TypedProperty reqProperties) Sets the request properties. |
void | setRequisitionListId(java.lang.Long id) Specifies the requisition list id to be displayed. |
void | setRequisitionListStoreId(java.lang.String[] id) Specifies the store id of the requisition list to be displayed. |
void | setStatus(java.lang.String status) Specifies the status of the requisition list to be displayed. |
protected void | updateResponseView() Sets the response view. |
void | validateParameters() Validate the input parameters. |
Methods inherited from class com.ibm.commerce.requisitionlist.commands.RequisitionListBaseCmdImpl |
copyOrder, copyOrder, copyOrderAccessBean, copyOrderItemAccessBean, copyOrderPayInfo, getName, getOrderId, getRequisitionListId, getStatus, setDefaultRequisitionListStatus, setName, setOrderId, setRequisitionListStatus |
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl |
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties |
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, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, 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, setRetriable, setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command.AccCommand |
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner |
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 |
Methods inherited from interface com.ibm.commerce.security.Protectable |
fulfills, getOwner |
Field Detail |
public static final java.lang.String COPYRIGHT
protected java.lang.String[] iOutRequisitionListId
protected java.lang.String[] iRequisitionListStoreId
Constructor Detail |
public RequisitionListDisplayCmdImpl()
Method Detail |
protected void action() throws java.sql.SQLException, CreateException, FinderException, javax.naming.NamingException, java.rmi.RemoteException, ECException
It finds the requisition lists specified by the input parameters.
It uses the following algorithm to find the requisition lists.
if (requisitionListId is specified) { return requisitionListId } else { if (status is specified) { status_list = {status} } else { // default is all status status_list = {'Y', 'Z'} } if (requisitionListStoreId is specified) { if (requisitionListStoreId = *) { storeId_list = * } else { storeId_list = requisitionListStoreId } } else { // default is the current store and then all stores if (current_storeId exists in the command context) { storeId_list = current_storeId } else { storeId_list = * } } requisitionListId_list = {} if (storeId_list = *) { for (status in status_list) { requisitionListId_list = requisitionListId_list + findRequisitionListByStatus(status) } } else { for (storeId in storeId_list) { for (status in status_list) { requisitionListId_list = requisitionListId_list + findRequisitionListByStatusAndStore(status, storeId) } } } return requisitionListId_list }
After finding all requisition list, it calls checkIsAllowed(AccessVector, String) to verify the access control.
public void checkIsAllowed(AccessVector resource, java.lang.String action) throws ECException
protected java.util.Enumeration findRequisitionListByStatus(java.lang.String status) throws java.sql.SQLException, CreateException, FinderException, javax.naming.NamingException, java.rmi.RemoteException, ECException
protected java.util.Enumeration findRequisitionListByStatusAndStore(java.lang.String status, java.lang.Integer storeId) throws java.sql.SQLException, CreateException, FinderException, javax.naming.NamingException, java.rmi.RemoteException, ECException
public java.lang.String[] getOutRequisitionListId()
protected java.lang.String[] getRequisitionListStoreId()
public void performExecute() throws ECException
public void reset()
protected void setOutRequisitionListId(java.lang.String[] id)
public void setRequestProperties(TypedProperty reqProperties) throws ECException
public void setRequisitionListId(java.lang.Long id)
public void setRequisitionListStoreId(java.lang.String[] id)
public void setStatus(java.lang.String status)
protected void updateResponseView()
public void validateParameters() throws ECException
It checks the validation of the follwoing parameter values:
Exception:
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.