Address Book Samples

Topics:

The Address Book sample folder contains Java applications that show how to create and manipulate ReportCaster Address Books using the API. As with all of the samples, it uses the ReportCaster authentication and context information contained in the samples.properties directory. These sample Java applications are presented as examples for learning purposes and are not represented as production quality applications.

A01_Add_Book.java

This application creates a new Address Book by accepting five parameters from the command line: owner, book name, book access type (for example, PUBLIC, PRIVATE), distribution method (for example, FTP, EMAIL, PRINT), and location (which is the destination of the first entry of the Address Book). The code can be modified to also require burst value.

Usage: java A01_Add_Book <owner> <bookName> <bookAccess> <bookMethod> <location>

A02_Add_Element.java

This application adds a line to an existing Address Book.

It accepts three arguments: The name of the Address Book, the burst value, and the distribution location.

The usage is as follows:

Usage: java A02_Add_Element <bookName> <burstValue> <location>

A10_Get_Book.java

This application retrieves an Address Book from the repository and writes the contents to standard out. It accepts one argument: the name of the book that is to be retrieved.

Usage: java A10_Get_Book <bookName>

A11_Get_PublicList.java

This application returns a list of all public Address Books for a specific distribution method, and their owners. It accepts one argument: the method of distribution (for example, FTP, EMAIL, PRINT).

Usage: java A11_Get_PublicList <bookMethod>

A12_Get_PrivateList.java

This application returns a list of all private Address Books belonging to a specific owner for a specific distribution method. It accepts two arguments: the owner and the method of distribution (for example, FTP, EMAIL, PRINT).

Usage: java A12_Get_PrivateList <owner> <bookMethod>

A13_Get_OwnerList.java

Writes a list of Address Book owners to standard out.

Usage: java A13_Get_OwnerList

A31_Update.java

This application updates an existing Address Book by adding a new location. It accepts two arguments: the name of the book to be updated and the location that is to be added. The code can be modified to also accept burst values for the update.

Usage: java A31_Update <bookName> <location>

A32_Delete_Book.java

This application deletes an Address Book. It accepts one argument: the name of the Address Book to be deleted.

Usage: java A32_Delete_Book <bookName>

A33_Delete_Element.java

This application deletes a line from an Address Book. It accepts three arguments: the name of the Address Book, the burst value from the line to be deleted, and the location (destination) from the line to be deleted.

Usage: java A33_Delete_Element <bookName> <burstValue> <location>

WebFOCUS

Feedback