|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.forum.gateway.SmtpExporter
public class SmtpExporter
A gateway that performs exports through SMTP.
Constructor Summary | |
---|---|
SmtpExporter(ForumFactory factory,
Forum forum,
GatewaySettings gatewaySettings)
Create a new SmtpExporter instance. |
Method Summary | |
---|---|
void |
exportData(ForumMessage forumMessage)
Export a forum message to a SMTP server. |
void |
exportData(ForumMessage[] forumMessage)
Export an array of forum message to a SMTP server. |
java.lang.String |
getDefaultFromAddress()
From email address to send mail from for export. |
java.lang.String |
getHost()
Returns the SMTP host (eg mail.example.com). |
java.util.Date |
getLastExport()
Last date this exporter completed |
java.lang.String |
getOrganization()
Retrieves the Organization header for outbound smtp messages. |
java.lang.String |
getPassword()
Returns the password that will be used when connecting to the SMTP server. |
int |
getPort()
Returns the port number that will be used when connecting to the SMTP server. |
java.lang.String |
getReplyToAddress()
Returns the reply to address for export. |
java.lang.String |
getSpecialCharacterSet()
Returns the special encoding for the email output, or null. |
java.lang.String |
getToAddress()
Returns the email address that messages will be sent to during exports. |
java.lang.String |
getUsername()
Returns the username that will be used when connecting to the SMTP server. |
boolean |
isAllowExportAgain()
Return whether this gateway will allow reexporting of messages or not. |
boolean |
isAttachmentsEnabled()
|
boolean |
isDebugEnabled()
Returns true if debugging is turned on for the email transport layers. |
boolean |
isEmailPrefEnabled()
Returns true if a user's privacy setting on their email address should be obeyed when doing an export. |
boolean |
isFromAddressOnly()
Returns true if the default from address should be used exclusively when sending email, ignoring the user's preferences. |
boolean |
isSSLEnabled()
Checks to see if this gateway is configured for SSL connections to the SMTP server or not. |
boolean |
isUpdateMessageIDOnExport()
Retrieve whether the gateway will update the messageID message property stored in Jive upon export of a message. |
void |
setAllowExportAgain(boolean allowExportAgain)
By default this gateway refuses to re-export a message which has previously been exported or imported or which was automatically created for threading purposes by an import gateway. |
void |
setAttachmentsEnabled(boolean attachmentsEnabled)
|
void |
setDebugEnabled(boolean debugEnabled)
Toggles SMTP transport layer debugging on or off. |
void |
setDefaultFromAddress(java.lang.String address)
Set the from email address for message export. |
void |
setEmailPrefEnabled(boolean enabled)
Toggles whether a user's privacy setting on their email address should be obeyed when doing an export. |
void |
setFromAddressOnly(boolean enabled)
Toggles whether to exclusively use the default from address when sending email and ignore the users's preferences. |
void |
setHost(java.lang.String host)
Sets the SMTP host (eg mail.example.com). |
void |
setOrganization(java.lang.String organization)
Sets the Organization header for outbound smtp messages. |
void |
setPassword(java.lang.String password)
Sets the username that will be used when connecting to the SMTP server. |
void |
setPort(int port)
Sets the port number that will be used when connecting to the SMTP server. |
void |
setReplyToAddress(java.lang.String address)
Set the reply-to email address for message export. |
void |
setSpecialCharacterSet(java.lang.String specialCharacterSet)
Sets the special encoding for the forum. |
void |
setSSLEnabled(boolean sslEnabled)
Sets whether this gateway is configured for SSL connections to the SMTP server or not. |
void |
setToAddress(java.lang.String address)
Sets the email address that messages will be sent to during exports. |
void |
setUpdateMessageIDOnExport(boolean updateMessageID)
Sets whether the gateway will update the messageID message property stored in Jive upon export of a message. |
void |
setUsername(java.lang.String username)
Sets the username that will be used when connecting to the SMTP server. |
void |
stop()
Stop a running export. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SmtpExporter(ForumFactory factory, Forum forum, GatewaySettings gatewaySettings)
Method Detail |
---|
public void exportData(ForumMessage forumMessage) throws GatewayException
NOTE: It is imperative that parent messages get exported prior to children messages so that the proper message headers can be set. Failure to do this will result in messages that may not be threaded properly when viewed using a mailreader.
exportData
in interface GatewayExporter
forumMessage
- the message to export.
GatewayException
- if a connection was unable to be established.public void exportData(ForumMessage[] forumMessage) throws GatewayException
NOTE: It is imperative that parent messages get exported prior to children messages so that the proper message headers can be set. Failure to do this will result in messages that may not be threaded properly when viewed using a mailreader. Therefore, parent messages should be first in the list.
exportData
in interface GatewayExporter
forumMessage
- array of messages to export, sorted parents first.
GatewayException
- if a connection was unable to be established.public void stop() throws GatewayException
GatewayExporter
stop
in interface GatewayExporter
GatewayException
public java.lang.String getHost()
public void setHost(java.lang.String host)
host
- the SMTP host.public int getPort()
public void setPort(int port)
port
- the SMTP port number.public java.lang.String getUsername()
public void setUsername(java.lang.String username)
username
- the SMTP username.public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- the SMTP password.public boolean isDebugEnabled()
public void setDebugEnabled(boolean debugEnabled)
debugEnabled
- true if SMTP debugging should be enabled.public boolean isEmailPrefEnabled()
public void setEmailPrefEnabled(boolean enabled)
enabled
- true if a user's privacy settings are respected during
exports.public boolean isFromAddressOnly()
public void setFromAddressOnly(boolean enabled)
enabled
- true if the default from address should be used exclusively
when sending email, ignoring the user's preferences. False otherwise.public java.lang.String getToAddress()
public void setToAddress(java.lang.String address)
address
- the email address that will receive exported messages.public java.lang.String getDefaultFromAddress()
public void setDefaultFromAddress(java.lang.String address)
address
- public java.lang.String getReplyToAddress()
public void setReplyToAddress(java.lang.String address)
address
- public boolean isSSLEnabled()
public void setSSLEnabled(boolean sslEnabled)
sslEnabled
- true if ssl should be enabled, false otherwise.public java.lang.String getOrganization()
public void setOrganization(java.lang.String organization)
organization
- the string to set the organization header to.public boolean isUpdateMessageIDOnExport()
Note: This setting has no effect unless accompanied by setAllowExportAgain(true).
public void setUpdateMessageIDOnExport(boolean updateMessageID)
Note: This setting has no effect unless accompanied by setAllowExportAgain(true).
updateMessageID
- true if Jive should be updated with the messageID
of exported messages, false otherwise.public boolean isAllowExportAgain()
public void setAllowExportAgain(boolean allowExportAgain)
However this can be overridden so that messages can be re-exported again if absolutely needed. Definite care is needed if you set the property to true.
Please note however that dummy messages will *never* be exported.
allowExportAgain
- true if messages should be allowed to be
reexported, false otherwise.public boolean isAttachmentsEnabled()
public void setAttachmentsEnabled(boolean attachmentsEnabled)
public java.lang.String getSpecialCharacterSet()
public void setSpecialCharacterSet(java.lang.String specialCharacterSet)
specialCharacterSet
- the encoding to send email messages with,
or null to use Jive's normal encoding.public java.util.Date getLastExport()
GatewayExporter
getLastExport
in interface GatewayExporter
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |