|
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.GatewayUtil
public class GatewayUtil
Field Summary | |
---|---|
static java.lang.String[] |
AGENT_HEADER_NAMES
List of likely headers which can contain user agent info |
static java.lang.String |
DEFAULT_CHARACTER_SET
|
static java.lang.String |
DUMMY_PARENT_HEADER
Used to mark a message as a Jive created message |
static java.lang.String |
GATEWAY_MESSAGE_ID
|
static java.lang.String |
USER_AGENT_PROPERTY
Used to store user agent which posted the message as a message property. |
Constructor Summary | |
---|---|
protected |
GatewayUtil()
|
Method Summary | |
---|---|
static java.lang.String |
cleanseHTMLForImport(java.lang.String html)
Prepares a full HTML document to be imported as a forum message. |
static java.lang.String |
getCharacterSet(java.lang.String contentType,
java.lang.String defaultCharacterSet)
|
static java.lang.String |
getEncodedSpace(java.lang.String charset,
java.lang.String encoding)
|
static java.lang.String |
getFromEmail(java.lang.String fromHeader)
Retrieve the from email address from the provided message object. |
static java.lang.String |
getFromName(java.lang.String fromHeader)
Retrieve the from email name. |
static java.lang.String |
getRFC2047DecodedString(java.lang.String str)
Utility method to decode strings that may have rfc 2047 encoded words in them. |
static java.lang.String |
getTranslatedFooter(ForumMessage message,
java.lang.String exportFooter)
Gets the export footer for a message, which is the footer with all tokens replaced with correct values. |
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 DEFAULT_CHARACTER_SET
public static final java.lang.String DUMMY_PARENT_HEADER
public static final java.lang.String USER_AGENT_PROPERTY
public static final java.lang.String[] AGENT_HEADER_NAMES
public static final java.lang.String GATEWAY_MESSAGE_ID
Constructor Detail |
---|
protected GatewayUtil()
Method Detail |
---|
public static java.lang.String getTranslatedFooter(ForumMessage message, java.lang.String exportFooter)
public static java.lang.String cleanseHTMLForImport(java.lang.String html)
html
- the original HTML document.
public static java.lang.String getFromEmail(java.lang.String fromHeader)
Don't let javaMail parse the address since it sometimes won't handle odd addresses.
In most cases we default to returning the whole from string if we can't determine the email address because of a poorly formatted header.
fromHeader
- the from header.
public static java.lang.String getFromName(java.lang.String fromHeader)
Don't let javaMail parse the address since it sometimes won't handle odd addresses like the following one I found "Mike [remove (SPAM_BLOCKER) from my email address to reply]"
In most cases we default to returning the whole from string if we can't determine the name because of a poorly formatted header.
fromHeader
- the from header.
public static java.lang.String getRFC2047DecodedString(java.lang.String str)
str
- the string to decode.
public static java.lang.String getEncodedSpace(java.lang.String charset, java.lang.String encoding) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public static java.lang.String getCharacterSet(java.lang.String contentType, java.lang.String defaultCharacterSet)
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |