com.ibm.commerce.messaging.commands

Class DeleteMsgFromStorageCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, DeleteMsgFromStorageCmd, Protectable, ToolsControllerCommand, 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 DeleteMsgFromStorageCmdImpl
    extends com.ibm.commerce.messaging.commands.MessagingAdminCmd
    implements DeleteMsgFromStorageCmd
    This is the default implementation of DeleteMsgFromStorageCmd. The DeleteMsgFromStorage command deletes messages in either the MSGSTORE or MSGARCHIVE table based on the message ID and transport ID given in the request properties. The deletion can be applied to multiple messages at a time.
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright field
        See Also:
        Constant Field Values
    • Constructor Detail

      • DeleteMsgFromStorageCmdImpl

        public DeleteMsgFromStorageCmdImpl()
        The DeleteMsgFromStorageCmdImpl constructor calls its parents constructor.
    • Method Detail

      • isGeneric

        public boolean isGeneric()
        Check to see if this is a generic command. A generic command can be called by a generic user. The default is false.
        Specified by:
        isGeneric in interface ControllerCommand
        Overrides:
        isGeneric in class ControllerCommandImpl
        Returns:
        true if this command can be called by a generic user, false otherwise.
      • isReadyToCallExecute

        public boolean isReadyToCallExecute()
        Check to see if the command is ready to execute.
        Specified by:
        isReadyToCallExecute in interface com.ibm.websphere.command.Command
        Overrides:
        isReadyToCallExecute in class AbstractECTargetableCommand
        Returns:
        This method always returns true.
      • isRetriable

        public boolean isRetriable()
        Check to see if this command can be retried on errors (like rollback exceptions).
        Specified by:
        isRetriable in interface ControllerCommand
        Overrides:
        isRetriable in class ControllerCommandImpl
        Returns:
        true if this command can be retried; false otherwise.
      • performExecute

        public void performExecute()
                            throws ECException
        The business logic for this controller command. This default implementation removes messages from the MSGSTORE or MSGARCHIVE table based on the msg_id and transport_id.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException - Raised with the following messages: _ERR_ADM_REMOTEEXCEPTION, _ERR_ADM_FINDEREXCEPTION, _ERR_ADM_NAMINGEXCEPTION, _ERR_ADM_CREATEEXCEPTION, _ERR_ADM_REMOVEEXCEPTION
      • validateParameters

        public void validateParameters()
                                throws ECException
        ControllerCommandImpl calls checkParameter in performExecute. It is the responsibility of the command writers to implement this method if they want to perform server side parameter checking. They should either call checkParameters inside their performExecute or call super.performExecute() as the first statement in the performExecute method. This implementation checks for the existence of the msg_id, transport_id, and table index (0 for MSGARCHIVE and 1 for MSGSTORE tables).
        Specified by:
        validateParameters in interface ECCommand
        Overrides:
        validateParameters in class AbstractECTargetableCommand
        Throws:
        ECException - Raised with message _ERR_CMD_MISSING_PARAM.