com.ibm.commerce.attachment.commands

Class DeleteAttachmentAssetCmdImpl

  • All Implemented Interfaces:
    DeleteAttachmentAssetCmd, com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, 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 DeleteAttachmentAssetCmdImpl
    extends TaskCommandImpl
    implements DeleteAttachmentAssetCmd
    Deletes an attachment asset with the specified parameters.
    Behavior:
    • If the store entity ID is not specified, the store ID in the command context will be used.
    • By default, the option to delete all attachment assets by attachment target ID is set to false
    • If the option to delete all attachment assets by attachment target ID is set to false
      • If the attachment asset ID is not given, then the attachment target ID and the attachment asset path must be specified. The attachment target ID, the attachment asset path, and the store entity ID are used together to obtain the attachment asset ID. If no attachment asset is found, an exception will be thrown.
      • Delete the attachment asset together will its attachment asset languages
      • If the attachment asset is not a URI, then the WriteManagedFile will be called. This will remove the association between the asset and the managed file.
    • If the option to delete all attachment assets by attachment target ID is set to true
      • If the attachment target ID is not specified, an exception will be thrown.
      • Delete all the attachment assets, together with its attachment asset languages, found in the attachment target.
      • For each attachment asset that is not a URI, the WriteManagedFile will be called. This will remove the association between the asset and the managed file.
    Access Bean:
    • AttachmentAssetAccessBean
    • StoreEntityAccessBean
    Other Commands:
    • WriteManagedFile
    Helper:
    • AttachmentAssetHelper
    See Also:
    Serialized Form
    • Field Detail

      • CLASSNAME

        public static final java.lang.String CLASSNAME
        Define the CLASSNAME.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DeleteAttachmentAssetCmdImpl

        public DeleteAttachmentAssetCmdImpl()
    • Method Detail

      • getAttachmentTargetId

        public java.lang.Long getAttachmentTargetId()
        Gets the attachment target ID that owns the attachment asset.
        Specified by:
        getAttachmentTargetId in interface DeleteAttachmentAssetCmd
        Returns:
        The attachment target ID
      • getDeleteByAttachmentTarget

        public java.lang.Boolean getDeleteByAttachmentTarget()
        Gets option value for deleting the attachment assets by attachment target ID.
        • True = delete all the attachment assets of the specified attachment target ID.
        • False = delete only the specified attachment asset.
        By default, this option is set to False
        Specified by:
        getDeleteByAttachmentTarget in interface DeleteAttachmentAssetCmd
        Returns:
        The option value to delete the attachment assets by attachment target ID.
      • reset

        public void reset()
        Resets all the parameters
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • setAttachmentAssetId

        public void setAttachmentAssetId(java.lang.Long anAttachmentAssetId)
        Sets the attachment asset ID.
        Specified by:
        setAttachmentAssetId in interface DeleteAttachmentAssetCmd
        Parameters:
        anAttachmentAssetId - The attachment asset ID
      • setAttachmentTargetId

        public void setAttachmentTargetId(java.lang.Long anAttachmentTargetId)
        Sets the attachment target ID.
        Specified by:
        setAttachmentTargetId in interface DeleteAttachmentAssetCmd
        Parameters:
        anAttachmentTargetId - The attachment target ID
      • setStoreentId

        public void setStoreentId(java.lang.Integer anStoreentId)
        Sets the store entity ID.
        Specified by:
        setStoreentId in interface DeleteAttachmentAssetCmd
        Parameters:
        anStoreentId - The store entity ID
      • setAttachmentAssetPath

        public void setAttachmentAssetPath(java.lang.String astrAttachmentAssetPath)
        Sets the path of the attachment asset.
        Specified by:
        setAttachmentAssetPath in interface DeleteAttachmentAssetCmd
        Parameters:
        astrAttachmentAssetPath - The attachment asset path
      • setDeleteByAttachmentTarget

        public void setDeleteByAttachmentTarget(java.lang.Boolean aboolDeleteByAttachmentTarget)
        Sets option value for deleting the attachment assets by attachment target ID.
        • True = delete all the attachment assets of the specified attachment target ID.
        • False = delete only the specified attachment asset.
        By default, this option is set to False
        Specified by:
        setDeleteByAttachmentTarget in interface DeleteAttachmentAssetCmd
        Parameters:
        aboolDeleteByAttachmentTarget - The option value to delete the attachment assets by attachment target ID.
      • getCatalogIdsForCacheInvalidations

        public java.lang.String[] getCatalogIdsForCacheInvalidations()
                                                              throws ECException
        Gets the list of catalog IDs for cache invalidations.
        Returns:
        The string array of catalog IDs
        Throws:
        ECException
      • getCatentryIdsForCacheInvalidations

        public java.lang.String[] getCatentryIdsForCacheInvalidations()
                                                               throws ECException
        Gets the list of catalog entry IDs for cache invalidations.
        Returns:
        The string array of catalog entry IDs
        Throws:
        ECException
      • getCatgroupIdsForCacheInvalidations

        public java.lang.String[] getCatgroupIdsForCacheInvalidations()
                                                               throws ECException
        Gets the list of catalog group IDs for cache invalidations.
        Returns:
        The string array of catalog group IDs
        Throws:
        ECException
      • getCollateralIdsForCacheInvalidations

        public java.lang.String[] getCollateralIdsForCacheInvalidations()
                                                                 throws ECException
        Gets the list of collateral IDs for cache invalidations.
        Returns:
        The string array of collateral IDs
        Throws:
        ECException
      • getEMarketingSpotNamesForCacheInvalidations

        public java.util.Collection getEMarketingSpotNamesForCacheInvalidations()
                                                                         throws ECException
        Gets the list of e-Marketing Spot names for cache invalidations.
        Returns:
        The string array of e-Marketing Spot names
        Throws:
        ECException