public class VHostJDBCRepository extends UserRepoRepository<VHostItem>
Repository.Meta
Modifier and Type | Field and Description |
---|---|
static String |
DNS_DEF_IP_PROP_KEY
Configuration option allowing specify default IP to which VHost should resolve
vhost-man/dns-def-ip=
|
static String |
DNS_DEF_IP_PROP_VAL
Field description
|
static String |
DNS_SRV_DEF_ADDR_PROP_KEY
Configuration option allowing specify default hostname to which VHost should resolve
vhost-man/dns-srv-def-addr=
|
static String |
DNS_SRV_DEF_ADDR_PROP_VAL
Field description
|
static String |
DOMAINS_PER_USER_LIMIT_PROP_KEY
Configuration option allowing specify default maximum number that user can register
in service
vhost-man/domains-per-user-limit=
|
static int |
DOMAINS_PER_USER_LIMIT_PROP_VAL
Field description
|
REPO_CLASS_PROP_KEY, REPO_URI_PROP_KEY
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()
Method description
|
String[] |
getDefaultPropetyItems()
Method description
|
void |
getDefaults(Map<String,Object> defs,
Map<String,Object> params)
The method is called to obtain default 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.
|
VHostItem |
getItemInstance()
Creates a new, uninitialized instance of the repository Item.
|
String |
getItemsListPKey()
Method description
|
String |
getPropertyKey()
Method description
|
BareJID |
getRepoUser()
Method description
|
void |
initRepository(String resource_uri,
Map<String,String> params)
The method is called to initialize the data repository.
|
static void |
main(String[] args)
Simple verification of VHost validation
|
void |
setProperties(Map<String,Object> properties)
Method description
|
String |
validateItem(VHostItem item)
Performs Item validation to check whether it meets the repository policy.
|
reload, store
addItem, addItemNoStore, addRepoChangeListener, allItems, contains, getItem, initItemsMap, itemChanged, iterator, removeItem, removeRepoChangeListener, setAutoloadTimer, size, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static final String DNS_DEF_IP_PROP_KEY
public static String DNS_DEF_IP_PROP_VAL
public static final String DNS_SRV_DEF_ADDR_PROP_KEY
public static String DNS_SRV_DEF_ADDR_PROP_VAL
public static final String DOMAINS_PER_USER_LIMIT_PROP_KEY
public static final int DOMAINS_PER_USER_LIMIT_PROP_VAL
public void destroy()
ComponentRepository
public String getConfigKey()
ConfigRepository
getConfigKey
in class ConfigRepository<VHostItem>
public String[] getDefaultPropetyItems()
ConfigRepository
getDefaultPropetyItems
in class ConfigRepository<VHostItem>
public void getDefaults(Map<String,Object> defs, Map<String,Object> params)
ComponentRepository
getDefaults
in interface ComponentRepository<VHostItem>
getDefaults
in class UserRepoRepository<VHostItem>
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.public VHostItem getItemInstance()
ComponentRepository
public String getItemsListPKey()
UserRepoRepository
getItemsListPKey
in class UserRepoRepository<VHostItem>
public String getPropertyKey()
ConfigRepository
getPropertyKey
in class ConfigRepository<VHostItem>
public BareJID getRepoUser()
UserRepoRepository
getRepoUser
in class UserRepoRepository<VHostItem>
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 void setProperties(Map<String,Object> properties)
UserRepoRepository
setProperties
in interface ComponentRepository<VHostItem>
setProperties
in class UserRepoRepository<VHostItem>
properties
- a Map
with configuration settings. Content of this
Map
must not be modified. This read-only collection.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 static void main(String[] args)
args
- Copyright © 2017 "Tigase, Inc.". All rights reserved.