java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.messaging.commands.SendMsgCmdImpl
The outbound messaging system interface implementation, a task command to use the messaging system object.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT The IBM copyright notice field. |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.messaging.commands. SendMsgCmd |
defaultCommandClassName,
NAME,
SEND_IMMEDIATE,
SEND_RECEIVE_IMMEDIATE,
SEND_TRANSACTED |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
SendMsgCmdImpl() |
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. |
java.lang.String |
getMsgTypeName() Returns the name of the message type. |
byte[] |
getResult() Returns the result of a sendReceive sending operation. |
boolean |
isReadyToCallExecute() Checks if the command is ready to call Execute . |
void |
performExecute() The business logic for this controller command. |
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 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 body of a message using byte[] format. |
void |
setContent(java.lang.Integer aTransportID,
java.lang.String aLanguageID, java.lang.String aMsgContent) Allows a user to set the content body of a message using String format. |
void |
setMsgType(java.lang.Integer aMsgType) Deprecated. use setMsgType(java.lang.String) instead. |
void |
setMsgType(java.lang.String aMsgType) Sets the message type required to initialize the messaging system. |
void |
setPartialSend(java.lang.Boolean aPartialSendFlag) Allows partial send when using e-mail as 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. |
void |
validateParameters() Checks if message type and store id are set. |
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
reset,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public SendMsgCmdImpl()
Method Detail |
---|
public void addContentPart(byte[] aMsgContentPart)
addContentPart
in interface
SendMsgCmd
aMsgContentPart
- The attachment (in byte array) to be added
to the message.public void addContentPart(byte[] aMsgContentPart, java.lang.String aMsgContentPartName, java.lang.String aMsgContentPartType)
addContentPart
in interface
SendMsgCmd
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'.public void addMember(java.lang.Long aMember)
addMember
in interface
SendMsgCmd
aMember
- The member id of a recipient.public void addMemberGroup(java.lang.Long aMemberGroup)
addMemberGroup
in interface
SendMsgCmd
public void addSecureMember(java.lang.Long aMember)
addSecureMember
in interface
SendMsgCmd
aMember
- The secure member id.public void addStore(java.lang.Integer astore_id)
addStore
in interface
SendMsgCmd
astore_id
- The store id.public void compose(java.lang.String aView, CommandContext aCommandContext, TypedProperty aParms)
compose
in interface
SendMsgCmd
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.public byte[] getContent(java.lang.Integer transport, java.lang.String language) throws ECSystemException
getContent
in interface
SendMsgCmd
transport
- The transport id.language
- The encoding scheme of the language
preference.
ECSystemException
public java.lang.String getMsgTypeName()
public byte[] getResult()
getResult
in interface
SendMsgCmd
public boolean isReadyToCallExecute()
Execute
.
isReadyToCallExecute
in class
AbstractECTargetableCommand
performExecute()
method;
false otherwise.public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
- Raised with ERR_CMD_BAD_PROCESS_CMD message when an exception is
encountered.public void remTransport(java.lang.Integer aRemoveTransportID)
setRemoveTransportID
.
remTransport
in interface
SendMsgCmd
aRemoveTransportID
- The unwanted transport id.setRemoveTransportID(Integer)
public void sendImmediate()
sendImmediate
in interface
SendMsgCmd
public void sendReceiveImmediate()
sendReceiveImmediate
in interface
SendMsgCmd
public void sendTransacted()
sendTransacted
in interface
SendMsgCmd
public void setConfigData(java.lang.String aKey, java.lang.String aValue)
setConfigData
in interface
SendMsgCmd
aKey
- The name of the parameter.aValue
- The value of the parameter.public void setConfigNLData(java.lang.String aKey, java.lang.String language, java.lang.String aValue)
setConfigNLData
in interface
SendMsgCmd
aKey
- The name of the parameter.aValue
- The value of the parameter.public void setContent(java.lang.Integer aTransportID, java.lang.String aLanguageID, byte[] aMsgContent)
setMsgContent(byte[])
.
setContent
in interface
SendMsgCmd
aTransportID
- The transport used in this command.aMsgContent
- The message content in byte array format.setMsgContent(byte[])
public void setContent(java.lang.Integer aTransportID, java.lang.String aLanguageID, java.lang.String aMsgContent) throws ECSystemException
setMsgContent(byte[])
.
setContent
in interface
SendMsgCmd
aTransportID
- The transport used in this command.aMsgContent
- The message content in String format.
ECSystemException
setMsgContent(byte[])
public void setMsgType(java.lang.Integer aMsgType)
setMsgType
in interface
SendMsgCmd
aMsgType
- The message type identifier used for this
command.public void setMsgType(java.lang.String aMsgType)
setMsgType
in interface
SendMsgCmd
aMsgType
- The message type name used for this
command.public void setPartialSend(java.lang.Boolean aPartialSendFlag)
setPartialSendFlag(Boolean)
.
setPartialSend
in interface
SendMsgCmd
aPartialSendFlag
- true if the command should still send the
message to the rest of recipients; false otherwise.setPartialSendFlag(Boolean)
public void setPriority(java.lang.Integer aPriority)
setPriority
in interface
SendMsgCmd
aPriority
- The priority used to send the
message.public void setStoreID(java.lang.Integer aStoreID)
setStoreID
in interface
SendMsgCmd
aStoreID
- The store id used by the
command.public void validateParameters() throws ECException
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECException
- Raised with ERR_CMD_BAD_PARAM_CMD message if one of the parameters are not
set.