Package org.jitsi.impl.configuration.xml
Class XMLConfigurationStore
- java.lang.Object
-
- org.jitsi.impl.configuration.xml.XMLConfigurationStore
-
- All Implemented Interfaces:
ConfigurationStore
public class XMLConfigurationStore extends Object implements ConfigurationStore
Implements aConfigurationStorewhich serializes property name-value associations in XML format.- Author:
- Emil Ivov, Damian Minkov, Lubomir Marinov
-
-
Constructor Summary
Constructors Constructor Description XMLConfigurationStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetProperty(String propertyName)ImplementsConfigurationStore.getProperty(String).String[]getPropertyNames()Implements {ConfigurationStore#getPropertyNames()}.booleanisSystemProperty(String propertyName)Implements {ConfigurationStore#isSystemProperty(String)}.voidreloadConfiguration(File file)ImplementsConfigurationStore.reloadConfiguration(File).voidremoveProperty(String propertyName)ImplementsConfigurationStore.removeProperty(String).voidsetNonSystemProperty(String propertyName, Object property)voidsetSystemProperty(String propertyName)ImplementsConfigurationStore.setSystemProperty(String).voidstoreConfiguration(OutputStream out)
-
-
-
Method Detail
-
getProperty
public Object getProperty(String propertyName)
ImplementsConfigurationStore.getProperty(String). Gets the value in thisConfigurationStoreof a property with a specific name.- Specified by:
getPropertyin interfaceConfigurationStore- Parameters:
propertyName- the name of the property to get the value of- Returns:
- the value in this ConfigurationStore of the property with the specified name; null if the property with the specified name does not have an association with a value in this ConfigurationStore
- See Also:
ConfigurationStore.getProperty(String)
-
getPropertyNames
public String[] getPropertyNames()
Implements {ConfigurationStore#getPropertyNames()}. Gets the names of the properties which have values associated in this ConfigurationStore.- Specified by:
getPropertyNamesin interfaceConfigurationStore- Returns:
- an array of Strings which specify the names of the properties that have values associated in this ConfigurationStore; an empty array if this instance contains no property values
- See Also:
ConfigurationStore.getPropertyNames()
-
isSystemProperty
public boolean isSystemProperty(String propertyName)
Implements {ConfigurationStore#isSystemProperty(String)}. Determines whether a specific name stands for a system property.- Specified by:
isSystemPropertyin interfaceConfigurationStore- Parameters:
propertyName- the name of a property which is to be determined whether it is a system property- Returns:
- true if the specified name stands for a system property; false, otherwise
- See Also:
ConfigurationStore.isSystemProperty(String)
-
reloadConfiguration
public void reloadConfiguration(File file) throws IOException, XMLException
ImplementsConfigurationStore.reloadConfiguration(File). Removes all property name-value associations currently present in this ConfigurationStore and deserializes new property name-value associations from a specific File which presumably is in the format represented by this instance.- Specified by:
reloadConfigurationin interfaceConfigurationStore- Parameters:
file- the File to be read and to deserialize new property name-value associations from into this instance- Throws:
IOException- if there is an input error while reading from the specified fileXMLException- if parsing the contents of the specified file fails- See Also:
ConfigurationStore.reloadConfiguration(File)
-
removeProperty
public void removeProperty(String propertyName)
ImplementsConfigurationStore.removeProperty(String). Removes the value association in this ConfigurationStore of the property with a specific name. If the property with the specified name is not associated with a value in this ConfigurationStore, does nothing.- Specified by:
removePropertyin interfaceConfigurationStore- Parameters:
propertyName- the name of the property which is to have its value association in this ConfigurationStore removed- See Also:
ConfigurationStore.removeProperty(String)
-
setNonSystemProperty
public void setNonSystemProperty(String propertyName, Object property)
ImplementsConfigurationStore.setNonSystemProperty(String, Object). Sets the value of a non-system property with a specific name to a specific value in this ConfigurationStore.- Specified by:
setNonSystemPropertyin interfaceConfigurationStore- Parameters:
propertyName- the name of the non-system property to be set to the specified value in this ConfigurationStoreproperty- the value to be assigned to the non-system property with the specified name in this ConfigurationStore- See Also:
ConfigurationStore.setNonSystemProperty(String, Object)
-
setSystemProperty
public void setSystemProperty(String propertyName)
ImplementsConfigurationStore.setSystemProperty(String). Sets a property with a specific name to be considered a system property by the ConfigurationStore.- Specified by:
setSystemPropertyin interfaceConfigurationStore- Parameters:
propertyName- the name of the property to be set as a system property in this ConfigurationStore- See Also:
ConfigurationStore.setSystemProperty(String)
-
storeConfiguration
public void storeConfiguration(OutputStream out)
ImplementsConfigurationStore.storeConfiguration(OutputStream). Stores/serializes the property name-value associations currently present in this ConfigurationStore into a specific OutputStream in the format represented by this instance.- Specified by:
storeConfigurationin interfaceConfigurationStore- Parameters:
out- the OutputStream to receive the serialized form of the property name-value associations currently present in this ConfigurationStore- See Also:
ConfigurationStore.storeConfiguration(OutputStream)
-
-