Class FasteningElement
java.lang.Object
org.jivesoftware.smackx.message_fastening.element.FasteningElement
- All Implemented Interfaces:
Element
,ExtensionElement
,NamedElement
,XmlElement
,XmlLangElement
Message Fastening container element.
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyTo
(MessageBuilder messageBuilder) Add this element to the provided message builder.static FasteningElement.Builder
builder()
static FasteningElement
createShellElementForSensitiveElement
(String originIdOfSensitiveElement) static FasteningElement
createShellElementForSensitiveElement
(FasteningElement sensitiveElement) static FasteningElement
createShellElementForSensitiveElement
(OriginIdElement originIdOfSensitiveElement) Returns the root element name.Return all external payloads of this element.Returns the root element XML namespace.Return all wrapped payloads of this element.static boolean
hasFasteningElement
(Message message) Return true if the providedMessage
contains aFasteningElement
.static boolean
hasFasteningElement
(MessageBuilder builder) Return true if the providedMessageBuilder
contains aFasteningElement
.boolean
Does this element remove a previously sentFasteningElement
?boolean
Is this a shell element? Shell elements are otherwise empty elements that indicate that an encrypted payload of a message encrypted using XEP-420: Stanza Content Encryption contains a sensitiveFasteningElement
.toXML
(XmlEnvironment xmlEnvironment) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jivesoftware.smack.packet.XmlElement
getLanguage, getQName
-
Field Details
-
ELEMENT
- See Also:
-
NAMESPACE
- See Also:
-
ATTR_ID
- See Also:
-
ATTR_CLEAR
- See Also:
-
ATTR_SHELL
- See Also:
-
-
Method Details
-
getReferencedStanzasOriginId
- Returns:
- origin id of the referenced stanza
-
getWrappedPayloads
Return all wrapped payloads of this element.- Returns:
- wrapped payloads.
- See Also:
-
getExternalPayloads
Return all external payloads of this element.- Returns:
- external payloads.
- See Also:
-
isRemovingElement
Does this element remove a previously sentFasteningElement
?- Returns:
- true if the clear attribute is set.
- See Also:
-
isShellElement
Is this a shell element? Shell elements are otherwise empty elements that indicate that an encrypted payload of a message encrypted using XEP-420: Stanza Content Encryption contains a sensitiveFasteningElement
.- Returns:
- true if this is a shell element.
- See Also:
-
hasFasteningElement
Return true if the providedMessage
contains aFasteningElement
.- Parameters:
message
- message- Returns:
- true if the stanza has an
FasteningElement
.
-
hasFasteningElement
Return true if the providedMessageBuilder
contains aFasteningElement
.- Parameters:
builder
- message builder- Returns:
- true if the stanza has an
FasteningElement
.
-
getNamespace
Description copied from interface:XmlElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceXmlElement
- Returns:
- the namespace.
-
getElementName
Description copied from interface:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
toXML
-
createShellElementForSensitiveElement
public static FasteningElement createShellElementForSensitiveElement(FasteningElement sensitiveElement) -
createShellElementForSensitiveElement
public static FasteningElement createShellElementForSensitiveElement(String originIdOfSensitiveElement) -
createShellElementForSensitiveElement
public static FasteningElement createShellElementForSensitiveElement(OriginIdElement originIdOfSensitiveElement) -
applyTo
Add this element to the provided message builder. Note: The stanza MUST NOT contain more than one apply-to elements at the same time.- Parameters:
messageBuilder
- message builder- See Also:
-
builder
-