java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.rfq.commands.CreatePAttributeValueCmdImpl
Creates personalization attributes for RFQ products or RFQ response products.
This is the default implementation of the CreatePAttributeValueCmd. This command uses the following AccessBeans:
PAttributeAccessBean
OperatorAccessBean
Field Summary |
---|
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.rfq.commands. CreatePAttributeValueCmd |
COPYRIGHT,
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand |
COPYRIGHT |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
CreatePAttributeValueCmdImpl() Constructor for CreatePAttributeValueCmdImpl |
Method Summary | |
---|---|
protected
java.lang.Integer[] |
getOperatorsIntoArray(java.lang.Integer operator,
java.lang.String[] valueArray) Processes the single operator that has been input by the user into one or more operators depending on the length of the incoming array of values. |
java.lang.Long[] |
getPAttributeValueIds() Gets the new personalization attribute value IDs. |
void |
performExecute() Execute the command. |
void |
reset() Resets the command. |
void |
setAllowMultipleValues(boolean allowMultipleValues) (Optional) Sets the allow multiple values flag. |
void |
setAttrName(java.lang.String attrName) Sets the personalization attribute name. |
void |
setAttrValue(java.lang.String attrValue) Sets the personalization attribute value. |
void |
setChangeable(java.lang.Integer changeable) Sets the changeable flag. |
void |
setCorrelationGroup(java.lang.Long correlationGroup) (Optional) Sets the correlation group. |
void |
setMandatory(java.lang.Integer mandatory) Sets the mandatory flag. |
void |
setOperatorId(java.lang.Integer operatorId) (Optional) Sets the operator ID. |
void |
setOrderItemId(java.lang.Long orderItemId) (Optional) Sets the order item ID. |
void |
setPAttributeId(java.lang.Long pAttributeId) Sets the personalization attribute ID. |
void |
setQuantityUnit(java.lang.String quantityUnit) Sets the quantity unit. |
void |
setRFQProductId(java.lang.Long rFQProductId) (Optional) Sets the RFQ product ID. |
void |
setRFQResponseProductId(java.lang.Long rfqResponseProductId) (Optional) Sets the RFQ response product ID. |
void |
setValueDelimiter(java.lang.String valueDelimiter) (Optional) Sets the value delimiter. |
void |
validateParameters() Check mandatory parameters. |
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,
isReadyToCallExecute,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Constructor Detail |
---|
public CreatePAttributeValueCmdImpl()
Method Detail |
---|
protected java.lang.Integer[] getOperatorsIntoArray(java.lang.Integer operator, java.lang.String[] valueArray)
Attribute Name = "Length" Operator = "Inclusive Range" Value = 20-40 Unit = metre
Essentially, the user has specified that the length should be between 20 and 40 metres, 20 and 40 inclusive. However, this information is parsed out into two sets of detail:
Length >= 20 Length <= 40
Therefore, when saving this information, it becomes necessary to convert a single operator into a set of operators, one for each value, in this case ">=" and "<=".
operator
- The single operator specified by the user.valueArray
- One or more values for a attribute.public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
- These exceptions are allowed to percolate.ECCommand#performExecute()
public void reset()
reset
in class
AbstractECTargetableCommand
public void validateParameters() throws ECException
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECApplicationException
- Raised with message
_ERR_BAD_MISSING_CMD_PARAMETER if quotationRequests is not specified.ECException
ECCommand#validateParameters()
public void setAttrName(java.lang.String attrName)
setAttrName
in interface
CreatePAttributeValueCmd
attrName
- The personalization attribute
name.public void setAttrValue(java.lang.String attrValue)
setAttrValue
in interface
CreatePAttributeValueCmd
attrValue
- The personalization attribute
value.public void setQuantityUnit(java.lang.String quantityUnit)
setQuantityUnit
in interface
CreatePAttributeValueCmd
quantityUnit
- The quantity unit.public void setOperatorId(java.lang.Integer operatorId)
setOperatorId
in interface
CreatePAttributeValueCmd
public void setRFQProductId(java.lang.Long rFQProductId)
setRFQProductId
in interface
CreatePAttributeValueCmd
rFQProductId
- The RFQ product ID.public void setMandatory(java.lang.Integer mandatory)
setMandatory
in interface
CreatePAttributeValueCmd
mandatory
- The mandatory flag.public void setChangeable(java.lang.Integer changeable)
setChangeable
in interface
CreatePAttributeValueCmd
changeable
- The changeable flag.public void setPAttributeId(java.lang.Long pAttributeId)
setPAttributeId
in interface
CreatePAttributeValueCmd
pAttributeId
- The personalization attribute
ID.public java.lang.Long[] getPAttributeValueIds()
getPAttributeValueIds
in interface
CreatePAttributeValueCmd
public void setRFQResponseProductId(java.lang.Long rfqResponseProductId)
setRFQResponseProductId
in interface
CreatePAttributeValueCmd
public void setAllowMultipleValues(boolean allowMultipleValues)
setAllowMultipleValues
in interface
CreatePAttributeValueCmd
allowMultipleValues
- The allow multiple values
flag.public void setValueDelimiter(java.lang.String valueDelimiter)
setValueDelimiter
in interface
CreatePAttributeValueCmd
valueDelimiter
- The value delimiter.public void setCorrelationGroup(java.lang.Long correlationGroup)
setCorrelationGroup
in interface
CreatePAttributeValueCmd
correlationGroup
- The correlation group.public void setOrderItemId(java.lang.Long orderItemId)
setOrderItemId
in interface
CreatePAttributeValueCmd
orderItemId
- The order item ID.