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
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(MessageBuilder messageBuilder) Add this element to the provided message builder.static FasteningElement.Builderbuilder()static FasteningElementcreateShellElementForSensitiveElement(String originIdOfSensitiveElement) static FasteningElementcreateShellElementForSensitiveElement(FasteningElement sensitiveElement) static FasteningElementcreateShellElementForSensitiveElement(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 booleanhasFasteningElement(Message message) Return true if the providedMessagecontains aFasteningElement.static booleanhasFasteningElement(MessageBuilder builder) Return true if the providedMessageBuildercontains aFasteningElement.booleanDoes this element remove a previously sentFasteningElement?booleanIs 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, waitMethods 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 providedMessagecontains aFasteningElement.- Parameters:
message- message- Returns:
- true if the stanza has an
FasteningElement.
-
hasFasteningElement
Return true if the providedMessageBuildercontains aFasteningElement.- Parameters:
builder- message builder- Returns:
- true if the stanza has an
FasteningElement.
-
getNamespace
Description copied from interface:XmlElementReturns the root element XML namespace.- Specified by:
getNamespacein interfaceXmlElement- Returns:
- the namespace.
-
getElementName
Description copied from interface:NamedElementReturns the root element name.- Specified by:
getElementNamein 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
-