Class ExternalElement
- java.lang.Object
-
- org.jivesoftware.smackx.message_fastening.element.ExternalElement
-
- All Implemented Interfaces:
Element
,NamedElement
public class ExternalElement extends Object implements NamedElement
Child element ofFasteningElement
. Reference to a top level element in the stanza that contains theFasteningElement
.
-
-
Constructor Summary
Constructors Constructor Description ExternalElement(String name)
Create a newExternalElement
that references a top level element with the given name.ExternalElement(String name, String elementNamespace)
Create a newExternalElement
that references a top level element with the given name and namespace.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getElementName()
Returns the root element name.String
getElementNamespace()
Namespace of the referenced top level element, eg.String
getName()
Name of the referenced top level element, eg.XmlStringBuilder
toXML(XmlEnvironment xmlEnvironment)
-
-
-
Field Detail
-
ELEMENT
public static final String ELEMENT
- See Also:
- Constant Field Values
-
ATTR_NAME
public static final String ATTR_NAME
- See Also:
- Constant Field Values
-
ATTR_ELEMENT_NAMESPACE
public static final String ATTR_ELEMENT_NAMESPACE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ExternalElement
public ExternalElement(String name)
Create a newExternalElement
that references a top level element with the given name.- Parameters:
name
- name of the top level element
-
ExternalElement
public ExternalElement(String name, String elementNamespace)
Create a newExternalElement
that references a top level element with the given name and namespace.- Parameters:
name
- name of the top level elementelementNamespace
- namespace of the top level element
-
-
Method Detail
-
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)
-
getName
public String getName()
Name of the referenced top level element, eg. 'body'.- Returns:
- element name
-
getElementNamespace
public String getElementNamespace()
Namespace of the referenced top level element, eg. 'urn:example:lik'.- Returns:
- element namespace
-
-