com.ibm.commerce.messaging.commands
Interface SendMsgCmd

All Superinterfaces:
TaskCommand
All Known Implementing Classes:
SendMsgCmdImpl

public interface SendMsgCmd
extends TaskCommand

The interface for the outbound messaging system. It is a task command to use the messaging system object to send a message.


Field Summary
static java.lang.String COPYRIGHT
          The IBM copyright notice field.
static java.lang.String defaultCommandClassName
          The default class containing the implementation 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.
 
Method Summary
 void addContentPart(byte[] aMsgContentPart)
          Adds attachments to an e-mail message.
 void addContentPart(byte[] aMsgContentPart, java.lang.String aMsgContentPartName, java.lang.String aMsgContentPartType)
          Adds attachments to an e-mail message.
 void addMember(java.lang.Long aMember)
          Adds member information to get recipient data.
 void addMemberGroup(java.lang.Long aMemberGroup)
          Adds member group information to get recipient data
 void addSecureMember(java.lang.Long aMember)
          Adds secure member id to get recipient data.
 void addStore(java.lang.Integer astore_Id)
          Adds a store.
 void compose(java.lang.String aView, CommandContext aCommandContext, TypedProperty aParms)
          Provides message composition services through the use as jsp templates.
 byte[] getContent(java.lang.Integer transport, java.lang.String language)
          Gets content of the message.
 byte[] getResult()
          Returns the result of a sendReceive sending operation.
 void remTransport(java.lang.Integer aRemoveTransportID)
          Allows the user to have transport(s) removed.
 void sendImmediate()
          Sets the sending mode to send the message immediately to the recipients.
 void sendReceiveImmediate()
          Sets the sending mode to send the message and wait for a reply.
 void sendTransacted()
          Sets the sending mode such that it sends the message in transacted mode.
 void setConfigData(java.lang.String aKey, java.lang.String aValue)
          Allows the user to configure the parameters of transport services used for the message.
 void setConfigNLData(java.lang.String aKey, java.lang.String language, java.lang.String aValue)
          Allows the user to configure the NL specific parameters of transport services used for the message.
 void setContent(java.lang.Integer aTransportID, java.lang.String aLanguageID, byte[] aMsgContent)
          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)
          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)
          Sets the message type required to initialize the messaging system.
 void setPartialSend(java.lang.Boolean aPartialSend)
          Allows partial sending operation when using e-mail as the transport.
 void setPriority(java.lang.Integer aPriority)
          Sets the priority which can be used when initializing the messaging system.
 void setStoreID(java.lang.Integer aStoreID)           Sets the store id required to initialize the messaging system.
 

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

NAME

public static final java.lang.String NAME
The name of the class.
See Also:
Constant Field Values

defaultCommandClassName

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

SEND_IMMEDIATE

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

SEND_RECEIVE_IMMEDIATE

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

SEND_TRANSACTED

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

addContentPart

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

addContentPart

public void addContentPart(byte[] aMsgContentPart,
                           java.lang.String aMsgContentPartName,
                           java.lang.String aMsgContentPartType)
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 Email, this could be 'text/plain'.

addMember

public void addMember(java.lang.Long aMember)
Adds member information to get recipient data.
Parameters:
aMember - The member id of a recipient.

addMemberGroup

public void addMemberGroup(java.lang.Long aMemberGroup)
Adds member group information to get recipient data

addSecureMember

public void addSecureMember(java.lang.Long aMember)
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

public void addStore(java.lang.Integer astore_Id)
Adds a store.
Parameters:
astore_Id - The store id.

compose

public void compose(java.lang.String aView,
CommandContext aCommandContext,
TypedProperty aParms)
Provides message composition services through the use as jsp templates.
Parameters:
aView - The viewname 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

public byte[] getContent(java.lang.Integer transport,
                         java.lang.String language)
                  throws ECSystemException
Gets content of the message.
Parameters:
transport - The transport id.
language - The encoding scheme of the language preference.
Returns:
byte[]
Throws:
ECSystemException

getResult

public byte[] getResult()
Returns the result of a sendReceive sending operation. This method should be called AFTER the execute for the command is called.
Returns:
The byte array of the response message.

remTransport

public void remTransport(java.lang.Integer aRemoveTransportID)
Allows the user to have transport(s) removed.
Parameters:
aRemoveTransportID - The unwanted transport id.

sendImmediate

public void sendImmediate()
Sets the sending mode to send the message immediately to the recipients.

sendReceiveImmediate

public void sendReceiveImmediate()
Sets the sending mode to send the message and wait for a reply.

sendTransacted

public void sendTransacted()
Sets the sending mode such that it sends the message in transacted mode. With this set, the command will store the message in the MSGSTORE table and let the scheduler batch job to send the messages at pre-determined time interval. The advantage of doing so is to avoid sending the message if the caller of this command encounters exception after calling this command.

setConfigData

public void setConfigData(java.lang.String aKey,
                          java.lang.String aValue)
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

public void setConfigNLData(java.lang.String aKey,
                            java.lang.String language,
                            java.lang.String aValue)
Allows the user to configure the NL specific parameters of transport services used for the message.
Parameters:
aKey - The name of the parameter.
aValue - The value of the parameter.

setContent

public void setContent(java.lang.Integer aTransportID,
                       java.lang.String aLanguageID,
                       byte[] aMsgContent)
Allows a user to set the content of a message directly using byte[] format.
Parameters:
aTransportID - The transport used in this command.
aMsgContent - The message content in byte array format.

setContent

public void setContent(java.lang.Integer aTransportID,
                       java.lang.String aLanguageID,
                       java.lang.String aMsgContent)
                throws ECSystemException
Allows a user to set the content of a message directly using String format.
Parameters:
aTransportID - The transport used in this command.
aMsgContent - The message content in String format.
Throws:
ECSystemException

setMsgType

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

setMsgType

public void setMsgType(java.lang.String aMsgType)
Sets the message type required to initialize the messaging system.
Parameters:
aMsgType - The message type name used for this command.

setPartialSend

public void setPartialSend(java.lang.Boolean aPartialSend)
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

public void setPriority(java.lang.Integer aPriority)
Sets the priority which can be used when initializing the messaging system.
Parameters:
aPriority - The priority used to send the message.

setStoreID

public void setStoreID(java.lang.Integer aStoreID)
Sets the store id required to initialize the messaging system.
Parameters:
aStoreID - The store id used by the command.