Oracle Reports
Java API Reference
10g Release 2 (10.1.2)
B14049-01

oracle.reports.server
Class Destination

java.lang.Object
  |
  +--oracle.reports.server.Destination

public abstract class Destination
extends java.lang.Object

Abstract base class for reports server destinations When create customized destination plugin, the subclass needs to implement several abstract methods defined here, and can optionally override methods implemented here. By default, reports has implemented DesMail, DesFile, DesCache, DesPrint, and DesOraclePortal


Field Summary
protected CacheItem m_cacheItem
The cache item associated with the destination.
protected Job m_job
The job object to which the destination object attaches.

Constructor Summary
Destination()

Method Summary
protected CacheItem getCacheItem()
Returns the cache item associated with the destination.
protected java.io.InputStream getContent(java.lang.String fileName)
Returns the contents of a file from the cache.
protected java.lang.String getDesname()
Returns the destination name (DESNAME) of the object.
protected java.lang.String getDestype()
Returns the destination type (DESTYPE) of the object.
protected Job getJob()
Returns the job object to which the destination object attaches.
protected java.lang.String getPluginParam(java.lang.String name)
Returns the plugin parameter value given the parameter name.
protected java.util.Properties getProperties()
Returns the properties for the destination.
protected static void init(java.util.Properties destProps)
Initializes the destination class.
protected void send()
Sends the output to a specified DESTYPE and DESNAME.
protected abstract void sendFile(boolean main, java.lang.String fileName, short fileFormat, long fileSize)
Sends a file to the destination.
protected void setCacheItem(CacheItem item)
Sets a cache item associated with the destination.
protected void setDesname(java.lang.String desname)
Sets the destination name.
protected void setJob(Job job)
Sets the job object to which the Destination object attaches.
protected void setProperties(java.util.Properties props)
Sets the properties for the subclass object.
protected static void shutdown()
Shuts down the destination class.
protected abstract boolean start(java.util.Properties props, java.lang.String desname, int totalFile, long totalSize, short mainFormat)
Invoked before sending the first file to the destination.
protected void stop()
Invoked after all the files are sent to the destination.

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

m_cacheItem

protected CacheItem m_cacheItem
The cache item associated with the destination.

m_job

protected Job m_job
The job object to which the destination object attaches.

Constructor Detail

Destination

public Destination()

Method Detail

init

protected static void init(java.util.Properties destProps)
                    throws oracle.reports.RWException
Initializes the destination class. A subclass could override this method to initialize the specific plugin destination.
Parameters:
destProps - The properties set in the server configuration file for the specified plugin destination.

shutdown

protected static void shutdown()
Shuts down the destination class. A subclass could override this method to shut down the specific plugin destination.

getDestype

protected java.lang.String getDestype()
Returns the destination type (DESTYPE) of the object.

setDesname

protected void setDesname(java.lang.String desname)
Sets the destination name.

This can be the value from the command line argument DESNAME, or it can come from a distribution file (.dist), or an .XML file.

Parameters:
desname - The DESNAME command line argument for the job.

getDesname

protected java.lang.String getDesname()
Returns the destination name (DESNAME) of the object.

setProperties

protected void setProperties(java.util.Properties props)
                      throws oracle.reports.RWException
Sets the properties for the subclass object. For example, you use setProperties to set the subject, body, cc for mail, copies, and orientation for printer.
Parameters:
props - Any properties passed in from command line or distribution file.

getProperties

protected java.util.Properties getProperties()
Returns the properties for the destination.

getPluginParam

protected java.lang.String getPluginParam(java.lang.String name)
                                   throws oracle.reports.RWException
Returns the plugin parameter value given the parameter name.
Parameters:
name - The plugin parameter name.

setCacheItem

protected void setCacheItem(CacheItem item)
Sets a cache item associated with the destination.
Parameters:
item - The cache item associated with the destination.

getCacheItem

protected CacheItem getCacheItem()
Returns the cache item associated with the destination.

setJob

protected void setJob(Job job)
Sets the job object to which the Destination object attaches.
Parameters:
job - The job object to which the Destination object attaches.

getJob

protected Job getJob()
Returns the job object to which the destination object attaches.

send

protected void send()
             throws oracle.reports.RWException
Sends the output to a specified DESTYPE and DESNAME.

getContent

protected java.io.InputStream getContent(java.lang.String fileName)
                                  throws oracle.reports.RWException
Returns the contents of a file from the cache.
Parameters:
fileName - Name of the file under which the content is stored.

start

protected abstract boolean start(java.util.Properties props,
                                 java.lang.String desname,
                                 int totalFile,
                                 long totalSize,
                                 short mainFormat)
                          throws oracle.reports.RWException
Invoked before sending the first file to the destination. Should be implemented by a subclass.
Parameters:
props - Properties for sending output to the destination.
desname - Destination name.
totalFile - Total number of files in the output.
totalSize - Total size of the output.
mainFormat - Format for the main output file.
Returns:
true - Continue to send. false - Do not send.

stop

protected void stop()
             throws oracle.reports.RWException
Invoked after all the files are sent to the destination. Can be overridden by a subclass, if necessary.

sendFile

protected abstract void sendFile(boolean main,
                                 java.lang.String fileName,
                                 short fileFormat,
                                 long fileSize)
                          throws oracle.reports.RWException
Sends a file to the destination. Should be implemented as a subclass.
Parameters:
main - Main part of the output.
fileName - File name including path.
fileFormat - File format.
fileSize - File size.

Oracle Reports
Java API Reference

Copyright © 1994, 2005 Oracle Corporation. All Rights Reserved.