Chapter 3. Configuration

Table of Contents

1. Domain
1.1. XML format
2. Repository
3. Configuration inside Repository
4. Profiles
4.1. Default Profiles
4.2. User-Defined Profiles
4.3. Profile Reference
5. Logging
6. Components
7. Communication
7.1. TAHITI_DEP2
7.2. TAHITI_FTP_SEND
7.3. TAHITI_SFTP_SEND
8. Variables
9. MIME types
9.1. Freedesktop.org.xml
9.2. MimeTypes.xml
10. Help Customization

Tahiti cannot be run as a stand alone system but only in connection with some information system, integrated into business process or as part of document management system. Such system defines document types, document identifiers and relations. Documents are valid only in context of such system.

Tahiti can provide access to one or more information systems (so called domains) and every domain have to be described in separate configuration file.

Configuration also allows to customize Tahiti for several different workplace's and different tasks. Proper configuration and distribution of configuration files is also vital for effective usage. Configuration process is on the next picture.

Tahiti Start

Basic configuration is stored in the file Tahiti.xml which is located in the main directory. This is key file for Tahiti. Please do not remove any configuration options from this file. It is only possible to change default values. Any configuration changes should be done in the domain configuration files. Domain configuration files are stored in the directory configs or directly at the local repository in the file called <domain>/domain.xml.

 \TahitiDirectory
   Tahiti.exe
   Tahiti.xml
   \configs
     DOMAIN1.xml
     DOMAIN2.xml
     \DOMAIN1
       ... DOMAIN1 configuration files ...
     \DOMAIN2
       ... DOMAIN2 configuration files ...

Every domain is represented by one configuration file in configs directory and one directory with subsequent configuration files for this domain. Name of the directory have to be same as domain name in configuration file.

Common configuration parameters for all domains:

Every domain have to have these parameters:

All configurations are stored in xml files. Configuration is stored in pairs of "name" and "value". Value can be string or number.

1. Domain

Domain configuration file is usually named DOMAIN.xml (where DOMAIN is domain name) and is stored in configs directory. File can override almost all configurations specified in Tahiti.xml. Minimal domain configuration have to contain:

  • domain name

  • user domain name - domain name displayed to user

Each domain have separate working directory, local document database. All these items are stored in a directory call local domain repository. Domain configuration can be also stored directly in this directory and file have to be called domain.xml.

Example of domain configuration:

<?xml version="1.0"?>
<Config>
 <Item name="Connection.Domain" 
       value="lc.ucto.lightcomp.cz"/>
 <Item name="Connection.Name" 
       value="LightComp.Ucto"/>
 <Item name="Connection.Options" 
       value="...."/>
 <Item name="Connection.RequestConfig.DocumentTypes" 
       value="cmserver2.xml"/>
</Config>

Table 3.1. Domain configuration options

NameDescription

Connection.Domain

Domain name, used as a domain identification. It can be server domain name with added service name, e.g. documents.server1.skoda-auto.cz

Connection.Name

Domain name displayed to user, should be easy for user to understand where he is going to connect


If any of these two options is not defined configuration is invalid and cannot be used. List of valid configurations is displayed in the login dialog at Tahiti start-up.

1.1. XML format

Tahiti.xml has relativly simple format. Domain configuration has almost the some with only few small differences. Each configuration contains root tag <Config>. This tag contains list of items each within tag <Item>. This tag describe one option. Definition of such option have to be in the main configuration. This definition contains attributes name, type and default. Domain configuration on the other hand has only attributes name and value. Item definition in the main configuration can contain tag <description> with the description of the item.

Attributes of the tag <Item> in the configuration file are in the following table.

Table 3.2. Attributes of tag <Item>

NameUsageDescription

name

tahiti.xml, domain.xml

Name of the item

type

tahiti.xml

Type of the item, can be int or string
defaulttahiti.xmlDefault value. This value is used for all domains if not redefined in domain.xml.
valuedomain.xmlDomain specific value of the item.

2. Repository

Repository is created inside the user profile. It is possible to override this location in option Tahiti.Repository.Path. There are only few reasons for changing this location and we do not recommend to change it. Default location allow to use Roaming Profiles in Windows.

Table 3.3. Repository parameters

NameDescription

Tahiti.Repository.Path

Path to the repository. This have to be fully qualified path. Path can contain variables.


3. Configuration inside Repository

Domain configuration can be stored inside repository (not part of the configs directory) and all other configuration files can be downloaded from the server. This approach is suitable for the situation when there is one Tahiti distribution common for several domains. Domain configuration is stored at the file called domain.xml. It is possible to use utility called configDownload to download this configuration from the web server and store it at the right place.

There is special configuration option called Connection.RequestConfig.TahitiPacked. This is name of server side file with packed configuration. If this option is not empty configuration will be downloaded during logon. Tahiti is using MD5 sum to check if there is new configuration available.

4. Profiles

Profiles are fundamental part of Tahiti and allow to customize look&feel to the specific needs, e.g. document viewing, scanning. There are several predefined profiles and administrator can change these or create new profiles. Default profiles are located in the directory bin/TahitiProfiles. Main file is profiles.xml and contains description of defined profiles. All profiles can be also redefined in domain specific settings.

4.1. Default Profiles

There are 5 standard predefined profiles in Tahiti distribution.

Table 3.4. Default Profiles

NameDescription
tahitiDefaultThis profile is used when Tahiti is run for first time. It can be later used to change or restore profile.
tahitiDocViewerProfile for document viewing and editing.
tahitiScanProfile is design for scanning documents using attached scanner.
tahitiPhotoImport photos from the camera connected over USB. Only cammeras which are mounted as disk are directly supported, typicaly Olympus.
tahitiDamisProfile for mass-data processing using Damis System. This profile is hidden by default.

4.2. User-Defined Profiles

It is possible to redefine any of the default profile or create new profile. Recommended way is to customize predefined profiles and only if no one is suitable to create new. User-defined profiles are defined in the profiles.xml. It is possible to change profiles.xml in the bin/TahitiProfiles but it is more convenience to change redefine this file in the domain specific directory in the repository, e.g. <repository>/<domain>/TahitiProfiles/profiles.xml.

There are two profile specific configuration options in the Tahiti.xml:

Tahiti.Profiles.Default

Name of the default profile. It is used for first time when user run Tahiti

Tahiti.Profiles.Active

Name of the last used profile.

4.3. Profile Reference

Profile Reference sections contains detail description of profiles.xml.

Example 3.1. Example of profiles.xml

<?xml version="1.0"?>
<TahitiProfiles>
 <Profile id="tahitiDefault"
    contentUrl="chrome://tahiti/content/intro.xul"
    saveChanges="0">
  <Name>Introduction</Name>
  <Name xml:lang="cs">Uvítání</Name>    
  <Name xml:lang="en">Introduction</Name>    
  <Description>This profile is used ....</Description>
  <Description xml:lang="cs">Profil použitý při ...</Description>  
 </Profile>
 <Profile id="tahitiDocViewer">
  <Name>Documents</Name>
  <Name xml:lang="cs">Dokumenty</Name>    
  <Name xml:lang="en">Documents</Name>    
  <Description>Recommended profile for ....</Description>
  <Description xml:lang="cs">Zobrazení ....</Description>    
 </Profile>
</TahitiProfiles>

Root Element: TahitiProfiles

4.3.1. TahitiProfiles

This is top-level container element for all defined/redefined profiles.

Children: Profile

4.3.2. Profile

The Profile element contains profile definition Each profile have to have attribute id - this is unique profile identifiier. Redefined profile have same id as its predecesor.

Children: Name, Description

Table 3.5. Profile Attributes

AttributeRequiredDescription
idyesProfile identifier; this is the primary key for identifying profile.
contentUrlnoOptional attribute; this is URL of the file which will be opened when user select this profile. Default profile uses this option to open introduction page.
saveChangesnoOption allows to control if user changes should be saved. Default value is 1; changes are automaticly saved. Possible values: 0|1
visiblenoFlag if profile is visible for users. Default value is 1; profile is visible. If this value is 0 profile is hidden. Possible values: 0|1

4.3.3. Name

The Name Element is profile name. This is user visible name and can be localized.

Inner Text: Name of the profile.

Table 3.6. Name Attributes

AttributeRequiredDescription
xml:langnoLanguage; this is language for which is this name valid. If not specified inner text is used as default name.

4.3.4. Description

The Description Element is profile description. This is description of the profile.

Inner Text: Descritption of the profile.

Table 3.7. Description Attributes

AttributeRequiredDescription
xml:langnoLanguage; this is language for which is this description valid. If not specified inner text is used as default description.

5. Logging

It is possible to log several application activities. It can be used for diagnostic and debugging purposes. It is recommend to switch off logging in production environment.

Table 3.8. Logging options

NameDescription

Tahiti.Log.Path

Path where to store log file. Path should include last slash otherwise it is used as a filename prefix.

Tahiti.Log.System

Logging level. =0 - switched off, >0 - switched on


Logging level should in interval <0; 4>. 4 is the highest logging level. Logging can be only set in the main Tahiti.xml.

6. Components

Tahiti consist from several components. Each component have own configuration options and can be switched on/off. There are internal components (shared components) which are integral part of the application (through some of them can be switched on/off) and also there are domain components. Domain components can be used as plug-ins to extend Tahiti.

Not all work-places need all components and they does not have to be initialized. Switching-off can speed-up application start-up and use less system resources.

Table 3.9. List of shared Tahiti components

NameDescription

Component.Mozilla.Core

Basic component for Mozilla (XPCOM, XUL) integration.

Component.ExternalView

Bridge for other XPCOM-based views

Component.XULView

View for XUL files

Component.XULFormView

View for files based on XUL (predecesor for mail view)

Component.ComposeMail

Mail composer

Component.Mozilla.EmailView

Base component for mail viewer

Component.ViewMail

Mail view component

DocumentIO

Document Input/Output Component

Component.PictureView.Base

Picture view base component

Component.EditView

Edit view component

Component.FormView

Form view component

Component.HTMLView

HTML view component (used to display PDF)

Component.Ole2View

OLE2 view component (.DOC, .XML, .PPT)

Component.ExecutableView

Component for openning outside Tahiti

Component.PackageView

Package view component

Component.PictureView

Picture view component (.TIFF, .JPEG, ,.PNG)

Component.XPCOMSharedBridge

Bridge for other XPCOM-based shared components


Table 3.10. List of Tahiti domain components

NameDescription

Core.Repository

Document repository. This component is essential for DocumentManager

Core.Scan

Low-level component for scanning. TWAIN interface

PropertyControl

Property Control - display list of properties

IntegratedBrowser

Optional bar with integrated browser (Firefox). Can be used for closer integration with other system

DocumentManager

Component provides access to localy stored documents

Scanner

Scanner component allows to scan document

PhotoImport

Component for import from cameras

Damis

Optional component, allow to communicate with DAMIS system

Component.ShellFiles

Optional component, allow to display embedded Explorer.

CanClose.Component

Component display confirmation dialog

Remove Old Documents

Component removes offline documents from the local repository during start

License Component

Check valid license and display dialog

System Message Handler

Component process action object 'Tahiti.System.Message'

Component.Tahiti.SapGui.ComBridge

External component which is used for SAP integration

XPCOMDomainBridge

Bridge for other XPCOM-based domain components


Tahiti can be extended with other components. There is configuration option called Components.XPCOM.Load. It is expected to receive comma separated list of components to be loaded. Components are physically stored inside directory Components. This option contains only domain components and cannot contain any shared components.

Example 3.2. Example of Components.Load

<Item name="Components.XPCOM.Load"
      value="@lightcomp.com/tahiti/sapgui.com;1">
</Item>

7. Communication

This chapter discuss communication between Tahiti (Document Manager) and other systems like document management system or information system. This chapter does not cover communication realized with other components and systems like DAMIS, Web, etc. These systems are described in separate chapters.

Tahiti allow communication primary with one document management system. It is called as Primary Connection. This connection should provide available document types, configuration. There is also possibility to communicate with more servers or use different communication protocol. Default and also the most powerful protocol is called DEP2. Protocol specification is available at the LightComp development web site. Each communication channel is configured by two items: used module name, configuration string.

Table 3.11. Communication configuration

NameDescription

Connection.Primary.Options

Settings of primary communication

Connection.PrintServer.Type

Type of module used for communication with printing service

Connection.PrintServer.Options

Setting for printing service


PrintServer connection can be used for sending documents to the specialized printing service. This logic should be preferably realized on the server side but if it is necessary it can be done on the client side.

Table 3.12. List of communication module

NameDescription

TAHITI_DEP2

Default communication protocol. This full-duplex protocol which allows server to push documents and events to the client and also to send changes and new documents from the client to the server

TAHITI_FTP_SEND

Standard FTP protocol. Allow to store new documents and changes to the server

TAHITI_SFTP_SEND

Standard SFTP protocol. Allow to store new documents and changes to the server


It is possible to write custom communication modules and customize Tahiti usage. Communication is configured with configuration string.

Example 3.3. Example of configuration string

user=%TAHITI_DOMAIN%:%TAHITI_USER%; 
  password=%TAHITI_PASSWORD%; 
  server=sds.lightcomp.cz;
  port=7780; pingInterval=10;

Configuration string consist from pairs (name=value) separated by semicolon. Configuration is specific for each module.

7.1. TAHITI_DEP2

Main communication module for connection to the Document Management System. This module allow to send and receive documents.

Table 3.13. DEP2 parameters

ParameterRequiredDescription

user

yes

user name

password

yes

password

server

yes

server address - name or IP address

port

no

port where to connect, default port is 7780

logLevel

no

logging level, default is 0, 0 - switched off, 4 - maximum level

logTarget

no

where to log, it is possible to redirect all logging from file to the windowlogTarget=window will set write data to the separate window

cache1noPath to the local cache. Cache is created in the subdirectory "pageCache". If path does not exists it will be created.
cache1NumLevelsnoCache is using hierarchy structure of directories. There is 16 directories on each level. Default value is 1.
cache1MaxSizenoMaximal cache size. Size is in the Megabytes (MB). If this parameter is not specified cache size is unlimited.
cache2noPath to the global cache. This cache has 3 levels. If this path is not valid at the Tahiti startup-time cache will not be used.
sslnoSSL based communication, default is 0, 0 - switched off, 1 - switched on
pingIntervalnoTime in seconds between keep alive packets. By default keep alive packets are not sent.
channelsnoSet if channels should be used for sent data, default is 0. 0 - switched off, 1 - switched on
filternoName of attribute to be used as a filter. If set only documents with this attribute will be sent.
connectOnSendnoUsually connection is established when Tahiti starts up. This options allows to start/stop connection for each sent document (same as HTTP), default is 0. 0 - switched off, 1 - switched on
authnoAuthentication method. Default value is plain. (This parametr can be overwriten when Tahiti is run via COM interface)

Cache is using auto-management technique. Maximum cache size is checked 10 minutes after start and later checked every hour.

Example 3.4. Example string

user=%TAHITI_USER%;password=%TAHITI_PASSWORD%;
  server=192.168.0.1;port=7780;
  logLevel=4;logTarget=window  

Example 3.5. Example with local cache

user=%TAHITI_USER%;password=%TAHITI_PASSWORD%;
  server=192.168.0.1;port=7780;
  logLevel=4;
  cache1=%CSIDL_LOCAL_APPDATA%\LightComp\Tahiti\5.0\%TAHITI_DOMAIN%

7.2. TAHITI_FTP_SEND

FTP module allow to upload data to the server. Format of uploaded data is specified in developer documentation.

Table 3.14. FTP parameters

ParameterRequiredDescription

user

yes

user name

password

yes

password

server

yes

server address - name or IP address

dir

yes

server directory

port

no

port where to connect, default port is 21

active

no

active/passive connection, active=1 -> active connection

dirMask

no

mask of target directory

filter

no

optional filter settings


7.3. TAHITI_SFTP_SEND

SFTP module have same configuration parameters as FTP module except possibility to specify active mode. SFTP module can be used only in one connection per application.

8. Variables

Tahiti have system of internal variables. It is possible to use such variables in several configuration strings. Table contains some broadly available variables. Other variables are valid only in special cases.

Table 3.15. Variables

NameDescription

TAHITI_USER

user name - name of logged user

TAHITI_PASSWORD

password

TAHITI_REPOSITORY

path to the repository

TAHITI_DOMAIN

domain

TAHITI_BIN_PATH

path to the binaries

CSIDL_DESKTOPDIRECTORY

desktop directory

CSIDL_PERSONAL

documents folder

CSIDL_APPDATA

application folder

CSIDL_LOCAL_APPDATA

local application folder (not part of roaming profiles)

CSIDL_PROGRAM_FILES

program files


Note

Variables CSIDL_XXX have same meaning as corresponding variables as defined in the Windows Shell and Controls API™.

9. MIME types

Document processing in Tahiti is based on the MIME types. They are used for decision how to view and edit page. It is also possible in some cases find out corresponding MIME type from extension. Configuration files are used to set mapping between extension, MIME type and eventually to configure external application which is able to open it.

MIME type configuration is read in 3 stages:

  1. freedesktop.org.xml

  2. registry

  3. mimetypes.xml

The best approach is to view and edit file inside Tahiti. It allows to have control over user actions and also to know which application is used and how. If file format is not supported for direct opening it is stored in temporary directory and opened with default system application associated this file type.

9.1. Freedesktop.org.xml

File contain platform independent list of MIME types and usual extensions and is used in the Tahiti as basic configuration. Actual file can be downloaded from http://freedesktop.org. There is also available specification of used file format. This .xml file is relatively big and it is possible to strip down unused types and speed up Tahiti startup.

Registry records are read after freedesktop.org.xml. Registry are also used for finding which application should be used for given MIME type, extension.

9.2. MimeTypes.xml

File is loaded after all other configuration files and can be used for overriding registry settings.

Use cases:

  • specification of user defined types

  • mapping between extension and MIME type

  • configuration of preferred external application

Tahiti monitor each running external application and try to recognize when user close program and save modified file. MimeTypes.xml allow to configure technique of monitoring specific application.

Table 3.16. Monitor types

TypeDescription

1

File lock is monitored

2

Process existence is monitored


File contain list of tags called MimeType. Application used for opening file can be defined inside this tag. If no application is specified tag is used only as mapping between MIME type and extension.

Table 3.17. MimeType Attributes

AttributeRequiredDescription

type

yes

defined MIME type

extension

yes

extension for MIME type

attr

no

used monitoring technique


Example 3.6. MimeTypes.xml example

<?xml version="1.0"?>
<MimeTypeDatabase>
 <MimeType type="application/msword" extension=".doc"/>
 <MimeType type="text/plain" extension=".txt" attr="2">
   %SystemRoot%\system32\NOTEPAD.EXE %1
 </MimeType>
</MimeTypeDatabase>
 

It is possible to use variables in application specification. Variable %1 will be substituted with file name.

10. Help Customization

Help files can be defined as part of configuration process. Help can consist from files distributed together with application as well as links and URLs. Content of menu Help is defined in the Tahiti.xml. There can be up to five user defined items.

Each item have to have name and associated command. Configuration values: Help.User.X.Name - name, Help.User.X.Command - command to be executed. X is number in the interval <1, 5>.

Example 3.7. Help Customization

 <Item name="Help.User.1.Name" type="string" default="&amp;Usage">
  <Description value=""/>
 </Item>
 <Item name="Help.User.1.Command" type="string" 
    default="%TAHITI_BIN_PATH%\help\index.html">
  <Description value=""/>
 </Item>

Example will create in the menu "Help" item "Usage". If user selects this item file help/index.html from the Tahiti directory will be open.