|
||||||||||
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.EnvAppDefinitionKeyHelper
@ThreadSafe public final class EnvAppDefinitionKeyHelper
Derives a ConfigurationKey
from a path found in a definition file.
Constructor Summary | |
---|---|
EnvAppDefinitionKeyHelper() Convenience constructor using the default TLDs and not registering any environments, nodes or groups. |
|
EnvAppDefinitionKeyHelper(EnvAppPropertiesDefinitionContext context) Default constructor. |
Method Summary | |
---|---|
ConfigurationKey<?> |
parse(String pathWithFile) Parses the given path to create a configuration key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EnvAppDefinitionKeyHelper()
public EnvAppDefinitionKeyHelper(EnvAppPropertiesDefinitionContext context) throws NullPointerException
context
- the context to evaluate the configuration keys from properties file paths.
NullPointerException
- if
context
is
null
.
Method Detail |
---|
public ConfigurationKey<?> parse(String pathWithFile) throws IllegalArgumentException
The expected syntax is as follows:
/environment
/environment/node
/environment/node/group
/environment/node/group/application
/environment/node/group/application/version
/environment/group
/environment/group/application
/environment/group/application/version
/group
/group/application
/group/application/version
A file ending with properties following the path will be chopped.
The parser has to determine whether a part of the path is a environment
, a node
or a group
. Since a node
is always prefixed by an environment
only the following two cases have to be dealt with:
environment
vs. group
node
vs. group
group
s start with
TenantUserPropertiesDefinitionContext#DEFAULT_TLDS
or explicitly registered with TenantUserPropertiesDefinitionContext
.
)definition.xml
file environment
s and node
s do not start as groups
except they are explicitly registered in the definition.xml
file.
parse
in interface
DefinitionKeyHelper
pathWithFile
- the path to parse.
IllegalArgumentException
- if the given
path
is not valid according to the rules given above.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |