Difference between revisions of "Accessing service configuration data"

From CCIL
Jump to: navigation, search
(Created page with "''ConfigHelper'' is defined in the cybercore-api artefact. You can reference it using the following Maven snippet: <pre> <dependency> <groupId>cybercore</groupId> <v...")
 
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
''ConfigHelper'' is defined in the cybercore-api artefact. You can reference it using the following Maven snippet:
+
''ConfigHelper'' is defined in the ''cybercore-api'' artefact. You can reference it using the following Maven snippet:
  
 
<pre>
 
<pre>
Line 9: Line 9:
 
</pre>
 
</pre>
  
TBA
+
== Usage ==
  
 
<pre>
 
<pre>
 
ConfigHelper config = LocalServer.createConfigHelper();
 
ConfigHelper config = LocalServer.createConfigHelper();
</pre<
+
</pre>
 +
 
 +
=== Getting data ===
 +
 
 +
<pre>
 +
String dictionaryBase = serviceConfig.getString(IGNORE_LIST_NS,
 +
PROP_DICTIONARY_LOCATION, SharpfindConstants.DEFAULT_DICTIONARY_LOCATION);
 +
</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);