public class ConfigXMLRepository extends ConfigurationCache
ConfigXMLRepository
provides access to configuration
settings.
Created: Sat Nov 13 18:53:21 2004
Repository.Meta
Modifier and Type | Field and Description |
---|---|
static String |
COMPONENT_NODE
Field description
|
static String |
ROOT_NODE
Field description
|
static String |
XMPP_CONFIG_FILE_PROPERTY_KEY
Field description
|
static String |
XMPP_CONFIG_FILE_PROPERTY_VAL
Field description
|
CONFIG_DUMP_FILE_PROP_DEF, CONFIG_DUMP_FILE_PROP_KEY
RELOAD_DELAY, RESOURCE_URI
COMP_REPO_BIND
Constructor and Description |
---|
ConfigXMLRepository()
Constructs ...
|
Modifier and Type | Method and Description |
---|---|
void |
addItem(String compName,
ConfigItem item)
Method description
|
Collection<ConfigItem> |
allItems()
Method description
|
String[] |
getCompNames()
Method description
|
static ConfigXMLRepository |
getConfigRepository()
Method description
|
static ConfigXMLRepository |
getConfigRepository(boolean debug,
String file_name)
Method description
|
static ConfigXMLRepository |
getConfigRepository(String file_name)
Method description
|
ConfigItem |
getItem(String compName,
String node,
String key)
Method description
|
Set<ConfigItem> |
getItemsForComponent(String compName)
Method description
|
String[] |
getKeys(String root,
String node)
Method description
|
void |
initRepository(String repo_uri,
Map<String,String> params)
Method description
|
String |
nodeForPackage(Class cls)
Method description
|
void |
removeItem(String compName,
ConfigItem item)
Method description
|
int |
size()
Method description
|
void |
store()
Method description
|
addItem, addItem, addItemNoStore, addRepoChangeListener, contains, destroy, get, getDefaults, getDefHostname, getInitProperties, getItem, getItemInstance, getProperties, iterator, putProperties, reload, remove, removeItem, removeRepoChangeListener, set, setAutoloadTimer, setDefHostname, setProperties, validateItem
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 tigase.xml.db.XMLDBException
tigase.xml.db.XMLDBException
public static ConfigXMLRepository getConfigRepository(String file_name) throws tigase.xml.db.XMLDBException
file_name
- tigase.xml.db.XMLDBException
public static ConfigXMLRepository getConfigRepository(boolean debug, String file_name) throws tigase.xml.db.XMLDBException
debug
- file_name
- tigase.xml.db.XMLDBException
public void addItem(String compName, ConfigItem item)
addItem
in class ConfigurationCache
compName
- item
- public Collection<ConfigItem> allItems() throws TigaseDBException
allItems
in interface ComponentRepository<ConfigItem>
allItems
in class ConfigurationCache
TigaseDBException
public String[] getCompNames()
getCompNames
in interface ConfigRepositoryIfc
getCompNames
in class ConfigurationCache
public ConfigItem getItem(String compName, String node, String key)
getItem
in class ConfigurationCache
compName
- node
- key
- public Set<ConfigItem> getItemsForComponent(String compName)
getItemsForComponent
in interface ConfigRepositoryIfc
getItemsForComponent
in class ConfigurationCache
compName
- public String[] getKeys(String root, String node)
getKeys
in interface ConfigRepositoryIfc
getKeys
in class ConfigurationCache
root
- node
- public void initRepository(String repo_uri, Map<String,String> params) throws DBInitException
initRepository
in interface Repository
initRepository
in class ConfigurationCache
params
- repo_uri
- value in most cases representing the database connection string.ConfigurationException
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
compName
- item
- public int size()
size
in interface ComponentRepository<ConfigItem>
size
in class ConfigurationCache
int
value with number of items in the repository.public void store() throws TigaseDBException
store
in interface ComponentRepository<ConfigItem>
store
in class ConfigurationCache
TigaseDBException
Copyright © 2014 "Tigase, Inc.". All rights reserved.