|
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.ImapImporter
public class ImapImporter
A gateway to import to a forum with the contents of an email account or a mailing list. For example, say you want to import the mailing list mail-list@example.com. To accomplish this you'd create and use a IMAP account that was subscribed to the list, for example mail-list-robot@example.com.
The following properties must be set with valid values before importing can work:
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.jivesoftware.forum.gateway.GatewayImporter |
---|
GatewayImporter.Stats |
Field Summary | |
---|---|
static java.lang.String |
GATEWAY_MESSAGE_ID
Used to flag messages in the forum with a message id Specific to this gateway |
static java.lang.String |
GATEWAY_PARENT_ID
Used to flag messages in the forum with a parent id Specific to this gateway |
Constructor Summary | |
---|---|
ImapImporter(ForumFactory factory,
Forum forum,
GatewaySettings gatewaySettings)
Create a new ImapImporter instance. |
Method Summary | |
---|---|
java.lang.String |
getDefaultCharacterSet()
Returns the character set that will be used to decode inbound messages that have no explicit character set defined. |
java.lang.String |
getEmptySubject()
Returns the string to be used in place of an empty subject. |
java.lang.String |
getFolder()
Returns the name of the root folder to use for retreiving mail from the IMAP server by the javamail IMAP provider. |
java.lang.String |
getHost()
Returns the IMAP host (ie mail.example.com). |
java.util.Date |
getLastImport()
Returns the Last date this importer completed |
java.lang.String |
getPassword()
Returns the password that will be used when connection to the IMAP server. |
int |
getPort()
Returns the port number that will be used when connecting to the IMAP server. |
java.lang.String |
getReplyPrefixes()
Returns a comma seperated of prefixes that will be stripped from messages when attempting to find a parent message via subject line matching. |
GatewayImporter.Stats |
getStats()
|
java.lang.String |
getTemporaryParentBody()
Returns the body that will be used when creating temporary parent messages. |
java.lang.String |
getUsername()
Returns the username that will be used when connection to the IMAP server. |
void |
importData(java.util.Date afterDate)
Import data from the data source into the specified forum. |
boolean |
isAttachmentsEnabled()
Returns true if attachments are allowed for the email transport layers. |
boolean |
isDebugEnabled()
Returns true if debugging is turned on for the email transport layers. |
boolean |
isDeleteEnabled()
Returns true if the IMAP delete flag is set. |
boolean |
isEmailToUserMappingEnabled()
True if email address -> user mapping is enabled, false otherwise. |
boolean |
isImportHtmlEnabled()
True if if the importation of html email is enabled, false otherwise. |
boolean |
isImporting()
|
boolean |
isSSLEnabled()
Returns true if this gateway is configured to connect to the IMAP server using an SSL encrypted connection. |
boolean |
isSubjectParentageCheckEnabled()
Returns whether parentage checks will be done using subject line matching or not. |
void |
setAttachmentsEnabled(boolean attachmentEnabled)
Toggles attachments on or off. |
void |
setDebugEnabled(boolean debugEnabled)
Toggles IMAP transport layer debugging on or off. |
void |
setDefaultCharacterSet(java.lang.String defaultCharacterSet)
Sets the character set that will be used to decode inbound messages that have no explicit character set defined. |
void |
setDeleteEnabled(boolean deleteEnabled)
Toggles the IMAP delete flag. |
void |
setEmailToUserMappingEnabled(boolean emailToUserMappingEnabled)
Sets whether email address -> user mapping is enabled, false otherwise. |
void |
setEmptySubject(java.lang.String emptySubject)
Sets the string to be used in place of an empty subject. |
void |
setFolder(java.lang.String folder)
Sets the name of the root folder to use. |
void |
setHost(java.lang.String host)
Sets the IMAP host (ie mail.example.com). |
void |
setImportHtmlEnabled(boolean importHtmlEnabled)
Sets whether the importation of html email is enabled. |
void |
setImporting(boolean importing)
|
void |
setPassword(java.lang.String password)
Sets the password that will be used when connecting to the IMAP server. |
void |
setPort(int port)
Sets the port number that will be used when connecting to the IMAP server. |
void |
setReplyPrefixes(java.lang.String replyPrefixes)
Sets the possible prefixes that will be stripped from messages when attempting to find a parent message via subject line matching. |
void |
setSSLEnabled(boolean enabled)
Toggles SSL connections to the IMAP server on or off. |
void |
setSubjectParentageCheckEnabled(boolean subjectParentageCheckEnabled)
Sets whether parentage checks will be done using subject line matching or not. |
void |
setTemporaryParentBody(java.lang.String temporaryParentBody)
Sets the body that will be used when creating temporary parent messages. |
void |
setUsername(java.lang.String username)
Sets the username that will be used when connecting to the IMAP server. |
void |
stop()
Stop a running import. |
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 GATEWAY_MESSAGE_ID
public static final java.lang.String GATEWAY_PARENT_ID
Constructor Detail |
---|
public ImapImporter(ForumFactory factory, Forum forum, GatewaySettings gatewaySettings)
Method Detail |
---|
public void importData(java.util.Date afterDate) throws GatewayException
GatewayImporter
importData
in interface GatewayImporter
afterDate
- the oldest cutoff date for data to import.
GatewayException
public void stop() throws GatewayException
GatewayImporter
stop
in interface GatewayImporter
GatewayException
public GatewayImporter.Stats getStats()
getStats
in interface GatewayImporter
public java.lang.String getHost()
public void setHost(java.lang.String host)
host
- the IMAP host.public int getPort()
public void setPort(int port)
port
- the IMAP port number.public java.lang.String getUsername()
public void setUsername(java.lang.String username)
username
- the IMAP username.public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- the IMAP password.public java.lang.String getFolder()
public void setFolder(java.lang.String folder)
folder
- the folder to usepublic boolean isDeleteEnabled()
public void setDeleteEnabled(boolean deleteEnabled)
deleteEnabled
- true if messages should be deleted from the
IMAP server after being downloaded.public boolean isDebugEnabled()
public void setDebugEnabled(boolean debugEnabled)
debugEnabled
- true if IMAP debugging should be enabled.public boolean isAttachmentsEnabled()
public void setAttachmentsEnabled(boolean attachmentEnabled)
attachmentEnabled
- true if attachments should be enabled.public boolean isEmailToUserMappingEnabled()
public void setEmailToUserMappingEnabled(boolean emailToUserMappingEnabled)
emailToUserMappingEnabled
- True if email address -> user mapping is enabled,
false otherwise.public boolean isImportHtmlEnabled()
public void setImportHtmlEnabled(boolean importHtmlEnabled)
importHtmlEnabled
- True if the importation of html email is enabled,
false otherwise.public java.lang.String getDefaultCharacterSet()
public void setDefaultCharacterSet(java.lang.String defaultCharacterSet)
defaultCharacterSet
- the character set that will be used to decode inbound messages
that have no explicit character set defined.public java.lang.String getTemporaryParentBody()
On subsequent imports when a real parent message is found, the fake data will be replaced with the correct subject and body.
public void setTemporaryParentBody(java.lang.String temporaryParentBody)
On subsequent imports when a real parent message is found, the fake data will be replaced with the correct subject and body.
temporaryParentBody
- the message body that will be used for
temporary fake parent messages.public boolean isSSLEnabled()
public void setSSLEnabled(boolean enabled)
enabled
- true if SSL connections to the IMAP server should be enabled.public java.lang.String getReplyPrefixes()
public void setReplyPrefixes(java.lang.String replyPrefixes)
replyPrefixes
- an comma seperated string of lowercase prefixespublic boolean isSubjectParentageCheckEnabled()
public void setSubjectParentageCheckEnabled(boolean subjectParentageCheckEnabled)
subjectParentageCheckEnabled
- true if parentage checks will be done using
subject line matching, false otherwise.public java.lang.String getEmptySubject()
public void setEmptySubject(java.lang.String emptySubject)
emptySubject
- the string to be used in place of an empty subject.public boolean isImporting()
isImporting
in interface GatewayImporter
public void setImporting(boolean importing)
setImporting
in interface GatewayImporter
public java.util.Date getLastImport()
GatewayImporter
getLastImport
in interface GatewayImporter
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |