|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectibi.broker.api.data.addrbook.AddrBook
public class AddrBook
The AddrBook class creates and configures ReportCaster Address Books. An Address Book
contains information on the recipients of ReportCaster output, such as e-mail addresses,
printers addresses, and FTP file names.
Address Books also contain burst values.Instead of distributing an entire report,
ReportCaster's burst feature allows you to break a report into sections
to be distributed separately. Bursting enables relevant sections of a report
to be sent to individual users. Each report section is saved as a separate file.
The code below shows the use of the AddrBook
class. It is taken from the
samples packaged with the product, and shows how an Address Book can be updated.
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 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. +
+ +
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ *
package ibi.broker.api.samples.addrbook;
import ibi.broker.api.cci.AddressBookManager;
import ibi.broker.api.cci.CasterConnection;
import ibi.broker.api.data.addrbook.AddrBook;
import ibi.broker.api.data.addrbook.DestinationElement;
import ibi.broker.api.samples.Util;
public class A31_Update
{
public A31_Update(String[] arg) throws Exception
{
// Example of arg
// bookName xxxNew@ibi.com
String bookName = arg[0];
String location = arg[1];
// Create manager
CasterConnection casterConnection = Util.createCasterConnection();
AddressBookManager manager = casterConnection.getAddressBookManager();
//Retrieve addrBook from repository
AddrBook addrBook = manager.getAddressBook(bookName);
// Create new destinationElement
DestinationElement element = new DestinationElement();
element.setLocation(location);
// Set into addrBook new DestinationElement List with new destinationElement
addrBook.setDestinationList(new DestinationElement[]{element});
//update addrBook
manager.updateAddressBook(addrBook);
}
public static void main(String[] arg)
{
A31_Update sampl = null;
if(arg.length < 2) {
menu();
return;
}
try
{
System.out.println("\n******* " + A31_Update.class.getName() + " *****************");
sampl = new A31_Update(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 " + A31_Update.class.getName() + " <bookName> <location>");
}
}
Field Summary | |
---|---|
static java.lang.String |
PRIVATE
PRIVATE is a string constant that indicates the security level of an Address Book. |
static java.lang.String |
PUBLIC
PUBLIC is a string constant that indicates the security level of an Address Book. |
Constructor Summary | |
---|---|
AddrBook()
|
Method Summary | |
---|---|
AddrBook |
copy()
Generates a copy of the passed AddrBook. |
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getAccess()
Returns the security setting of an Address Book. |
java.lang.String |
getBookName()
Returns the name of an Address Book. |
DestinationElement[] |
getDestinationList()
Returns an Array of DestinationElements where each includes a destination and a burst value. |
java.lang.String |
getMethod()
Returns the distribution method for an Address Book. |
java.lang.String |
getOwner()
Returns the owner of an Address Book. |
int |
hashCode()
|
void |
setAccess(java.lang.String access)
The setAccess method specifies the security level of an Address Book. |
void |
setBookName(java.lang.String bookName)
Specifies the name of an Address Book. |
void |
setDestinationList(DestinationElement[] destinationList)
Accepts an Array of DestinationElements. |
void |
setMethod(java.lang.String method)
Specifies the distribution method for an Address Book. |
void |
setOwner(java.lang.String user)
Indicates the owner of an Address Book. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PUBLIC
setAccess(String access)
,
Constant Field Valuespublic static final java.lang.String PRIVATE
setAccess(String access)
,
Constant Field ValuesConstructor Detail |
---|
public AddrBook()
Method Detail |
---|
public java.lang.String getAccess()
PUBLIC
,
PRIVATE
public void setAccess(java.lang.String access)
access
- A String constant representing the access type.public java.lang.String getOwner()
public void setOwner(java.lang.String user)
user
- ID of this Address Book's owner as a String.public DestinationElement[] getDestinationList()
public void setDestinationList(DestinationElement[] destinationList)
destinationList
- An Array of DestinationElement.public java.lang.String getBookName()
public void setBookName(java.lang.String bookName)
bookName
- The unique key of this Address Book as a String.public java.lang.String getMethod()
public void setMethod(java.lang.String method)
method
- The distribution method of this Address Book.Distribution.FTP
,
Distribution.EMAIL
,
Distribution.PRINT
public AddrBook 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 |