ibi.broker.api.data.schedule
Class DistributionEmail

java.lang.Object
  extended by ibi.broker.api.data.schedule.Distribution
      extended by ibi.broker.api.data.schedule.DistributionEmail
All Implemented Interfaces:
java.io.Serializable

public class DistributionEmail
extends Distribution

Extends the abstract Distribution class, and is used when the distribution method for the scheduled ReportCaster job is Email. E-mail distribution is one of five distribution types supported by ReportCaster.

The code below illustrates how DistributionEmail is instantiated and 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.DistributionEmail;
 import ibi.broker.api.data.schedule.DistributionFTP;
 import ibi.broker.api.data.schedule.DynamicAddress;
 
 public Destination createDestinationList()
        {
                Destination destination = new Destination();
                destination.setType(Destination.DISTRIBUTION_LIST);
                destination.setSingleAddress("listName");
                return destination;
        }

 public DistributionEmail createDistributionEmail()
        {
                DistributionEmail distribution = new DistributionEmail();
                Destination destination = createDestinationList();
                distribution.setDestination(destination);
                distribution.setInlineMessage("inLineMessage");
                distribution.setInlineTaskIndex(0);
                distribution.setMailFrom("mailFrom");
                distribution.setMailReplyAddress("mailReplyAddress");
                distribution.setMailServerName("serverName");
                distribution.setMailSubject("subject");
                distribution.setSendingReportAsAttachment(true);
                distribution.setZipFileName("zipfile");
                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
DistributionEmail()
           
 
Method Summary
 Destination getDestination()
          Obtains a destination object, which contains the information indicating where the scheduled report will be distributed.
 java.lang.String getInlineMessage()
          Obtains the inline message associated with an e-mail report distribution.
 int getInlineTaskIndex()
          This method returns the task index of the report that is going to be inline (in the body of the email).ReportCaster schedules can accept multiple tasks, with each task representing a report within the schedule.
 java.lang.String getMailFrom()
          Obtains the e-mail address associated with the From header field of a scheduled e-mail distribution.
 java.lang.String getMailReplyAddress()
          Obtains the reply e-mail address from Reply Address header field of a scheduled e-mail distribution.
 java.lang.String getMailServerName()
          Obtains a SMTP mail server name associated with scheduled e-mail distribution.
 java.lang.String getMailSubject()
          Obtains an e-mail Subject corresponding to the Subject header field associated with scheduled e-mail distribution.
 java.lang.String getZipFileName()
          Obtains the name of the zip file associated with a scheduled e-mail distribution.
 boolean isSendingReportAsAttachment()
          Obtains the logical value of the flag which specifies whether or not a report scheduled for e-mail distribution is being sent as an attachment.
 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 by accepting a Destination object that can be one of the four types: Distribution List, Distribution File, Single Address, and Dynamic Address.
 void setInlineMessage(java.lang.String inlineMessage)
          Sets the inline message associated with an e-mail report distribution.
 void setInlineTaskIndex(int inlineTaskIndex)
          This method sets the index of the task that is going to be inline (in the body of the email).
 void setMailFrom(java.lang.String mailFrom)
          Specifies the e-mail address associated with the From header field of a scheduled e-mail distribution.
 void setMailReplyAddress(java.lang.String mailReplyAddress)
          Specifies the reply e-mail address from Reply Address header field of a scheduled e-mail distribution.
 void setMailServerName(java.lang.String mailServerName)
          Assigns a SMTP mail server name associated with scheduled e-mail distribution.
 void setMailSubject(java.lang.String mailSubject)
          Assigns an e-mail Subject corresponding to the Subject header field associated with scheduled e-mail distribution.
 void setSendingReportAsAttachment(boolean sendingReportAsAttachment)
          Assigns the logical value of the flag which specifies whether or not a report scheduled for e-mail distribution is being sent as an attachment.
 void setZipFileName(java.lang.String zipFileName)
          Assigns the name of the zip file associated with a scheduled e-mail 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

DistributionEmail

public DistributionEmail()
Method Detail

getDestination

public Destination getDestination()
Obtains a destination object, which contains the information indicating where the scheduled report will be distributed. Possible destination object types can be: Distribution List, Distribution File, Single Address, and Dynamic Address.

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

setDestination

public void setDestination(Destination destination)
Assigns the destination by accepting a Destination object that can be one of the four types: Distribution List, Distribution File, Single Address, and Dynamic Address. These destination types contain one or more recipients of the scheduled distribution. In this case where distribution is via e-mail, the recipients are listed as e-mail addresses.

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

getInlineMessage

public java.lang.String getInlineMessage()
Obtains the inline message associated with an e-mail report distribution. An inline message is what constitutes the body of an e-mail if the report is sent as an attachment and is only used when the distributed report is attached to the email.

The size limit for an inline message is 255 characters.

Returns:
Inline message content as a String.
See Also:
setInlineMessage(java.lang.String)

setInlineMessage

public void setInlineMessage(java.lang.String inlineMessage)
Sets the inline message associated with an e-mail report distribution. An inline message is the message contained in the body of the e-mail when the report is sent as an attachment. If the report is sent inline, this method should not be set.

The size limit for an inline message is 255 characters.

Parameters:
inlineMessage - String Representing the inline message.
See Also:
getInlineMessage()

getInlineTaskIndex

public int getInlineTaskIndex()
This method returns the task index of the report that is going to be inline (in the body of the email).ReportCaster schedules can accept multiple tasks, with each task representing a report within the schedule. These tasks will run sequentially. The task index is the sequential index number (from 0 to N) assigned to the tasks within a scheduled distribution. This is particularly important for inline e-mail distribution because only one of the tasks can be an inline report (i.e., a report whose contents are in the body of the email). The other reports are sent as an attachment.

Returns:
Returns An integer representing the task index that is currently designated as the inline report.
See Also:
setInlineTaskIndex(int)

setInlineTaskIndex

public void setInlineTaskIndex(int inlineTaskIndex)
This method sets the index of the task that is going to be inline (in the body of the email). ReportCaster schedules can accept multiple tasks, with each task representing a report within the schedule. These tasks will run sequentially. The task index is the sequential index number (from 0 to N) assigned to the tasks within a scheduled distribution. This is particularly important for inline email distribution because only one of the tasks can be an inline report (i.e., a report whose contents are in the body of the email). The other reports are sent as an attachment.

Parameters:
inlineTaskIndex - An integer representing the task index of the report that is to be the in the body of the email.
See Also:
getInlineTaskIndex()

getMailFrom

public java.lang.String getMailFrom()
Obtains the e-mail address associated with the From header field of a scheduled e-mail distribution.

The size limit for MailFrom is 65 characters. This field is required unless a default is set in the configuration file.

Returns:
A String representing the e-mail address in the From field.
See Also:
setMailFrom(String)

setMailFrom

public void setMailFrom(java.lang.String mailFrom)
Specifies the e-mail address associated with the From header field of a scheduled e-mail distribution.

The size limit for MailFrom is 65 characters. This field is required unless a default is set in the configuration file.

Parameters:
mailFrom - a String represents the e-mail address in the * From field.
See Also:
getMailFrom()

getMailReplyAddress

public java.lang.String getMailReplyAddress()
Obtains the reply e-mail address from Reply Address header field of a scheduled e-mail distribution.

The size limit for mail reply address is 65 characters.

Returns:
A String representing the Reply From e-mail address. This field is required unless a default is set in the configuration file.
See Also:
getMailReplyAddress()

setMailReplyAddress

public void setMailReplyAddress(java.lang.String mailReplyAddress)
Specifies the reply e-mail address from Reply Address header field of a scheduled e-mail distribution.

The size limit for mail reply address is 65 characters. This field is required unless a default is set in the configuration file.

Parameters:
mailReplyAddress - a String representing the e-mail *Reply Address.
See Also:
getMailReplyAddress()

getMailServerName

public java.lang.String getMailServerName()
Obtains a SMTP mail server name associated with scheduled e-mail distribution. The size limit for mail server name is 65 characters.

Returns:
A String corresponding to the name of the mail server.
See Also:
getMailServerName()

setMailServerName

public void setMailServerName(java.lang.String mailServerName)
Assigns a SMTP mail server name associated with scheduled e-mail distribution. The size limit for mail server name is 65 characters.

Parameters:
mailServerName - a String value corresponding to the name of the mail server.
See Also:
getMailServerName()

getMailSubject

public java.lang.String getMailSubject()
Obtains an e-mail Subject corresponding to the Subject header field associated with scheduled e-mail distribution.

The size limit for mail subject is 90 characters.

Returns:
A String representing the Subject in the e-mail header.
See Also:
setMailSubject(String)

setMailSubject

public void setMailSubject(java.lang.String mailSubject)
Assigns an e-mail Subject corresponding to the Subject header field associated with scheduled e-mail distribution.

The size limit for mail subject is 90 characters.

Parameters:
mailSubject - a String representing the e-mail subject line.
See Also:
getMailSubject()

isSendingReportAsAttachment

public boolean isSendingReportAsAttachment()
Obtains the logical value of the flag which specifies whether or not a report scheduled for e-mail distribution is being sent as an attachment. The default value for this flag is TRUE.

Returns:
A boolean indicating whether or not the report is to be sent as an attachment.
See Also:
setSendingReportAsAttachment(boolean)

setSendingReportAsAttachment

public void setSendingReportAsAttachment(boolean sendingReportAsAttachment)
Assigns the logical value of the flag which specifies whether or not a report scheduled for e-mail distribution is being sent as an attachment. The default value for this flag is TRUE.

Parameters:
sendingReportAsAttachment - A boolean indicating whether or not the report is to be sent as an attachment.
See Also:
isSendingReportAsAttachment()

getZipFileName

public java.lang.String getZipFileName()
Obtains the name of the zip file associated with a scheduled e-mail 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 e-mail 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 email.
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 email.
See Also:
isZipResult()


Copyright © 2006 Information Builders, Incorporated.