public class InterestItemAddCmdImpl extends ControllerCommandImpl implements InterestItemAddCmd
InterestItemAdd command adds one or more products to one or
more shopper's interest item lists.
For example, to add three catalog entries with ID 15, 16, and 17 to certain
interest item list, you can pass catEntryId_1=15&catEntryId_2=16&catEntryId_3=17
to the command. If you call the individual set method to pass the above
parameters, you need to create a hashtable and add the following to the hashtable:
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASSNAME
The fully qualified name of this class.
|
static java.lang.String |
COPYRIGHT
The internal copyright field.
|
defaultCommandClassName, NAME| Constructor and Description |
|---|
InterestItemAddCmdImpl()
No value constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkIsAllowed(AccessVector resource,
java.lang.String action)
Check to see if user can perform action on resource.
|
TypedProperty |
getResolvedRequestProperties()
This method gets the resolved request properties associated with this command.
|
java.lang.Long[] |
getResourceOwners()
This method gets all the organization units that own the resources accessed by this command.
|
boolean |
isReadyToCallExecute()
This method is called by the targetable command framework.
|
void |
performExecute()
The main program for InterestItemAddCmd command.
|
void |
reset()
This method is called after a command has been executed.
|
void |
setAttrName(java.util.Hashtable ahshAttrName)
Sets the attribute name parameters (optional).
|
void |
setAttrValue(java.util.Hashtable ahshAttrValue)
Sets the attribute value parameters (optional).
|
void |
setCatEntryId(java.util.Hashtable ahshCatEntryId)
Sets the
catentry ID parameters. |
void |
setField1(java.util.Hashtable ahshField1)
Sets the field1 parameters (optional).
|
void |
setField2(java.util.Hashtable ahshField2)
Sets the field2 parameters (optional).
|
void |
setField3(java.util.Hashtable ahshField3)
Sets the field3 parameters (optional).
|
void |
setListId(java.lang.String[] asaListId)
Specifies zero or more interest item lists from which to be added.
|
void |
setListIdName(java.lang.String[] asaListIdName)
Specifies the names of name-value pairs to be added to the redirection
URL.
|
void |
setMemberId(java.util.Hashtable ahshMemberId)
Set the member id parameters.
|
void |
setPartNumber(java.util.Hashtable ahshPartNumber)
Set the part number parameters.
|
void |
setQuantity(java.util.Hashtable ahshQuantity)
The quantity of the item to add.
|
void |
setRequestProperties(TypedProperty aRequestProperties)
This method sets the
requestProperties for the command. |
void |
setUOM(java.util.Hashtable ahshUOM)
Set the unit of measure parameters (optional).
|
void |
setUpdateable(java.util.Hashtable ahshUpdateable)
updateable={ 1 | 0 }
If updateable=1: Add a new record.
|
void |
validateParameters()
This method performs server side parameter checking.
|
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputPropertiesaccessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiesexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCachegetCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicyequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckPermission, execute, getGeneric, getRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputPropertiesexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCachegetCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputPropertiesaccessControlCheck, getAccCheck, getForUserId, setAccCheck, setForUserId, setOwnercheckIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiesfulfills, getOwnerpublic static final java.lang.String COPYRIGHT
public static final java.lang.String CLASSNAME
public void checkIsAllowed(AccessVector resource, java.lang.String action) throws ECException
resource - AccessVector - the resource to be acted onaction - String - action to be performed on the resourceECExceptionpublic TypedProperty getResolvedRequestProperties()
ControllerCommandImplHashtable of name/value pairs of interpreted request properties.
This method needs to be implemented for all commands that accept wild card parameter values
and where user traffic data monitoring is desired. The default implementation returns null.
The command will return only the properties with expanded parameter values.getResolvedRequestProperties in interface ControllerCommandgetResolvedRequestProperties in class ControllerCommandImplpublic java.lang.Long[] getResourceOwners()
throws ECException
ControllerCommandImplgetResourceOwners in interface AccCommandgetResourceOwners in class ControllerCommandImplLong objects that represents all the organization
unit reference numbers. A site owner is represented by an organization unit value of -1.ECExceptionpublic boolean isReadyToCallExecute()
AbstractECTargetableCommandtrue.isReadyToCallExecute in interface com.ibm.websphere.command.CommandisReadyToCallExecute in class AbstractECTargetableCommandboolean value; true if we can execute the
command and false otherwise. This default implementation will return true.public void performExecute()
throws ECException
performExecute in interface ECCommandperformExecute in interface com.ibm.websphere.command.TargetableCommandperformExecute in class AbstractECTargetableCommandECExceptionpublic void reset()
AbstractECTargetableCommandreset in interface com.ibm.websphere.command.Commandreset in class AbstractECTargetableCommandpublic void setAttrName(java.util.Hashtable ahshAttrName)
InterestItemAddCmdsetAttrName in interface InterestItemAddCmdahshAttrName - the hash table of attribute namespublic void setAttrValue(java.util.Hashtable ahshAttrValue)
InterestItemAddCmdsetAttrValue in interface InterestItemAddCmdahshAttrValue - the hash table of attribute valuespublic void setCatEntryId(java.util.Hashtable ahshCatEntryId)
InterestItemAddCmdcatentry ID parameters.setCatEntryId in interface InterestItemAddCmdahshCatEntryId - the hash table of catalog entry IDspublic void setField1(java.util.Hashtable ahshField1)
InterestItemAddCmdsetField1 in interface InterestItemAddCmdahshField1 - the hash table of custom fieldspublic void setField2(java.util.Hashtable ahshField2)
InterestItemAddCmdsetField2 in interface InterestItemAddCmdahshField2 - the hash table of custom fieldspublic void setField3(java.util.Hashtable ahshField3)
InterestItemAddCmdsetField3 in interface InterestItemAddCmdahshField3 - the hash table of custom fieldspublic void setListId(java.lang.String[] asaListId)
GetCurrentIILists process task is
invoked to obtain the shopper's current interest item lists.
Then the command behaves as if the current interest item lists
were specified. If GetCurrentIILists process task determines
that there are no current interest item lists, the most recently
updated item interest item list is used. If there is no interest
item list at all, a new interest item list will be created.
If "*" is specified, the command behaves as if all shopper's
interest item lists were specified.
If a specified interest item list no longer exists, it is not added.
If this parameter is missing, this command behaves as if "." was specified.setListId in interface InterestItemAddCmdasaListId - the ListIdpublic void setListIdName(java.lang.String[] asaListIdName)
ListId. This is provided
to make it possible to obtain the reference numbers of the interest item
lists when ListId is not explicitly specified.setListIdName in interface InterestItemAddCmdasaListIdName - the array of namespublic void setMemberId(java.util.Hashtable ahshMemberId)
MemberId + PartNumber can be supplied in place of a CatentryIdsetMemberId in interface InterestItemAddCmdahshMemberId - java.util.Hashtablepublic void setPartNumber(java.util.Hashtable ahshPartNumber)
MemberId + PartNumber can be supplied in place of a CatentryIdsetPartNumber in interface InterestItemAddCmdahshPartNumber - java.util.Hashtablepublic void setQuantity(java.util.Hashtable ahshQuantity)
setQuantity in interface InterestItemAddCmdadQuantity - the quantity of the itempublic void setRequestProperties(TypedProperty aRequestProperties) throws ECApplicationException
ControllerCommandImplrequestProperties for the command. The WebController calls the setRequestProperties
method before invoking the execute method for this command.
It is the responsibility of the command writer to extract the
required input parameters from the requestProperties object.setRequestProperties in interface ControllerCommandsetRequestProperties in class ControllerCommandImplaRequestProperties - This is an object that represents the request properties.ECApplicationExceptionpublic void setUOM(java.util.Hashtable ahshUOM)
InterestItemAddCmdsetUOM in interface InterestItemAddCmdastrUOM - the UOM, used with quantity to calculate the normalized quantitypublic void setUpdateable(java.util.Hashtable ahshUpdateable)
setUpdateable in interface InterestItemAddCmdanUpdatable - the updatable flagpublic void validateParameters()
throws ECException
AbstractECTargetableCommandcheckParameters() method from version 5.1.
The default implementation of validateParameters() is a no op.
It is the responsibility of the command writers to implement this method if they want to perform
server side parameter checking.validateParameters in interface ECCommandvalidateParameters in class AbstractECTargetableCommandECException