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.
|
Constructor and Description |
---|
CheckOrderAttributesCmdImpl() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map | generateResult(java.util.Map catEntResult, java.util.Map catEntOrderItems)
generate result from catEntResult and catEntOrderItems
|
java.util.Map | getAttributes()
get attributes' names and values
|
protected CatalogEntryType[] | getCatalogEntries(java.lang.String[] catEntryIds)
get catalog entries by specified catalogEntryIds
|
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
|
public static final java.lang.String COPYRIGHT
public void setOrderItems(java.util.Map orderItemIds)
public java.util.Map getOrderItems()
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)
public OrderAccessBean getOrderAccessBean()
public void setOrderItemAccessBean(OrderItemAccessBean[] orderItemABs)
public OrderItemAccessBean[] getOrderItemAccessBean()
public void setAttributes(java.lang.String[] attributeNames, java.lang.String[] attributeValues)
String[] attributeNames = new String[] ({"attributeName1", "attributeName2" }); String[] attributeValues = new String[] ({"attributeValue1", "attributeValue2"});attributeValues can be null.
public java.util.Map getAttributes()
public void performExecute() throws ECException
protected java.util.Map generateResult(java.util.Map catEntResult, java.util.Map catEntOrderItems)
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"); } }
protected CatalogEntryType[] getCatalogEntries(java.lang.String[] catEntryIds) throws ECException
public void reset()