|
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.nntp.spi.FForumNewsGroupAdapter
public class FForumNewsGroupAdapter
Converts a Forum to an NNTP NewsGroup. The passed in Forum object is by the system on a once-per-NNTP-protocol-command basis. New NNTP commands will retrieve a fresh Forum and wrap a new adapter (so don't worry about saving state, caching, or stale data for the given message). It will be common for the NNTP system to call several access methods on the Forum (e.g. typical name and article numbers defining the range of available articles).
Constructor Summary | |
---|---|
FForumNewsGroupAdapter(Forum forum)
Create a new adapter to wrap the given forum. |
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. |
Forum |
getForum()
Returns the underlying Forum object. |
long |
getID()
Retruns the ID of the newsgroup. |
int |
getLastArticleNumber()
Obtain the last valid group article number in this group. |
java.lang.String |
getName()
Obtain the group name from it's Forum name. |
boolean |
isModerated()
Returns true if the news group is moderated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FForumNewsGroupAdapter(Forum forum)
forum
- the forum to wrap.Method Detail |
---|
public Forum getForum()
public java.lang.String getName()
getName
in interface NewsGroup
public java.lang.String getDescription()
NewsGroup
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.
getDescription
in interface NewsGroup
public boolean isModerated()
NewsGroup
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).
isModerated
in interface NewsGroup
public int getFirstArticleNumber()
NewsGroup
Obtain the first valid group article number in this group.
getFirstArticleNumber
in interface NewsGroup
public int getLastArticleNumber()
NewsGroup
Obtain the last valid group article number in this group.
getLastArticleNumber
in interface NewsGroup
public int getArticleCount()
NewsGroup
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.
getArticleCount
in interface NewsGroup
public Article getArticle(int articleNumber) throws ArticleNotFoundException
NewsGroup
Obtain an article by it's group number.
getArticle
in interface NewsGroup
articleNumber
- the group's article number.
ArticleNotFoundException
- if no article corresponds to the given number.public long getID()
NewsGroup
getID
in interface NewsGroup
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |