public class JivePropertiesExtension extends Object implements ExtensionElement
Modifier and Type | Field and Description |
---|---|
static String |
ELEMENT |
static String |
NAMESPACE
Namespace used to store stanza properties.
|
Constructor and Description |
---|
JivePropertiesExtension() |
JivePropertiesExtension(Map<String,Object> properties) |
Modifier and Type | Method and Description |
---|---|
void |
deleteProperty(String name)
Deletes a property.
|
static JivePropertiesExtension |
from(Message message)
Return a Jive properties extensions of the given message.
|
String |
getElementName()
Returns the root element name.
|
String |
getNamespace()
Returns the root element XML namespace.
|
Map<String,Object> |
getProperties()
Returns an unmodifiable map of all properties.
|
Object |
getProperty(String name)
Returns the stanza property with the specified name or null if the
property doesn't exist.
|
Collection<String> |
getPropertyNames()
Returns an unmodifiable collection of all the property names that are set.
|
void |
setProperty(String name,
Object value)
Sets a property with an Object as the value.
|
CharSequence |
toXML(String enclosingNamespace)
Returns the XML representation of this Element.
|
public static final String NAMESPACE
public static final String ELEMENT
public JivePropertiesExtension()
public JivePropertiesExtension(Map<String,Object> properties)
public Object getProperty(String name)
name
- the name of the property.public void setProperty(String name, Object value)
name
- the name of the property.value
- the value of the property.public void deleteProperty(String name)
name
- the name of the property to delete.public Collection<String> getPropertyNames()
public Map<String,Object> getProperties()
public String getElementName()
NamedElement
getElementName
in interface NamedElement
public String getNamespace()
ExtensionElement
getNamespace
in interface ExtensionElement
public CharSequence toXML(String enclosingNamespace)
Element
public static JivePropertiesExtension from(Message message)
message
- the message to return the extension from.