com.ibm.commerce.catalogmanagement.commands

Class ProductAttributeDeleteCmdImpl

  • All Implemented Interfaces:
    ProductAttributeDeleteCmd, AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, 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 ProductAttributeDeleteCmdImpl
    extends ControllerCommandImpl
    implements ProductAttributeDeleteCmd
    The ProductAttributeDeleteCmd is a URL and controller command that:
    • If the attribute ID is supplied:
      • Deletes an existing product attribute,
      • By default, it will call CatalogEntryDeleteCmd for all the items with the deleting attribute.
        • Sets setDeleteItems to false if items of the product are not to be deleted when deleting the product attribute.
    • If the catalog entry ID for the product is supplied:
      • Deletes all product attributes related to that catalog entry.
      • By default, it will call CatalogEntryDeleteCmd for all the items of the product.
        • Sets setDeleteItems to false if items of the product are not to be deleted when deleting the product attribute.
    Parameters:
    • attribute ID
    • catalog entry ID
    Access Beans:
    • AttributeAccessBean
    • AttributeAccessBean
    Task Commands: DeleteAttributeCmd
    Other Controller Commands: None.
    Mandatory Parameters: attributeId, or catentryId and name.
    Additional Parameters: None.
    Optional Parameters: descLangId, force, URL.
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

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

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

      • ProductAttributeDeleteCmdImpl

        public ProductAttributeDeleteCmdImpl()
    • Method Detail

      • getAttrLangId

        public java.lang.Integer getAttrLangId()
        Get attribute language Id
        Returns:
        java.lang.Integer
      • getAttrtypeId

        public java.lang.String getAttrtypeId()
        Get the attribute type Id Attribute types included: 1. String 2. Integer 3. Float
        Returns:
        java.lang.String
      • getCatentryId

        public java.lang.Long getCatentryId()
        Get the catalog entry Id
        Specified by:
        getCatentryId in interface ProductAttributeDeleteCmd
        Parameters:
        java.lang.Long -
        Returns:
        the catalog entry ID
      • getForce

        public java.lang.Integer getForce()
        Get the force delete option for the attribute
        Parameters:
        java.lang.Integer -
      • getName

        public java.lang.String getName()
        Get the attribute name
        Parameters:
        java.lang.String -
      • getSequence

        public java.lang.Double getSequence()
        Get the sequence number
        Parameters:
        java.lang.Double -
      • getURL

        public java.lang.String getURL()
        Get the redirect URL
        Parameters:
        java.lang.String -
      • performExecute

        public void performExecute()
                            throws ECException
        The main program for ProductAttributeDelete command This method calls the DeleteAttributeCmd task command. It then sets the attribute ID, and catalog entry ID in the response properties.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException
      • reset

        public void reset()
        This method reset all the variables used in ProductAttributeDelete command
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • setAttributeId

        public void setAttributeId(java.lang.Long anAttributeId)
        Set the attribute Id
        Specified by:
        setAttributeId in interface ProductAttributeDeleteCmd
        Parameters:
        anAttributeId - java.lang.Long
      • setAttrLangId

        public void setAttrLangId(java.lang.Integer anAttrLangId)
        Set the language Id of the Attribute
        Specified by:
        setAttrLangId in interface ProductAttributeDeleteCmd
        Parameters:
        anAttrLangId - java.lang.Integer
      • setAttrtypeId

        public void setAttrtypeId(java.lang.String astrAttrtypeId)
        Set the attribute type Id Attribute types included: 1. String 2. Integer 3. Float
        Specified by:
        setAttrtypeId in interface ProductAttributeDeleteCmd
        Parameters:
        astrAttrtypeId - java.lang.String
      • setCatentryId

        public void setCatentryId(java.lang.Long anCatentryId)
        Set the catalog entry Id
        Specified by:
        setCatentryId in interface ProductAttributeDeleteCmd
        Parameters:
        anCatentryId - java.lang.Long
      • setForce

        public void setForce(java.lang.Integer anForce)
        Set the force delete option of the attribute
        Specified by:
        setForce in interface ProductAttributeDeleteCmd
        Parameters:
        anForce - java.lang.Integer
      • setName

        public void setName(java.lang.String astrName)
        Set the attribute name
        Specified by:
        setName in interface ProductAttributeDeleteCmd
        Parameters:
        astrName - java.lang.String
      • setDeleteItems

        public void setDeleteItems(java.lang.Boolean abDeleteItems)
        Set whether or not to delete the items of the product for the deleting attribute
        Specified by:
        setDeleteItems in interface ProductAttributeDeleteCmd
        Parameters:
        abDeleteItems - java.lang.Boolean
      • setSequence

        public void setSequence(java.lang.Double anSequence)
        Set the sequence number of the attribute
        Specified by:
        setSequence in interface ProductAttributeDeleteCmd
        Parameters:
        anSequence - java.lang.Double
      • setURL

        public void setURL(java.lang.String astrURL)
        Set a redirect URL
        Specified by:
        setURL in interface ProductAttributeDeleteCmd
        Parameters:
        astrURL - java.lang.String