TDI solutions are packaged into one or more TDI configuration files (XML format) that contain the settings for end point connections, data flow and a host of other features. Although a configuration file can hold everything we need to create a solution, you often may need to use data sources external to the configuration file to modify the behavior of the configuration, such as standard Java properties, TDI external properties and TDI System Store properties.
Property stores are used to hold configuration information in the format of key=value. The Properties connector is used to work with such stores, performing operations of reading/writing of properties and encryption/decryption of certain property values. The familiar global.properties and solution.properties are examples of such property stores.
Individual property stores can be encrypted with individual Certificates, by means of the Property Key and Encrypt parameters. This allows a certificate that is different from the server certificate to be used for encrypting and decrypting both properties in the file, and the entire file if wanted. This may be useful when multiple developers are working on a project, and credentials cannot be shared.
This Connector uses an internal memory buffer to hold all properties in a properties file. The Connector can also be used to access the JavaVM system properties object.
The Connector supports Iterator, AddOnly, Update, Lookup and Delete mode.
The Properties Connector uses the following parameters:
When the Property Key parameter is specified, this parameter specifies the algorithm to use with that key. If keyalias is not specified, this parameter specifies the algorithm to use when encrypting the entire file. In this case the word "server" means to use TDI server encryption, anything else uses the password from the Password parameter as a key for the algorithm.
Only used if Property Key is not specified, Encrypt is checked, and Cipher Alg. is not "server".
This parameter is a dropdown list; the dropdown list is automatically filled with the names found in the server keystore.
If this parameter is set to true, the collection will immediately be written back if any value was automatically encrypted. If a property is marked with "{protect}-" in front of the property name, the value will be automatically encrypted if it is not encrypted. If this parameter is not set to true, the collection must be written back by programmatic means.
The Property Connector is used to connect to standard .property files, Java Properties or the System Store User Property Store. It provides encryption/decryption of the stores being read/written.
The typical behavior of this connector is to connect to a .property file specified by its URL. This can be achieved by setting the collection parameter of the connector, and constitutes "User-Defined" properties.
However, we can also access the system-defined property stores: JVM ("java") properties, User Property Store, global.properties and solution.properties. In order to do this, we need to set the collectionType property of the connector. It is not exposed in the configuration screen but can be set with the following script (for example, put in the Prolog>Before Initialize hook):
These property collections are those that show up in the "Properties" folder in the Config Browser for a given configuration file. These can be modified using the Config Editor, and this may make it unneccesary to use this Connector to access or alter any of the properties in these property collections at runtime.
All of these stores are shared within the same JavaVM, which means that an AssemblyLine writing to the System Store will affect all other AssemblyLines in the JavaVM reading from the same store.
All of the properties in the global and solution stores are propagated to the Java property store by the TDI server at startup in that order. The point to make here is that the global and solution stores can now be discretely addressed and modifications to these files, if permitted, can also be made. Each property store is given a unique name that is unique within the confines of a configuration instance. If a TDI server runs multiple configuration instances, they will share the Java, global, solution and all System-Store property stores (for example, system) but all others are local to the configuration instance.
When using the Connector to deal with external properties, the Auto-Rewrite parameter should be set to true if we want to automatically write back encrypted properties without calling an explicit "commit".
# comment ' comment // comment !include filename !merge filename [{protect}-]keyword <colon | equals> [{encr}]value
Notes:
Syntax checking is used on properties files that are read in directly by the Properties Connector, the TDI Server and the CE. If any nonblank line does not adhere to the properties file format, an Exception will be thrown.
Headers in the Property file
The first one or two lines in a Property File will be lines beginning with this String
##{PropertiesConnector}
This signifies that this line is a header that is rewritten every time the Property File is written.
The first line will look like this
##{PropertiesConnector} savedBy=user, saveDate=date
where user is the name of the user that saved the file and date is the date the file was saved.
If the Property Key parameter was specified when writing the file, the next line will look like this
##{PropertiesConnector} encryptionKey=keyAlias
where keyAlias is the value of the Property Key parameter.
"Property Store" in IBM TDI V7.1 Users Guide.