Package org.apache.commons.net.nntp
Class NewsgroupInfo
java.lang.Object
org.apache.commons.net.nntp.NewsgroupInfo
NewsgroupInfo stores information pertaining to a newsgroup returned by the NNTP GROUP, LIST, and NEWGROUPS commands, implemented by
selectNewsgroup , listNewsgroups
, and listNewNewsgroups respectively.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate longprivate longprivate longstatic final intA constant indicating that a newsgroup is moderated.private Stringstatic final intA constant indicating that a newsgroup is public and unmoderated.private intstatic final intA constant indicating that a newsgroup is closed for general posting.static final intA constant indicating that the posting permission of a newsgroup is unknown. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintDeprecated.longGet the estimated number of articles in the newsgroup.intDeprecated.longGet the number of the first article in the newsgroup.intDeprecated.longGet the number of the last article in the newsgroup.Get the newsgroup name.intGet the posting permission of the newsgroup.(package private) voidsetArticleCount(long count) (package private) voidsetFirstArticle(long first) (package private) voidsetLastArticle(long last) (package private) voidsetNewsgroup(String newsgroup) (package private) voidsetPostingPermission(int permission)
-
Field Details
-
UNKNOWN_POSTING_PERMISSION
public static final int UNKNOWN_POSTING_PERMISSIONA constant indicating that the posting permission of a newsgroup is unknown. For example, the NNTP GROUP command does not return posting information, so NewsgroupInfo instances obtained from that command will have an UNKNOWN_POSTING_PERMISSION.- See Also:
-
MODERATED_POSTING_PERMISSION
public static final int MODERATED_POSTING_PERMISSIONA constant indicating that a newsgroup is moderated.- See Also:
-
PERMITTED_POSTING_PERMISSION
public static final int PERMITTED_POSTING_PERMISSIONA constant indicating that a newsgroup is public and unmoderated.- See Also:
-
PROHIBITED_POSTING_PERMISSION
public static final int PROHIBITED_POSTING_PERMISSIONA constant indicating that a newsgroup is closed for general posting.- See Also:
-
newsgroup
-
estimatedArticleCount
private long estimatedArticleCount -
firstArticle
private long firstArticle -
lastArticle
private long lastArticle -
postingPermission
private int postingPermission
-
-
Constructor Details
-
NewsgroupInfo
public NewsgroupInfo()
-
-
Method Details
-
getArticleCount
Deprecated. -
getArticleCountLong
public long getArticleCountLong()Get the estimated number of articles in the newsgroup. The accuracy of this value will depend on the server implementation.- Returns:
- The estimated number of articles in the newsgroup.
-
getFirstArticle
Deprecated. -
getFirstArticleLong
public long getFirstArticleLong()Get the number of the first article in the newsgroup.- Returns:
- The number of the first article in the newsgroup.
-
getLastArticle
Deprecated. -
getLastArticleLong
public long getLastArticleLong()Get the number of the last article in the newsgroup.- Returns:
- The number of the last article in the newsgroup.
-
getNewsgroup
Get the newsgroup name.- Returns:
- The name of the newsgroup.
-
getPostingPermission
public int getPostingPermission()Get the posting permission of the newsgroup. This will be one of thePOSTING_PERMISSIONconstants.- Returns:
- The posting permission status of the newsgroup.
-
setArticleCount
void setArticleCount(long count) -
setFirstArticle
void setFirstArticle(long first) -
setLastArticle
void setLastArticle(long last) -
setNewsgroup
-
setPostingPermission
void setPostingPermission(int permission)
-