|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.impl.config.domain.key.envapp.AbstractPropertiesDefinitionContext
@ThreadSafe public abstract class AbstractPropertiesDefinitionContext
Contains information from the definition.xml
that is contained in archives providing property information, based on environment and application.
Field Summary | |
---|---|
static Set<String> |
DEFAULT_TLDS The default top level domains to identify groups. |
Constructor Summary | |
---|---|
AbstractPropertiesDefinitionContext() Convenience constructor using the default TLDs and not registering any environments, nodes or groups. |
|
AbstractPropertiesDefinitionContext(Set<String> environments, Set<String> nodes, Set<String> groups) Convenience constructor using the default TLDs and no explicit files. |
|
AbstractPropertiesDefinitionContext(Set<String> environments, Set<String> nodes, Set<String> groups, PropertyResourceMatchers matchers) Convenience constructor using the default TLDs. |
|
AbstractPropertiesDefinitionContext(Set<String> tlds, Set<String> environments, Set<String> nodes, Set<String> groups) Convenience constructor without an explicit path to configuration key mapping. |
|
AbstractPropertiesDefinitionContext(Set<String> tlds, Set<String> environments, Set<String> nodes, Set<String> groups, PropertyResourceMatchers matchers) 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 AbstractPropertiesDefinitionContext()
public AbstractPropertiesDefinitionContext(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 AbstractPropertiesDefinitionContext(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 AbstractPropertiesDefinitionContext(Set<String> environments, Set<String> nodes, Set<String> groups, PropertyResourceMatchers matchers)
environments
- the collection of registered environment names.
nodes
- the collection of registered node names.
groups
- the collection of registered group names.
matchers
- the matcher of properties file path names to a associated configuration key.
public AbstractPropertiesDefinitionContext(Set<String> tlds, Set<String> environments, Set<String> nodes, Set<String> groups, PropertyResourceMatchers matchers)
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.
matchers
- the matcher of properties file path names to a associated configuration key.
Method Detail |
---|
public final 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 final boolean isRegisteredEnvironment(String token)
token
- the token to check.
true
if the token is a registered environment,
false
otherwise.
public final boolean isRegisteredNode(String token)
token
- the token to check.
true
if the token is a registered node,
false
otherwise.
public final boolean isRegisteredGroup(String token)
token
- the token to check.
true
if the token is a registered group,
false
otherwise.
@CheckForNull public final ConfigurationKey<?> getKey(String path)
path
.
getKey
in interface
PropertiesDefinitionContext
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 final 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 |