|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttigase.vhosts.VhostConfigRepository
public class VhostConfigRepository
Created: Nov 27, 2008 1:53:58 PM
| Field Summary | |
|---|---|
static java.lang.String |
ANONYMOUS_DOMAINS_PROP_KEY
|
protected java.util.LinkedHashMap<java.lang.String,VHostItem> |
vhosts
|
| Constructor Summary | |
|---|---|
VhostConfigRepository()
|
|
| Method Summary | |
|---|---|
void |
addVHost(VHostItem vhost)
The method adds a new or updates existing virtual hosts in the repository. |
boolean |
contains(java.lang.String domain)
The method checks whether the given domain is stored in the repository. |
void |
getDefaults(java.util.Map<java.lang.String,java.lang.Object> defs,
java.util.Map<java.lang.String,java.lang.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. |
VHostItem |
getVHost(java.lang.String domain)
The method returns all domain configuration parameters for a given domain or null if the domain does not exist in the repository. |
java.util.Collection<VHostItem> |
localDomains()
|
void |
reload()
This method is called to reload virtual hosts from the database or other permanent storage. |
void |
removeVHost(java.lang.String vh)
The method is called to remove given VHost from the memory cache and permanent storage. |
void |
setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
The method is called to set configuration for this repository implementation. |
int |
size()
The method returns number of virtual domains in the repository. |
void |
store()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ANONYMOUS_DOMAINS_PROP_KEY
protected java.util.LinkedHashMap<java.lang.String,VHostItem> vhosts
| Constructor Detail |
|---|
public VhostConfigRepository()
| Method Detail |
|---|
public void getDefaults(java.util.Map<java.lang.String,java.lang.Object> defs,
java.util.Map<java.lang.String,java.lang.Object> params)
VHostRepository
getDefaults in interface VHostRepositorydefs - 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 void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
VHostRepository
setProperties in interface VHostRepositoryproperties - a Map with configuration settings. Content
of this Map must not be modified. This read-only collection.public VHostItem getVHost(java.lang.String domain)
VHostRepositorynull if the domain does not exist in the repository. In
other words it returns null if given domain is not local.
getVHost in interface VHostRepositorydomain - a String with domain name to search for.
VHostItem for a given domain or null
if the domain is not in the repository.public boolean contains(java.lang.String domain)
VHostRepository
contains in interface VHostRepositorydomain - a String with domain name to search for.
boolean value true if domain exist in
the repository or false of domain does not exist.public void reload()
VHostRepository
reload in interface VHostRepositorypublic void store()
public int size()
VHostRepository
size in interface VHostRepositoryint value with number of virtual hosts in the
repository.public void addVHost(VHostItem vhost)
VHostRepositoryVHostItem has all fields set to "enabled". After this method
call is finished a new added virtual domain must be available as a local
domain for the server installation.
The method adds the vhosts to memory cache and permamnent storage.
addVHost in interface VHostRepositoryvhost - a VHostItem with virtual domain and all it's
configuration parameters.public void removeVHost(java.lang.String vh)
VHostRepository
removeVHost in interface VHostRepositoryvh - a String with domain name to remove.public java.util.Collection<VHostItem> localDomains()
localDomains in interface VHostRepository
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||