com.ibm.commerce.catalogmanagement.commands

Interface AttributeValueUpdateCmd

  • All Superinterfaces:
    AccCommand, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, ControllerCommand, ECCommand, Protectable, java.io.Serializable, com.ibm.websphere.command.TargetableCommand
    All Known Implementing Classes:
    AttributeValueUpdateCmdImpl


    public interface AttributeValueUpdateCmd
    extends ControllerCommand
    The AttributeValueUpdateCmd is a URL and controller command that updates an existing attribute value.
    Note that a parent attribute value is an attribute value with a store default language ID. A child attribute value is an attribute value with a language ID other than the store default language ID. A product attribute value is an attribute value where the catalog entry ID = 0, an item attribute value is an attribute value where the catalog entry ID = the catalog entry ID of an item.
    As a controller command, the caller can use the setProductAttributeValue(value) to find the parent product attribute value ID (for example, the command will find the attribute value ID with the specified attribute ID, catalog entry ID = 0, language ID = store default language ID, and value of the attribute value). The attribute value ID will be assigned and passed back into the command. This option is not available to the URL command.
    • Update a parent product attribute value. All the item attribute values will be updated. The item attribute values will have the same attribute ID, language ID, and attribute values (depending on the attribute value type, the value can be string, float, or integer) as the parent product attribute value.
    • Update a parent item attribute value:
      • If the parent item attribute value does not exist, it will be created.
      • If the parent item attribute value exists, then:
        • If the unique index is being updated:
          • Recreate the attribute value, use the new key (attribute value ID), and create the rest of the attribute values in other supported languages, then delete the old attribute value of all languages. A common case is changing the existing attribute value of an item from "Red" to another existing attribute value such as "Blue". The command will change the attribute value in all languages (from "fr_Red" to "fr_Blue").
        • If the unique index is not being changed:
          • Update the item attribute value (such as the noncritical fields).
    • Update a child product attribute value:
      • If the child product attribute value does not exist, it will be created.
      • If the child product attribute value exists, then update it. All the changes will be reflected in the child item attribute value.
    • Update a child item attribute value:
      • If the child item attribute value does not exists, it will be created.
      • If the child item attribute value exists:
        • If the parent item attribute value does not exists, it will be created.
    Parameters:
    • Most fields in the ATTRVALUE table except for Market Place Edition related columns and IBM internal use columns.
    Tables:
    • AttributeValue
    Task Commands: UpdateAttributeValueCmd
    Other Controller Commands: None
    Mandatory Parameters: attrvalueId, or attributeId + catentryId + name
    Additional Parameters: none
    Optional Parameters: field1, field2, field3, image1, image2, seq, value (or floatValue, integerValue, stringValue), descLangId, URL
    Default Value: descLangId = language ID from command contect. name = value
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        The internal copyright field.
        See Also:
        Constant Field Values
      • CLASSNAME

        static final java.lang.String CLASSNAME
        The name of this interface is "com.ibm.commerce.catalogmanagement.commands.AttributeValueUpdateCmd".
        See Also:
        Constant Field Values
    • Method Detail

      • getAttributeId

        java.lang.Long getAttributeId()
        Gets the attribute ID.
        Returns:
        the attribute ID
      • getAttrvalueId

        java.lang.Long getAttrvalueId()
        Gets the attribute value ID.
        Returns:
        the attribute value ID
      • getCatentryId

        java.lang.Long getCatentryId()
        Gets the catalog entry ID.
        Returns:
        the catalog entry ID
      • setAttributeId

        void setAttributeId(java.lang.Long anAttributeId)
        Sets the attribute ID.
        Parameters:
        anAttributeId - the attribute ID
      • setAttrvalueId

        void setAttrvalueId(java.lang.Long anAttrvalueId)
        Sets the attribute value ID.
        Parameters:
        anAttrvalueId - the attribute value ID
      • setCatentryId

        void setCatentryId(java.lang.Long anCatentryId)
        Sets the catalog entry ID.
        Parameters:
        anCatentryId - the catalog entry ID
      • setDescLanguage

        void setDescLanguage(java.lang.Integer anDescLanguage)
        Sets the language ID of the attribute value.
        Parameters:
        anDescrLanguage - the language ID
      • setField1

        void setField1(java.lang.Integer anField1)
        Sets field 1 of the attribute value.
        Parameters:
        anField1 - customizable field 1
      • setField2

        void setField2(java.lang.String astrField2)
        Sets field 2 of the attribute value.
        Parameters:
        astrField2 - customizable field 2
      • setField3

        void setField3(java.lang.String astrField3)
        Sets field 3 of the attribute value.
        Parameters:
        astrField3 - customizable field 3
      • setFloatvalue

        void setFloatvalue(java.lang.Double adFloatvalue)
        Sets the float value of the attribute value.
        Parameters:
        adFloatvalue - the float value of the attribute value
      • setImage1

        void setImage1(java.lang.String astrImage1)
        Sets the path of image 1 of the attribute value.
        Parameters:
        astrImage1 - the first image of the attribute value
      • setImage2

        void setImage2(java.lang.String astrImage2)
        Sets the path of image 2 of the attribute value.
        Parameters:
        astrImage2 - the second image of the attribute value
      • setIntegervalue

        void setIntegervalue(java.lang.Integer anIntegervalue)
        Sets the integer value of the attribute value.
        Parameters:
        anIntegervalue - the integer value of the attribute value
      • setName

        void setName(java.lang.String astrName)
        Sets the attribute value name.
        Parameters:
        astrName - the name of the attribute value
      • setOID

        void setOID(java.lang.String astrOID)
        Sets the object identifier of the attribute value.
        Parameters:
        astrOID - the object identifier of the attribute value
      • setProductAttributeValue

        void setProductAttributeValue(java.lang.String astrProductAttributeValue)
        Sets the value of the product attribute value. The value of the product attribute value is used to determine the attribute value ID when it is not given.
        Parameters:
        astrValue - the value of the product attribute value
      • setSequence

        void setSequence(java.lang.Double adSequence)
        Sets the sequence number of the attribute value.
        Parameters:
        adSequence - the sequence number
      • setStringvalue

        void setStringvalue(java.lang.String astrStringvalue)
        Sets the string value of the attribute value.
        Parameters:
        astrStringvalue - the string value of attribute value
      • setURL

        void setURL(java.lang.String astrURL)
        Sets the redirect URL.
        Parameters:
        astrURL - the redirect URL
      • setValue

        void setValue(java.lang.String astrValue)
        Sets the value of the attribute value. If value is set, then there is no need to use setFloatvalue, setIntegervalue, or setStringvalue. Depending on the attribute type of the attribute value, the value will set correspondingly.
        Parameters:
        astrValue - the value of the attribute value