org.brains2b.coffee.message.local
Class Options

java.lang.Object
  extended by org.brains2b.coffee.message.local.LocalMessage
      extended by org.brains2b.coffee.message.local.Options
All Implemented Interfaces:
CoffeeBean, NNTPMessage

public class Options
extends LocalMessage
implements CoffeeBean

Options is a CoffeeBean wrapper around HashMap to set and retrieve user settable options for CoffeeBreak.

Id determines which set of options is stored in this Map f.e. "binary" for the options for sending binary files.

Version:
$Revision: 1.5 $ $Date: 2010/12/30 23:42:27 $
Author:
dennis@brains2b.org

Field Summary
static int OPTIONS
           
 
Constructor Summary
Options()
           
Options(java.lang.String id)
           
 
Method Summary
 boolean getBoolean(java.lang.String key)
           
 java.lang.String getId()
           
 int getInt(java.lang.String key)
           
 int getSize()
           
 java.lang.String getString(java.lang.String key)
           
 int getType()
           
 boolean hasContent()
           
 void setAttributes(org.xml.sax.Attributes atts)
           
 void setBoolean(java.lang.String key, boolean b)
           
 void setContent(java.lang.String name, org.xml.sax.Attributes atts, java.lang.String value)
           
 void setId(java.lang.String id)
           
 void setInt(java.lang.String key, int num)
           
 void setString(java.lang.String key, java.lang.String value)
           
 void writeMessage(org.brains2b.saxo.SAXWriter sw)
           
 
Methods inherited from class org.brains2b.coffee.message.local.LocalMessage
addHeader, addLine, endMessage, isHeaderSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.brains2b.coffee.message.NNTPMessage
addHeader, addLine, endMessage, isHeaderSet
 

Field Detail

OPTIONS

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

Options

public Options()

Options

public Options(java.lang.String id)
Method Detail

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

getId

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

setId

public void setId(java.lang.String id)

getSize

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

getType

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

hasContent

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

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

getBoolean

public boolean getBoolean(java.lang.String key)

setBoolean

public void setBoolean(java.lang.String key,
                       boolean b)

getInt

public int getInt(java.lang.String key)

setInt

public void setInt(java.lang.String key,
                   int num)

getString

public java.lang.String getString(java.lang.String key)

setString

public void setString(java.lang.String key,
                      java.lang.String value)