public class AttributeCreateControllerCmdImpl extends ToolsControllerCommandImpl implements AttributeCreateControllerCmd
AttributeCreateControllerCmd
. This tool controller command creates attributes and attribute values
associated to a catalog entry of type ProductBean as returned by the defining attribute create dialog.
This command is used by the user interface dialog in the tooling used to create defining attributes and the associated set of values for a product.
A sample of the hashtable (string representation) used by this command is as follows:
{ fr_FR= { status=ADD, name=definingAttribute1_french, type=STRING, description=definingAttribute1_french_description, attributeValues=[ { status=ADD, value=valeur1, image=/image/valeur1, sequence=1, id=-1 }, { status=ADD, value=valeur2, image=image/valeur2, sequence=2, id=-2 }, { status=ADD, value=valeur3, image=/image/valeur3, sequence=3, id=-3 }], id=-1 }, XMLFile=catalog.attributeDetailCreateDialog, productrfnbr=14751, en_US= { status=ADD, name=definingAttribute1_required, type=STRING, description=definingAttribute1_description, attributeValues=[ { status=ADD, value=value1, image=/image/value1, sequence=1, id=-1 }, { status=ADD, value=value2, image=/image/value2, sequence=2, id=-2 }, { status=ADD, value=value3, image=/image/value3, sequence=3, id=-3 }], id=-1 }, isNewAttribute=true }
defaultCommandClassName, NAME
NAME
Constructor and Description |
---|
AttributeCreateControllerCmdImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.Long |
attributeValueCreate(java.lang.Long attributeId,
com.ibm.commerce.tools.catalog.beans.ProductAttributeValue avalueDB)
Create the attribute values for the specified attribute id.
|
void |
attributeValueUpdate(java.lang.Long attributeId,
com.ibm.commerce.tools.catalog.beans.ProductAttributeValue avalueDB)
Update the attribute values for the specified attribute id.
|
void |
performExecute()
Create a defining attribute and its values for a product.
|
getViewInputProperties, setRequestProperties
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, 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, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
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, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRequestProperties, setRetriable, setViewInputProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
fulfills, getOwner
public java.lang.Long attributeValueCreate(java.lang.Long attributeId, com.ibm.commerce.tools.catalog.beans.ProductAttributeValue avalueDB) throws ECException
ProductAttributeValue
bean. Since these are defining attributes values for a ProductBean, the
catalog entry id used is 0. This method calls the command AttributeValueAddCmd
.attributeId
- The attribute Id.avalueDB
- The ProductAttributeValue
bean.ECException
public void attributeValueUpdate(java.lang.Long attributeId, com.ibm.commerce.tools.catalog.beans.ProductAttributeValue avalueDB) throws ECException
ProductAttributeValue
bean. Since these are defining attributes values for a ProductBean, the
catalog entry id used is 0. This method calls the command AttributeValueUpdateCmd
.attributeId
- The attribute Id.avalueDB
- The ProductAttributeValue
bean.ECException
- if the attribute value creation fails.public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
- if 1)the resource properties cannot be found or 2) ProductAttributeForAllLanguagesDataBean
cannot be populated or 3) the XML string is null or 4) an exception was thrown when creating the attributes.