com.ibm.commerce.tools.catalog.commands

Class ItemCreateImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, ItemCreate, ToolsControllerCommand, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class ItemCreateImpl
    extends ToolsControllerCommandImpl
    implements ItemCreate
    This is the default implementation of the ItemCreate controller command. This command creates a SKU. If an error occurs, it throws an ECException. This command is used by the item wizard in the user interface tooling. A sample of the hashtable (string representation) used by this command is a follows:
     {
    XML=
            {
                     storeId=10101
                     fulfillmentCenterId=10101
                     XMLFile=catalog.itemWizard
                     productrfnbr=14751
                     details=
                            {
                                     lastOrderMonth=
                                     endOfServiceDay=
                                     endDay=
                                     endOfServiceMonth=
                                     lastOrderYear=
                                     lastOrderDay=
                                     discontinueYear=
                                     discontinueDay=
                                     endYear=
                                     availabilityYear=
                                     buyable=true
                                     startDay=
                                     sku=prod111_SKU_required
                                     endOfServiceYear=
                                     availabilityDay=
                                     startYear=
                                     endMonth=
                                     oldSKU=
                                     startMonth=
                                     published=true
                                     availabilityMonth=
                                     memberid=7000000000000000101
                                     discontinueMonth=
                                     name=prod111 name required
                            }
                     attribute=
                            {
                                    size=1
                                    attribute=
                                    {
                                            attr0=
                                                    {
                                                             formatValue=
                                                             isEmptyValueList=NO
                                                             attrvalue=value0
                                                             attrid=11451
                                                             attrname=definingAttribute1_required_updated
                                                             attrtype=AttributeStringValueBean
                                                    }
                                    }
                                    langid=-1
                            }
                            description=
                                    {
                                             auxDesc2=
                                             auxDesc1=
                                             shortDesc=
                                             longDesc=
                                    }
                            langId=-1
            }
    }
     
    See Also:
    Serialized Form
    • Constructor Detail

      • ItemCreateImpl

        public ItemCreateImpl()
    • Method Detail

      • reset

        public void reset()
        This method resets all instance variables to null.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • setRequestProperties

        public void setRequestProperties(TypedProperty reqParams)
                                  throws ECApplicationException
        This method accepts input parameters from RequestProperties for the controller command. A vector for parameter ECToolsConstants.EC_XMLOBJECT is retrieved from the request properties. The first element of the vector is the hashtable representation of the XML object created by the Item Wizard.
        Specified by:
        setRequestProperties in interface ControllerCommand
        Overrides:
        setRequestProperties in class ToolsControllerCommandImpl
        Parameters:
        reqParams - com.ibm.commerce.datatype.TypedProperty
        Throws:
        ECApplicationException.
        ECApplicationException - if the request properties can't be processed
      • getCatalogEntryId

        public java.lang.String getCatalogEntryId()
        Gets the catalog entry id of the created SKU.
        Returns:
        Returns the catalog entry id of the created SKU.