com.ibm.commerce.messaging.commands

Interface SendMsgCmd

  • All Superinterfaces:
    com.ibm.websphere.command.CacheableCommand, com.ibm.commerce.command.CacheableECCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, ECCommand, java.io.Serializable, com.ibm.websphere.command.TargetableCommand, TaskCommand
    All Known Implementing Classes:
    SendMsgCmdImpl


    public interface SendMsgCmd
    extends TaskCommand
    The class defining the interface of the task message sending task command which can be called by other business logic.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      The IBM copyright notice field.
      static java.lang.String defaultCommandClassName
      The default class containing the implementation of the SendMsgCmd command.
      static java.lang.String NAME
      The name of the class.
      static java.lang.String SEND_IMMEDIATE
      Constant to indicate SendImmediate send mode.
      static java.lang.String SEND_RECEIVE_IMMEDIATE
      Constant to indicate SendReceiveImmediate send mode.
      static java.lang.String SEND_TRANSACTED
      Constant to indicate SendTransacted send mode.
      • Fields inherited from interface com.ibm.websphere.command.Command

        serialVersionUID
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method and Description
      void addContentPart(byte[] aMsgContentPart)
      This method adds attachments to an e-mail message.
      void addContentPart(byte[] aMsgContentPart, java.lang.String aMsgContentPartName, java.lang.String aMsgContentPartType)
      This method adds attachments to an e-mail message.
      void addMember(java.lang.Long aMember)
      This method adds member information to get recipient data.
      void addMemberGroup(java.lang.Long aMemberGroup)
      This method adds member group information to get recipient data.
      void addSecureMember(java.lang.Long aMember)
      This method adds secure member ID to get recipient data.
      void addStore(java.lang.Integer astore_Id)
      This method adds a store.
      void compose(java.lang.String aView, CommandContext aCommandContext, TypedProperty aParms)
      This method provides message composition services through the use of JSP templates.
      byte[] getContent(java.lang.Integer transport, java.lang.String language)
      This method gets the content of the message.
      byte[] getResult()
      This method returns the result of a send-and-receive sending operation.
      void remTransport(java.lang.Integer aRemoveTransportID)
      This method allows the user to have transport(s) removed.
      void sendImmediate()
      This method sets the sending mode to send the message immediately to the recipients.
      void sendReceiveImmediate()
      This method sets the sending mode to send the message and wait for a reply.
      void sendTransacted()
      This method sets the sending mode such that it sends the message in transacted mode.
      void setConfigData(java.lang.String aKey, java.lang.String aValue)
      This method allows the user to configure the parameters of transport services used for the message.
      void setConfigNLData(java.lang.String aKey, java.lang.String aLanguage, java.lang.String aValue)
      This method allows the user to configure the national language specific parameters of transport services used for the message.
      void setContent(java.lang.Integer aTransportID, java.lang.String aLanguageID, byte[] aMsgContent)
      This method allows a user to set the content of a message directly using byte[] format.
      void setContent(java.lang.Integer aTransportID, java.lang.String aLanguageID, java.lang.String aMsgContent)
      This method allows a user to set the content of a message directly using String format.
      void setMsgType(java.lang.Integer aMsgType)
      Deprecated. 
      use setMsgType(String) instead.
      void setMsgType(java.lang.String aMsgType)
      This method sets the message type required to initialize the messaging system.
      void setPartialSend(java.lang.Boolean aPartialSend)
      This method allows partial sending operation when using e-mail as the transport.
      void setPriority(java.lang.Integer aPriority)
      This method sets the priority which can be used when initializing the messaging system.
      void setStoreID(java.lang.Integer aStoreID)
      This method sets the store ID required to initialize the messaging system.
      • Methods inherited from interface com.ibm.commerce.command.CacheableECCommand

        execute
      • Methods inherited from interface com.ibm.websphere.command.CacheableCommand

        executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
      • Methods inherited from interface com.ibm.websphere.command.TargetableCommand

        getCommandTarget, getCommandTargetName, hasOutputProperties, performExecute, setCommandTarget, setCommandTargetName, setOutputProperties
      • Methods inherited from interface com.ibm.websphere.command.Command

        isReadyToCallExecute, reset
      • Methods inherited from interface com.ibm.websphere.command.CommandCaller

        unionDependencies
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        The IBM copyright notice field.
        See Also:
        Constant Field Values
      • defaultCommandClassName

        static final java.lang.String defaultCommandClassName
        The default class containing the implementation of the SendMsgCmd command.
        See Also:
        Constant Field Values
      • SEND_IMMEDIATE

        static final java.lang.String SEND_IMMEDIATE
        Constant to indicate SendImmediate send mode.
        See Also:
        Constant Field Values
      • SEND_RECEIVE_IMMEDIATE

        static final java.lang.String SEND_RECEIVE_IMMEDIATE
        Constant to indicate SendReceiveImmediate send mode.
        See Also:
        Constant Field Values
      • SEND_TRANSACTED

        static final java.lang.String SEND_TRANSACTED
        Constant to indicate SendTransacted send mode.
        See Also:
        Constant Field Values
    • Method Detail

      • addContentPart

        void addContentPart(byte[] aMsgContentPart)
        This method adds attachments to an e-mail message.
        Parameters:
        aMsgContentPart - The attachment (in byte array) to be added to the message.
      • addContentPart

        void addContentPart(byte[] aMsgContentPart,
                            java.lang.String aMsgContentPartName,
                            java.lang.String aMsgContentPartType)
        This method adds attachments to an e-mail message.
        Parameters:
        aMsgContentPart - The attachment (in byte array) to be added to the message.
        aMsgContentPartName - The name to be used for this attachment.
        aMsgContentPartType - The content type of the part being sent For instance, in Mime e-mail, this could be 'text/plain'.
      • addMember

        void addMember(java.lang.Long aMember)
        This method adds member information to get recipient data.
        Parameters:
        aMember - The member ID of a recipient.
      • addMemberGroup

        void addMemberGroup(java.lang.Long aMemberGroup)
        This method adds member group information to get recipient data. By default, this method will add all members (both implicit and explicit) to the recipient list.
        Parameters:
        aMemberGroup - The member group ID.
      • addSecureMember

        void addSecureMember(java.lang.Long aMember)
        This method adds secure member ID to get recipient data. The information used will be hidden from the rest of recipients if there is any.
        Parameters:
        aMember - The secure member ID.
      • addStore

        void addStore(java.lang.Integer astore_Id)
        This method adds a store.
        Parameters:
        astore_Id - The store ID.
      • compose

        void compose(java.lang.String aView,
                     CommandContext aCommandContext,
                     TypedProperty aParms)
        This method provides message composition services through the use of JSP templates.
        Parameters:
        aView - The view name used for composing the message. It can be found in VIEWREG table.
        aCommandContext - The context of this command execution.
        aParms - The parameter list used to generate the message.
      • getContent

        byte[] getContent(java.lang.Integer transport,
                          java.lang.String language)
                   throws ECSystemException
        This method gets the content of the message.
        Parameters:
        transport - The transport ID.
        language - The encoding scheme of the language preference.
        Returns:
        byte[]
        Throws:
        ECSystemException
      • getResult

        byte[] getResult()
        This method returns the result of a send-and-receive sending operation. This method should be called AFTER the execute for the command is called.
        Returns:
        The byte array of the response message.
      • remTransport

        void remTransport(java.lang.Integer aRemoveTransportID)
        This method allows the user to have transport(s) removed.
        Parameters:
        aRemoveTransportID - The unwanted transport ID.
      • sendImmediate

        void sendImmediate()
        This method sets the sending mode to send the message immediately to the recipients.
      • sendReceiveImmediate

        void sendReceiveImmediate()
        This method sets the sending mode to send the message and wait for a reply.
      • sendTransacted

        void sendTransacted()
        This method sets the sending mode such that it sends the message in transacted mode. This set stores the message in the MSGSTORE table and lets the scheduler batch job send the messages at predetermined time intervals. The advantage of doing this is to avoid sending the message if the caller of this command encounters exception after calling this command.
      • setConfigData

        void setConfigData(java.lang.String aKey,
                           java.lang.String aValue)
        This method allows the user to configure the parameters of transport services used for the message.
        Parameters:
        aKey - The name of the parameter.
        aValue - The value of the parameter.
      • setConfigNLData

        void setConfigNLData(java.lang.String aKey,
                             java.lang.String aLanguage,
                             java.lang.String aValue)
        This method allows the user to configure the national language specific parameters of transport services used for the message.
        Parameters:
        aKey - The name of the parameter.
        aLanguage - The language ID.
        aValue - The value of the parameter.
      • setContent

        void setContent(java.lang.Integer aTransportID,
                        java.lang.String aLanguageID,
                        byte[] aMsgContent)
        This method allows a user to set the content of a message directly using byte[] format.
        Parameters:
        aTransportID - The transport used in this command.
        aLauguageID - The encoding scheme of language perference of the message content.
        aMsgContent - The message content in byte array format.
      • setContent

        void setContent(java.lang.Integer aTransportID,
                        java.lang.String aLanguageID,
                        java.lang.String aMsgContent)
                 throws ECSystemException
        This method allows a user to set the content of a message directly using String format.
        Parameters:
        aTransportID - The transport used in this command.
        aLauguageID - The encoding scheme of language perference of the message content.
        aMsgContent - The message content in String format.
        Throws:
        ECSystemException
      • setMsgType

        void setMsgType(java.lang.Integer aMsgType)
        Deprecated. use setMsgType(String) instead.
        This method sets the message type required to initialize the messaging system.
        Parameters:
        aMsgType - The message type identifier used for this command.
      • setMsgType

        void setMsgType(java.lang.String aMsgType)
        This method sets the message type required to initialize the messaging system.
        Parameters:
        aMsgType - The message type name used for this command.
      • setPartialSend

        void setPartialSend(java.lang.Boolean aPartialSend)
        This method allows partial sending operation when using e-mail as the transport. It is used in conjunction with addMember(). If parameter is true, sending operation will be done even if some members from the recipient list do not have address. If it is false, sending operation will be aborted if one of the member does not have an address set up.
        Parameters:
        aPartialSend - true if the command should still send the message to the rest of recipients; false otherwise.
      • setPriority

        void setPriority(java.lang.Integer aPriority)
        This method sets the priority which can be used when initializing the messaging system.
        Parameters:
        aPriority - The priority used to send the message.
      • setStoreID

        void setStoreID(java.lang.Integer aStoreID)
        This method sets the store ID required to initialize the messaging system.
        Parameters:
        aStoreID - The store ID used by the command.