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)
Method description
|
VHostItem |
getItemInstance()
Method description
|
String |
getItemsListPKey()
Method description
|
String |
getPropertyKey()
Method description
|
tigase.xmpp.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 validation of given VHostItem
|
reload, store
addItem, addItemNoStore, addRepoChangeListener, allItems, contains, getItem, initItemsMap, itemChanged, iterator, removeItem, removeRepoChangeListener, setAutoloadTimer, size, toString
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()
getConfigKey
in class ConfigRepository<VHostItem>
public String[] getDefaultPropetyItems()
getDefaultPropetyItems
in class ConfigRepository<VHostItem>
public void getDefaults(Map<String,Object> defs, Map<String,Object> params)
getDefaults
in interface ComponentRepository<VHostItem>
getDefaults
in class UserRepoRepository<VHostItem>
defs
- params
- public VHostItem getItemInstance()
public String getItemsListPKey()
getItemsListPKey
in class UserRepoRepository<VHostItem>
public String getPropertyKey()
getPropertyKey
in class ConfigRepository<VHostItem>
public tigase.xmpp.BareJID getRepoUser()
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)
setProperties
in interface ComponentRepository<VHostItem>
setProperties
in class UserRepoRepository<VHostItem>
properties
- public String validateItem(VHostItem item)
validateItem
in interface ComponentRepository<VHostItem>
validateItem
in class ConfigRepository<VHostItem>
item
- VHostItem which should be validatednull
on success and an error message otherwise.public static void main(String[] args)
args
- Copyright © 2014 "Tigase, Inc.". All rights reserved.