Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.nntp
Interface NewsGroup

All Known Implementing Classes:
FForumNewsGroupAdapter

public interface NewsGroup

Represents an NNTP news group allowing the retreival of group information and group content information.

The NewsGroup interface is one of the three primary interfaces (NewsGroup, Article and NewsGroupProvider) that backend storage providers must implement.

See Also:
Article

Method Summary
 Article getArticle(int articleNumber)
          Obtain an article by it's group number.
 int getArticleCount()
          Obtain an estimate on the number of articles in the group.
 java.lang.String getDescription()
          Obtain the bried summary description of the group.
 int getFirstArticleNumber()
          Obtain the first valid group article number in this group.
 long getID()
          Retruns the ID of the newsgroup.
 int getLastArticleNumber()
          Obtain the last valid group article number in this group.
 java.lang.String getName()
          Returns the name of the group.
 boolean isModerated()
          Returns true if the news group is moderated.
 

Method Detail

getID

long getID()
Retruns the ID of the newsgroup.

Returns:
the ID of the newsgroup.

getName

java.lang.String getName()

Returns the name of the group.

Groups are described using unique dot separated heirchical names. Group names may not contain whitespace or non-ASCII characters. Standard open NNTP systems use comp, alt, news, rec, etc prefixes. Private news servers tend to prefix the names with a company name. E.g.:

jive.general
jive.support
jive.products.forums
jive.products.kb

Returns:
the name of the group.

getDescription

java.lang.String getDescription()

Obtain the bried summary description of the group.

Provides a brief description of the news group. NNTP limits line lengths to 512 ASCII characters including the trailing <CR-LF> terminator. Thus there are 510 characters for a line. So the group name + 1 space character, plus the description must equal 510 characters. If the description exceeds this length, the server will truncate the description to fit.

Returns:
a description of the group

isModerated

boolean isModerated()

Returns true if the news group is moderated.

Moderated news groups allow posting, but articles are sent to a moderator who must approve the articles before they appear in their group(s).

Returns:
true if the group is moderated.

getFirstArticleNumber

int getFirstArticleNumber()

Obtain the first valid group article number in this group.

Returns:
The number of the first article in the group

getLastArticleNumber

int getLastArticleNumber()

Obtain the last valid group article number in this group.

Returns:
the last valid article number in the group.

getArticleCount

int getArticleCount()

Obtain an estimate on the number of articles in the group.

This count does not have to be 100% accurate and can be simply the difference between the last and first group number. However, if the server can provide more accurate numbers it will provide a more consistent user experience. Otherwise, the group summary will show one number, but when the reader actually downloads the articles that number will change to reflect the actual count.

Returns:
an estimate on the number of articles in the group.

getArticle

Article getArticle(int articleNumber)
                   throws ArticleNotFoundException

Obtain an article by it's group number.

Parameters:
articleNumber - the group's article number.
Returns:
the article corresponding to that group number.
Throws:
ArticleNotFoundException - if no article corresponds to the given number.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.