public static class CdiTestSuiteRunner.TestConfigSource extends Object implements ConfigSource, Deactivatable
DELTASPIKE_ORDINAL| Constructor and Description |
|---|
TestConfigSource() |
| Modifier and Type | Method and Description |
|---|---|
String |
getConfigName() |
int |
getOrdinal()
Lookup order:
System properties (ordinal 400)
Environment properties (ordinal 300)
JNDI values (ordinal 200)
Properties file values (/META-INF/apache-deltaspike.properties) (ordinal 100)
Important Hints for custom implementations:
If a custom implementation should be invoked before the default implementations, use a value > 400
If a custom implementation should be invoked after the default implementations, use a value < 100
IMPORTANT: Have a look at the abstract base-implementation DeltaSpike is using internally,
if a custom implementation should load the ordinal value from the config-source like the default
implementations provided by DeltaSpike do.
|
Map<String,String> |
getProperties()
Return properties contained in this config source.
|
String |
getPropertyValue(String key) |
boolean |
isScannable()
Determines if this config source should be scanned for its list of properties.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetOnAttributeChangepublic int getOrdinal()
ConfigSourceImportant Hints for custom implementations:
If a custom implementation should be invoked before the default implementations, use a value > 400
If a custom implementation should be invoked after the default implementations, use a value < 100
IMPORTANT: Have a look at the abstract base-implementation DeltaSpike is using internally, if a custom implementation should load the ordinal value from the config-source like the default implementations provided by DeltaSpike do.
Reordering of the default order of the config-sources:
Example: If the properties file/s should be used before the other implementations, you have to configure an ordinal > 400. That means, you have to add e.g. deltaspike_ordinal=401 to /META-INF/apache-deltaspike.properties . Hint: In case of property files every file is handled as independent config-source, but all of them have ordinal 400 by default (and can be reordered in a fine-grained manner.
getOrdinal in interface ConfigSourcepublic Map<String,String> getProperties()
ConfigSourcegetProperties in interface ConfigSourcepublic String getPropertyValue(String key)
getPropertyValue in interface ConfigSourcekey - for the propertynull if this ConfigSource doesn't provide any value for the given key.public String getConfigName()
getConfigName in interface ConfigSourcepublic boolean isScannable()
ConfigSourceisScannable in interface ConfigSourceCopyright © 2020 The Apache Software Foundation. All rights reserved.