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, NAMENAME| 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, setRequestPropertiescheckPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, 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, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParametersexecuteFromCache, 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, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRequestProperties, setRetriable, setViewInputPropertiesexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCachegetCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputPropertiesaccessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwnercheckIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParametersfulfills, getOwnerpublic 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.ECExceptionpublic 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 ECCommandperformExecute in interface com.ibm.websphere.command.TargetableCommandperformExecute in class AbstractECTargetableCommandECException - 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.