java.lang.Object | +--com.ibm.commerce.messaging.outboundservice.Messaging
The object that is responsible to creating the messages and sending the messages using CCF transports based on the specified configuration for the message types.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT IBM copyright notice field. |
Constructor Summary | |
---|---|
Messaging(java.lang.Integer msgty,
java.lang.Integer store) Deprecated. user Messaging(String, Integer) so the message type Identifier does not need to be hardcode by the application. | |
Messaging(java.lang.Integer msgty, java.lang.Integer store,
java.lang.Integer priority) Deprecated. user Messaging(String, Integer, Integer) so the message type Identifier does not need to be hardcode by the application. | |
Messaging(java.lang.String msgTypeName,
java.lang.Integer store) Messaging constructor. | |
Messaging(java.lang.String msgTypeName, java.lang.Integer store,
java.lang.Integer priority) Messaging constructor. |
Method Summary | |
---|---|
void |
addContentPart(byte[] part) This method adds a content part to the message content |
void |
addContentPart(byte[] part, java.lang.String name,
java.lang.String type) This method adds a content part to the message content |
void |
addMember(java.lang.Long memb) This method sets the internal member vector with the single parameter. |
int |
addMemberGroup(java.lang.Long mbrgrp) This method sets the internal member vector with the member group parameter. |
void |
addSecureMember(java.lang.Long memb) This method sets the internal securemember vector with the single parameter. |
void |
addStore(java.lang.Integer astore_id) Add a store to send the message on behalf of. |
void |
clearMember() Removes all members from our internal recipient list. |
void |
compose(java.lang.String view,
CommandContext comContext,
TypedProperty inparms) This method will interface with the JSP's for each transport and return the message content to the content field. |
void |
compose(java.lang.String view,
CommandContext comContext,
TypedProperty inparms,
java.lang.String content_type) Deprecated. |
javax.mail.internet.MimeMessage |
composeMimeMessage(
WCMSRecord input) This method will compose the mime message |
java.lang.Integer |
getArchiveFlag() getArchiveFlag() returns the archive flag from the transport info |
java.lang.String |
getConfigData(java.lang.String name) This method will return the first value found for given key. |
java.lang.String |
getConfigData(java.lang.String name,
java.lang.String language) This method will return the first NL value found for given key. |
byte[] |
getContent(java.lang.Integer transport,
java.lang.String language) This method is used by external users to get the content of a message from a particular transport. |
java.lang.Object |
getContentObject(java.lang.Integer transport,
java.lang.String language) This method is used by external users to get the content object of a message from a particular transport. |
java.lang.String |
getContentType(java.lang.Integer transport,
java.lang.String language) This method is used by external users to get the content type of a message from a particular transport. |
java.util.Vector |
getTransports() Gets the transports property (java.util.Vector) value. |
java.lang.String |
getUserData(java.lang.Integer transport,
java.lang.String name) Returns the User Data attribute of the specified transport and attribute name. |
static
Messaging |
load(byte[] ser) This public method can be used by users of the Messaging System to deserialize a serialized Messaging Object |
int |
remTransport(java.lang.Integer transport) Removes the transport so the message will not be using |
int |
sendImmediate() Sends the message immediately. |
byte[] |
sendReceiveImmediate() Sends the message immediately and waits for a response. |
Record |
sendReceiveRecordImmediate() Sends the message immediately and waits for a response. |
long |
sendTransacted() Saves the message to the MSGSTORE table. |
int |
setConfigData(java.lang.String name,
java.lang.String value) This method will insert a nvp into the configuration data of ALL transports that have the name as a key in their hashtable. |
int |
setConfigData(java.lang.String name, java.lang.String language,
java.lang.String value) This method will insert a nvp into the nl configuration data of ALL transports that have the name as a key in their hashtable. |
int |
setContent(java.lang.Integer transport, java.lang.String language,
byte[] content) This method will insert the content of a message directly for a particular transport |
int |
setContent(java.lang.Integer transport, java.lang.String language,
byte[] content, java.lang.String content_type) Deprecated. |
int |
setContent(java.lang.Integer transport, java.lang.String language,
java.lang.Object object) Insert the method's description here. |
int |
setLowPriorityConfigData(java.lang.String name,
java.lang.String value) This method will insert a nvp into the configuration data of ALL transports that have the name as a key in their hashtable. |
int |
setLowPriorityConfigData(java.lang.String name,
java.lang.String language, java.lang.String value) This method will insert a nvp into the nl configuration data of ALL transports that have the name as a key in their hashtable. |
void |
setNotificationID(java.lang.Long notifyID) setNotificationID set the notifcaiton id and replaces any default value using the data in the notification object (from database) |
void |
setPartialSend(java.lang.Boolean newPartialSend) Sets the partial send flag. |
int |
setUserData(java.lang.Integer transport, java.lang.String name,
java.lang.String value) Sets the User Data for the specified transport. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public Messaging(java.lang.String msgTypeName, java.lang.Integer store) throws ECException, java.lang.NullPointerException
store
- The store, part of the key used to access Admin
informationECException
- Raised with message _ERR_ADM_FINDEREXCEPTION whenever a request object is not
found Raised with message _ERR_ACCESS_STORE whenever a request object is not
foundjava.lang.NullPointerException
- Raised if the message type is
nullpublic Messaging(java.lang.String msgTypeName, java.lang.Integer store, java.lang.Integer priority) throws ECException, java.lang.NullPointerException
store
- The store, part of the key used to access Admin
informationpriority
- The priority, used to filter table accessECException
- Raised with message _ERR_ADM_FINDEREXCEPTION whenever a request object is not
found Raised with message _ERR_ACCESS_STORE whenever a request object is not
foundjava.lang.NullPointerException
- Raised if the message type is
nullpublic Messaging(java.lang.Integer msgty, java.lang.Integer store) throws ECSystemException, java.lang.NullPointerException
msgty
- The message type, part of the key used to access Admin
informationstore
- The store, part of the key used to access Admin
informationECException
- Raised with message _ERR_ADM_FINDEREXCEPTION whenever a request object is not
found Raised with message _ERR_ACCESS_STORE whenever a request object is not
foundjava.lang.NullPointerException
- Raised if the message type is
null
ECSystemException
public Messaging(java.lang.Integer msgty, java.lang.Integer store, java.lang.Integer priority) throws ECSystemException, java.lang.NullPointerException
msgty
- The message type, part of the key used to access Admin
informationstore
- The store, part of the key used to access Admin
informationpriority
- The priority, used to filter table access
ECSystemException
- Raised with message _ERR_ADM_FINDEREXCEPTION
whenever a request object is not found Raised with message _ERR_ACCESS_STORE
whenever a request object is not foundjava.lang.NullPointerException
- Raised if the message type is
nullMethod Detail |
---|
public void addContentPart(byte[] part)
public void addContentPart(byte[] part, java.lang.String name, java.lang.String type)
public void addMember(java.lang.Long memb) throws ECSystemException
ECSystemException
- Raised with message _ERR_ACCESS_USER_BEAN
whenever a request object is not foundpublic int addMemberGroup(java.lang.Long mbrgrp) throws ECSystemException
mbrgrp
- The member group.
ECSystemException
- Raised with message _ERR_ACCESS_USER_BEAN
whenever a request object is not foundpublic void addSecureMember(java.lang.Long memb) throws ECSystemException
ECSystemException
- The exception description. Raised with message
_ERR_ACCESS_USER_BEAN whenever a request object is not
foundpublic void addStore(java.lang.Integer astore_id) throws ECSystemException
astore_id
- The store identifier
ECSystemException
- The exception description. Raised with message
_ERR_ACCESS_USER_BEAN whenever a request object is not
foundpublic void clearMember()
public void compose(java.lang.String view, CommandContext comContext, TypedProperty inparms) throws ECSystemException
AddMember*(Long)
and
AddSecureMember(Long) has not been called, this method requires correct
language id set inside the command context object.
Parameters:
view
- The view name
ECSystemException
- The exception description. Raised with message
_ERR_EXEC_COMPOSE whenever an error occurs while composing the message Raised
with message _ERR_CCF2JM_GENERIC_EXCEPTION whenever a CCF generic exception
occurspublic void compose(java.lang.String view, CommandContext comContext, TypedProperty inparms, java.lang.String content_type) throws ECSystemException
AddMember*(Long)
and
AddSecureMember(Long) has not been called, this method requires correct
language id set inside the command context object.
Parameters:
view
- The view name associated with this
message
content_type
- The message content type which is used by
JavaMail.
ECSystemException
- Raised with message _ERR_EXEC_COMPOSE whenever
an error occurs while composing the message Raised with message
_ERR_CCF2JM_GENERIC_EXCEPTION whenever a CCF exception
occurspublic javax.mail.internet.MimeMessage composeMimeMessage(WCMSRecord input) throws ECSystemException
input
- The input record
ECSystemException
- The exception description.public java.lang.String getConfigData(java.lang.String name) throws ECSystemException
name
- The attribute name.
ECSystemException
- Raised with message _ERR_MSGTRANS_NOT_INIT
whenever the hashtable containing the config data is null.public java.lang.String getConfigData(java.lang.String name, java.lang.String language) throws ECSystemException
name
- The attribute name.language
- The language id.
ECSystemException
- Raised with message _ERR_MSGTRANS_NOT_INIT
whenever the hashtable containing the config data is null.public java.lang.String getContentType(java.lang.Integer transport, java.lang.String language) throws ECSystemException
transport
- The transport identifierlanguage
- The language.
ECSystemException
- The exception description. Raised with
ArrayIndexOutOfBoundsException whenever an exception occurs while accessing the
transport arraypublic byte[] getContent(java.lang.Integer transport, java.lang.String language) throws ECSystemException
transport
- The transport identifierlanguage
- The language.
ECSystemException
- The exception description. Raised with
ArrayIndexOutOfBoundsException whenever there is an error accesing the
transport arraypublic java.lang.Object getContentObject(java.lang.Integer transport, java.lang.String language) throws ECSystemException
transport
- java.lang.Integer The transport.language
- java.lang.String The language.
ECSystemException
- The exception description. Raised with
ArrayIndexOutOfBoundsException whenever there is an error accesing the tranport
arraypublic java.util.Vector getTransports()
#setTransports
public java.lang.String getUserData(java.lang.Integer transport, java.lang.String name) throws ECSystemException
transport
- The transport.name
- The attribute name.
ECSystemException
- The exception description. Raised with message
_ERR_MSGTRANS_NOT_INIT whenever the message transport is not
foundpublic static Messaging load(byte[] ser) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public int remTransport(java.lang.Integer transport)
transport
- The transport to remove.public int sendImmediate() throws ECSystemException
ECSystemException
- Raised with message
_ERR_CCF2JM_CDATA_NULLCONTENT whenever the input byte[] parameter is null
Raised with message _ERR_MSG_CFG_NOT_INIT whenever the messaging configuration
data cannot be initialized Raised with message _ERR_ADM_FINDEREXCEPTION
whenever a request object is not found Raised with message
_ERR_ADM_NAMINGEXCEPTION whenever a failure to look up the JNDI name occured
Raised with message _ERR_ADM_CREATEEXCEPTION whenever a failure to create the
EJB occuredpublic byte[] sendReceiveImmediate() throws ECSystemException
ECSystemException
- Raised with message
_ERR_CCF2JM_CDATA_NULLCONTENT whenever the input byte[] parameter is null
Raised with message _ERR_MSG_CFG_NOT_INIT whenever the messaging configuration
data cannot be initialized Raised with message _ERR_ADM_FINDEREXCEPTION
whenever a request object is not found Raised with message
_ERR_ADM_NAMINGEXCEPTION whenever a failure to look up the JNDI name occured
Raised with message _ERR_ADM_CREATEEXCEPTION whenever a failure to create the
EJB occuredpublic Record sendReceiveRecordImmediate() throws ECSystemException
ECSystemException
- Raised with message _ERR_MSG_CFG_NOT_INIT
whenever the messaging configuration data cannot be initialized Raised with
message _ERR_CCF2JM_CDATA_NULLCONTENT whenever the input byte[] parameter is
null Raised with message _ERR_UNSUPPORTED_ENCODING whenever an unsupported
encoding exception occurs Raised with message _ERROR_JCA_NULL_JNDI whenver the
JNDI name is either null or empty Raised with message _ERR_GENERIC whenever a
generic error occurs Raised with message _ERROR_MSG_RESOURCE_EXCEPTION whenever
a resource exception occurspublic long sendTransacted() throws ECSystemException
ECSystemException
- The exception description.public int setConfigData(java.lang.String name, java.lang.String value) throws ECSystemException
name
- The attribute name.value
- The attribute value.
ECSystemException
- The exception description.public int setConfigData(java.lang.String name, java.lang.String language, java.lang.String value) throws ECSystemException
name
- The attribute name.language
- The language IDvalue
- The attribute value.
ECSystemException
- Raised with message _ERR_MSG_CFG_NOT_INIT
whenever the messaging configuration data cannot be
initializedpublic int setLowPriorityConfigData(java.lang.String name, java.lang.String value) throws ECSystemException
name
- The attribute name.value
- The attribute value.
ECSystemException
- Raised with message _ERR_MSG_CFG_NOT_INIT
whenever the messaging configuration data cannot be
initializedpublic int setLowPriorityConfigData(java.lang.String name, java.lang.String language, java.lang.String value) throws ECSystemException
name
- The attribute name.value
- The attribute value.
ECSystemException
- Raised with message _ERR_MSG_CFG_NOT_INIT
whenever the messaging configuration data cannot be
initializedpublic int setContent(java.lang.Integer transport, java.lang.String language, byte[] content)
transport
- The Transport identifierlanguage
- The language idcontent
- The content of the message to be set.public int setUserData(java.lang.Integer transport, java.lang.String name, java.lang.String value) throws ECSystemException
transport
- The transport.identifiername
- The attribute name.value
- The attribute value.
ECSystemException
- Raised with message _ERR_MSG_CFG_NOT_INIT
whenever the messaging configuration data cannot be
initializedpublic int setContent(java.lang.Integer transport, java.lang.String language, java.lang.Object object)
transport
- The transport identifierlanguage
- The languageobject
- The MimeMultipart for JavaMail.public int setContent(java.lang.Integer transport, java.lang.String language, byte[] content, java.lang.String content_type)
transport
- The transport identifierlanguage
- The languagecontent
- The content of the message to be setcontent_type
- The content type of the message to be setpublic java.lang.Integer getArchiveFlag()
public void setNotificationID(java.lang.Long notifyID) throws ECSystemException
ECSystemException
- Raised with message _ERR_ADM_FINDEREXCEPTION
whenever a request object is not found Raised with message
_ERR_ADM_NAMINGEXCEPTION whenever a failure to look up the JNDI name occured
Raised with message _ERR_ADM_CREATEEXCEPTION whenever a failure to create the
EJB occuredpublic void setPartialSend(java.lang.Boolean newPartialSend)