org.jabber.jabberbeans.serverside
Class XDBBuilder

java.lang.Object
  |
  +--org.jabber.jabberbeans.PacketBuilder
        |
        +--org.jabber.jabberbeans.serverside.XDBBuilder

public class XDBBuilder
extends PacketBuilder
implements java.io.Serializable

XDBBuilder is the class that expands upon PacketBuilder to allow building of XDB objects (packets). The builder is a required object in the creation of said packet, as the number of fields is too numerous to make direct creation feasable and non-error prone.

Version:
$Revision: 1.1.1.1 $
Author:
David Waite <dwaite@jabber.com>, $Author: lucky $
See Also:
Serialized Form

Field Summary
private  java.lang.String action
          action for partial changes to a record (either blank or insert)
private  java.lang.String match
          match string for performing partial changes to a record
private  java.lang.String namespace
          Namespace for the packet.
 
Fields inherited from class org.jabber.jabberbeans.PacketBuilder
errorCode, errorText, extensions, fromAddress, identifier, toAddress, type
 
Constructor Summary
XDBBuilder()
          Creates a new XDBBuilder instance.
 
Method Summary
 Packet build()
          build returns a packet, specifically an InfoQuery packet.
 java.lang.String getAction()
          get the action string
 java.lang.String getMatch()
          get the match string
 java.lang.String getNamespace()
          get the namespace.
 void reset()
          reset all parameters (including those in the parent class) to default values
 void setAction(java.lang.String action)
          set the action string
 void setMatch(java.lang.String match)
          set the match string
 void setNamespace(java.lang.String ns)
          set the namespace.
 
Methods inherited from class org.jabber.jabberbeans.PacketBuilder
addExtension, delExtension, getErrorCode, getErrorText, getExtensionVector, getFromAddress, getIdentifier, getToAddress, getType, resetBase, setErrorCode, setErrorText, setFromAddress, setIdentifier, setToAddress, setType
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

namespace

private java.lang.String namespace
Namespace for the packet. Attribute, e.g. ns="jabber:iq:roster".

action

private java.lang.String action
action for partial changes to a record (either blank or insert)

match

private java.lang.String match
match string for performing partial changes to a record
Constructor Detail

XDBBuilder

public XDBBuilder()
Creates a new XDBBuilder instance.
Method Detail

reset

public void reset()
reset all parameters (including those in the parent class) to default values
Overrides:
reset in class PacketBuilder

getNamespace

public java.lang.String getNamespace()
get the namespace.
Returns:
the namespace value.

setNamespace

public void setNamespace(java.lang.String ns)
set the namespace.
Parameters:
the - namespace value.

getAction

public java.lang.String getAction()
get the action string
Returns:
a String value

setAction

public void setAction(java.lang.String action)
set the action string
Parameters:
action - a String value

getMatch

public java.lang.String getMatch()
get the match string
Returns:
a String value

setMatch

public void setMatch(java.lang.String match)
set the match string
Parameters:
match - a String value

build

public Packet build()
             throws java.lang.InstantiationException
build returns a packet, specifically an InfoQuery packet. It will fail if the parameters specified in the builder were not sufficient to create a valid packet.
Overrides:
build in class PacketBuilder
Returns:
a valid Packet
Throws:
java.lang.InstantiationException - if there was not sufficient information to create a valid InfoQuery packet