ibi.broker.api.data.addrbook
Class DestinationElement

java.lang.Object
  extended by ibi.broker.api.data.addrbook.DestinationElement
All Implemented Interfaces:
java.io.Serializable

public class DestinationElement
extends java.lang.Object
implements java.io.Serializable

 The DestinationElement class specifies destination locations and burst values.
 A DestinationElement encapsualates a single line in an Address Book, containing
 the destination for ReportCaster output and the corresponding
 burst value, if any, associated with that destination. 

 ReportCaster's burst feature allows you to break a report into sections to be 
 distributed separately, based upon a primary sort field. Bursting enables relevant sections 
 of a report to be sent to individual users. Each report section is saved as a separate file.
 The code example below shows an implementation of the DestinationElement class.       
 It is taken from the coding samples packaged with the product in the samples directory.  

 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      
 +  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.       +      
 +                                                                          +      
 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++   

 
         public class A02_Add_Element 
 {
        public A02_Add_Element(String[] arg) throws Exception
        {
                //   Example of arg
                //   bookName ENGLAND xxx@ibi.com
                
                String bookName = arg[0];
                String burstValue = arg[1];
                String location = arg[2];
                
                // Create manager
                CasterConnection casterConnection = Util.createCasterConnection();
                AddressBookManager manager = casterConnection.getAddressBookManager();
                
                //Create destinationElement
                DestinationElement element = new DestinationElement();
                element.setBurstValue(burstValue);
                element.setLocation(location);
                
                //add destinationElement into book
                manager.addDestinationElement(bookName, element);
        }
        public static void main(String[] arg)
        {
                A02_Add_Element sampl = null;
                if(arg.length < 3) {
                         menu();
                         return;
                }
                try
                {
                        System.out.println("\n******* " + A02_Add_Element.class.getName() + " *****************");
                        sampl = new A02_Add_Element(arg);
                        System.out.println(sampl.getClass().getName() + " OK");
                }
                catch(Exception ce)
                {
                        ce.printStackTrace();
                        System.out.println(sampl.getClass().getName() + " FAIL");
                }       
        }
        private static void menu()
        {
                System.out.println("Usage: java " + A02_Add_Element.class.getName() + " <bookName> <burstValue> <location>");
        
        }
 }       

See Also:
Serialized Form

Constructor Summary
DestinationElement()
          Default Constructor of DestinationElement
 
Method Summary
 DestinationElement copy()
          Copies this instance of DistributionElement.
 boolean equals(java.lang.Object obj)
           
 java.lang.String getBurstValue()
          Returns the burst value associated with this DestinationElement.
 java.lang.String getLocation()
          Returns a destination location representing a single destination in an address book.
 int hashCode()
           
 void setBurstValue(java.lang.String burstValue)
          Accepts the burst value associated with this DestinationElement.
 void setLocation(java.lang.String location)
          A ccepts a destination location representing a single destination in an address book.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DestinationElement

public DestinationElement()
Default Constructor of DestinationElement

Method Detail

getLocation

public java.lang.String getLocation()
Returns a destination location representing a single destination in an address book. The destination location can be an FTP file path, an email address, a printer name or a printer location.

Returns:
String A String representing a single location in an address book.

setLocation

public void setLocation(java.lang.String location)
A ccepts a destination location representing a single destination in an address book. The destination location can be an FTP file path, an email address, a printer name or a printer location.

Parameters:
location - A String representing a single location in an address book.

getBurstValue

public java.lang.String getBurstValue()
Returns the burst value associated with this DestinationElement.

Returns:
String representing the burst value.

setBurstValue

public void setBurstValue(java.lang.String burstValue)
Accepts the burst value associated with this DestinationElement.

Parameters:
burstValue - The burst value for this DestinationElement instance.

copy

public DestinationElement copy()
Copies this instance of DistributionElement.

Returns:
DestinationElement Returns a Copy of this instance of DistributionElement.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2006 Information Builders, Incorporated.