public class AbstractCompDBRepository extends UserRepoRepository<CompRepoItem>
Repository.Meta, Repository.SchemaId
Modifier and Type | Field and Description |
---|---|
static String |
ITEMS_IMPORT_FILE |
REPO_CLASS_PROP_KEY, REPO_URI_PROP_KEY
autoReloadInterval, items, itemsHash
COMP_REPO_BIND
Modifier | Constructor and Description |
---|---|
protected |
AbstractCompDBRepository(String extenalComponentsGroup) |
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() |
CompRepoItem |
getItemInstance()
Creates a new, uninitialized instance of the repository Item.
|
String |
getItemsListPKey() |
String |
getPropertyKey() |
BareJID |
getRepoUser() |
void |
initialize()
Method will be called, when bean will be created, configured and ready to use.
|
void |
initRepository(String resource_uri,
Map<String,String> params)
Deprecated.
|
void |
loadItemsFromFile() |
String |
validateItem(CompRepoItem item)
Performs Item validation to check whether it meets the repository policy.
|
reload, setRepo, store
addItem, addItemNoStore, addRepoChangeListener, allItems, beforeUnregister, contains, getDefaultItems, getDefaults, getItem, getItemsOld, initItemsMap, isInitialized, itemChanged, iterator, removeItem, removeItemNoStore, removeRepoChangeListener, setAutoloadTimer, setAutoReloadInterval, setItemsOld, setProperties, size, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static final String ITEMS_IMPORT_FILE
protected AbstractCompDBRepository(String extenalComponentsGroup)
public void destroy()
ComponentRepository
public String getConfigKey()
getConfigKey
in class ConfigRepository<CompRepoItem>
public String[] getDefaultPropetyItems()
getDefaultPropetyItems
in class ConfigRepository<CompRepoItem>
public CompRepoItem getItemInstance()
ComponentRepository
public String getItemsListPKey()
getItemsListPKey
in class UserRepoRepository<CompRepoItem>
public String getPropertyKey()
getPropertyKey
in class ConfigRepository<CompRepoItem>
public BareJID getRepoUser()
getRepoUser
in class UserRepoRepository<CompRepoItem>
@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.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 String validateItem(CompRepoItem item)
ComponentRepository
null
, otherwise it returns an error description.validateItem
in interface ComponentRepository<CompRepoItem>
validateItem
in class ConfigRepository<CompRepoItem>
item
- is an Item
object to perform validation checking upon.null
on success and an error message otherwise.public void initialize()
Initializable
initialize
in interface Initializable
initialize
in class ConfigRepository<CompRepoItem>
public void loadItemsFromFile()
Copyright © 2004–2019 "Tigase, Inc.". All rights reserved.