public class ConfigXMLRepository extends ConfigurationCache
ConfigXMLRepository
provides access to configuration settings.
Created: Sat Nov 13 18:53:21 2004
Repository.Meta, Repository.SchemaId
Modifier and Type | Field and Description |
---|---|
static String |
COMPONENT_NODE |
static String |
ROOT_NODE |
static String |
XMPP_CONFIG_FILE_PROPERTY_KEY |
static String |
XMPP_CONFIG_FILE_PROPERTY_VAL |
CONFIG_DUMP_FILE_PROP_DEF, CONFIG_DUMP_FILE_PROP_KEY
RELOAD_DELAY, RESOURCE_URI
COMP_REPO_BIND
Constructor and Description |
---|
ConfigXMLRepository() |
Modifier and Type | Method and Description |
---|---|
void |
addItem(String compName,
ConfigItem item) |
Collection<ConfigItem> |
allItems()
Returns a collection with all items stored in the repository.
|
String[] |
getCompNames()
Returns all component names for which there are some configuration settings available.
|
static ConfigXMLRepository |
getConfigRepository() |
static ConfigXMLRepository |
getConfigRepository(boolean debug,
String file_name) |
static ConfigXMLRepository |
getConfigRepository(String file_name) |
ConfigItem |
getItem(String compName,
String node,
String key) |
Set<ConfigItem> |
getItemsForComponent(String compName)
Get set of config items stored for component
|
String[] |
getKeys(String root,
String node)
Returns an array of all configuration keys for a given component and configuration node.
|
void |
initRepository(String repo_uri,
Map<String,String> params)
Method is deprecated and should not be user any more.
|
String |
nodeForPackage(Class cls) |
void |
removeItem(String compName,
ConfigItem item) |
int |
size()
The method returns number of items in the repository.
|
void |
store()
The method is called to store all data in the database.
|
addItem, addItem, addItemNoStore, addRepoChangeListener, contains, destroy, get, getDefaults, getDefHostname, getInitProperties, getItem, getItemInstance, getProperties, iterator, putProperties, reload, remove, removeItem, removeItemNoStore, removeRepoChangeListener, set, setAutoloadTimer, setDefHostname, setProperties, validateItem
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public static final String COMPONENT_NODE
public static final String ROOT_NODE
public static final String XMPP_CONFIG_FILE_PROPERTY_KEY
public static final String XMPP_CONFIG_FILE_PROPERTY_VAL
public static ConfigXMLRepository getConfigRepository() throws XMLDBException
XMLDBException
public static ConfigXMLRepository getConfigRepository(String file_name) throws XMLDBException
XMLDBException
public static ConfigXMLRepository getConfigRepository(boolean debug, String file_name) throws XMLDBException
XMLDBException
public void addItem(String compName, ConfigItem item)
addItem
in class ConfigurationCache
public Collection<ConfigItem> allItems() throws TigaseDBException
ComponentRepository
allItems
in interface ComponentRepository<ConfigItem>
allItems
in class ConfigurationCache
TigaseDBException
public String[] getCompNames()
ConfigRepositoryIfc
getCompNames
in interface ConfigRepositoryIfc
getCompNames
in class ConfigurationCache
public ConfigItem getItem(String compName, String node, String key)
getItem
in class ConfigurationCache
public Set<ConfigItem> getItemsForComponent(String compName)
ConfigRepositoryIfc
getItemsForComponent
in interface ConfigRepositoryIfc
getItemsForComponent
in class ConfigurationCache
public String[] getKeys(String root, String node)
ConfigRepositoryIfc
getKeys
in interface ConfigRepositoryIfc
getKeys
in class ConfigurationCache
public void initRepository(String repo_uri, Map<String,String> params) throws DBInitException
Repository
resource_uri
parameter as the database connection string or via
params
map if the required repository parameters are more complex or both.initRepository
in interface Repository
initRepository
in class ConfigurationCache
repo_uri
- value in most cases representing the database connection string.params
- is a Map
with repository properties necessary to initialize and perform all the
functions. The initialization parameters are implementation dependent.DBInitException
- if there was an error during repository initialization. Some implementations,
though, perform so called lazy initialization so even though there is a problem with the underlying repository it
may not be signaled through this method call.public void removeItem(String compName, ConfigItem item)
removeItem
in class ConfigurationCache
public int size()
ComponentRepository
size
in interface ComponentRepository<ConfigItem>
size
in class ConfigurationCache
int
value with number of items in the repository.public void store() throws TigaseDBException
ComponentRepository
store
in interface ComponentRepository<ConfigItem>
store
in class ConfigurationCache
TigaseDBException
Copyright © 2004–2021 "Tigase, Inc.". All rights reserved.