Class OriginIdElement
- java.lang.Object
-
- org.jivesoftware.smackx.sid.element.StableAndUniqueIdElement
-
- org.jivesoftware.smackx.sid.element.OriginIdElement
-
- All Implemented Interfaces:
Element
,ExtensionElement
,FullyQualifiedElement
,NamedElement
,XmlLangElement
public class OriginIdElement extends StableAndUniqueIdElement
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELEMENT
static java.lang.String
NAMESPACE
static javax.xml.namespace.QName
QNAME
-
Fields inherited from class org.jivesoftware.smackx.sid.element.StableAndUniqueIdElement
ATTR_ID
-
-
Constructor Summary
Constructors Constructor Description OriginIdElement()
OriginIdElement(java.lang.String id)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static OriginIdElement
addOriginId(Message message)
Deprecated.useaddTo(MessageBuilder)
instead.static OriginIdElement
addTo(MessageBuilder messageBuilder)
Add an origin-id element to a message and set the stanzas id to the same id as in the origin-id element.boolean
equals(java.lang.Object other)
java.lang.String
getElementName()
Returns the root element name.java.lang.String
getNamespace()
Returns the root element XML namespace.static OriginIdElement
getOriginId(Message message)
Return the origin-id element of a message or null, if absent.int
hashCode()
static boolean
hasOriginId(Message message)
Return true, if the message contains a origin-id element.java.lang.CharSequence
toXML(XmlEnvironment enclosingNamespace)
-
Methods inherited from class org.jivesoftware.smackx.sid.element.StableAndUniqueIdElement
getId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smack.packet.FullyQualifiedElement
getLanguage, getQName
-
-
-
-
Field Detail
-
ELEMENT
public static final java.lang.String ELEMENT
- See Also:
- Constant Field Values
-
NAMESPACE
public static final java.lang.String NAMESPACE
- See Also:
- Constant Field Values
-
QNAME
public static final javax.xml.namespace.QName QNAME
-
-
Constructor Detail
-
OriginIdElement
public OriginIdElement()
-
OriginIdElement
public OriginIdElement(java.lang.String id)
-
-
Method Detail
-
addOriginId
@Deprecated public static OriginIdElement addOriginId(Message message)
Deprecated.useaddTo(MessageBuilder)
instead.Add an origin-id element to a message and set the stanzas id to the same id as in the origin-id element.- Parameters:
message
- message.- Returns:
- the added origin-id element.
-
addTo
public static OriginIdElement addTo(MessageBuilder messageBuilder)
Add an origin-id element to a message and set the stanzas id to the same id as in the origin-id element.- Parameters:
messageBuilder
- the message builder to add an origin ID to.- Returns:
- the added origin-id element.
-
hasOriginId
public static boolean hasOriginId(Message message)
Return true, if the message contains a origin-id element.- Parameters:
message
- message- Returns:
- true if the message contains a origin-id, false otherwise.
-
getOriginId
public static OriginIdElement getOriginId(Message message)
Return the origin-id element of a message or null, if absent.- Parameters:
message
- message- Returns:
- origin-id element
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:FullyQualifiedElement
Returns the root element XML namespace.- Returns:
- the namespace.
-
getElementName
public java.lang.String getElementName()
Description copied from interface:NamedElement
Returns the root element name.- Returns:
- the element name.
-
toXML
public java.lang.CharSequence toXML(XmlEnvironment enclosingNamespace)
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-