|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.spi.config.definition.PropertiesDefinitionContext
@ThreadSafe public final class PropertiesDefinitionContext
Contains information from the definition.xml
that is contained in archives providing property information.
Field Summary | |
---|---|
static Set<String> |
DEFAULT_TLDS The default top level domains to identify groups. |
Constructor Summary | |
---|---|
PropertiesDefinitionContext() Convenience constructor using the default TLDs and not registering any environments, nodes or groups. |
|
PropertiesDefinitionContext(Set<String> environments, Set<String> nodes, Set<String> groups) Convenience constructor using the default TLDs and no explicit files. |
|
PropertiesDefinitionContext(Set<String> environments, Set<String> nodes, Set<String> groups, Map<String,ConfigurationKey> files) Convenience constructor using the default TLDs. |
|
PropertiesDefinitionContext(Set<String> tlds, Set<String> environments, Set<String> nodes, Set<String> groups) Convenience constructor without an explicit path to configuration key mapping. |
|
PropertiesDefinitionContext(Set<String> tlds, Set<String> environments, Set<String> nodes, Set<String> groups, Map<String,ConfigurationKey> files) Default constructor. |
Method Summary | |
---|---|
ConfigurationKey |
getKey(String path) Returns the configuration key associated with the given path . |
boolean |
isGroup(String token) Checks if the given token is a group. |
boolean |
isRegisteredEnvironment(String token) Checks if the given token is a registered environment. |
boolean |
isRegisteredGroup(String token) Checks if the given token is a registered group. |
boolean |
isRegisteredGroupTld(String token) Checks if the given string is a registered top level domain (tld) or contains only two letters. |
boolean |
isRegisteredNode(String token) Checks if the given token is a registered node. |
String |
toString() |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Set<String> DEFAULT_TLDS
biz
com
edu
gov
info
net
org
Constructor Detail |
---|
public PropertiesDefinitionContext()
public PropertiesDefinitionContext(Set<String> environments, Set<String> nodes, Set<String> groups)
environments
- the collection of registered environment names.
nodes
- the collection of registered node names.
groups
- the collection of registered group names.
public PropertiesDefinitionContext(Set<String> tlds, Set<String> environments, Set<String> nodes, Set<String> groups)
tlds
- the collection of top-level-domains (tlds).
environments
- the collection of registered environment names.
nodes
- the collection of registered node names.
groups
- the collection of registered group names.
public PropertiesDefinitionContext(Set<String> environments, Set<String> nodes, Set<String> groups, Map<String,ConfigurationKey> files)
environments
- the collection of registered environment names.
nodes
- the collection of registered node names.
groups
- the collection of registered group names.
files
- the mapping of properties file path names to a associated configuration key.
public PropertiesDefinitionContext(Set<String> tlds, Set<String> environments, Set<String> nodes, Set<String> groups, Map<String,ConfigurationKey> files)
tlds
- the collection of top-level-domains (tlds).
environments
- the collection of registered environment names.
nodes
- the collection of registered node names.
groups
- the collection of registered group names.
files
- the mapping of properties file path names to a associated configuration key.
Method Detail |
---|
public boolean isRegisteredGroupTld(String token)
token
- the token to check.
true
if the
token
is not
null
, is registered or contains exactly two letters,
false
otherwise.
public boolean isRegisteredEnvironment(String token)
token
- the token to check.
true
if the token is a registered environment,
false
otherwise.
public boolean isRegisteredNode(String token)
token
- the token to check.
true
if the token is a registered node,
false
otherwise.
public boolean isRegisteredGroup(String token)
token
- the token to check.
true
if the token is a registered group,
false
otherwise.
@CheckForNull public ConfigurationKey getKey(String path)
path
.
path
- the path to fetch its configuration key. Note that a
null
value is allowed.
path
or
null
if no key is associated with it.
public boolean isGroup(String token)
token
- the token to check.
true
if the token is a group,
false
otherwise.
public String toString()
toString
in class
Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |