ConnectorLib Java 25.1
ConnectorLib Java SDK Programming Guide

# Read Configuration Parameters

All of the fetch action methods you can override in `ConnectorBase` are passed a `task` object with a `TaskConfig` member - accessed through `getTaskConfig()`. You can use this property to read configuration settings from the task's configuration.

NOTE: The task configuration returned by the methods of the `TaskConfig` can be different to what is specified in the configuration file. This is because the settings in the configuration file can be overridden by settings passed to ACI actions.

The following lines demonstrate how to read string, integer and Boolean values:

           String param = task.getTaskConfig().read("Param", "DefaultValue");
           int numeric = task.getTaskConfig().read("Numeric", 6);
           boolean bool = task.getTaskConfig().read("Boolean", true);

Each of the methods called above takes the name of the parameter to read and the default value to return if the parameter is not specified. Values for these parameters might be specified in a configuration file like this:

           Param=MyValue
           Numeric=4
           Boolean=False

You can read encrypted values (such as passwords that were encrypted with autpassword.exe) using the `readPassword` method:

           String password = task.getTaskConfig().readPassword("Password");

Copyright 2024 Open Text
Version 25.1 | Last updated January 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery ConnectorLib Java 25.1

Topic Title: Read Configuration Parameters