public class SendMsgCmdImpl extends TaskCommandImpl implements SendMsgCmd
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
The IBM copyright notice field.
|
defaultCommandClassName, NAME, SEND_IMMEDIATE, SEND_RECEIVE_IMMEDIATE, SEND_TRANSACTED
Constructor and Description |
---|
SendMsgCmdImpl() |
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 content of the message by the transport ID and language ID.
|
java.lang.String |
getMsgTypeName()
This method returns the name of the message type.
|
byte[] |
getResult()
This method returns the result of a sendReceive sending operation.
|
boolean |
isReadyToCallExecute()
This method checks if the command is ready to call
Execute . |
void |
performExecute()
The business logic for this controller command.
|
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 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 body of a message 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 body of a message using String format.
|
void |
setMsgType(java.lang.Integer aMsgType)
Deprecated.
This method is replaced by
setMsgType(java.lang.String) . |
void |
setMsgType(java.lang.String aMsgType)
This method sets the message type required to initialize the messaging system.
|
void |
setPartialSend(java.lang.Boolean aPartialSendFlag)
This method allows partial sends 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()
This method checks if message type and store ID are set.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public static final java.lang.String COPYRIGHT
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 e-mail, 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
aMemberGroup
- The member group ID.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 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.public byte[] getContent(java.lang.Integer transport, java.lang.String language) throws ECSystemException
getContent
in interface SendMsgCmd
transport
- The transport ID.language
- The language ID of the language preference.ECSystemException
public java.lang.String getMsgTypeName()
public byte[] getResult()
getResult
in interface SendMsgCmd
public boolean isReadyToCallExecute()
Execute
.isReadyToCallExecute
in interface com.ibm.websphere.command.Command
isReadyToCallExecute
in class AbstractECTargetableCommand
performExecute()
method; false
otherwise.public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
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.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 aLanguage, java.lang.String aValue)
setConfigNLData
in interface SendMsgCmd
aKey
- The name of the parameter.aLanguage
- The language ID.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.aLanguageID
- The language ID of language preference of the message content.aMsgContent
- The message content in byte array format.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.aLanguageID
- The language ID of language preference of the message content.aMsgContent
- The message content in String format.ECSystemException
public void setMsgType(java.lang.Integer aMsgType)
setMsgType(java.lang.String)
.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)
setPartialSend
in interface SendMsgCmd
aPartialSendFlag
- The boolean indicating if the e-mail can be sent to a subset of targeted
recipients. If it is false, an exception will be thrown if the SendFailedException
happened when the message was sent to one of the targeted recipients.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.