com.ibm.commerce.catalogmanagement.commands

Class CatalogEntryDeleteCmdImpl

  • All Implemented Interfaces:
    CatalogEntryDeleteCmd, 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 CatalogEntryDeleteCmdImpl
    extends ControllerCommandImpl
    implements CatalogEntryDeleteCmd
    The CatalogEntryDeleteCmd is a URL and controller command that:
    • If the force option is set to 1, then the catalog entry is deleted, else the catalog entry is set to mark for delete.
    • If the catalog entry is a product, then all its product attributes, attribute values, and items will be deleted or mark for delete.
    • All description tables are cascade deleted.
    • The force option does not apply to the inventory tables, for example, the baseitem and item specification tables. The baseitem and item specification will be marked for delete depending if the force option is set to 1 for delete and the check ATP option is set to true for checking.
    • By default, the check ATP option is set to false (off).
      • If the check ATP option is set to true, then it will be checked whether or not the catalog entry being deleted is the last catalog entry associated with the baseitem or item specification. If the catalog entry is the last one associated with them, then the baseitem or item specification will be the mark for deleted, regardless of the force option. The force option is only applicable to the catalog entry, not the inventory.
      • If the check ATP option is set to false, then no checking on the inventory will be performed. The partnumber of the baseitem or item specification associated with the catalog entry will be appended a timestamp. They will not be deleted or marked for delete.
    • If the catalog entry exists in an order item, and the force option is set to 1, then an exception will be thrown.
    • If the Catalog Entry ID is supplied, then the partnumber will be ignored.
    • All the attachment relationships with the catalog entry and its children will be deleted.
    Parameters:
    • Catalog entry ID or partnumber of the catalog entry.
    • No fields required.
    • No fields required.
    • Force option required.
    • Check ATP option required.
    Access Beans:
    • CatalogEntryAccessBean
    • AttributeAccessBean, AttributeValueAccessBean, CatalogEntryAccessBean
    • CatalogEntryDescriptionAccessBean, BaseItmDescriptionAccessBean
    • BaseItemAccessBean, ItemSpecificationAccessBean
    • BaseItemAccessBean, ItemSpecificationAccessBean
    Task Commands: DeleteCatalogEntryCmd
    Other Controller Commands: CatalogEntryAttachmentDeleteCmd
    Mandatory Parameters: catentryId, or partnumber.
    Additional Parameters: none
    Optional Parameters: force, checkATP.
    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.CatalogEntryDeleteCmdImpl".
        See Also:
        Constant Field Values
    • Constructor Detail

      • CatalogEntryDeleteCmdImpl

        public CatalogEntryDeleteCmdImpl()
    • Method Detail

      • getCheckATP

        public java.lang.Boolean getCheckATP()
        Get the check ATP option: True = BaseItem and ItemSpc will be checked. False = BaseItem and ItemSpc will not be checked.
        Returns:
        java.lang.Boolean
      • getForce

        public java.lang.Integer getForce()
        Get the force delete option: 0 = catalog entry mark for deletion. 1 = catalog entry force delete.
        Returns:
        java.lang.Integer
      • getLastupdate

        public java.sql.Timestamp getLastupdate()
        Get last update time of the catalog entry
        Returns:
        java.sql.Timestamp
      • getMarkfordelete

        public java.lang.Integer getMarkfordelete()
        Get the mark for delete value of the catalog entry
        Returns:
        java.lang.Integer
      • getMemberId

        public java.lang.Long getMemberId()
        Get the owner Id of the catalog entry
        Returns:
        java.lang.Long
      • getPartnumber

        public java.lang.String getPartnumber()
        Get the part number of the catalog entry
        Specified by:
        getPartnumber in interface CatalogEntryDeleteCmd
        Returns:
        java.lang.String
      • getURL

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

        public void performExecute()
                            throws ECException
        The main program for CatalogEntryDelete command. This method calls the task command DeleteCatalogEntryCmd and then sets the 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 CatalogEntryDelete command
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • setCatentryId

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

        public void setCheckATP(java.lang.Boolean abCheckATP)
        Set the check ATP option for the catalog entry: true = BaseItem and ItemSpc will be checked when deleting the catalog entry. false = BaseItem and ItemSpc will not be checked when deleting the catalog entry.
        Specified by:
        setCheckATP in interface CatalogEntryDeleteCmd
        Parameters:
        abCheckATP -
      • setForce

        public void setForce(java.lang.Integer anForce)
        Set the force delete option of the catalog entry: 0 = catalog entry will be marked for delete. 1 = catalog entry will be force deleted.
        Specified by:
        setForce in interface CatalogEntryDeleteCmd
        Parameters:
        anForce - java.lang.Integer
      • setLastupdate

        public void setLastupdate(java.sql.Timestamp atmLastupdate)
        Set the date and time when the catalog entry was updated
        Parameters:
        atmLastupdate - java.sql.Timestamp
      • setMarkfordelete

        public void setMarkfordelete(java.lang.Integer anMarkfordelete)
        Set the mark for delete flag of the catalog entry: 0 = catalog entry not marked for delete. 1 = catalog entry marked for delete.
        Specified by:
        setMarkfordelete in interface CatalogEntryDeleteCmd
        Parameters:
        anMarkfordelete - java.lang.Integer
      • setMemberId

        public void setMemberId(java.lang.Long anMemberId)
        Set the owner Id of the catalog entry
        Specified by:
        setMemberId in interface CatalogEntryDeleteCmd
        Parameters:
        anMemberId - java.lang.Long
      • setPartnumber

        public void setPartnumber(java.lang.String astrPartnumber)
        Set the partnumber of the catalog entry
        Specified by:
        setPartnumber in interface CatalogEntryDeleteCmd
        Parameters:
        astrPartnumber - java.lang.String
      • setURL

        public void setURL(java.lang.String astrURL)
        Set a redirect URL
        Parameters:
        astrURL - java.lang.String