|
jACOB 2.7 API Documentation. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.tif.jacob.messaging.Message
public class Message
Common messaging class to either send
Except of alerts, messages will first by queued and afterwards processed (asynchronously) by means of the jAN application.
Note: By default jAN supports email and HTML email only. Nevertheless, the jAN application can be extended accordingly to support further kinds of message protocols.
| Field Summary | |
|---|---|
static java.lang.String |
EMAIL_HTML_PROTOCOL_NAME
Html email protocol name, i.e. |
static java.lang.String |
EMAIL_PROTOCOL_NAME
Email protocol name, i.e. |
static java.lang.String |
FAX_PROTOCOL_NAME
FAX protocol name, i.e. |
static java.lang.String |
PROTOCOL_HEADER_SUFFIX
The protocol header suffix to be used in recipient urls, i.e. |
static java.lang.String |
RCS_ID
The internal revision control system id. |
static java.lang.String |
RCS_REV
The internal revision control system id in short form. |
static java.lang.String |
SMS_PROTOCOL_NAME
SMS protocol name, i.e. |
| Constructor Summary | |
|---|---|
Message(java.lang.String recipientUrl,
java.lang.String message)
Generic message constructor. |
|
| Method Summary | |
|---|---|
void |
addAttachment(DataDocumentValue document)
Adds a document as attachment to this message. |
void |
addAttachment(java.lang.String mimeType,
DataDocumentValue document)
Adds a document as attachment to this message. |
void |
addAttachment(java.lang.String mimeType,
java.lang.String fileName,
byte[] fileContent)
Adds a file as attachment to this message. |
static Message |
createEMailMessage(java.lang.String recipient,
java.lang.String message)
Creates an email message. |
static Message |
createHtmlEMailMessage(java.lang.String recipient,
java.lang.String message)
Creates a HTML formated email message. |
static java.lang.String |
getMimeType(java.lang.String fileName)
Returns the default mime type of a given file name. |
void |
send()
Sends the message, i.e. the message is queued for jAN processing. |
static void |
sendAlert(java.lang.String recipient,
java.lang.String message)
Sends an alert message. |
static void |
sendAlert(java.lang.String recipient,
java.lang.String message,
java.lang.String url)
Sends an alert message with an url. |
static void |
sendEMail(java.lang.String recipient,
java.lang.String message)
Deprecated. Use createEMailMessage(String, String) instead. |
static void |
sendFAX(java.lang.String recipient,
java.lang.String message)
Sends a fax message via jAN. |
static void |
sendHtmlEMail(java.lang.String recipient,
java.lang.String message)
Deprecated. Use createHtmlEMailMessage(String, String) instead. |
static void |
sendSMS(java.lang.String recipient,
java.lang.String message)
Sends a SMS message via jAN. |
void |
setSender(java.lang.String sender)
Sets the sender of the message. |
void |
setSenderAddr(java.lang.String senderAddr)
Sets the address of the sender of the message. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final transient java.lang.String RCS_ID
public static final transient java.lang.String RCS_REV
public static final java.lang.String PROTOCOL_HEADER_SUFFIX
"://".
- See Also:
Message(String, String),
Constant Field Values
public static final java.lang.String EMAIL_PROTOCOL_NAME
"email".
Email recipient urls should be as follows:
email://my@email.com[,my2@email.com,my3@email.com]
- See Also:
Message(String, String),
Constant Field Values
public static final java.lang.String EMAIL_HTML_PROTOCOL_NAME
"htmlemail".
Html email recipient urls should be as follows:
htmlemail://my@email.com[,my2@email.com,my3@email.com]
- See Also:
Message(String, String),
Constant Field Values
public static final java.lang.String SMS_PROTOCOL_NAME
"sms".
SMS recipient urls should be as follows:
sms://phonenbr[,phonenbr2,phonenbr3]
- See Also:
Message(String, String),
Constant Field Values
public static final java.lang.String FAX_PROTOCOL_NAME
"fax".
FAX recipient urls should be as follows:
fax://phonenbr[,phonenbr2,phonenbr3]
- See Also:
Message(String, String),
Constant Field Values
| Constructor Detail |
|---|
public Message(java.lang.String recipientUrl,
java.lang.String message)
Use this constructor to send a jAN message via any type of protocol. Nevertheless, the jAN application has to be extended accordingly.
recipientUrl - the recipient URL of this message, which must be structured as
follows:message - the message to send| Method Detail |
|---|
public void setSender(java.lang.String sender)
Note: If the sender is not explicitly set by this method, the sender will be set implicitly to the full name (@link IUser#getFullName()) of the invoking user (@link Context#getUser()}.
sender - the sender to set or null to let jAN determine the
sender.public void setSenderAddr(java.lang.String senderAddr)
Note: If the sender address is not explicitly set by this method, the sender address will be set implicitly to the email address (@link IUser#getEMail()) of the invoking user (@link Context#getUser()}.
senderAddr - the sender address to set or null to let jAN
determine the sender address.public void addAttachment(DataDocumentValue document)
document - the document value to add as attachmentIDataRecord.getDocumentValue(String)
public void addAttachment(java.lang.String mimeType,
DataDocumentValue document)
mimeType - the mime type to use or null for default mime typedocument - the document value to add as attachmentIDataRecord.getDocumentValue(String),
getMimeType(String)
public void addAttachment(java.lang.String mimeType,
java.lang.String fileName,
byte[] fileContent)
mimeType - the mime type to use or null for default mime typefileName - the file namefileContent - the file contentpublic static java.lang.String getMimeType(java.lang.String fileName)
fileName - the file name
public void send()
throws java.lang.Exception
java.lang.Exception - if the message could not be queued
public static void sendSMS(java.lang.String recipient,
java.lang.String message)
throws java.lang.Exception
recipient - the SMS recipientmessage - the SMS message
java.lang.Exception - on any problem sending this message
public static void sendEMail(java.lang.String recipient,
java.lang.String message)
throws java.lang.Exception
createEMailMessage(String, String) instead.
recipient - the email recipient.
Note: To send an email message to multiple recipients
recipient must be a comma separated list of email
addresses.
message - the email message.java.lang.Exception - on any problem sending this messagepublic static Message createEMailMessage(java.lang.String recipient, java.lang.String message)
Call send() to really release the returned message.
recipient - the email recipient.
Note: To send an email message to multiple recipients
recipient must be a comma separated list of email
addresses.
message - the email content.
public static void sendHtmlEMail(java.lang.String recipient,
java.lang.String message)
throws java.lang.Exception
createHtmlEMailMessage(String, String) instead.
recipient - the email recipient.
Note: To send an email message to multiple recipients
recipient must be a comma separated list of email
addresses.
message - the email message.java.lang.Exception - on any problem sending this messagepublic static Message createHtmlEMailMessage(java.lang.String recipient, java.lang.String message)
Call send() to really release the returned message.
recipient - the email recipient.
Note: To send an email message to multiple recipients
recipient must be a comma separated list of email
addresses.
message - the email content.
public static void sendFAX(java.lang.String recipient,
java.lang.String message)
throws java.lang.Exception
recipient - the FAX recipientmessage - the fax message
java.lang.Exception - on any problem
public static void sendAlert(java.lang.String recipient,
java.lang.String message)
throws java.lang.Exception
recipient - the alert recipientmessage - the alert message
java.lang.Exception - on any problem
public static void sendAlert(java.lang.String recipient,
java.lang.String message,
java.lang.String url)
throws java.lang.Exception
Attention: This does not work for Quintus migration projects!
recipient - the alert recipientmessage - the alert messageurl - the (entrypoint) url to be invoked, if the alert is selected by an
user
java.lang.Exception - on any problem
|
jACOB 2.7 API Documentation. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||