com.ibm.commerce.attachment.commands

Class ManagedFileDeleteCmdImpl

  • All Implemented Interfaces:
    ManagedFileDeleteCmd, 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 ManagedFileDeleteCmdImpl
    extends ControllerCommandImpl
    implements ManagedFileDeleteCmd
    This is the default implementation of the controller command ManagedFileDeleteCmd.

    Input parameters:

    Name Description
    managedFileId The array of managed file identifiers. Mandatory.

    Output parameters:

    Name Description
    managedFileId The array of managed file identifiers. Optional. If it is not specified, the file name and file path should both be specified.
    fileName The array of managed file names. Optional.
    filePath The array of managed file paths. Optional.

    Behaviour:

    • For each managed file, it checks if the file id is specified, if not, the file name and file path should be specified. If neither the file name nor path is specified, it throws an exception.
    • For each file, it checks if the file id or file name and file path exists in system, if not, it throws an exception.
    • For each file, it checks if it is associated with some attachment. If so, it throws an exception.
    • It deletes all the files by marking the promotedToFileSystem to 2 and then updates the resource manager.
    See Also:
    Serialized Form