Package com.crystaldecisions.sdk.plugin.destination.diskunmanaged

This package provides an interface through which the destination options for a disk can be specified.

See:
          Description

Interface Summary
IDiskUnmanaged This interface extends the IInfoObject and the IDestinationPlugin interfaces.
IDiskUnmanagedOptions The IDiskUnmanagedOptions interface allows you to set the global or schedule options to an unmanaged disk location.
 

Package com.crystaldecisions.sdk.plugin.destination.diskunmanaged Description

This package provides an interface through which the destination options for a disk can be specified. Two types of options can be set for each destination: global and scheduling. Global options are the default settings for a particular job server. Scheduling options are the default settings for the destination plugin and can be copied to a report. When the report is run, the global and scheduling destination options are compared; the scheduling options override the global options.

Retrieving and setting global and schedule destination options

Both the global and schedule options are set through the corresponding object: the IDiskUnmanagedOptions object, IFtpOptions object, or ISMTPOptions object. Set the global options by using the getPluginInterface() method of the IJobServerDestination object to retrieve the destination plugin. Set the schedule options by directly querying the APS InfoStore for the destination plugin. The query returns the plugin's default object, through which you can access the destination options object.

Note: Enable the destination with IJobServerDestination before a job for that destination is run.

Example

The following example retrieves the disk unmanaged destination plugin:

IInfoObjects serverObjs = iStore.query( "SELECT SI_NAME, SI_SERVER_KIND FROM CI_SYSTEMOBJS WHERE 
        SI_PROGID='CrystalEnterprise.Server' AND SI_SERVER_KIND='jobserver'");

for (int i = 0; i < serverObjs.size(); i++)
{
        IInfoObject obj = (IInfoObject) serverObjs.get(i);
        IServer serverObj = (IServer) obj;
        IJobServerAdmin jobServer = (IJobServerAdmin) serverObj.getServerAdmin();
        IJobServerDestination[] jobServerDests = jobServer.getDestinations( iStore );
        
        for ( int j = 0; j < jobServerDests.length; j++ )
        {
                IJobServerDestination jobServerDest = jobServerDests[ j ];

                if ( jobServerDest.getName().equals( "CrystalEnterprise.DiskUnmanaged" ) )
                {
                        IDiskUnmanagedOptions diskUnmanagedOptions = (IDiskUnmanagedOptions) jobServerDest.getPluginInterface();
                }
        }
}

The query method returns a collection of InfoObjects, which in this case are IServer plugin 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.

The process for retrieving a destination plugin is as follows:

  1. Query the IInfoStore object for the job server objects.
  2. For each job server object, get the job server admin.
  3. Using the job server admin, retrieve the job server destinations. The destinations will be returned as an array.
  4. For each item in the array, check whether the destination has the ProgId "CrystalEnterprise.DiskUnmanaged".
  5. If the destination is the disk unmanaged destination, retrieve the plugin interface.
  6. From the plugin interface the IDiskUnmanagedOptions object can be retrieved. This object allows you to modify the properties of the disk unmanaged destination.