Package com.crystaldecisions.sdk.plugin.desktop.shortcut

This package represents a shortcut object that behaves in a similar manner to a Windows Shortcut; that is, it can reference another object.

See:
          Description

Interface Summary
IShortcut The IShortcut interface is used to return the object that it references so that it can gain access to all of the target object's properties and methods.
IShortcutBase This interface is used to return the object that it references so that it can gain access to all of the target object's properties and methods.
 

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

This package represents a shortcut object that behaves in a similar manner to a Windows Shortcut; that is, it can reference another object. Any object in the Crystal Enterprise system can become a shortcut. However, shortcuts cannot be referred to other shortcuts.

Note that any changes made to the shortcut will change the shortcut and not the object the shortcut references (For example, the target object). For example, if you change the name of the shortcut, the name of the object that is referred to by the shortcut will remain the same.

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 Shortcut objects in the APS:

IInfoObjects shortcutObjs = iStore.query("SELECT SI_NAME, SI_ID FROM CI_INFOOBJECTS Where SI_PROGID='CrystalEnterprise.Shortcut');

The query method returns a collection of InfoObjects, which in this case are IShortcut 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 IShortcut objects returned by the query, the resulting IInfoObjects need to be cast. This example demonstrates how to cast the returned IInfoObjects as IShortcut objects.

for (int i = 0; i < shortcutObjs.size(); i++)
{
    IInfoObject obj = (IInfoObject) shortcutObjs.get(i);
    IShortcut shortcut = (IShortcut) obj;
}