org.brains2b.coffee.message.local
Class Subscription

java.lang.Object
  extended by org.brains2b.coffee.message.NewsGroupImpl
      extended by org.brains2b.coffee.message.local.Subscription
All Implemented Interfaces:
java.lang.Cloneable, CoffeeBean, NewsGroup, NNTPMessage

public class Subscription
extends NewsGroupImpl
implements CoffeeBean, java.lang.Cloneable

Subscription is an implementation of NewsGroup holding the groups a user is actually subscribed to.

Holds server as extra information to make sure it can be accessed directly

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

Field Summary
static int SUBSCRIPTION
           
 
Fields inherited from class org.brains2b.coffee.message.NewsGroupImpl
m_articleList
 
Constructor Summary
Subscription()
           
 
Method Summary
 java.lang.Object clone()
           
static Subscription createSubscription(NewsGroup group, ServerDescriptor server)
           
protected  org.xml.sax.Attributes getAttributes()
           
 java.lang.String getServer()
          get the name of the server this subscription resides on
 int getType()
           
 void setAttributes(org.xml.sax.Attributes atts)
           
 void setContent(java.lang.String name, org.xml.sax.Attributes atts, java.lang.String value)
           
 void setServer(java.lang.String server)
          set the name of the server this subscription resides on
 void writeMessage(org.brains2b.saxo.SAXWriter sw)
           
 
Methods inherited from class org.brains2b.coffee.message.NewsGroupImpl
addArticle, addHeader, addLine, endMessage, getArticleList, getEstimate, getFirst, getId, getLast, getLastUpdated, getName, getSize, hasContent, isAllowPost, isHeaderSet, removeArticle, setAllowPost, setArticleList, setEstimate, setFirst, setLast, setLastUpdated, setName, writeList
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.brains2b.coffee.message.NNTPMessage
addHeader, addLine, endMessage, getId, getSize, hasContent, isHeaderSet
 

Field Detail

SUBSCRIPTION

public static final int SUBSCRIPTION
See Also:
Constant Field Values
Constructor Detail

Subscription

public Subscription()
Method Detail

getType

public int getType()
Specified by:
getType in interface NNTPMessage
Overrides:
getType in class NewsGroupImpl

getServer

public java.lang.String getServer()
get the name of the server this subscription resides on

Returns:
String, the name of the server

setServer

public void setServer(java.lang.String server)
set the name of the server this subscription resides on

Parameters:
server - String, the name of the server

writeMessage

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

getAttributes

protected org.xml.sax.Attributes getAttributes()
Overrides:
getAttributes in class NewsGroupImpl

setAttributes

public void setAttributes(org.xml.sax.Attributes atts)
Specified by:
setAttributes in interface CoffeeBean

setContent

public void setContent(java.lang.String name,
                       org.xml.sax.Attributes atts,
                       java.lang.String value)
Specified by:
setContent in interface CoffeeBean

createSubscription

public static final Subscription createSubscription(NewsGroup group,
                                                    ServerDescriptor server)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object