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 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
-
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
.List<AffixElement>
getAffixElements()
Return a list of affix elements.String
getElementName()
Returns the root element name.String
getNamespace()
Returns the root element XML namespace.PayloadElement
getPayload()
Return thePayloadElement
which holds the sensitive payload extensions.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 String NAMESPACE_0
- See Also:
- Constant Field Values
-
NAMESPACE
public static final String NAMESPACE
- See Also:
- Constant Field Values
-
ELEMENT
public static final String ELEMENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPayload
public PayloadElement getPayload()
Return thePayloadElement
which holds the sensitive payload extensions.- Returns:
- payload element
-
getAffixElements
public 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 String getNamespace()
Description copied from interface:FullyQualifiedElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceFullyQualifiedElement
- Returns:
- the namespace.
-
getElementName
public 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 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
-
-