@ConfigAliases(value=@ConfigAlias(field="items",alias="virtual-hosts")) public class VHostJDBCRepository extends UserRepoRepository<VHostItem> implements ComponentRepositoryDataSourceAware<VHostItem,DataSource>
Repository.Meta, Repository.SchemaId
REPO_CLASS_PROP_KEY, REPO_URI_PROP_KEY
autoReloadInterval, items, itemsHash
COMP_REPO_BIND
Constructor and Description |
---|
VHostJDBCRepository() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Method destroys this instance of ComponentRepository releasing resources allocated for this instance of
ComponentRepository if possible
|
String |
getConfigKey() |
String[] |
getDefaultPropetyItems() |
String |
getDefaultVHost() |
VHostItem |
getItemInstance()
Creates a new, uninitialized instance of the repository Item.
|
String |
getItemsListPKey() |
String |
getPropertyKey() |
BareJID |
getRepoUser() |
void |
initRepository(String resource_uri,
Map<String,String> params)
Deprecated.
|
void |
reload()
This method is called to reload items from the database or other permanent storage.
|
void |
setDataSource(DataSource dataSource)
Method called to provide class with instance of a data source.
|
void |
setDef_srv_address(String address) |
void |
setDefaultVHost(String vhost) |
void |
setItemsOld(String[] items_arr) |
void |
setVhostDefaults(VHostItemDefaults vhostDefaults) |
String |
validateItem(VHostItem item)
Performs Item validation to check whether it meets the repository policy.
|
setRepo, store
addItem, addItemNoStore, addRepoChangeListener, allItems, beforeUnregister, contains, getDefaultItems, getDefaults, getItem, getItemsOld, initialize, initItemsMap, isInitialized, itemChanged, iterator, removeItem, removeItemNoStore, removeRepoChangeListener, setAutoloadTimer, setAutoReloadInterval, setProperties, size, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addItem, addItemNoStore, addRepoChangeListener, allItems, contains, getDefaults, getItem, removeItem, removeItemNoStore, removeRepoChangeListener, setAutoloadTimer, setProperties, size, store
forEach, iterator, spliterator
public void destroy()
ComponentRepository
destroy
in interface ComponentRepository<VHostItem>
public String getConfigKey()
getConfigKey
in class ConfigRepository<VHostItem>
public String[] getDefaultPropetyItems()
getDefaultPropetyItems
in class ConfigRepository<VHostItem>
public VHostItem getItemInstance()
ComponentRepository
getItemInstance
in interface ComponentRepository<VHostItem>
public String getItemsListPKey()
getItemsListPKey
in class UserRepoRepository<VHostItem>
public String getPropertyKey()
getPropertyKey
in class ConfigRepository<VHostItem>
public BareJID getRepoUser()
getRepoUser
in class UserRepoRepository<VHostItem>
@Deprecated public void initRepository(String resource_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
resource_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 reload()
ComponentRepository
reload
in interface ComponentRepository<VHostItem>
reload
in class UserRepoRepository<VHostItem>
public void setDef_srv_address(String address)
public String validateItem(VHostItem item)
ComponentRepository
null
, otherwise it returns an error description.validateItem
in interface ComponentRepository<VHostItem>
validateItem
in class ConfigRepository<VHostItem>
item
- is an Item
object to perform validation checking upon.null
on success and an error message otherwise.public void setDataSource(DataSource dataSource)
DataSourceAware
setDataSource
in interface DataSourceAware<DataSource>
public String getDefaultVHost()
public void setDefaultVHost(String vhost)
public void setItemsOld(String[] items_arr)
setItemsOld
in class ConfigRepository<VHostItem>
public void setVhostDefaults(VHostItemDefaults vhostDefaults)
Copyright © 2004–2019 "Tigase, Inc.". All rights reserved.