Configuration Overview
nevisDataPorter is configured using an XML file. The syntax is defined by the XML schema which can be found in the application package. At this point only a coarse overview of the configuration file layout is given. A detailed description can be found in 4.1, Configuration, page 18.
The configuration file consists of the following basic blocks:
Setup Section
In the setup section additional data-plug-in factories can be registered and the settings of the nevisDataPorter daemon are configured.
Configuration Section
In the configuration section you can define typed variables. This simplifies parameterization of a concrete configuration. The configuration can also be externalized in an additional file. An import is used to include selected values of a different configuration in the current configuration.
Export Section
The export section can be used top configure nevisDataPorter as a daemon application. Event sources and their relationship to modules are configured in this section.
Global Initialization Section
The global initialization section can be used to instantiate global DataObjects used by other plug-ins. Here you will typically initialize your connection pools to access a database or an LDAP directory. The global initialization section is executed when the first module is initialized (see below).
Export Section
The export section defines a list of modules. Each module consists of a local initialization section and a list of entities. Each module can be run individually. The local initialization section is executed each time the initialization method for a given module is called. Each entity in the entity list consists of an optional DataSource followed by an optional list of DataFilters and a DataSink.
The following extract illustrates a small but complete configuration example.
<?xml version="1.0" encoding="UTF-8"?>
<dp:DataPorter
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dp="http://www.siven.ch/ch/siven/dataporter"
>
<config>
<dp:cfgVal name="basedn" value="OU=portal,DC=durg,DC=local"/>
<dp:cfgVal name="domain" value="durg.local"/>
<dp:cfgVal name="appl_list" value="SHAREPOINT EXCHANGE" separator=" "/>
<dp:cfgImport file="servers.xml">
<cfgValue name="ldapHostname" />
<cfgValue name="ldapPort" />
</dp:cfgImport>
</config>
<event></event>
<init>
<object type="JDBCConnectionPool" name="dataSource">
<dp:paraVal name="connectionUrl" value="jdbc:oracle:thin:@hispano:49185:ESAU"/>
<dp:paraVal name="username" value="devel" sensitive="true" />
<dp:paraVal name="password" value="password"/>
<dp:paraVal name="driver" value="oracle.jdbc.OracleDriver"/>
</object>
</init>
<export>
<module name="default">
<object type="LDAPConnectionPool" name="initalContext">
<dp:paraVal name="connectionUrl" value="ldaps://aldvia.siven.ch"/>
<dp:paraVal name="username" value="cn=admin,cn=users,dc=durg,dc=local"/>
<dp:paraVal name="password" value="password"/>
</object>
<entity name="appl">
<dataSource type="JDBCDataSource">
<dp:paraVal name="query" value="select id, name, desc from def_v_resource where resourcename in (#?)"/>
<dp:paraVal name="parameter" value="${cfg.appl_list}" separator=" "/>
<dp:paraVal name="datasource" value="${inst.dataSource}"/>
</dataSource>
<dataFilter type="ELMappingFilter">
<dp:attrVal name="objectClass" value="top group" separator=" "/>
<dp:attrVal name="cn" value="#{in.appl.NAME}"/>
<dp:attrVal name="description" value="#{in.appl.DESC}"/>
</dataFilter>
<dataSink type="LDAPDataSink">
<dp:paraVal name="ldapContext" value="${inst.initalContext}"/>
<dp:paraVal name="basedn" value="ou=${cfg.basedn}"/>
<dp:paraVal name="rdn" value="cn=#{in.appl.NAME}"/>
</dataSink>
</entity>
</module>
</export>
</dp:DataPorter>