public class CheckOrderAttributesCmdImpl extends TaskCommandImpl implements CheckOrderAttributesCmd
Behavior
The command does the following:
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
defaultCommandClassName, NAME
Constructor and Description |
---|
CheckOrderAttributesCmdImpl() |
Modifier and Type | Method and Description |
---|---|
java.util.Map |
getAttributes()
get attributes' names and values
|
OrderAccessBean |
getOrderAccessBean()
get order access bean
|
OrderItemAccessBean[] |
getOrderItemAccessBean()
get order item access bean
|
java.util.Map |
getOrderItems() |
void |
performExecute()
This is the default implementation of this task command.
|
void |
reset()
reset all parameters
|
void |
setAttributes(java.lang.String[] attributeNames,
java.lang.String[] attributeValues)
set attributes you want to check.
|
void |
setOrderAccessBean(OrderAccessBean orderAB)
set order access bean you want to check
|
void |
setOrderItemAccessBean(OrderItemAccessBean[] orderItemABs)
set order item access bean you want to check
|
void |
setOrderItems(java.util.Map orderItemIds)
set order item id
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
public static final java.lang.String COPYRIGHT
public void setOrderItems(java.util.Map orderItemIds)
orderItemIds
- public java.util.Map getOrderItems()
getOrderItems
in interface CheckOrderAttributesCmd
The following sample code demonstrates how to resolve the result:
Map result = checkOrderAttributes.getOrderItems();
String[] orderItemIds = (String[]) result.get("orderItemIds");
Map[] attributes = (Map[]) result.get("attributeNames");
for (int i=0; i<orderItemIds.length; i++) {
String orderItem=orderItemIds[i];
Map attributesArray = attributes[i];
if (attributesArray.containsKey("attributeName1")){
String attributeValue1 = (String) attributesArray.get("attributeName1");
}
}
public void setOrderAccessBean(OrderAccessBean orderAB)
setOrderAccessBean
in interface CheckOrderAttributesCmd
orderAB
- public OrderAccessBean getOrderAccessBean()
public void setOrderItemAccessBean(OrderItemAccessBean[] orderItemABs)
setOrderItemAccessBean
in interface CheckOrderAttributesCmd
orderItemABs
- public OrderItemAccessBean[] getOrderItemAccessBean()
public void setAttributes(java.lang.String[] attributeNames, java.lang.String[] attributeValues)
The following sample code demonstrates how to set attributes:
String[] attributeNames = new String[] ({"attributeName1", "attributeName2" });
String[] attributeValues = new String[] ({"attributeValue1", "attributeValue2"});
attributeValues can be null.
setAttributes
in interface CheckOrderAttributesCmd
attributeNames
- attributeValues
- public java.util.Map getAttributes()
public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
public void reset()
reset
in interface com.ibm.websphere.command.Command
reset
in class AbstractECTargetableCommand