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, setViewInputProperties
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
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
checkPermission, execute, getGeneric, getRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
accessControlCheck, getAccCheck, getForUserId, setAccCheck, setForUserId, setOwner
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
fulfills, getOwner
public 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 resourceECException
public TypedProperty getResolvedRequestProperties()
ControllerCommandImpl
Hashtable
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 ControllerCommand
getResolvedRequestProperties
in class ControllerCommandImpl
public java.lang.Long[] getResourceOwners() throws ECException
ControllerCommandImpl
getResourceOwners
in interface AccCommand
getResourceOwners
in class ControllerCommandImpl
Long
objects that represents all the organization
unit reference numbers. A site owner is represented by an organization unit value of -1.ECException
public boolean isReadyToCallExecute()
AbstractECTargetableCommand
true
.isReadyToCallExecute
in interface com.ibm.websphere.command.Command
isReadyToCallExecute
in class AbstractECTargetableCommand
boolean
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 ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
public void reset()
AbstractECTargetableCommand
reset
in interface com.ibm.websphere.command.Command
reset
in class AbstractECTargetableCommand
public void setAttrName(java.util.Hashtable ahshAttrName)
InterestItemAddCmd
setAttrName
in interface InterestItemAddCmd
ahshAttrName
- the hash table of attribute namespublic void setAttrValue(java.util.Hashtable ahshAttrValue)
InterestItemAddCmd
setAttrValue
in interface InterestItemAddCmd
ahshAttrValue
- the hash table of attribute valuespublic void setCatEntryId(java.util.Hashtable ahshCatEntryId)
InterestItemAddCmd
catentry ID
parameters.setCatEntryId
in interface InterestItemAddCmd
ahshCatEntryId
- the hash table of catalog entry IDspublic void setField1(java.util.Hashtable ahshField1)
InterestItemAddCmd
setField1
in interface InterestItemAddCmd
ahshField1
- the hash table of custom fieldspublic void setField2(java.util.Hashtable ahshField2)
InterestItemAddCmd
setField2
in interface InterestItemAddCmd
ahshField2
- the hash table of custom fieldspublic void setField3(java.util.Hashtable ahshField3)
InterestItemAddCmd
setField3
in interface InterestItemAddCmd
ahshField3
- 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 InterestItemAddCmd
asaListId
- the ListId
public 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 InterestItemAddCmd
asaListIdName
- the array of namespublic void setMemberId(java.util.Hashtable ahshMemberId)
MemberId
+ PartNumber
can be supplied in place of a CatentryId
setMemberId
in interface InterestItemAddCmd
ahshMemberId
- java.util.Hashtablepublic void setPartNumber(java.util.Hashtable ahshPartNumber)
MemberId
+ PartNumber
can be supplied in place of a CatentryId
setPartNumber
in interface InterestItemAddCmd
ahshPartNumber
- java.util.Hashtablepublic void setQuantity(java.util.Hashtable ahshQuantity)
setQuantity
in interface InterestItemAddCmd
adQuantity
- the quantity of the itempublic void setRequestProperties(TypedProperty aRequestProperties) throws ECApplicationException
ControllerCommandImpl
requestProperties
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 ControllerCommand
setRequestProperties
in class ControllerCommandImpl
aRequestProperties
- This is an object that represents the request properties.ECApplicationException
public void setUOM(java.util.Hashtable ahshUOM)
InterestItemAddCmd
setUOM
in interface InterestItemAddCmd
astrUOM
- the UOM, used with quantity to calculate the normalized quantitypublic void setUpdateable(java.util.Hashtable ahshUpdateable)
setUpdateable
in interface InterestItemAddCmd
anUpdatable
- the updatable flagpublic void validateParameters() throws ECException
AbstractECTargetableCommand
checkParameters()
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 ECCommand
validateParameters
in class AbstractECTargetableCommand
ECException