SAP NetWeaver '04

com.sapportals.wcm.util.channels
Interface IChannel

[contained in: com.sap.netweaver.bc.util.par - bc.util.public_api.jar]
All Known Implementing Classes:
AbstractChannel

public interface IChannel

A channel is the abstraction of an transport mechanism for sending messages to recipients.
A message can be a simple String or an internet MimeMessage . A recipient can be something like an user or a distribution list.

See Also:
ChannelFactory, IRecipient, MimeMessage

Method Summary
 java.lang.String getDescription()
          Get the channel's displayable name.
 java.lang.String getDescription(java.util.Locale locale)
          Get the channel's displayable name for a specific locale.
 javax.mail.internet.MimeMessage getEmptyMessage()
          Get an empty internet mime message.
 java.lang.String getID()
          Get the channel's unique system id.
 java.lang.String getRecipientAddress(IRecipient recipient)
          Get the given recipient's channel address in the channel's specific format.
 java.lang.String getType()
          Get the channel's type.
 void sendTo(java.lang.String[] to, java.lang.String from, javax.mail.internet.MimeMessage mimemessage)
          Send a mime message via this channel to the given addresses.
 void sendTo(java.lang.String[] to, java.lang.String from, java.lang.String title, java.lang.String messagetext, java.lang.String type)
          Send a message text via this channel to the given addresses.
 void sendTo(java.lang.String[] to, java.lang.String from, java.lang.String title, java.lang.String messagetext, java.lang.String type, java.lang.String encoding)
          Send a message text via this channel to the given addresses.
 void sendTo(java.lang.String to, java.lang.String from, javax.mail.internet.MimeMessage mimemessage)
          Send a mime message via this channel to the given address.
 void sendTo(java.lang.String to, java.lang.String from, java.lang.String title, java.lang.String messagetext, java.lang.String type)
          Send a message text via this channel to the given address.
 void sendTo(java.lang.String to, java.lang.String from, java.lang.String title, java.lang.String messagetext, java.lang.String type, java.lang.String encoding)
          Send a message text via this channel to the given address.
 

Method Detail

getType

public java.lang.String getType()
Get the channel's type.
Returns:
a String with the channel's type, for example EMAIL .
See Also:
ChannelFactory

getID

public java.lang.String getID()
Get the channel's unique system id.
Returns:
a String with the channel's system id.

getDescription

public java.lang.String getDescription()
Get the channel's displayable name.
Returns:
a String with the channel's displayable name.

getDescription

public java.lang.String getDescription(java.util.Locale locale)
Get the channel's displayable name for a specific locale.
Parameters:
locale - a Locale defining the language to get the name for.
Returns:
a String with the channel's displayable name in the given locale.

getRecipientAddress

public java.lang.String getRecipientAddress(IRecipient recipient)
                                     throws WcmException
Get the given recipient's channel address in the channel's specific format.
Parameters:
recipient - an IRecipient to get the channel's address for.
Returns:
a String with the address of the given recipient in the channel's specific format; null if the given recipient has no address for this channel.
Throws:
- WcmException if there was an error while resolving the recipient's address for this channel.

getEmptyMessage

public javax.mail.internet.MimeMessage getEmptyMessage()
                                                throws WcmException
Get an empty internet mime message.
Returns:
an empty MimeMessage (see javax.mail.internet.MimeMessage ).
Throws:
- WcmException if there was an error while creating the mime message.

sendTo

public void sendTo(java.lang.String to,
                   java.lang.String from,
                   java.lang.String title,
                   java.lang.String messagetext,
                   java.lang.String type)
            throws WcmException
Send a message text via this channel to the given address.
Parameters:
to - a String with the address of the receiver in the channel's specific format.
from - a String with the address of the sender in the channel's specific format.
title - a String with the title for the message.
messagetext - a String with the content of the message to send.
type - a String with the mimetype of message, for example text/plain .
Throws:
- WcmException if there was an error while sending the message.
PartialSendException - if the message was sent only parially (to some recipients).

sendTo

public void sendTo(java.lang.String to,
                   java.lang.String from,
                   java.lang.String title,
                   java.lang.String messagetext,
                   java.lang.String type,
                   java.lang.String encoding)
            throws WcmException
Send a message text via this channel to the given address.
Parameters:
to - a String with the address of the receiver in the channel's specific format.
from - a String with the address of the sender in the channel's specific format.
title - a String with the title for the message.
messagetext - a String with the content of the message to send.
type - a String with the mimetype of message, for example text/plain .
encoding - a String with the encoding for the message
Throws:
- WcmException if there was an error while sending the message.
PartialSendException - if the message was sent only parially (to some recipients).

sendTo

public void sendTo(java.lang.String[] to,
                   java.lang.String from,
                   java.lang.String title,
                   java.lang.String messagetext,
                   java.lang.String type)
            throws WcmException
Send a message text via this channel to the given addresses.
Parameters:
to - an array of Strings with the addresses of the receivers in the channel's specific format.
from - a String with the address of the sender in the channel's specific format.
title - a String with the title for the message.
messagetext - a String with the content of the message to send.
type - a String with the mimetype of message, for example text/plain .
Throws:
- WcmException if there was an error while sending the message.
PartialSendException - if the message was sent only parially (to some recipients).

sendTo

public void sendTo(java.lang.String[] to,
                   java.lang.String from,
                   java.lang.String title,
                   java.lang.String messagetext,
                   java.lang.String type,
                   java.lang.String encoding)
            throws WcmException
Send a message text via this channel to the given addresses.
Parameters:
to - an array of Strings with the addresses of the receivers in the channel's specific format.
from - a String with the address of the sender in the channel's specific format.
title - a String with the title for the message.
messagetext - a String with the content of the message to send.
type - a String with the mimetype of message, for example text/plain .
encoding - a String with the encoding for this message
Throws:
- WcmException if there was an error while sending the message.
PartialSendException - if the message was sent only parially (to some recipients).

sendTo

public void sendTo(java.lang.String to,
                   java.lang.String from,
                   javax.mail.internet.MimeMessage mimemessage)
            throws WcmException
Send a mime message via this channel to the given address.
Parameters:
to - a String with the address of the receiver in the channel's specific format.
from - a String with the address of the sender in the channel's specific format.
mimemessage - an internet MimeMessage with the content of the message to send (see javax.mail.internet.MimeMessage ).
Throws:
- WcmException if there was an error while sending the message.
PartialSendException - if the message was sent only parially (to some recipients).

sendTo

public void sendTo(java.lang.String[] to,
                   java.lang.String from,
                   javax.mail.internet.MimeMessage mimemessage)
            throws WcmException
Send a mime message via this channel to the given addresses.
Parameters:
to - an array of String s with the addresses of the receivers in the channel's specific format.
from - a String with the address of the sender in the channel's specific format.
mimemessage - an internet MimeMessage with the content of the message to send (see javax.mail.internet.MimeMessage ).
Throws:
- WcmException if there was an error while sending the message.
PartialSendException - if the message was sent only parially (to some recipients).

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.