|
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 |
public interface Article
Represents an article on the system.
Articles should be able to return the entire article or just the body or headers. Articles must exist within the context of one or more news groups. Articles are one of three interfaces (NewsGroup, Article and NewsGroupProvider) that backend storage providers must implement.
NewsGroup
,
Article
Method Summary | |
---|---|
java.lang.String |
getAuthor()
Obtain the author of the article (name <email>). |
int |
getByteCount()
Returns the number of bytes in the article including line terminating <CR-LF> pairs the two extra <CR-LF> pairs separating message body and article body. |
java.lang.String |
getDate()
Obtain the Date the article was posted. |
java.lang.String |
getHead()
Obtain the headers of the article. |
int |
getLineCount()
Returns the number of lines in the article including headers and blank line between headers and body. |
java.lang.String |
getMessageID()
Obtain the message-ID associated with the article. |
java.lang.String |
getNewsGroups()
Obtain the comma separated list newsgroups this article is posted to. |
int |
getNumber()
Obtain the article number of the article. |
java.lang.String |
getReferences()
Obtain the references of the article. |
java.lang.String |
getSubject()
Obtain the subject of the article. |
void |
sendArticle(NNTPResponseBuffer response)
Send the entire article. |
void |
sendBody(NNTPResponseBuffer response)
Send the body of the article. |
Method Detail |
---|
int getNumber()
Obtain the article number of the article. The article number is only relevant when the article was obtained from within the context of an article pointer with valid group. Accessing this method outside of that context, of after the article pointer has been moved can result in exceptions.
java.lang.String getMessageID()
Obtain the message-ID associated with the article.
All message-ID's MUST be surrounded by angle brackets. All articles are identified by a globally unique message-ID. Articles without a message ID header can be supplied with a single digit "0" (zero) within angle brackets. The same article in different newsgroups will have the same message ID (but not the same message number) allowing readers to skip articles previously read in other groups.
java.lang.String getSubject()
Obtain the subject of the article.
This method MUST NOT include any tab or end of line characters. Any such character in this field must be converted to spaces.
java.lang.String getAuthor()
Obtain the author of the article (name <email>).
This method MUST NOT include any tab characters. Any tab character in this field must be converted to spaces.
java.lang.String getDate()
Obtain the Date the article was posted.
Dates must be formatted as standard RFC 822 dates:
Thu Sep 26, 2003 10:43:11 US/Pacific
This method MUST NOT include any tab characters. Any tab character in this field must be converted to spaces.
java.lang.String getReferences()
Obtain the references of the article.
This method MUST NOT include any tab characters. Any tab character in this field must be converted to spaces.
java.lang.String getNewsGroups()
Obtain the comma separated list newsgroups this article is posted to. The list should be generated from the Newsgroups: header of the article (a required header field of all NNTP articles).
This method MUST NOT include any tab characters. Any tab character in this field must be converted to spaces.
int getByteCount()
int getLineCount()
void sendBody(NNTPResponseBuffer response) throws java.io.IOException
Send the body of the article.
The body text may contain any ASCII text. It should not contain the end of article trailing '.'. One will be supplied by the server and any isolated '.' will be escaped as per NNTP rules.
response
- the response buffer to send the body of the article to.
java.io.IOException
void sendArticle(NNTPResponseBuffer response) throws java.io.IOException
Send the entire article.
The articlre text may contain any ASCII text. It should not contain the end of article trailing '.'. One will be supplied by the server and any isolated '.' will be escaped as per NNTP rules.
response
- the response buffer to send the body of the article to.
java.io.IOException
java.lang.String getHead()
Obtain the headers of the article.
The headers text may contain any ASCII text. It should not contain the end of article trailing '.'. Headers must follow RFC-822 message header format:
From: sender
Subject: The message subject
Newsgroups: jive.general, jive.support
Each line should be terminated with a
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |