tigase.db.comp
Class UserRepoRepository<Item extends RepositoryItem>

java.lang.Object
  extended by tigase.db.comp.ConfigRepository<Item>
      extended by tigase.db.comp.UserRepoRepository<Item>
Type Parameters:
Item -
All Implemented Interfaces:
Iterable<Item>, ComponentRepository<Item>
Direct Known Subclasses:
CompDBRepository, VHostJDBCRepository

public abstract class UserRepoRepository<Item extends RepositoryItem>
extends ConfigRepository<Item>

Created: Oct 3, 2009 3:55:27 PM

Version:
$Rev: 1905 $
Author:
Artur Hefczyc

Field Summary
static String REPO_CLASS_PROP_KEY
           
static String REPO_URI_PROP_KEY
           
 
Fields inherited from class tigase.db.comp.ConfigRepository
items
 
Fields inherited from interface tigase.db.ComponentRepository
COMP_REPO_BIND
 
Constructor Summary
UserRepoRepository()
           
 
Method Summary
 void getDefaults(Map<String,Object> defs, Map<String,Object> params)
          The method is called to obtain defualt configuration settings if there are any for this repository implementation The configuration settings are implementation dependent and there are no defaults set by the server.
 String getItemsListPKey()
           
abstract  String getRepoUser()
           
 void reload()
          This method is called to reload items from the database or other permanent storage.
 void setProperties(Map<String,Object> properties)
          The method is called to set configuration for this repository implementation.
 void store()
          The method is called to store all data in the database.
 
Methods inherited from class tigase.db.comp.ConfigRepository
addItem, allItems, contains, getConfigKey, getDefaultPropetyItems, getItem, getPropertyKey, iterator, removeItem, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface tigase.db.ComponentRepository
getItemInstance
 

Field Detail

REPO_CLASS_PROP_KEY

public static final String REPO_CLASS_PROP_KEY
See Also:
Constant Field Values

REPO_URI_PROP_KEY

public static final String REPO_URI_PROP_KEY
See Also:
Constant Field Values
Constructor Detail

UserRepoRepository

public UserRepoRepository()
Method Detail

getRepoUser

public abstract String getRepoUser()

getItemsListPKey

public String getItemsListPKey()

getDefaults

public void getDefaults(Map<String,Object> defs,
                        Map<String,Object> params)
Description copied from interface: ComponentRepository
The method is called to obtain defualt configuration settings if there are any for this repository implementation The configuration settings are implementation dependent and there are no defaults set by the server. Default settings returned by this method are then saved in the configuration file and presented to the admin for further adjustements.

Specified by:
getDefaults in interface ComponentRepository<Item extends RepositoryItem>
Overrides:
getDefaults in class ConfigRepository<Item extends RepositoryItem>
Parameters:
defs - is a Map collection where all repository configuration defaults must be put.
params - is a Map collection with some preset properties for the server. These settings can be used to adjust repository defaults, for example they can contain database connection URL or initial list of virtual domains.

setProperties

public void setProperties(Map<String,Object> properties)
Description copied from interface: ComponentRepository
The method is called to set configuration for this repository implementation. The configuration is repository implementation dependent. There are no default settings for the repository.

Specified by:
setProperties in interface ComponentRepository<Item extends RepositoryItem>
Overrides:
setProperties in class ConfigRepository<Item extends RepositoryItem>
Parameters:
properties - a Map with configuration settings. Content of this Map must not be modified. This read-only collection.

reload

public void reload()
Description copied from interface: ComponentRepository
This method is called to reload items from the database or other permanent storage. It is possible that items list is modified externally by third-party system. When all modifications are done this method is called to refresh the class cache. Whether the implementation load whole list or just last modifications is implementation dependent.

Specified by:
reload in interface ComponentRepository<Item extends RepositoryItem>
Overrides:
reload in class ConfigRepository<Item extends RepositoryItem>

store

public void store()
Description copied from interface: ComponentRepository
The method is called to store all data in the database. It is used when the repository has been changed in some way and the changes have to be put to a permanent storage for later retrieval.

Specified by:
store in interface ComponentRepository<Item extends RepositoryItem>
Overrides:
store in class ConfigRepository<Item extends RepositoryItem>


Copyright © 2001-2006 Tigase Developers Team. All rights Reserved.