java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.ControllerCommandImpl | +--com.ibm.commerce.interestitems.commands.InterestItemAddCmdImpl
The InterestItemAdd command adds one or more products to one or more shopper's interest item lists.
Field Summary | |
---|---|
static java.lang.String |
CLASSNAME The fully qualified name of this class. |
static java.lang.String |
COPYRIGHT The internal copyright field. |
Fields inherited from class com.ibm.commerce.command. ControllerCommandImpl |
requestProperties,
responseProperties,
retriable,
viewReqProperties |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.interestitems.commands. InterestItemAddCmd |
defaultCommandClassName,
NAME |
Constructor Summary | |
---|---|
InterestItemAddCmdImpl() No value constructor. |
Method Summary | |
---|---|
void |
checkIsAllowed(
AccessVector resource, java.lang.String action) Check to see if user can perform action on resource. |
protected
void |
checkProductEntitlement(java.lang.Long catentry_id,
java.lang.Long member_id) Ensures that the given member is entitled to access the given catlog entry based on the user's trading agreements. |
TypedProperty |
getResolvedRequestProperties() Gets the resolved request properties associated with this command. |
java.lang.Long[] |
getResourceOwners() Returns all the organization unit that owns the resources accessed by this command.It will return null if no resource is being accessed by this command. |
boolean |
isReadyToCallExecute() This method is called by the Targettable Command frame work before the execution of the command. |
void |
performExecute() Contains the actual business logic of the command It should be implemented by all the command writer. |
void |
reset() This method should be called after a command has been executed to reset its states variables. |
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) Sets the request properties. |
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. |
protected
double |
updateQuantity(double newQuantity, double oldQuantity) Returns the newly calculated quantity. |
void |
validateParameters() Performs server side parameter checking. |
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl |
checkPermission,
fulfills,
getForUserId,
getGeneric,
getOwner,
getRequestProperties,
getResponseProperties,
getRetriable,
getViewInputProperties,
isGeneric,
isRetriable,
mergeProperties,
setForUserId,
setGeneric,
setOwner,
setResponseProperties,
setRetriable,
setViewInputProperties |
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Methods inherited from interface com.ibm.commerce.command. ControllerCommand |
checkPermission,
execute,
getGeneric,
getRequestProperties,
getResponseProperties,
getRetriable,
getViewInputProperties,
isGeneric,
isRetriable,
mergeProperties,
setGeneric,
setRetriable,
setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command. AccCommand |
accessControlCheck,
getAccCheck,
getForUserId,
setAccCheck,
setForUserId,
setOwner |
Methods inherited from interface com.ibm.commerce.command. ECCommand |
checkIsAllowed,
checkResourcePermission,
createCommandExecutionEvent,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASSNAME
Constructor Detail |
---|
public InterestItemAddCmdImpl()
Method Detail |
---|
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
protected void checkProductEntitlement(java.lang.Long catentry_id, java.lang.Long member_id) throws ECException, FinderException, CreateException, javax.naming.NamingException, java.rmi.RemoteException
catentry_id
- java.lang.Longmember_id
- java.lang.LongECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
public TypedProperty getResolvedRequestProperties()
ControllerCommand
getResolvedRequestProperties
in interface
ControllerCommand
getResolvedRequestProperties
in class
ControllerCommandImpl
public java.lang.Long[] getResourceOwners() throws ECException
AccCommand
getResourceOwners
in interface
AccCommand
getResourceOwners
in class
ControllerCommandImpl
ECException
public boolean isReadyToCallExecute()
AbstractECTargetableCommand
isReadyToCallExecute
in class
AbstractECTargetableCommand
public void performExecute() throws ECException
ECCommand
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
public void reset()
AbstractECTargetableCommand
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
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)
setListId
in interface
InterestItemAddCmd
asaListId
- the ListIdpublic void setListIdName(java.lang.String[] asaListIdName)
setListIdName
in interface
InterestItemAddCmd
asaListIdName
- the array of namespublic void setMemberId(java.util.Hashtable ahshMemberId)
setMemberId
in interface
InterestItemAddCmd
ahshMemberId
- java.util.Hashtablepublic void setPartNumber(java.util.Hashtable ahshPartNumber)
setPartNumber
in interface
InterestItemAddCmd
ahshPartNumber
- java.util.Hashtablepublic void setQuantity(java.util.Hashtable ahshQuantity)
setQuantity
in interface
InterestItemAddCmd
ahshQuantity
- a hash table of quantitiespublic void setRequestProperties(TypedProperty aRequestProperties) throws ECApplicationException
ControllerCommand
setRequestProperties
in interface
ControllerCommand
setRequestProperties
in class
ControllerCommandImpl
aRequestProperties
- request properties
ECApplicationException
public void setUOM(java.util.Hashtable ahshUOM)
InterestItemAddCmd
setUOM
in interface
InterestItemAddCmd
ahshUOM
- a hash table of unitspublic void setUpdateable(java.util.Hashtable ahshUpdateable)
setUpdateable
in interface
InterestItemAddCmd
ahshUpdateable
- a hash table of updateable
flagsprotected double updateQuantity(double newQuantity, double oldQuantity)
newQuantity
- doubleoldQuantity
- doublepublic void validateParameters() throws ECException
ECCommand
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECException