|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectibi.broker.api.data.addrbook.DestinationElement
public class DestinationElement
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>");
}
}
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 |
---|
public DestinationElement()
Method Detail |
---|
public java.lang.String getLocation()
public void setLocation(java.lang.String location)
location
- A String representing a single location in an address book.public java.lang.String getBurstValue()
public void setBurstValue(java.lang.String burstValue)
burstValue
- The burst value for this DestinationElement
instance.public DestinationElement copy()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |