Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.jabber.extensions.whiteboard
Class WhiteboardObjectPacketExtension

java.lang.Object
  extended by net.java.sip.communicator.impl.protocol.jabber.extensions.whiteboard.WhiteboardObjectPacketExtension
All Implemented Interfaces:
org.jivesoftware.smack.packet.PacketExtension

public class WhiteboardObjectPacketExtension
extends Object
implements org.jivesoftware.smack.packet.PacketExtension

WhiteboardObjectPacketExtension

Author:
Julien Waechter

Field Summary
static String ACTION_DELETE
          A type string constant indicating that the current object must be deleted.
static String ACTION_DRAW
          A type string constant indicating that the current object must be drawn.
static String ACTION_MOVE
          A type string constant indicating that the current object must be moved.
static String ELEMENT_NAME
          The name of the XML element used for transport of white-board parameters.
static String NAMESPACE
          The names XMPP space that the white-board elements belong to.
 
Constructor Summary
WhiteboardObjectPacketExtension()
          Default WhiteboardObjectPacketExtension constructor.
WhiteboardObjectPacketExtension(String xml)
          WhiteboardObjectPacketExtension constructor with a XML-SVG String.
WhiteboardObjectPacketExtension(String id, String action)
          WhiteboardObjectPacketExtension constructor.
WhiteboardObjectPacketExtension(WhiteboardObjectJabberImpl whiteboardObject, String action)
          Constructs and initializes a WhiteboardObjectPacketExtension.
 
Method Summary
 String getAction()
          Returns the current action associated with the WhiteboardObject to send.
 String getElementName()
          Returns the root element name.
 String getNamespace()
          Returns the root element XML namespace.
 WhiteboardObjectJabberImpl getWhiteboardObject()
          Returns the current WhiteboardObject to be sent.
 String getWhiteboardObjectID()
          Returns the current WhiteboardObject's identifier to be sent.
 void setAction(String action)
          Sets the action associated with the WhiteboardObject to send.
 void setWhiteboardObjectID(String objectID)
          Sets the current WhiteboardObject's identifier to be sent.
 String toXML()
          Returns the XML representation of the WhiteboardObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ELEMENT_NAME

public static final String ELEMENT_NAME
The name of the XML element used for transport of white-board parameters.

See Also:
Constant Field Values

NAMESPACE

public static final String NAMESPACE
The names XMPP space that the white-board elements belong to.

See Also:
Constant Field Values

ACTION_DELETE

public static final String ACTION_DELETE
A type string constant indicating that the current object must be deleted.

See Also:
Constant Field Values

ACTION_DRAW

public static final String ACTION_DRAW
A type string constant indicating that the current object must be drawn.

See Also:
Constant Field Values

ACTION_MOVE

public static final String ACTION_MOVE
A type string constant indicating that the current object must be moved.

See Also:
Constant Field Values
Constructor Detail

WhiteboardObjectPacketExtension

public WhiteboardObjectPacketExtension()
Default WhiteboardObjectPacketExtension constructor.


WhiteboardObjectPacketExtension

public WhiteboardObjectPacketExtension(String id,
                                       String action)
WhiteboardObjectPacketExtension constructor.

Parameters:
id - Identifier of the WhiteboardObject to be treated
action - The current action associated with the WhiteboardObject.

WhiteboardObjectPacketExtension

public WhiteboardObjectPacketExtension(WhiteboardObjectJabberImpl whiteboardObject,
                                       String action)
Constructs and initializes a WhiteboardObjectPacketExtension.

Parameters:
whiteboardObject - The WhiteboardObject to be treated
action - The current action associated with the WhiteboardObject.

WhiteboardObjectPacketExtension

public WhiteboardObjectPacketExtension(String xml)
WhiteboardObjectPacketExtension constructor with a XML-SVG String.

Parameters:
xml - XML-SVG String
Method Detail

getElementName

public String getElementName()
Returns the root element name.

Specified by:
getElementName in interface org.jivesoftware.smack.packet.PacketExtension
Returns:
the element name.

getNamespace

public String getNamespace()
Returns the root element XML namespace.

Specified by:
getNamespace in interface org.jivesoftware.smack.packet.PacketExtension
Returns:
the namespace.

toXML

public String toXML()
Returns the XML representation of the WhiteboardObject

Specified by:
toXML in interface org.jivesoftware.smack.packet.PacketExtension
Returns:
the WhiteboardObject as XML.

getAction

public String getAction()
Returns the current action associated with the WhiteboardObject to send. (DELETE - DRAW - MOVE)

Returns:
current action.

setAction

public void setAction(String action)
Sets the action associated with the WhiteboardObject to send. (DELETE - DRAW - MOVE)

Parameters:
action - the action associated with the WhiteboardObject to send.

getWhiteboardObject

public WhiteboardObjectJabberImpl getWhiteboardObject()
Returns the current WhiteboardObject to be sent.

Returns:
WhiteboardObject to be sent

getWhiteboardObjectID

public String getWhiteboardObjectID()
Returns the current WhiteboardObject's identifier to be sent. (For a delete WhiteboardObject message)

Returns:
WhiteboardObject's identifier

setWhiteboardObjectID

public void setWhiteboardObjectID(String objectID)
Sets the current WhiteboardObject's identifier to be sent. (For a delete WhiteboardObject message)

Parameters:
objectID - WhiteboardObject's identifier

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.