com.ibm.commerce.messaging.outboundservice

Class Messaging

  • java.lang.Object
    • com.ibm.commerce.messaging.outboundservice.Messaging
  • All Implemented Interfaces:
    java.io.Serializable


    public class Messaging
    extends java.lang.Object
    implements java.io.Serializable
    This class contains information about creating and sending messages using the messaging system. It also contains transport information based on the message type configurations.
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      class  Messaging.AsyncMessagingWorker
      The worker class for composing and sending a message asynchronously
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Messaging(java.lang.Integer msgty, java.lang.Integer store)
      Deprecated. 
      This method is replaced by Messaging(String, Integer). It should be used so the message type identifier does not need to be hardcoded by the application.
      Messaging(java.lang.Integer msgTypeId, java.lang.Integer store, java.lang.Integer priority)
      Deprecated. 
      This method is replaced by Messaging(String, Integer, Integer). It should be used so the message type identifier does not need to be hardcoded 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

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method and Description
      int addAllUsersInMemberGroup(java.lang.Long mbrgrp, CommandContext commandContext)
      This method sets the internal member vector with the member group parameter.
      void addContentPart(byte[] part)
      This method adds a content part to the message.
      void addContentPart(byte[] part, java.lang.String name, java.lang.String type)
      This method adds a content part to the message specified by name and type.
      void addMember(java.lang.Long memb)
      This method sets the internal member vector with the single parameter.
      int addMemberGroup(java.lang.Long mbrgrp)
      Deprecated. 
      This method is replaced by #addAlUsersInMemberGroup(Long, CommandContext).
      void addSecureMember(java.lang.Long memb)
      This method adds a non-public recipient to the internal vector.
      void addStore(java.lang.Integer astore_id)
      Adds a store to send the message on behalf of.
      void clearMember()
      This method removes all members from the 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)
      void composeAsync(java.lang.String view, CommandContext comContext, TypedProperty inparms)
      This method will interface with the JSP's for each transport in asynchronized mode and return the message content to the content field.
      javax.mail.internet.MimeMessage composeMimeMessage(WCMSRecord input)
      This method will compose the MIME message
      void composeSync(java.lang.String view, CommandContext comContext, TypedProperty inparms)
      This method will interface with the JSP's for each transport in synchronized mode and return the message content to the content field.
      java.lang.Integer getArchiveFlag()
      This method 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 a 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()
      This method gets the transport property (java.util.Vector) value.
      java.lang.String getUserData(java.lang.Integer transport, java.lang.String name)
      This method returns the User Data attribute of the specified transport and attribute name.
      static Messaging load(byte[] ser)
      This public method can be used to deserialize a serialized Messaging Object
      int remTransport(java.lang.Integer transport)
      This method removes a target transport from the messaging system.
      int sendImmediate()
      This method will send the message immediately.
      byte[] sendReceiveImmediate()
      This method will send the message immediately and wait for a response.
      javax.resource.cci.Record sendReceiveRecordImmediate()
      This method will send the message immediately and wait for a response.
      long sendTransacted()
      This method saves the message to the MSGSTORE table if it is in synchronized mode.
      long sendTransactedSync()
      This method saves the message to the MSGSTORE table in the synchronized mode.
      int setConfigData(java.lang.String name, java.lang.String value)
      This method will insert a name-value pair 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 inserts a name-value pair 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)
      This method will insert the content object directly for a particular transport.
      int setContent(java.lang.Integer transport, java.lang.String language, javax.resource.cci.Record record)
      This method will insert the message record directly for a particular transport.
      int setLowPriorityConfigData(java.lang.String name, java.lang.String value)
      This method will insert a name-value pair 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 inserts a name-value pair into the NL configuration data of ALL transports that have the name as a key in their hashtable.
      void setNotificationID(java.lang.Long notifyID)
      This method sets the notification ID and replaces any default value using the data in the notification object (from the database).
      void setPartialSend(java.lang.Boolean newPartialSend)
      This method sets the partial send flag.
      int setUserData(java.lang.Integer transport, java.lang.String name, java.lang.String value)
      This method sets the user data for the specified transport.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

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

      • Messaging

        public Messaging(java.lang.String msgTypeName,
                         java.lang.Integer store)
                  throws ECException,
                         java.lang.NullPointerException
        Messaging constructor. For the given key parameters, the constructor will access the messaging system tables and retrieve required information (based on the given priority level). Information gathered : name-value pairs for CS, IS, misc, and valid transports for the key.
        Parameters:
        msgTypeName - The message type, part of the key used to access Admin information
        store - The store, part of the key used to access Admin information
        Throws:
        ECException - Raised with message _ERR_ADM_FINDEREXCEPTION when a request object is not found. Raised with message _ERR_ACCESS_STORE when a request object is not found.
        java.lang.NullPointerException - Raised if the message type is null
      • Messaging

        public Messaging(java.lang.String msgTypeName,
                         java.lang.Integer store,
                         java.lang.Integer priority)
                  throws ECException,
                         java.lang.NullPointerException
        Messaging constructor. For the given key parameters, the constructor will access the messaging system tables and retrieve required information (based on the given priority level Information gathered : name-value pairs for CS, IS, misc, and valid transports for the key.
        Parameters:
        msgTypeName - The message type, part of the key used to access Admin information
        store - The store, part of the key used to access Admin information
        priority - The priority, used to filter table access
        Throws:
        ECException - Raised with message _ERR_ADM_FINDEREXCEPTION when a request object is not found. Raised with message _ERR_ACCESS_STORE when a request object is not found.
        java.lang.NullPointerException - Raised if the message type is null
      • Messaging

        public Messaging(java.lang.Integer msgty,
                         java.lang.Integer store)
                  throws ECSystemException,
                         java.lang.NullPointerException
        Deprecated. This method is replaced by Messaging(String, Integer). It should be used so the message type identifier does not need to be hardcoded by the application.
        Messaging constructor. For the given key parameters, the constructor will access the messaging system tables and retrieve required information (based on the given priority level Information gathered : name-value pairs for CS, IS, misc, and valid transports for the key.
        Parameters:
        msgty - The message type, part of the key used to access Admin information
        store - The store, part of the key used to access Admin information
        Throws:
        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 found.
        java.lang.NullPointerException - Raised if the message type is null.
      • Messaging

        public Messaging(java.lang.Integer msgTypeId,
                         java.lang.Integer store,
                         java.lang.Integer priority)
                  throws ECSystemException,
                         java.lang.NullPointerException
        Deprecated. This method is replaced by Messaging(String, Integer, Integer). It should be used so the message type identifier does not need to be hardcoded by the application.
        Messaging constructor. For the given key parameters, the constructor will access the messaging system tables and retrieve required information (based on the given priority level Information gathered : name-value pairs for CS, IS, misc, and valid transports for the key.
        Parameters:
        msgTypeId - The message type, part of the key used to access Admin information
        store - The store, part of the key used to access Admin information
        priority - The priority, used to filter table access
        Throws:
        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 found.
        java.lang.NullPointerException - Raised if the message type is null
    • Method Detail

      • addContentPart

        public void addContentPart(byte[] part)
        This method adds a content part to the message.
        Parameters:
        part - The content part to add as a byte[].
      • addContentPart

        public void addContentPart(byte[] part,
                                   java.lang.String name,
                                   java.lang.String type)
        This method adds a content part to the message specified by name and type.
        Parameters:
        part - The content part to add
        name - The name of the part to add (example filename)
        type - The type of the part (for example the MIME type (text/plain) in JavaMail).
      • addMember

        public void addMember(java.lang.Long memb)
                       throws ECSystemException
        This method sets the internal member vector with the single parameter. It adds to any previous members.
        Parameters:
        memb - The member group.
        Throws:
        ECSystemException - Raised with message _ERR_ACCESS_USER_BEAN whenever a request object is not found.
      • addMemberGroup

        public int addMemberGroup(java.lang.Long mbrgrp)
                           throws ECSystemException
        Deprecated. This method is replaced by #addAlUsersInMemberGroup(Long, CommandContext).
        This method sets the internal member vector with the member group parameter. Because the members in a member group can be member groups themselves, this method must perform a thorough search of all the members. It adds to any previous members.
        Parameters:
        mbrgrp - The member group.
        Returns:
        int The return code.
        Throws:
        ECSystemException - Raised with message _ERR_ACCESS_USER_BEAN whenever a request object is not found.
      • addAllUsersInMemberGroup

        public int addAllUsersInMemberGroup(java.lang.Long mbrgrp,
                                            CommandContext commandContext)
                                     throws ECSystemException
        This method sets the internal member vector with the member group parameter. Because members in a member group can be implicit or explicit members, this method will perform a thorough search of all the members. It adds to any previous members.
        Parameters:
        mbrgrp - The member group.
        commandContext - The command context that have the current store id.
        Returns:
        int The return code.
        Throws:
        ECSystemException - Raised with message _ERR_ACCESS_USER_BEAN whenever a request object is not found.
      • addSecureMember

        public void addSecureMember(java.lang.Long memb)
                             throws ECSystemException
        This method adds a non-public recipient to the internal vector. It adds to any previous members.
        Parameters:
        memb - The member group.
        Throws:
        ECSystemException - The exception description. Raised with message _ERR_ACCESS_USER_BEAN whenever a request object is not found.
      • addStore

        public void addStore(java.lang.Integer astore_id)
                      throws ECSystemException
        Adds a store to send the message on behalf of.
        Parameters:
        astore_id - The store identifier
        Throws:
        ECSystemException - The exception description. Raised with message _ERR_ACCESS_USER_BEAN whenever a request object is not found.
      • clearMember

        public void clearMember()
        This method removes all members from the internal recipient list.
      • compose

        public void compose(java.lang.String view,
                            CommandContext comContext,
                            TypedProperty inparms)
                     throws ECSystemException
        This method will interface with the JSP's for each transport and return the message content to the content field. If AddMember*(Long) and AddSecureMember(Long) has not been called, this method requires the correct language ID to be set inside the command context object.
        Parameters:
        view - The view name
        comContext - The command context
        inparms - The request property
        Throws:
        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 generic exception occurs.
      • composeAsync

        public void composeAsync(java.lang.String view,
                                 CommandContext comContext,
                                 TypedProperty inparms)
                          throws ECSystemException
        This method will interface with the JSP's for each transport in asynchronized mode and return the message content to the content field.
        Parameters:
        view - The view name
        comContext - The command context
        inparms - The input parameters
        Throws:
        ECSystemException
      • composeSync

        public void composeSync(java.lang.String view,
                                CommandContext comContext,
                                TypedProperty inparms)
                         throws ECSystemException
        This method will interface with the JSP's for each transport in synchronized mode and return the message content to the content field. If AddMember*(Long) and AddSecureMember(Long) has not been called, this method requires the correct language ID to be set inside the command context object.
        Parameters:
        view - The view name
        comContext - The command context
        inparms - The request property
        Throws:
        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 generic exception occurs.
      • compose

        public void compose(java.lang.String view,
                            CommandContext comContext,
                            TypedProperty inparms,
                            java.lang.String content_type)
                     throws ECSystemException
        This method will interface with the JSP's for each transport and return the message content to the content field. If AddMember*(Long) and AddSecureMember(Long) has not been called, this method requires the correct language ID to be set inside the command context object.
        Parameters:
        view - The view name associated with this message
        comContext - The command context
        inparms - The request property
        content_type - The message content type which is used by JavaMail.
        Throws:
        ECSystemException - Raised with message _ERR_EXEC_COMPOSE whenever an error occurs while composing the message. Raised with message _ERR_CCF2JM_GENERIC_EXCEPTION whenever a generic exception occurs.
      • composeMimeMessage

        public javax.mail.internet.MimeMessage composeMimeMessage(WCMSRecord input)
                                                           throws ECSystemException
        This method will compose the MIME message
        Parameters:
        input - The input record
        Returns:
        The Mime message object
        Throws:
        ECSystemException - Raised with message _ERR_EXEC_COMPOSE whenever an error occurs creating the MIME message.
      • getConfigData

        public java.lang.String getConfigData(java.lang.String name)
                                       throws ECSystemException
        This method will return the first value found for a given key. It searches through the hash tables of all transports. If there is no transport available to be searched, this method returns null.
        Parameters:
        name - The attribute name.
        Returns:
        The attribute value
        Throws:
        ECSystemException - Raised with message _ERR_MSGTRANS_NOT_INIT whenever the hashtable containing the configuration data is null.
      • getConfigData

        public java.lang.String getConfigData(java.lang.String name,
                                              java.lang.String language)
                                       throws ECSystemException
        This method will return the first NL value found for given key. It searches through the hash tables of all transports. If there is no transport available to be searched, this method returns null.
        Parameters:
        name - The attribute name.
        language - The language id
        Returns:
        The attribute value
        Throws:
        ECSystemException - Raised with message _ERR_MSGTRANS_NOT_INIT whenever the hashtable containing the configuration data is null.
      • getContentType

        public java.lang.String getContentType(java.lang.Integer transport,
                                               java.lang.String language)
                                        throws ECSystemException
        This method is used by external users to get the content type of a message from a particular transport.
        Parameters:
        transport - The transport identifier
        language - The language ID
        Returns:
        String The content type of the message.
        Throws:
        ECSystemException - The exception description. Raised with ArrayIndexOutOfBoundsException whenever an exception occurs while accessing the transport array
      • getContent

        public byte[] getContent(java.lang.Integer transport,
                                 java.lang.String language)
                          throws ECSystemException
        This method is used by external users to get the content of a message from a particular transport.
        Parameters:
        transport - The transport identifier
        language - The language ID
        Returns:
        byte[] The content of the message.
        Throws:
        ECSystemException - The exception description. Raised with ArrayIndexOutOfBoundsException whenever there is an error accessing the transport array
      • getContentObject

        public java.lang.Object getContentObject(java.lang.Integer transport,
                                                 java.lang.String language)
                                          throws ECSystemException
        This method is used by external users to get the content object of a message from a particular transport.
        Parameters:
        transport - java.lang.Integer The transport.
        language - java.lang.String The language ID
        Returns:
        the content object of the message.
        Throws:
        ECSystemException - The exception description. Raised with ArrayIndexOutOfBoundsException whenever there is an error accessing the transport array
      • getTransports

        public java.util.Vector getTransports()
        This method gets the transport property (java.util.Vector) value.
        Returns:
        The transports property value.
      • getUserData

        public java.lang.String getUserData(java.lang.Integer transport,
                                            java.lang.String name)
                                     throws ECSystemException
        This method returns the User Data attribute of the specified transport and attribute name.
        Parameters:
        transport - The transport.
        name - The attribute name.
        Returns:
        The attribute value.
        Throws:
        ECSystemException - The exception description. Raised with message _ERR_MSGTRANS_NOT_INIT whenever the message transport is not found.
      • load

        public static Messaging load(byte[] ser)
                              throws java.io.IOException,
                                     java.lang.ClassNotFoundException
        This public method can be used to deserialize a serialized Messaging Object
        Parameters:
        ser - The byte array used to build the messaging object
        Returns:
        The messaging object
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • remTransport

        public int remTransport(java.lang.Integer transport)
        This method removes a target transport from the messaging system.
        Parameters:
        transport - The transport to remove.
        Returns:
        int The return code. Returns 0 If the transport was found and successfully removed; -1 if the transport does not exist.
      • sendImmediate

        public int sendImmediate()
                          throws ECSystemException
        This method will send the message immediately.
        Returns:
        The return code.
        Throws:
        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 occured.
      • sendReceiveImmediate

        public byte[] sendReceiveImmediate()
                                    throws ECSystemException
        This method will send the message immediately and wait for a response.
        Returns:
        byte[] The response in bytes.
        Throws:
        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 occured.
      • sendReceiveRecordImmediate

        public javax.resource.cci.Record sendReceiveRecordImmediate()
                                                             throws ECSystemException
        This method will send the message immediately and wait for a response.
        Returns:
        Record The response in output record.
        Throws:
        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 whenever 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 occurs.
      • sendTransacted

        public long sendTransacted()
                            throws ECSystemException
        This method saves the message to the MSGSTORE table if it is in synchronized mode.
        Returns:
        The number of bytes saved. -1 if it is in asynchronous mode.
        Throws:
        ECSystemException - The exception description.
      • sendTransactedSync

        public long sendTransactedSync()
                                throws ECSystemException
        This method saves the message to the MSGSTORE table in the synchronized mode.
        Returns:
        The number of bytes saved.
        Throws:
        ECSystemException - The exception description.
      • setConfigData

        public int setConfigData(java.lang.String name,
                                 java.lang.String value)
                          throws ECSystemException
        This method will insert a name-value pair into the configuration data of ALL transports that have the name as a key in their hashtable. The name must already exist or an exception will be returned.
        Parameters:
        name - The attribute name.
        value - The attribute value.
        Returns:
        0 if the method executes successfully. -2 if name or value is null. -1 if there is no profile (message type to transport assignment) created for this message type.
        Throws:
        ECSystemException - The exception description.
      • setConfigData

        public int setConfigData(java.lang.String name,
                                 java.lang.String language,
                                 java.lang.String value)
                          throws ECSystemException
        This method inserts a name-value pair into the NL configuration data of ALL transports that have the name as a key in their hashtable. This will only affect the value specified by the language.
        Parameters:
        name - The attribute name.
        language - The language ID
        value - The attribute value.
        Returns:
        0 if the method executes successfully. -2 if name or value or language is null. -1 if there is no profile (message type to transport assignment) created for this message type.
        Throws:
        ECSystemException - Raised with message _ERR_MSG_CFG_NOT_INIT whenever the messaging configuration data cannot be initialized.
      • setLowPriorityConfigData

        public int setLowPriorityConfigData(java.lang.String name,
                                            java.lang.String value)
                                     throws ECSystemException
        This method will insert a name-value pair into the configuration data of ALL transports that have the name as a key in their hashtable. The name must already exist or an exception will be returned. This configuration data will only be used if there is no site/store administrator defined configuration.
        Parameters:
        name - The attribute name.
        value - The attribute value.
        Returns:
        0 if the method executes successfully. -2 if name or value is null. -1 if there is no profile (message type to transport assignment) created for this message type.
        Throws:
        ECSystemException - Raised with message _ERR_MSG_CFG_NOT_INIT whenever the messaging configuration data cannot be initialized.
      • setLowPriorityConfigData

        public int setLowPriorityConfigData(java.lang.String name,
                                            java.lang.String language,
                                            java.lang.String value)
                                     throws ECSystemException
        This method inserts a name-value pair into the NL configuration data of ALL transports that have the name as a key in their hashtable. The name must already exist or an exception will be returned. This will only affect the value specified by the language. This configuration data will only be used if there is no site/store administrator defined configuration.
        Parameters:
        name - The attribute name.
        language - The language id.
        value - The attribute value.
        Returns:
        0 if the method executes successfully. -2 if name or value is null. -1 if there is no profile (message type to transport assignment) created for this message type.
        Throws:
        ECSystemException - Raised with message _ERR_MSG_CFG_NOT_INIT whenever the messaging configuration data cannot be initialized.
      • setContent

        public 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.
        Parameters:
        transport - The Transport identifier
        language - The language ID
        content - The content of the message to be set.
        Returns:
        0 if the method completes successfully. -2 if content is null. -3 if language is invalid. -1 if there is no profile (message type to transport assignment) created for this message type.
      • setUserData

        public int setUserData(java.lang.Integer transport,
                               java.lang.String name,
                               java.lang.String value)
                        throws ECSystemException
        This method sets the user data for the specified transport.
        Parameters:
        transport - The transport.identifier
        name - The attribute name.
        value - The attribute value.
        Returns:
        0 if the method executes successfully. -1 if there is no profile (message type to transport assignment) created for this message type.
        Throws:
        ECSystemException - Raised with message _ERR_MSG_CFG_NOT_INIT whenever the messaging configuration data cannot be initialized.
      • setContent

        public int setContent(java.lang.Integer transport,
                              java.lang.String language,
                              java.lang.Object object)
        This method will insert the content object directly for a particular transport.
        Parameters:
        transport - The transport identifier
        language - The language ID
        object - The MimeMultipart for JavaMail.
        Returns:
        0 if the method executes successfully. -3 if language is invalid. -2 if object is null. -1 if there is no profile (message type to transport assignment) created for this message type.
      • setContent

        public int setContent(java.lang.Integer transport,
                              java.lang.String language,
                              byte[] content,
                              java.lang.String content_type)
        Deprecated. This method is replaced by setContent(Integer, String, byte[]) and setConfigData(String, String).
        This method will insert the content of a message directly for a particular transport with content type.
        Parameters:
        transport - The transport identifier
        language - The language ID
        content - The content of the message to be set
        content_type - The content type of the message to be set
        Returns:
        0 if the method executes successfully. -3 if language is invalid. -2 if object is null. -1 if there is no profile (message type to transport assignment) created for this message type.
      • setContent

        public int setContent(java.lang.Integer transport,
                              java.lang.String language,
                              javax.resource.cci.Record record)
        This method will insert the message record directly for a particular transport.
        Parameters:
        transport - The Transport identifier
        language - The language ID
        record - The input record which contains message.
        Returns:
        0 if the method executes successfully. -3 if language is invalid. -2 if record is null. -1 if there is no profile (message type to transport assignment) created for this message type.
      • getArchiveFlag

        public java.lang.Integer getArchiveFlag()
        This method returns the archive flag from the transport info.
        Returns:
        the archive flag as an Integer
      • setNotificationID

        public void setNotificationID(java.lang.Long notifyID)
                               throws ECSystemException
        This method sets the notification ID and replaces any default value using the data in the notification object (from the database).
        Parameters:
        notifyID - is used to identify a notification object (may apply to multiple msgtypes and transports in the database).
        Throws:
        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 occured.
      • setPartialSend

        public void setPartialSend(java.lang.Boolean newPartialSend)
        This method sets the partial send flag. The value will be saved into configuration data.
        Parameters:
        newPartialSend - boolean indicating if the message is to be partially sent or not.