public class RequisitionListDisplayCmdImpl extends RequisitionListBaseCmdImpl implements RequisitionListDisplayCmd
Input parameters:
Name | Type | Requirement | Description |
---|---|---|---|
requisitionListId | Long | optional | The id of the requisition list to be displayed. |
status/type(CO) | Char | optional | The status/type(CO) of the requisition list. The valid values are 'Y' and 'Z'/"PRL" and "SRL". |
requisitionListStoreId | Long | optional | The store id of the requisition list. |
Output parameters:
Name | Type | Description |
---|---|---|
requisitionListId | Long[] | the resolved requisition list ids |
Behavior:
View:
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
The 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.
|
Constructor and Description |
---|
RequisitionListDisplayCmdImpl() |
Modifier and Type | Method and Description |
---|---|
protected void | action()
The main action of the command.
|
void | checkIsAllowed(AccessVector resource, java.lang.String Paraaction)
This method checks for the access control by calling checkIsAllowed() in the super classes
|
protected java.util.Enumeration | findRequisitionListByStatus(java.lang.String status)
This method finds the requisition lists based on the status.
|
protected java.util.Enumeration | findRequisitionListByStatusAndStore(java.lang.String status, java.lang.Integer storeId)
This method finds the requisition lists based on status and storeId.
|
java.lang.String[] | getOutRequisitionListId()
This method returns the output requisition list ids.
|
protected java.lang.String[] | getRequisitionListStoreId()
This method returns the id of the store.
|
void | performExecute()
This method is the main execution of the command.
|
void | reset()
This method resets all instance variables.
|
protected void | setOutRequisitionListId(java.lang.String[] id)
This method sets an array of output requisition list ids.
|
void | setRequestProperties(TypedProperty reqProperties)
This method sets the request properties.
|
void | setRequisitionListId(java.lang.Long id)
This method specifies the requisition list id to be displayed.
|
void | setRequisitionListStoreId(java.lang.String[] id)
This method specifies the store id of the requisition list to be displayed.
|
void | setStatus(java.lang.String status)
This method specifies the status of the requisition list to be displayed.
|
void | setType(java.lang.String type)
This method specifies the type of the requisition list to be displayed.
|
protected void | updateResponseView()
This method sets the response view.
|
void | validateParameters()
This method validates the input parameters.
|
public static final java.lang.String COPYRIGHT
protected java.lang.String[] iOutRequisitionListId
protected java.lang.String[] iRequisitionListStoreId
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 lists, it calls checkIsAllowed(AccessVector, String) to verify the access control.
public void checkIsAllowed(AccessVector resource, java.lang.String Paraaction) 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
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 following parameter values:
Exception:
public void setType(java.lang.String type)