org.brains2b.coffee.message
Class NewsGroupImpl

java.lang.Object
  extended by org.brains2b.coffee.message.NewsGroupImpl
All Implemented Interfaces:
NewsGroup, NNTPMessage
Direct Known Subclasses:
BundleNewsGroup, Subscription

public class NewsGroupImpl
extends java.lang.Object
implements NewsGroup, NNTPMessage

Default implementation of NewsGroup

Version:
0.90 [25-02-2008]
Author:
dennis@brains2b.nl

Field Summary
protected  java.util.List m_articleList
           
 
Constructor Summary
NewsGroupImpl()
           
 
Method Summary
 void addArticle(Article a)
           
 void addHeader(int id, java.lang.String s)
           
 void addLine(java.lang.String s)
           
 void endMessage()
           
 java.util.List getArticleList()
           
protected  org.xml.sax.Attributes getAttributes()
           
 int getEstimate()
           
 int getFirst()
           
 java.lang.String getId()
           
 int getLast()
           
 java.util.Date getLastUpdated()
           
 java.lang.String getName()
           
 int getSize()
           
 int getType()
           
 boolean hasContent()
           
 boolean isAllowPost()
           
 boolean isHeaderSet()
           
 void removeArticle(Article a)
           
 void setAllowPost(boolean allowPost)
           
 void setArticleList(java.util.List articleList)
           
 void setEstimate(int estimate)
           
 void setFirst(int first)
           
 void setLast(int last)
           
 void setLastUpdated(java.util.Date lastUpdated)
           
 void setName(java.lang.String name)
           
 void writeList(org.brains2b.saxo.SAXWriter sw)
           
 void writeMessage(org.brains2b.saxo.SAXWriter sw)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_articleList

protected java.util.List m_articleList
Constructor Detail

NewsGroupImpl

public NewsGroupImpl()
Method Detail

isAllowPost

public boolean isAllowPost()
Specified by:
isAllowPost in interface NewsGroup

setAllowPost

public void setAllowPost(boolean allowPost)
Specified by:
setAllowPost in interface NewsGroup

getFirst

public int getFirst()
Specified by:
getFirst in interface NewsGroup

setFirst

public void setFirst(int first)
Specified by:
setFirst in interface NewsGroup

getLast

public int getLast()
Specified by:
getLast in interface NewsGroup

setLast

public void setLast(int last)
Specified by:
setLast in interface NewsGroup

getLastUpdated

public java.util.Date getLastUpdated()
Specified by:
getLastUpdated in interface NewsGroup

setLastUpdated

public void setLastUpdated(java.util.Date lastUpdated)
Specified by:
setLastUpdated in interface NewsGroup

getName

public java.lang.String getName()
Specified by:
getName in interface NewsGroup

getId

public java.lang.String getId()
Specified by:
getId in interface NNTPMessage

setName

public void setName(java.lang.String name)
Specified by:
setName in interface NewsGroup

addHeader

public void addHeader(int id,
                      java.lang.String s)
Specified by:
addHeader in interface NNTPMessage

addLine

public void addLine(java.lang.String s)
Specified by:
addLine in interface NNTPMessage

endMessage

public void endMessage()
Specified by:
endMessage in interface NNTPMessage

isHeaderSet

public boolean isHeaderSet()
Specified by:
isHeaderSet in interface NNTPMessage

getEstimate

public int getEstimate()
Specified by:
getEstimate in interface NewsGroup

setEstimate

public void setEstimate(int estimate)
Specified by:
setEstimate in interface NewsGroup

writeList

public void writeList(org.brains2b.saxo.SAXWriter sw)
               throws org.xml.sax.SAXException
Specified by:
writeList in interface NewsGroup
Throws:
org.xml.sax.SAXException

getAttributes

protected org.xml.sax.Attributes getAttributes()

writeMessage

public void writeMessage(org.brains2b.saxo.SAXWriter sw)
                  throws org.xml.sax.SAXException
Specified by:
writeMessage in interface NNTPMessage
Throws:
org.xml.sax.SAXException

getType

public int getType()
Specified by:
getType in interface NNTPMessage

addArticle

public void addArticle(Article a)
Specified by:
addArticle in interface NewsGroup

removeArticle

public void removeArticle(Article a)
Specified by:
removeArticle in interface NewsGroup

getArticleList

public java.util.List getArticleList()
Specified by:
getArticleList in interface NewsGroup

setArticleList

public void setArticleList(java.util.List articleList)
Specified by:
setArticleList in interface NewsGroup

hasContent

public boolean hasContent()
Specified by:
hasContent in interface NNTPMessage

getSize

public int getSize()
Specified by:
getSize in interface NNTPMessage