Property sets

A property set is a collection of controls, settings or options used to configure a third-party application. A property set usually combines a large number of options and it vastly simplifies the user interface required in Switch for configuring the application because it can be referred to as a single entity.

Referring to a property set

Depending on how a property set is stored by the third-party application, Switch keeps a different type of reference to the property set – as illustrated in the following table.

Storage model

Reference in Switch

Stored in exported flow

As a regular file anywhere in the file system

Absolute file path

Full copy of the file

In an open repository (folder) controlled by the third-party application but directly accessible to Switch as a regular file

Absolute file path

Full copy of the file

In a private repository (database) controlled by the third-party application and only accessible by Switch by name and through the third-party application

Name

Name

Some applications support multiple storage models for the same property (that is, the property can be specified as a named repository item or as a file path). Switch configurators can easily accommodate this by providing multiple property editors for the property.

Selecting a property set

Switch allows a choice between browsing for a file (the first storage model) or selecting from a list of names (the second and third storage models). Note that there is no way to show a tree structure; only a linear list of names.

The following table describes the implementation mechanism and the cooperation required from the third-party application depending on the storage model.

Storage model

Action in Switch

Implemented through

Cooperation required from application

As a regular file in the file system

Allow the user to browse the file system for a property set

"Choose file" property editor

"Choose file" property editor

In an open repository as a regular file

List all of the appropriate files in the repository folder and show them in a dialog after stripping the filename extension

"Select from library" property editor with getLibraryForProperty entry point that iterates over the repository folder

Document the location of the repository folder

In a private repository, by name

Request the list of names from the third-party application and show them in a dialog box

"Select from library" property editor with getLibraryForProperty entry point that interacts with the third-party application

Provide a run-time mechanism to retrieve the list of names on request