- OTIS Documentation
- General OTIS Configuration
- Security Administrator's Guide
- XML File Configuration Format
- Configuring OTIS Client in Java
- Configuration Settings for OTIS Client
- Configuration Settings for OTIS Server
- Configuration Settings for Specific Authentication Methods
Configuring OTIS Client in Java
Both the OTIS client SDK and the OTIS server are written in Java. Many of the objects and interfaces have configure methods that take as a parameter a java.util.Map object. The map has a set of entries, each of which is a key/value pair. The key is a string that names the setting, and the value is a java.lang.Object. The value can itself be another Map or a List of Objects. This allows settings to be nested.
For the OTIS client, a configuration Map is passed into the AuthSessionManager object, and from there is passed down to IAuthSession objects. The configuration Map object can be built by the application, or read in from a configuration file. Many different configuration formats can be used. This page assumes that the specific XML file format described here is being used. If the configuration file is an XML file in this format, then the org.eclipse.higgins.configuration.xml.ConfigurationHandler class may be used to read the configuration into a java.util.Map object, as illustrated below:
import org.eclipse.higgins.configuration.xml.ConfigurationHandler;
import org.bandit.otis.impl.AuthSessionManager;
ConfigurationHandler configHandler = new ConfigurationHandler();
// Configuration file is "/ConfigDir/otis-config.xml"
configHandler.setConfigurationBase( "/ConfigDir");
configHandler.setFileName( "otis-config.xml");
if (!configHandler.configure())
{
// THROW SOME KIND OF EXCEPTION HERE
}
else
{
Map settings = configHandler.getSettings();
AuthSessionManager authSessionMgr = new AuthSessionManager( settings);
}