Package com.crystaldecisions.sdk.plugin.desktop.connection

This package allows you to retrieve the metrics for each connection to a single APS server or for each active connection to each APS server in a cluster.

See:
          Description

Interface Summary
IConnection This interface inherits from IInfoObject and IConnectionBase.
IConnectionBase This interface allows you to access general connection information.
 

Package com.crystaldecisions.sdk.plugin.desktop.connection Description

This package allows you to retrieve the metrics for each connection to a single APS server or for each active connection to each APS server in a cluster. The metrics will allow you to monitor authentication methods, failed logon attempts, the date and time of the last logon and last access, the user Id and user alias, and the name of the APS server.

Retrieving desktop plugins

Each object that is created with a desktop plugin is stored in either the CI_INFOOBJECTS or the CI_SYSTEMOBJECTS category in the APS InfoStore, and is marked with a programmatic identifier (ProgID). Using SI_PROGID, you can query the APS InfoStore for a collection of objects.

Example

The following query selects the names, and IDs of all Connection objects in the APS:

IInfoObjects connectionObjs = iStore.query("SELECT SI_NAME, SI_ID FROM CI_SYSTEMOBJECTS Where SI_PROGID='CrystalEnterprise.Connection'");

The query method returns a collection of InfoObjects, which in this case are IConnection objects. Like other InfoObjects, these objects are uniquely represented by their ID property. For each object in the collection, you can access general InfoObject properties, such as the SI_NAME property, SI_DESCRIPTION property, and SI_ID property.

To access the IConnection objects returned by the query, the resulting IInfoObjects need to be cast. This example demonstrates how to cast the returned IInfoObjects as IConnection objects.


for (int i = 0; i < connectionObjs.size(); i++)
{
    IInfoObject obj = (IInfoObject) connectionObjs.get(i);
    IConnection connection = (IConnection) obj;
}