Difference between revisions of "Accessing service configuration data"
From CCIL
m |
m |
||
Line 9: | Line 9: | ||
</pre> | </pre> | ||
− | + | == Usage == | |
<pre> | <pre> | ||
ConfigHelper config = LocalServer.createConfigHelper(); | ConfigHelper config = LocalServer.createConfigHelper(); | ||
+ | </pre> | ||
+ | |||
+ | === Getting data === | ||
+ | |||
+ | <pre> | ||
+ | String dictionaryBase = serviceConfig.getString(IGNORE_LIST_NS, | ||
+ | PROP_DICTIONARY_LOCATION, SharpfindConstants.DEFAULT_DICTIONARY_LOCATION); | ||
</pre> | </pre> |
Latest revision as of 09:44, 13 June 2016
ConfigHelper is defined in the cybercore-api artefact. You can reference it using the following Maven snippet:
<dependency> <groupId>cybercore</groupId> <version>2.4.3-SNAPSHOT</version> <artifactId>cybercore-api</artifactId> </dependency>
Usage
ConfigHelper config = LocalServer.createConfigHelper();
Getting data
String dictionaryBase = serviceConfig.getString(IGNORE_LIST_NS, PROP_DICTIONARY_LOCATION, SharpfindConstants.DEFAULT_DICTIONARY_LOCATION);