ibi.broker.api.data.schedule
Class DistributionFTP

java.lang.Object
  extended by ibi.broker.api.data.schedule.Distribution
      extended by ibi.broker.api.data.schedule.DistributionFTP
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DistributionSFTP

public class DistributionFTP
extends Distribution

 The DistributionFTP class extends the abstract Distribution class  
 where the distribution method for the scheduled ReportCaster report is via FTP.
 The code below illustrates how DistributionFTP is used:

 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 +  Copyright (c) 2004 Information Builders, Inc. All  Rights Reserved.     +
 +                                                                          +
 +  Information Builders offers sample API programs as a heuristic device.  +
 +  They are not intended, as is, for production use. Licensed users are    +
 +  welcome to alter and extend these samples and deploy them in other      +
 +  environments, or alternate configurations, as they see fit.             +
 +  Information Builders will support the documented functionality of       +
 +  its API classes and methods. However, Information Builders is not       +
 +  responsible for functionality or behavior of products built with        +
 +  its API unless the documented behavior of its discrete classes and      +
 +  methods is different than the actual results.                           +
 +                                                                          +
 +  Redistributions of IBI source code and documentation must be within     +
 +  the scope of the Information Builders Software License Agreement.       +
 +                                                                          +
 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  

 
 import ibi.broker.api.data.schedule.Destination;
 import ibi.broker.api.data.schedule.DistributionFTP;

 public Destination createDestinationSingleAddress() 
        {
                Destination destination = new Destination();
                destination.setType(Destination.SINGLE_ADDRESS);
                destination.setSingleAddress("aaa.txt");
                return destination;
        }

 public DistributionFTP createDistributionFTP()
        {
                DistributionFTP distribution = new DistributionFTP();
                Destination destination = createDestinationSingleAddress();
                distribution.setDestination(destination);
                distribution.setFtpLocation("root");
                distribution.setFtpPassword("passw");
                distribution.setFtpServerName("serverName");
                distribution.setFtpUserName("user");
                distribution.setIndexFile("indexFileName");
                distribution.setZipFileName("zipFileName");

                return distribution;
        }
 
 

Version:
5.3
See Also:
Serialized Form

Field Summary
 
Fields inherited from class ibi.broker.api.data.schedule.Distribution
description, EMAIL, enabled, FTP, id, LIBRARY, MRE, PRINT, SFTP
 
Constructor Summary
DistributionFTP()
           
 
Method Summary
 Destination getDestination()
          Obtains the destination object, which contains information indicating where the scheduled report will be distributed.
 java.lang.String getFtpLocation()
          Obtains the virtual directory for a report scheduled for distribution via FTP.
 java.lang.String getFtpPassword()
          Obtains the password to the target FTP server needed to authenticate at the time of report distribution.
 java.lang.String getFtpServerName()
          Obtains the name of the FTP server that is the target of the distribution.
 java.lang.String getFtpUserName()
          Obtains the username needed to authenticate to the target FTP server at the time of report distribution.
 java.lang.String getIndexFile()
          Obtains the index file associated with report(s) scheduled for distribution via FTP where bursting is activated.
 java.lang.String getZipFileName()
          Obtains the name of the zip file associated with a scheduled FTP distribution.
 boolean isZipBurstReportsTogether()
           
 boolean isZipResult()
          Obtains the logical value of the flag which indicates whether or not to zip the output before sending.
 void setDestination(Destination destination)
          Assigns the destination object, which contains information indicating where the scheduled report will be distributed.
 void setFtpLocation(java.lang.String ftpLocation)
          Assigns the virtual directory for a report scheduled for distribution via FTP.
 void setFtpPassword(java.lang.String ftpPassword)
          Assigns the password to the target FTP server needed to authenticate at the time of report distribution.
 void setFtpServerName(java.lang.String ftpServerName)
          Assigns the name of the FTP server that is the target of the distribution.
 void setFtpUserName(java.lang.String ftpUserName)
          Assigns the username needed to authenticate to the target FTP server at the time of report distribution.
 void setIndexFile(java.lang.String indexFile)
          Specifies the index file associated with report(s) scheduled for distribution via FTP where bursting is activated.
 void setZipBurstReportsTogether(boolean zipBurstReportsTogether)
           
 void setZipFileName(java.lang.String zipFileName)
          Assigns the name of the zip file associated with a scheduled FTP distribution.
 void setZipResult(boolean zipResult)
          Assigns a logical value to a flag that determines whether or not to zip report l output before sending via email.
 
Methods inherited from class ibi.broker.api.data.schedule.Distribution
getDescription, getId, isEnabled, setDescription, setEnabled, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistributionFTP

public DistributionFTP()
Method Detail

getDestination

public Destination getDestination()
Obtains the destination object, which contains information indicating where the scheduled report will be distributed. In this case the target(s) will be via an FTP distribution, and the ultimate destination(s) will be one or more paths on the target FTP server.

Returns:
A Destination object.
See Also:
setDestination(Destination)

setDestination

public void setDestination(Destination destination)
Assigns the destination object, which contains information indicating where the scheduled report will be distributed. In this case the target(s) will be via an FTP distribution and the ultimate destination(s) will be one or more paths on the target FTP server.

Parameters:
destination - a reference to the Destination object.
See Also:
getDestination()

getFtpLocation

public java.lang.String getFtpLocation()
Obtains the virtual directory for a report scheduled for distribution via FTP. In general a virtual directory is a directory name, used in a path, which corresponds to a physical directory on a server. Here the server is the FTP server and this method specifically refers to the target destination the report will be sent to via FTP. It is important to note that, depending on the operating system on which the destination FTP server resides, there are specific conventions that must be followed when specifying a virtual directory. Consult the appropriate manual for guidance.

Returns:
The target FTP server's virtual directory as a String.
See Also:
setFtpLocation(String)

setFtpLocation

public void setFtpLocation(java.lang.String ftpLocation)
Assigns the virtual directory for a report scheduled for distribution via FTP. In general a virtual directory is a directory name, used in a path, which corresponds to a physical directory on a server. Here the server is the FTP server and this method specifically refers to the target destination the report will be sent to via FTP. It is important to note that depending on the operating system that the destination FTP server resides on, there are specific conventions that must be followed when specifying a virtual directory, so consult the appropriate manual for guidance.

Parameters:
ftpLocation - String representing the virtual directory of the target FTP server.
See Also:
getFtpLocation()

getFtpPassword

public java.lang.String getFtpPassword()
Obtains the password to the target FTP server needed to authenticate at the time of report distribution. The FTP password is part of the credentials necessary for the user to access the FTP server. This is required unless a default is set in the configuration file.

Returns:
The FTP password as a String.
See Also:
setFtpLocation(String)

setFtpPassword

public void setFtpPassword(java.lang.String ftpPassword)
Assigns the password to the target FTP server needed to authenticate at the time of report distribution. The FTP password is part of the credentials necessary for the user to access the FTP server. This is required unless a default is set in the configuration file.

Parameters:
ftpPassword - the FTP password as a String

getFtpServerName

public java.lang.String getFtpServerName()
Obtains the name of the FTP server that is the target of the distribution. This is required unless a default is set in the configuration file.

Returns:
A String representing the FTP server name or its alias.
See Also:
setFtpServerName(String)

setFtpServerName

public void setFtpServerName(java.lang.String ftpServerName)
Assigns the name of the FTP server that is the target of the distribution. This is required unless a default is set in the configuration file.

Parameters:
ftpServerName - String represents the FTP server name or its alias.
See Also:
getFtpServerName()

getFtpUserName

public java.lang.String getFtpUserName()
Obtains the username needed to authenticate to the target FTP server at the time of report distribution. The FTP username is part of the credentials necessary for the user to have access to the FTP server. This is required unless a default is set in the configuration file.

Returns:
The FTP user name as a String.
See Also:
setFtpUserName(String)

setFtpUserName

public void setFtpUserName(java.lang.String ftpUserName)
Assigns the username needed to authenticate to the target FTP server at the time of report distribution. The FTP username is part of the credentials necessary for the user to have access to the FTP server. This is required unless a default is set in the configuration file.

Parameters:
ftpUserName - the FTP user name as a String.
See Also:
getFtpUserName()

getIndexFile

public java.lang.String getIndexFile()
Obtains the index file associated with report(s) scheduled for distribution via FTP where bursting is activated. When bursting is activated, the index file specifies the name of the file where the corresponding index page will be created. If bursting is activated (Burst =TRUE), and no index file is specified, an error occurs.

Note that it makes sense to burst a report in cases where the distribution type is: DISTRIBUTION LIST, DISTRIBUTION FILE and DYNAMIC LIST. In the case where distribution type is SINGLE ADDRESS, there is no need to burst because the reports will be sent to a single address.

Returns:
The name of the index file as a String.
See Also:
setIndexFile(String)

setIndexFile

public void setIndexFile(java.lang.String indexFile)
Specifies the index file associated with report(s) scheduled for distribution via FTP where bursting is activated. When bursting is activated, the index file specifies the name of the file where the corresponding index page will be created. If bursting is activated (Burst =TRUE), and no index file is specified, an error occurs.

Note that it makes sense to burst a report in cases where the distribution type is: DISTRIBUTION LIST, DISTRIBUTION FILE and DYNAMIC LIST. In the case where distribution type is SINGLE ADDRESS, there is no need to burst because the reports will be sent to a single address.

Parameters:
indexFile - the index file name as a String.
See Also:
getIndexFile()

getZipFileName

public java.lang.String getZipFileName()
Obtains the name of the zip file associated with a scheduled FTP distribution.

The size limit for zip file name is 64 characters.

Returns:
The string name of the zip file
See Also:
setZipFileName(String)

setZipFileName

public void setZipFileName(java.lang.String zipFileName)
Assigns the name of the zip file associated with a scheduled FTP distribution.

The size limit for zip file name is 64 characters.

Parameters:
zipFileName - a String representing the name of the zipped file.
See Also:
getZipFileName()

isZipResult

public boolean isZipResult()
Obtains the logical value of the flag which indicates whether or not to zip the output before sending. If TRUE, the report will be sent as a zipped file.

Returns:
A Boolean representing whether or not to zip report output before sending via FTP.
See Also:
setZipResult(boolean)

setZipResult

public void setZipResult(boolean zipResult)
Assigns a logical value to a flag that determines whether or not to zip report l output before sending via email. If TRUE, the report output is sent as a zip file.

Parameters:
zipResult - a boolean representing whether or not to zip report output before sending via FTP.
See Also:
isZipResult()

isZipBurstReportsTogether

public boolean isZipBurstReportsTogether()

setZipBurstReportsTogether

public void setZipBurstReportsTogether(boolean zipBurstReportsTogether)


Copyright © 2006 Information Builders, Incorporated.