|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Field Summary | |
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, COPYRIGHT, defaultCommandClassName, NAME |
Fields inherited from interface com.ibm.commerce.command.ECTargetableCommand |
COPYRIGHT |
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()
This method should be called after a command has been executed to reset its states variables. |
protected void |
setOutRequisitionListId(java.lang.String[] id)
Set an array of output requisition list ids. |
void |
setRequestProperties(TypedProperty reqProperties)
The WebController calls this method before invoking the execute method in this command to set the request properties for this command. |
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 |
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, getResources, 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, setRetriable, setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command.AccCommand |
accessControlCheck, getAccCheck, getForUserId, setAccCheck, setForUserId, setOwner |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties |
Methods inherited from interface com.ibm.commerce.security.Protectable |
fulfills, getOwner |
Field Detail |
protected java.lang.String[] iOutRequisitionListId
protected java.lang.String[] iRequisitionListStoreId
Constructor Detail |
public RequisitionListDisplayCmdImpl()
Method Detail |
protected void action() throws java.sql.SQLException, javax.ejb.CreateException, javax.ejb.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, javax.ejb.CreateException, javax.ejb.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, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException, java.rmi.RemoteException, ECException
public java.lang.String[] getOutRequisitionListId()
protected java.lang.String[] getRequisitionListStoreId()
public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in class AbstractECTargetableCommand
com.ibm.commerce.command.ECCommand
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.public void reset()
AbstractECTargetableCommand
reset
in class RequisitionListBaseCmdImpl
protected void setOutRequisitionListId(java.lang.String[] id)
public void setRequestProperties(TypedProperty reqProperties) throws ECException
ControllerCommand
setRequestProperties
in interface ControllerCommand
setRequestProperties
in class RequisitionListBaseCmdImpl
com.ibm.commerce.command.ControllerCommand
requestProperties
- com.ibm.commerce.datatype.TypedPropertycom.ibm.commerce.exception.ECException.
- public void setRequisitionListId(java.lang.Long id)
RequisitionListDisplayCmd
setRequisitionListId
in interface RequisitionListDisplayCmd
setRequisitionListId
in class RequisitionListBaseCmdImpl
public void setRequisitionListStoreId(java.lang.String[] id)
RequisitionListDisplayCmd
setRequisitionListStoreId
in interface RequisitionListDisplayCmd
public void setStatus(java.lang.String status)
RequisitionListDisplayCmd
setStatus
in interface RequisitionListDisplayCmd
setStatus
in class RequisitionListBaseCmdImpl
protected void updateResponseView()
updateResponseView
in class RequisitionListBaseCmdImpl
public void validateParameters() throws ECException
It checks the validation of the follwoing parameter values:
Exception:
validateParameters
in interface ECCommand
validateParameters
in class AbstractECTargetableCommand
com.ibm.commerce.command.ECCommand
ECException.
-
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |