Contains all the necessary code to parse instrument and .tsf files.

Package Specification

The instruments package contains all the necessary code to parse instrument and .tsf file.

Design Patterns (Object Factory)

  1. The .isf files are parsed on application start up. The InstrumentList class which is a singleton reference contains a list of instrument classes. This is a singleton for performance reasons because every time you need data from this file you do not want to have to read it every time

    The main role of the instrument file is to provide common data that spreads across .tsf files.

  2. The main interface to the Template classes is the TemplateSignatureFactory class The method getTemplate and refreshTemplate are the methods used by packages that need to read .tsf files. REMEMBER these classes require that a valid InstrumentList singleton has been instantiated. The getTemplate Method returns a reference to a .tsf object

    Both the TemplateSignature and Parameter classes use delegation to reference commonly shared read only metadata. TemplateSignatureMeta and ParameterMetaData contain all the values which cannot be changed by the user unless the underlying file changes on disk

    This metadata is cached in a hashtable in TemplateSignatureFactory to save memory and avoid parsing the file on disk every time.

Refactoring

The Verify methods should simply return boolean as the string that it returns is not used Create a new method called verifyParam in each of the derived classes and the base that returns a boolean and then mark the old method as deprecated with a comment.
The change needs to be done like this because if you change the signature of a method serialization will break.

Unit Tests

A unit test should be written to see if Templates refresh correctly when they are changed.

Production Issues

  1. .tsf and .isf files: Form period to period backwards compatibility has has to be kept with use caches and also with .tsf files. If a .tsf file has changed the software will work this out and load all the values from the old file into the new .tsf file if the type and name are the same. This is critical to the smooth operation of the software from period to period. MAKE SURE CHANGES IN .TSF FILES ARE TESTED THOROUGHLY FROM PERIOD TO PERIOD

  2. Version 2.1 and 2.2 cache: The main diffence in between the 2 caches is that the ParamMetaData and TemplateSignaturMetaData references in the TemplateSignature Class and the Parameter class are no longer used and instead transient variables are used which are not saved out to disk. This means less storage space is taken up on disk and it improves the read and write performance of the cache and transferring the OB to BOB.

    This has required us to add a new variable for meta data storage so as not to loose backwards compatibility with the old cache. We can still use the old variable to successfully load version 2.1 Ob's

  3. Karim has a refrence 2.1 cache which should be tested against that loads every template in the system This should be checked against when new releases are made