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.
 
Constructor Summary
protected HashExtension(HashExtensionBuilder builder)
          Creates a new HashExtension instance.
 
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 org.jabber.jabberbeans.XMLData
appendAttrib, appendAttrib, appendChild, appendChild, escapeString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jabber.jabberbeans.Extension.Extension
toString
 

Field Detail

entries

protected java.util.Hashtable entries
entries is a list of all name/value pairs.

Constructor Detail

HashExtension

protected HashExtension(HashExtensionBuilder builder)
                 throws java.lang.InstantiationException
Creates a new HashExtension instance.

Method Detail

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