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
-
-
Constructor Summary
Constructors Constructor Description OriginIdElement()
OriginIdElement(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(Object other)
String
getElementName()
Returns the root element name.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.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 String ELEMENT
- See Also:
- Constant Field Values
-
NAMESPACE
public static final String NAMESPACE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OriginIdElement
public OriginIdElement()
-
OriginIdElement
public OriginIdElement(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 String getNamespace()
Description copied from interface:FullyQualifiedElement
Returns the root element XML namespace.- Returns:
- the namespace.
-
getElementName
public String getElementName()
Description copied from interface:NamedElement
Returns the root element name.- Returns:
- the element name.
-
toXML
public CharSequence toXML(XmlEnvironment enclosingNamespace)
-
-