|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnan.model.Newsgroup
A representation of an NNTP newsgroup.
Field Summary | |
static int |
ALL_MESSAGES
Integer constant representing that all messages should be cached locally. |
static int |
DEFAULT_MESSAGES
The default number of messages to cache locally. |
static java.lang.String |
XML_FIRST_ARTICLE
XML tag for the first article property. |
static java.lang.String |
XML_LAST_ARTICLE
XML tag for the last article property. |
static java.lang.String |
XML_MESSAGES
XML tag for the messages property. |
static java.lang.String |
XML_NAME
XML tag for the name property. |
static java.lang.String |
XML_NEXT_ARTICLE
XML tag for the next article property. |
static java.lang.String |
XML_POSTING_ALLOWED
XML tag for the posting allowed property. |
static java.lang.String |
XML_TAG
XML tag for serialization. |
static java.lang.String |
XML_UPDATED
XML tag for the updated property. |
Constructor Summary | |
protected |
Newsgroup()
Creates a new Newsgroup object. |
|
Newsgroup(java.lang.String name,
boolean postingAllowed,
int messages)
Creates a new Newsgroup object. |
Method Summary | |
int |
compareTo(java.lang.Object object)
Compares this Newsgroup to another object for lexiographic equivalence by Newsgroup name. |
boolean |
equals(java.lang.Object object)
Tests for equivalence with another object. |
MessageTree |
getCache()
Gets the local cache. |
int |
getFirstArticle()
Gets the first article id in this Newsgroup. |
int |
getLastArticle()
Gets the last article id in this Newsgroup. |
int |
getMessages()
Gets the number of messages to cache locally. |
java.lang.String |
getName()
Gets the name of this Newsgroup. |
int |
getNextArticle()
Gets the next article in need of retrieval. |
java.util.Date |
getUpdated()
Gets the last update time. |
boolean |
hasCache()
Asks if this Newsgroup has a current cache. |
boolean |
isPostingAllowed()
Asks if this Newsgroup permits posting. |
void |
setCache(MessageTree cache)
Sets the local cache. |
void |
setFirstArticle(int firstArticle)
Sets the first article id in this Newsgroup. |
void |
setLastArticle(int lastArticle)
Sets the last article id in this Newsgroup. |
void |
setMessages(int messages)
Sets the number of messages to cache locally. |
void |
setName(java.lang.String name)
Sets the name of this Newsgroup. |
void |
setNextArticle(int nextArticle)
Sets the next article in need of retrieval. |
void |
setPostingAllowed(boolean postingAllowed)
Sets whether posting is allowed on this Newsgroup or not. |
void |
setUpdated()
Sets the current time as the last update time. |
protected void |
setUpdated(java.util.Date date)
Sets the last update time. |
java.lang.String |
toString()
Returns a String representation of this Newsgroup. |
org.dom4j.Document |
toXML()
Converts an object into an XML Document. |
void |
transpose(java.lang.Object object)
Transposes (copies over) the values of another object of the same type onto this one. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String XML_TAG
public static final java.lang.String XML_NAME
public static final java.lang.String XML_FIRST_ARTICLE
public static final java.lang.String XML_LAST_ARTICLE
public static final java.lang.String XML_NEXT_ARTICLE
public static final java.lang.String XML_POSTING_ALLOWED
public static final java.lang.String XML_UPDATED
public static final java.lang.String XML_MESSAGES
public static final int DEFAULT_MESSAGES
public static final int ALL_MESSAGES
Constructor Detail |
public Newsgroup(java.lang.String name, boolean postingAllowed, int messages)
name
- The name of this Newsgroup.postingAllowed
- Whether this Newsgroup permits posting.messages
- The number of messages to cache locally (0 = all).protected Newsgroup()
Method Detail |
public java.lang.String getName()
public void setName(java.lang.String name)
name
- The name.public int getFirstArticle()
public void setFirstArticle(int firstArticle)
firstArticle
- The first article id.public int getLastArticle()
public void setLastArticle(int lastArticle)
lastArticle
- The last article id.public int getNextArticle()
public void setNextArticle(int nextArticle)
nextArticle
- The next article number.public boolean isPostingAllowed()
public void setPostingAllowed(boolean postingAllowed)
postingAllowed
- true if posting is allowed; false otherwise.public boolean hasCache()
public MessageTree getCache()
public void setCache(MessageTree cache)
cache
- The MessageTree cache.protected void setUpdated(java.util.Date date)
date
- The new Date.public void setUpdated()
public java.util.Date getUpdated()
public int getMessages()
public void setMessages(int messages)
messages
- The number of messages.public org.dom4j.Document toXML()
toXML
in interface XMLSerializable
public int compareTo(java.lang.Object object)
compareTo
in interface java.lang.Comparable
object
- The object to compare with.
public boolean equals(java.lang.Object object)
object
- The other object to test equivalence with.
public void transpose(java.lang.Object object)
transpose
in interface Transposer
object
- The object to transpose over this one.public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |