In order to bind Spotfire templates to specific LiveReports, several conventions are applied to the Spotfire library structure and representation for the default folder used by the LiveDesign Connector for Spotfire.
The library structure
The root folder
To be able to use the LiveDesign Connector for Spotfire, a folder must be dedicated to it into the Spotfire library. This folder is set into the Spotfire preferences, in the Discngine LiveDesign Connector Configuration, under the preference DefaultLibraryPath. It will be considered as the library root folder by the LiveDesign Connector panel and the Spotfire gadget.
The tree folder
The tree folder structure of the Spotfire library should reproduce the logic used in LiveDesign with Projects as first level folders, and LiveReports as second level subfolders. Each folder should be associated with its corresponding Project/LiveReport using its ID. For example the Global project is named Project 0 in the library.
When a template is created based on LiveReport data, it should be saved under the folder corresponding to this LiveReport. If a template is not specific to the data of a single LiveReport, but can be used for all (or several) LiveReports of a Project, it can be saved directly under the corresponding project folder. In addition, some subfolders can be created under the project folders to group these generic templates.
As in LiveDesign, Project 0
has a special meaning and corresponds to the Global Project.
The library view
In order to make the library structure more human readable, it is not displayed as is in the LiveDesign Connector panel or in the Spotfire gadget, but with an additional view on top of it. For each folder, this view gives its type (LiveReport or Project) as first information, its name as second information, and its ID as last. The root folder is never displayed.
The template picker
A template picker displays all the templates which can be associated to the current LiveReport in order to easily and quickly find the template of interest for a user when:
- opening a template in the gadget
- importing a LiveReport in an existing template from the panel
The templates which are considered as potentially associated to LiveReport Y
in Project N
are:
- all templates under
Project N/LiveReport Y
- templates under
Project N
but not inLiveReport X
- templates under
Project 0
but not inLiveReport Z
The automatic opening
The automatic opening of templates is applied only if the preference GadgetAutoLoadTemplate is set to True and it is based on the following conventions (by order of precedence):
- If only one template exists under
Project N/LiveReport Y/template
, it will be opened - If multiple templates exist under
Project N/LiveReport Y
, the users will have to select the template to open through the template picker - If the project folder exists but contains no folder for the current LiveReport:
3.1. If only one template exists underProject N/template
, it will be opened
3.2. If multiple templates exist underProject N
, the users will have to select the template to open (similar to rule 2) - If the project folder does not exist, but a folder named
Project 0
exists
4.1. If only one template exists underProject 0/template
, it will be opened
4.2. If multiple templates exist underProject 0
, the users will have to select the template to open (similar to rule 2 and 3.2) - If none of the previous patterns is found, the users will have to select a template through the template picker, with the possibility to display the full Spotfire library tree under the LiveDesign Connector root folder to open any document they can access.