Using and Configuring the DataView Reader
The Server Code
The Server code consists of the following files:
ostcoperations.h and ostcoperations.cpp
ostcoperations.h and ostcoperations.cpp define subtypes of ostc_ServerOperation:
Each subtype defines a constructor, a destructor, execute(), and format(). ListShows and ListPerformances also define operation_complete(), to override the default cleanup behavior.
ostcinterface.h and ostcinterface.cpp
ostcinterface.h and ostcinterface.cpp define the Server API functions ostcInitialize(), ostcConnect(), and ostcDisconnect().
ostcInitialize() creates an instance of TicketApp, which creates an instance of each subtype of ostc_ServerOperation, and performs various initialization tasks, such as opening the database and retrieving database roots.
ostcConnect() adds the operations to the current session by calling TicketApp::addOperations().
ostcDisconnect() deletes the instance of TicketApp created by ostcInitialize().
ticketapp.h and ticketapp.cpp
The class TicketApp defines
Using and Configuring the DataView Reader
Windows only
On Windows platforms, the DataView Reader provides read-only access to data views you define using ObjectStore Inspector. A data view is a tabular representation of a persistent ObjectStore collection, optionally filtered and ordered by an ObjectStore query.
Each persistent instance is displayed in a specified format. The instance format designates the set of data members to be displayed. For each specified member, the data view has a corresponding column. The instance format also specifies how strings are presented and how one-to-many and many-to-many relationships are presented. See the ObjectStore Inspector User Guide for more information about data views.
The DataView Reader makes it easy to define a Server operation that corresponds to a data view. Instead of defining a subtype of ostc_ServerOperation and adding an instance to the Server session in ostcConnect(), you simply expose the data view by calling ostc_ServerSession::exposeDataView() from ostcConnect(). You designate the data view by name, and specify the name of the corresponding Server operation.
When a data view is exposed in this way, the Server acts just as if you had defined a Server operation whose
If you want, you can specify the instance format independently of the data view's definition in Inspector. Do this with the DataView Reader Configuration Utility. When you expose a data view, you can also specify further filtering and ordering using SQL.
For you to use the DataView Reader, ObjectStore Inspector must be installed. When you install the Component Server Framework, the installation program verifies that the Inspector is installed, examines the Inspector configuration to determine where the Inspector metaknowledge resides, and configures the DataView Reader with that location. This allows the DataView Reader to access the data views and instance formats you define using Inspector. See the ObjectStore Inspector User Guide.
If the location of the Inspector metaknowledge changes, you can inform the DataView Reader of the new location using the DataView Reader Configuration Utility.
[previous] [next]