org.jabber.jabberbeans.Extension
Class HashExtension
java.lang.Object
|
+--org.jabber.jabberbeans.XMLData
|
+--org.jabber.jabberbeans.Extension.HashExtension
- All Implemented Interfaces:
- Extension, java.io.Serializable
- Direct Known Subclasses:
- IQRegister, IQSearchRequest, SearchResult
- public abstract class HashExtension
- extends XMLData
- implements Extension
A HashExtension
holds the code which is shared by several
other extensions, including the register extension and part of the search
extension implementation.
NOTE: it is my personal hope that this general type of extension dies a
horrible death at a later date, probably at the hand of XML forms.
all parameters are subject to interpretation - the names are meant to be
labels to editable text boxes, with instructions being broadcast on how to
use the interface.
also note that the values do not have default states - is
represented by name.equals(""), whereas name=null indicates the element
is not present
- See Also:
- Serialized Form
Field Summary |
protected java.util.Hashtable |
entries
entries is a list of all name/value pairs. |
Method Summary |
void |
appendItem(java.lang.StringBuffer retval)
appendItem appends the XML representation of the
current packet data to the specified StringBuffer . |
java.util.Enumeration |
getNames()
getNames returns an enumeration with all keys in this
object. |
java.lang.String |
getValue(java.lang.String name)
getValue
|
protected abstract java.lang.String |
getXMLNS()
getXMLNS is overloaded by derived classes to allow the
toString and appendItem() code to be fixed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
entries
protected java.util.Hashtable entries
entries
is a list of all name/value pairs.
HashExtension
protected HashExtension(HashExtensionBuilder builder)
throws java.lang.InstantiationException
- Creates a new
HashExtension
instance.
getValue
public java.lang.String getValue(java.lang.String name)
getValue
- Parameters:
name
- a String
value
- Returns:
String
value
getNames
public java.util.Enumeration getNames()
getNames
returns an enumeration with all keys in this
object.
getXMLNS
protected abstract java.lang.String getXMLNS()
getXMLNS
is overloaded by derived classes to allow the
toString and appendItem() code to be fixed.
appendItem
public void appendItem(java.lang.StringBuffer retval)
appendItem
appends the XML representation of the
current packet data to the specified StringBuffer
.
- Specified by:
appendItem
in interface Extension
- Specified by:
appendItem
in class XMLData
- Parameters:
retval
- The StringBuffer
to append to