Skip to main content

Spotfire Service Contexts

This page describes the services available on the global, user and analysis levels in Spotfire.

Overview

Service contexts and hierarchy

A service provides a set of related operations. It is shared by all code executing in the context of the service. Spotfire services are either registries, collections of items that can be enumerated or looked up, or managers, access points for specific functionality. Many Spotfire classes implement IServiceProviderMSDN link, most important of which are the AnalysisApplication and Node, the base class of all nodes constituting the document.

Each service provider except the global service registry has a parent service provider to which it delegates GetService() calls for services it does not provide. If, for instance, the AnalysisApplication is queried for the ViewRegistry service, the call is delegated to the service registry on the analysis level, which delegates it to the service registry on the user level, which in turn delegates it to the service registry on the global level, where it is found and returned.

Services Available when Spotfire has been Initialized

Global ServicesAPI Documentation Summary

ConnectivityService

Provides information about the Spotfire Server, such as its URL, whether or not it is currently available, and so forth.

ModulesService

Provides access to public resources defined by the currently loaded modules.

ViewRegistry

The ViewRegistry maps model types to view types for a given category of view type.

WorkManager

Manages workers and work dispatchers.
 

User ServicesAPI Documentation Summary

CredentialsService

The CredentialsService class is available as a user-level service. It can be used to store credentials for the current user. Set credentials are available until the user session ends – typically when the application or web browser is closed.
See also Virtual Columns: Using the CredentialsService

LicenseManager

The LicenseManager is an application wide service that provides information on which that are enabled. New instances of this manager cannot be created. To access the one and only instance of this class, use one of the service provider methods available.

PreferenceObjectService

Provides functionality to retrieve, add, and delete preference objects for the currently logged on user.
There is only one object of this type available in the application. This instance is registered as a top-level service and can be accessed through one of the service provider methods. New instances of this type cannot be created.
A preference object defines a value that can be set as a preference. All preference objects are ordered in preference classes which defines categories of preference values.
Preference objects created through this service, are cached locally on the computer until synchronized with the server, at which point the settings are written to the server. The synchronization procedure is automatically managed, but doing so requires the application to be connected to the server.
When this service is initialized during application start-up, it will synchronize with the server to download new preference objects that may have been added for the currently logged on user. This, again, requires a connection to the server.
 

Analysis ServicesAPI Documentation Summary

ApplicationThread

This class enables pieces of code to be synchronously executed on the main application thread. This is required if the document is to be accessed from any other thread.

PreferenceManager

Provides functionality to retrieve and set preferences for the currently logged on user. There is only one object of this type available in the application. This instance is registered as a top-level service and can be accessed through one of the service provider methods. New instances of this type cannot be created.

ProgressService

Allows operations to be executed with progress information.

PromptService

Allows the user to be prompted for input to various operations.