Class ContentElement
- java.lang.Object
-
- org.jivesoftware.smackx.stanza_content_encryption.element.ContentElement
-
- All Implemented Interfaces:
Element
,ExtensionElement
,FullyQualifiedElement
,NamedElement
,XmlLangElement
public class ContentElement extends java.lang.Object implements ExtensionElement
Extension element that holds the payload element, as well as a list of affix elements. In SCE, the XML representation of this element is what will be encrypted using the encryption mechanism of choice.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ContentElement.Builder
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELEMENT
static java.lang.String
NAMESPACE
static java.lang.String
NAMESPACE_0
static javax.xml.namespace.QName
QNAME
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ContentElement.Builder
builder()
Return aContentElement.Builder
that can be used to build theContentElement
.java.util.List<AffixElement>
getAffixElements()
Return a list of affix elements.java.lang.String
getElementName()
Returns the root element name.java.lang.String
getNamespace()
Returns the root element XML namespace.PayloadElement
getPayload()
Return thePayloadElement
which holds the sensitive payload extensions.javax.xml.namespace.QName
getQName()
XmlStringBuilder
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.FullyQualifiedElement
getLanguage
-
-
-
-
Field Detail
-
NAMESPACE_0
public static final java.lang.String NAMESPACE_0
- See Also:
- Constant Field Values
-
NAMESPACE
public static final java.lang.String NAMESPACE
- See Also:
- Constant Field Values
-
ELEMENT
public static final java.lang.String ELEMENT
- See Also:
- Constant Field Values
-
QNAME
public static final javax.xml.namespace.QName QNAME
-
-
Method Detail
-
getPayload
public PayloadElement getPayload()
Return thePayloadElement
which holds the sensitive payload extensions.- Returns:
- payload element
-
getAffixElements
public java.util.List<AffixElement> getAffixElements()
Return a list of affix elements. Those are elements that need to be verified upon reception by the encryption mechanisms implementation.- Returns:
- list of affix elements
- See Also:
- XEP-0420: Stanza Content Encryption - ยง4. Affix Elements
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:FullyQualifiedElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceFullyQualifiedElement
- Returns:
- the namespace.
-
getElementName
public java.lang.String getElementName()
Description copied from interface:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
toXML
public XmlStringBuilder toXML(XmlEnvironment xmlEnvironment)
-
getQName
public javax.xml.namespace.QName getQName()
- Specified by:
getQName
in interfaceFullyQualifiedElement
-
builder
public static ContentElement.Builder builder()
Return aContentElement.Builder
that can be used to build theContentElement
.- Returns:
- builder
-
-