com.ibm.commerce.messaging.commands
Class SendMsgCmdImpl

java.lang.Object
  |
  +--com.ibm.commerce.command.AbstractECCommand
        |
        +--com.ibm.commerce.command.TaskCommandImpl
              |
              +--com.ibm.commerce.messaging.commands.SendMsgCmdImpl
All Implemented Interfaces:
ECCommand, SendMsgCmd, TaskCommand

public class SendMsgCmdImpl
extends TaskCommandImpl
implements SendMsgCmd

The outbound messaging system interface implementation, a task command to use the messaging system object.


Field Summary
static java.lang.String COPYRIGHT
          The internal copyright field.
 
Fields inherited from class com.ibm.commerce.command.AbstractECCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.messaging.commands.SendMsgCmd
defaultCommandClassName, NAME, SEND_IMMEDIATE, SEND_RECEIVE_IMMEDIATE, SEND_TRANSACTED
 
Constructor Summary
SendMsgCmdImpl()
           
 
Method Summary
 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 allows greater flexibility in adding attachments to an e-mail message.
 void addMember(java.lang.Long member)
          This method uses member information to get recipient data
 void addMemberGroup(java.lang.Long memberGroup)
          This method uses member group information to get recipient data
 void addSecureMember(java.lang.Long member)
          This method uses member information to get recipient data
 void addStore(java.lang.Integer astore_id)
          Add a store.
 void compose(java.lang.String aView, CommandContext aCommandContext, TypedProperty aParms)
          This method provides message composition services through the use as jsp templates
 byte[] getContent(java.lang.Integer transport, java.lang.String language)
          Get content.
 byte[] getResult()
          Returns the result of a sendReceive send.
 boolean isReadyToCallExecute()
          This method checks if command is ready to be executed
 void performExecute()
          Call all the necessary steps to execute the messaging system services
 void remTransport(java.lang.Integer aRemoveTransportID)
          This method allows the user to have transport(s) removed
 void sendImmediate()
          This method sets the send mode to send the message immediately to the recipients.
 void sendReceiveImmediate()
          This method sets the send mode to send the message and wait for a reply
 void sendTransacted()
          This method sets the send mode to send the message in transacted mode which stores the message in the MSGSTORE table and let the scheduler batch job to send the messages at pre-determined interval
 void setConfigData(java.lang.String aKey, java.lang.String aValue)
          This method allows the user to configure the 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)
          This method sets the message type required to initialize the messaging system
 void setPartialSend(java.lang.Boolean aPartialSendFlag)
          This method allows partial send when using e-mail as 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
 void validateParameters()
          Check if message type and store id is set
 
Methods inherited from class com.ibm.commerce.command.AbstractECCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
The internal copyright field.
Constructor Detail

SendMsgCmdImpl

public SendMsgCmdImpl()
Method Detail

addContentPart

public void addContentPart(byte[] aMsgContentPart)
This method adds attachments to an e-mail message.
Specified by:
addContentPart in interface SendMsgCmd

addContentPart

public void addContentPart(byte[] aMsgContentPart,
                           java.lang.String aMsgContentPartName,
                           java.lang.String aMsgContentPartType)
This method allows greater flexibility in adding attachments to an e-mail message. The parameter msgAttachment represents the attachment to be added to the message. The parameter partName represents a name to be used for this attachment. The parameter partType, represents the type of the part being sent (for example, in Mime Email this could be 'text/plain')
Specified by:
addContentPart in interface SendMsgCmd

addMember

public void addMember(java.lang.Long member)
This method uses member information to get recipient data
Specified by:
addMember in interface SendMsgCmd

addMemberGroup

public void addMemberGroup(java.lang.Long memberGroup)
This method uses member group information to get recipient data
Specified by:
addMemberGroup in interface SendMsgCmd

addSecureMember

public void addSecureMember(java.lang.Long member)
This method uses member information to get recipient data
Specified by:
addSecureMember in interface SendMsgCmd

addStore

public void addStore(java.lang.Integer astore_id)
Add a store. Creation date: (12/6/00 8:12:28 AM)
Specified by:
addStore in interface SendMsgCmd
Parameters:
astore_id - java.lang.Integer

compose

public void compose(java.lang.String aView,
                    CommandContext aCommandContext,
                    TypedProperty aParms)
This method provides message composition services through the use as jsp templates
Specified by:
compose in interface SendMsgCmd

getContent

public byte[] getContent(java.lang.Integer transport,
                         java.lang.String language)
                  throws ECSystemException
Get content. Creation date: (04/20/01 2:08:16 PM)
Specified by:
getContent in interface SendMsgCmd
Parameters:
transport - java.lang.Integer
language - java.lang.String
Returns:
byte[]

getResult

public byte[] getResult()
Returns the result of a sendReceive send. This method should be called AFTER the execute for the command is called.
Specified by:
getResult in interface SendMsgCmd

isReadyToCallExecute

public boolean isReadyToCallExecute()
This method checks if command is ready to be executed
Overrides:
isReadyToCallExecute in class AbstractECCommand
Following copied from class: com.ibm.commerce.command.AbstractECCommand
Returns:
boolean - true if we can execute the command false if we canot execute the command

performExecute

public void performExecute()
                    throws ECException
Call all the necessary steps to execute the messaging system services
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECCommand
Throws:
ECException - The exception description.

remTransport

public void remTransport(java.lang.Integer aRemoveTransportID)
This method allows the user to have transport(s) removed
Specified by:
remTransport in interface SendMsgCmd

sendImmediate

public void sendImmediate()
This method sets the send mode to send the message immediately to the recipients.
Specified by:
sendImmediate in interface SendMsgCmd

sendReceiveImmediate

public void sendReceiveImmediate()
This method sets the send mode to send the message and wait for a reply
Specified by:
sendReceiveImmediate in interface SendMsgCmd

sendTransacted

public void sendTransacted()
This method sets the send mode to send the message in transacted mode which stores the message in the MSGSTORE table and let the scheduler batch job to send the messages at pre-determined interval
Specified by:
sendTransacted in interface SendMsgCmd

setConfigData

public void setConfigData(java.lang.String aKey,
                          java.lang.String aValue)
This method allows the user to configure the transport services used for the message.
Specified by:
setConfigData in interface SendMsgCmd

setContent

public 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.
Specified by:
setContent in interface SendMsgCmd

setContent

public 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.
Specified by:
setContent in interface SendMsgCmd

setMsgType

public void setMsgType(java.lang.Integer aMsgType)
This method sets the message type required to initialize the messaging system
Specified by:
setMsgType in interface SendMsgCmd

setPartialSend

public void setPartialSend(java.lang.Boolean aPartialSendFlag)
This method allows partial send when using e-mail as transport. Used in conjunction with addMember(). If parameter is true, send will be done even if some member does not have address. If false, send will not be done if one of the member does not have an address set up.
Specified by:
setPartialSend in interface SendMsgCmd

setPriority

public void setPriority(java.lang.Integer aPriority)
This method sets the priority which can be used when initializing the messaging system
Specified by:
setPriority in interface SendMsgCmd

setStoreID

public void setStoreID(java.lang.Integer aStoreID)
This method sets the store id required to initialize the messaging system
Specified by:
setStoreID in interface SendMsgCmd

validateParameters

public void validateParameters()
                        throws ECException
Check if message type and store id is set
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECCommand
Throws:
ECException - The exception description.