|
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.Pop3Importer
public class Pop3Importer
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 POP3 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 | |
---|---|
Pop3Importer(ForumFactory factory,
Forum forum,
GatewaySettings settings)
Create a new Pop3Importer 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 |
getHost()
Returns the POP3 host (eg 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 POP3 server. |
int |
getPort()
Returns the port number that will be used when connecting to the POP3 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 POP3 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 POP3 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 POP3 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 SMTP 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 POP3DeleteEnabled)
Toggles the POP3 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 |
setHost(java.lang.String host)
Sets the POP3 host (eg 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 POP3 server. |
void |
setPort(int port)
Sets the port number that will be used when connecting to the POP3 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 POP3 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 POP3 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 Pop3Importer(ForumFactory factory, Forum forum, GatewaySettings settings)
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 POP3 host.public int getPort()
public void setPort(int port)
port
- the POP3 port number.public java.lang.String getUsername()
public void setUsername(java.lang.String username)
username
- the POP3 username.public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- the POP3 password.public boolean isDeleteEnabled()
public void setDeleteEnabled(boolean POP3DeleteEnabled)
POP3DeleteEnabled
- true if messages should be deleted from the
POP3 server after being downloaded.public boolean isDebugEnabled()
public void setDebugEnabled(boolean debugEnabled)
debugEnabled
- true if SMTP 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 POP3 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 java.util.Date getLastImport()
GatewayImporter
getLastImport
in interface GatewayImporter
public boolean isImporting()
isImporting
in interface GatewayImporter
public void setImporting(boolean importing)
setImporting
in interface GatewayImporter
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |