public class ConferenceInfoDocument
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
ConferenceInfoDocument.Endpoint
Wraps around an Element and represents an endpoint
element.
|
static class |
ConferenceInfoDocument.EndpointStatusType
Endpoint status type.
|
class |
ConferenceInfoDocument.Media
Wraps around an Element and represents a media
element.
|
static class |
ConferenceInfoDocument.State
Represents the possible values for the state attribute (see
RFC4575)
|
class |
ConferenceInfoDocument.User
Wraps around an Element and represents a user
element (child of the users element).
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONFERENCE_DESCRIPTION_ELEMENT_NAME
The name of the "conference-description" element.
|
static java.lang.String |
CONFERENCE_INFO_ELEMENT_NAME
The name of the "conference-info" element.
|
static java.lang.String |
CONFERENCE_STATE_ELEMENT_NAME
The name of the "conference-state" element.
|
static java.lang.String |
DISPLAY_TEXT_ELEMENT_NAME
The mane of the "display-text" element.
|
static java.lang.String |
ENDPOINT_ELEMENT_NAME
The name of the "endpoint" element.
|
static java.lang.String |
ENTITY_ATTR_NAME
The name of the "entity" attribute.
|
static java.lang.String |
ID_ATTR_NAME
The name of the "id" attribute.
|
static java.lang.String |
MEDIA_ELEMENT_NAME
The name of the "media" element.
|
static java.lang.String |
NAMESPACE
The namespace of the conference-info element.
|
static java.lang.String |
SRC_ID_ELEMENT_NAME
The name of the "src-id" element.
|
static java.lang.String |
STATE_ATTR_NAME
The name of the "state" attribute.
|
static java.lang.String |
STATUS_ELEMENT_NAME
The name of the "status" element.
|
static java.lang.String |
TYPE_ELEMENT_NAME
The name of the "type" element.
|
static java.lang.String |
USER_COUNT_ELEMENT_NAME
The name of the "user-count" element.
|
static java.lang.String |
USER_ELEMENT_NAME
The name of the "user" element.
|
static java.lang.String |
USERS_ELEMENT_NAME
The name of the "users" element.
|
static java.lang.String |
VERSION_ATTR_NAME
The name of the "version" attribute.
|
Constructor and Description |
---|
ConferenceInfoDocument()
Creates a new ConferenceInfoDocument instance.
|
ConferenceInfoDocument(ConferenceInfoDocument confInfo)
Creates a new ConferenceInfoDocument instance that represents
a copy of confInfo
|
ConferenceInfoDocument(java.lang.String xml)
Creates a new ConferenceInfoDocument instance and populates it
by parsing the XML in xml
|
Modifier and Type | Method and Description |
---|---|
ConferenceInfoDocument.User |
addNewUser(java.lang.String entity)
Creates a new User instance, adds it to the document and
returns it.
|
void |
addUser(ConferenceInfoDocument.User user)
Adds a copy of user to this ConferenceInfoDocument
|
org.w3c.dom.Document |
getDocument()
Returns the Document that this instance wraps around.
|
java.lang.String |
getEntity()
Gets the value of the entity attribute of the
conference-info element.
|
java.lang.String |
getSid()
Gets the value of the sid attribute of the
conference-info element.
|
ConferenceInfoDocument.State |
getState()
Gets the value of the state attribute of the
conference-info element.
|
ConferenceInfoDocument.User |
getUser(java.lang.String entity)
Searches this document's Users and returns the one with
entity attribute entity, or null if one
wasn't found.
|
int |
getUserCount()
Returns the content of the user-count child of the
conference-state child of conference-info, parsed as
an integer, if they exist.
|
java.util.List<ConferenceInfoDocument.User> |
getUsers()
Returns the list of User that represents the user
children of the users child element of conference-info
|
ConferenceInfoDocument.State |
getUsersState()
Returns the value of the state attribute of the users
child of the conference-info element.
|
int |
getVersion()
Returns the value of the version attribute of the
conference-info element, or -1 if there is no version
attribute or if it's value couldn't be parsed as an integer.
|
void |
removeUser(java.lang.String entity)
Removes a specific User (the one with entity entity)
from the document.
|
void |
setEntity(java.lang.String entity)
Sets the value of the entity attribute of the
conference-info element.
|
void |
setSid(java.lang.String sid)
Sets the value of the sid attribute of the
conference-info element.
|
void |
setState(ConferenceInfoDocument.State state)
Sets the value of the state attribute of the
conference-info element.
|
void |
setUserCount(int count)
Sets the content of the user-count child element of the
conference-state child element of conference-info
|
void |
setUsersState(ConferenceInfoDocument.State state)
Sets the state attribute of the users chuld of the
conference-info element.
|
void |
setVersion(int version)
Sets the version attribute of the conference-info
element.
|
java.lang.String |
toString()
Returns the XML representation of the document (from the
conference-info element down), or an error string in case the
XML cannot be generated for some reason.
|
java.lang.String |
toXml()
Returns the XML representation of the conference-info tree,
or null if an error occurs while trying to get it.
|
public static final java.lang.String NAMESPACE
public static final java.lang.String CONFERENCE_INFO_ELEMENT_NAME
public static final java.lang.String CONFERENCE_DESCRIPTION_ELEMENT_NAME
public static final java.lang.String CONFERENCE_STATE_ELEMENT_NAME
public static final java.lang.String STATE_ATTR_NAME
public static final java.lang.String ENTITY_ATTR_NAME
public static final java.lang.String VERSION_ATTR_NAME
public static final java.lang.String USER_ELEMENT_NAME
public static final java.lang.String USERS_ELEMENT_NAME
public static final java.lang.String ENDPOINT_ELEMENT_NAME
public static final java.lang.String MEDIA_ELEMENT_NAME
public static final java.lang.String ID_ATTR_NAME
public static final java.lang.String STATUS_ELEMENT_NAME
public static final java.lang.String SRC_ID_ELEMENT_NAME
public static final java.lang.String TYPE_ELEMENT_NAME
public static final java.lang.String USER_COUNT_ELEMENT_NAME
public static final java.lang.String DISPLAY_TEXT_ELEMENT_NAME
public ConferenceInfoDocument() throws org.jitsi.util.xml.XMLException
org.jitsi.util.xml.XMLException
- if a document failed to be created.public ConferenceInfoDocument(java.lang.String xml) throws org.jitsi.util.xml.XMLException
xml
- the XML string to parseorg.jitsi.util.xml.XMLException
- If parsing failedpublic ConferenceInfoDocument(ConferenceInfoDocument confInfo) throws org.jitsi.util.xml.XMLException
confInfo
- the document to copyorg.jitsi.util.xml.XMLException
- if a document failed to be created.public int getVersion()
public void setVersion(int version)
version
- the value to set the version attribute of the
conference-info element to.public ConferenceInfoDocument.State getState()
public ConferenceInfoDocument.State getUsersState()
public void setUsersState(ConferenceInfoDocument.State state)
state
- the state to setpublic void setState(ConferenceInfoDocument.State state)
state
- the value to set the state attribute of the
conference-info element to.public void setSid(java.lang.String sid)
sid
- the value to set the sid attribute of the
conference-info element to.public java.lang.String getSid()
public void setEntity(java.lang.String entity)
entity
- the value to set the entity attribute of the
conference-info document to.public java.lang.String getEntity()
public void setUserCount(int count)
count
- the value to set the content of user-count topublic int getUserCount()
public java.lang.String toXml()
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.List<ConferenceInfoDocument.User> getUsers()
public ConferenceInfoDocument.User getUser(java.lang.String entity)
entity
- The value of the entity attribute to search for.public ConferenceInfoDocument.User addNewUser(java.lang.String entity)
entity
- The value to use for the entity attribute of the
new User.public void addUser(ConferenceInfoDocument.User user)
user
- the User to add a copy ofpublic void removeUser(java.lang.String entity)
entity
- the entity of the User to remove.public org.w3c.dom.Document getDocument()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.