ibi.broker.api.cci
Interface AddressBookManager

All Known Implementing Classes:
AddressBookManagerClientSF

public interface AddressBookManager

 This interface provides all of the basic functions for managing
 ReportCaster's distribution list information.  

 A DistributionElement specifies destination locations and burst values.
 It can be represented as a single line in an Address Book, containing
 the destination for ReportCaster output and the burst value, if any, 
 associated with that destination.

 The following sample code shows the instantiation of an AddressBookManager object.   

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


 CasterManagedConnectionFactory managedConnectionFactory = new CasterManagedConnectionFactory();
 managedConnectionFactory.setServerName(host);//the name of the server running the distribution server
 managedConnectionFactory.setPortNumber(port);//the port the distribution server is listening
 CasterConnectionFactory connectionFactory = (CasterConnectionFactory)managedConnectionFactory.createConnectionFactory();
 ConnectionSpec credential = new PasswordCredential(user, password.toCharArray());
    //This can be any of the credential objects. It is assumed here the user String has been assigned earlier
   // and that password, also assigned earlier, is a String that needs to be converted to a character Array.
 CasterConnection connectionObject = ((CasterConnection)connectionFactory.getConnection(credential));
 AddressBookManager manager = connectionObject.getAddressBookManager();
 

See Also:
AddrBook, DestinationElement

Method Summary
 void addAddressBook(AddrBook addrBook)
          Creates an Address Book in the ReportCaster Repository.
 void addDestinationElement(java.lang.String bookName, DestinationElement destinationElement)
          Adds a DestinationElement to the Address Book specified by bookName.
 void deleteAddressBook(java.lang.String bookName)
          Deletes the Address Book specified by bookName.
 void deleteDestinationElement(java.lang.String bookName, DestinationElement destinationElement)
          Deletes a DestinationElement from the Address Book specified by bookName.
 AddrBook getAddressBook(java.lang.String bookName)
          Returns an AddrBook object specified by bookName.
 AddrBook[] getAddressBookPrivateList(java.lang.String method)
           
 AddrBook[] getAddressBookPrivateListByCaller(java.lang.String method)
          Returns an Array of PRIVATE AddrBook objects for both the given distribution method and the caller who has authenticated.
 AddrBook[] getAddressBookPrivateListByOwner(java.lang.String owner, java.lang.String method)
          Returns an Array of PRIVATE AddrBook objects for a given distribution method and the specified owner of the AddrBooks.
 AddrBook getAddressBookProperty(java.lang.String bookName)
          Returns an AddrBook object specified by bookName.
 AddrBook[] getAddressBookPublicList(java.lang.String method)
          Returns an Array of PUBLIC AddrBook objects for a given distribution method.
 AddrBook[] getAddressBookPublicListByCaller(java.lang.String method)
          Returns an Array of PUBLIC AddrBook objects for a given distribution method and the caller who has authenticated.
 AddrBook[] getAddressBookPublicListByOwner(java.lang.String owner, java.lang.String method)
          Returns an Array of PUBLIC AddrBook objects for a given distribution method and the specified owner of the Address Books.
 java.lang.String[] getOwnerList()
          Retrieves the Address Book owner list as a String Array from the ReportCaster Repository.
 java.lang.String[] getOwnerList(java.lang.String method, java.lang.String access)
           
 void updateAddressBook(AddrBook addrBook)
          Updates an Address Book's properties, deletes all existing distribution lists and inserts the new ones, which are represented by the DestinationElement Array stored in AddrBook.
 void updateAddressBookProperty(AddrBook addrBook)
          Address Book's properties in the ReportCaster Repository.
 

Method Detail

getAddressBookPublicList

AddrBook[] getAddressBookPublicList(java.lang.String method)
                                    throws CasterException
Returns an Array of PUBLIC AddrBook objects for a given distribution method. The distribution method is one of three String constants: Distribution.EMAIL , Distribution.PRINT, or Distribution.FTP. For performance reasons, the AddrBook objects returned by this method do not contain the distribution list. If there are no PUBLIC Address Books for the specified distribution method, an empty Array will be returned. If the specified distribution method is NULL, all Address Books will be returned.

Parameters:
method - The method of distribution as a String constant
Returns:
an Array of AddrBook objects.
Throws:
CasterException

getAddressBookPrivateList

AddrBook[] getAddressBookPrivateList(java.lang.String method)
                                     throws CasterException
Throws:
CasterException

getAddressBookPublicListByCaller

AddrBook[] getAddressBookPublicListByCaller(java.lang.String method)
                                            throws CasterException
Returns an Array of PUBLIC AddrBook objects for a given distribution method and the caller who has authenticated. The distribution method is one of three String constants: Distribution.EMAIL , Distribution.PRINT, or Distribution.FTP. If there are no PUBLIC Address Books for the specified distribution method, an empty Array will be returned. If the specified distribution method is NULL, all Address Books will be returned. For performance reasons, the AddrBook objects returned by this method do not contain the distribution list.

Parameters:
method - The method of distribution as a String constant.
Returns:
an Array of AddrBook objects.
Throws:
CasterException
See Also:
for all the methods values.

getAddressBookPublicListByOwner

AddrBook[] getAddressBookPublicListByOwner(java.lang.String owner,
                                           java.lang.String method)
                                           throws CasterException
Returns an Array of PUBLIC AddrBook objects for a given distribution method and the specified owner of the Address Books. The distribution method is one of three String Distribution.EMAIL , Distribution.PRINT. If there are no PUBLIC Address Books for the specified distribution method, an empty Array will be returned. If the specified distribution method is NULL, all Address Books will be returned. For performance reasons, the AddrBook objects returned by this method do not contain the distribution list.

Parameters:
owner - The owner of the Address Book as a String.
method - The method of distribution, as a String constant.
Returns:
an Array of AddrBook objects.
Throws:
CasterException

getAddressBookPrivateListByCaller

AddrBook[] getAddressBookPrivateListByCaller(java.lang.String method)
                                             throws CasterException
Returns an Array of PRIVATE AddrBook objects for both the given distribution method and the caller who has authenticated. The distribution method is one of three String constants: Distribution.EMAIL , Distribution.PRINT, or Distribution.FTP. If there are no PUBLIC Address Books for the specified distribution method, an empty Array will be returned. If the specified distribution method is NULL, all Address Books will be returned. For performance reasons, the AddrBook objects returned by this method do not contain the distribution list.

Parameters:
method - The method of distribution, as a String constant. This method is available only to the administrator and the Address Book owner.
Returns:
an Array of AddrBook objects.
Throws:
CasterException

getAddressBookPrivateListByOwner

AddrBook[] getAddressBookPrivateListByOwner(java.lang.String owner,
                                            java.lang.String method)
                                            throws CasterException
Returns an Array of PRIVATE AddrBook objects for a given distribution method and the specified owner of the AddrBooks. The distribution method is one of three String Distribution.EMAIL , Distribution.PRINT. If there are no PUBLIC Address Books for the specified distribution method, an empty Array will be returned. If the specified distribution method is NULL all Address Books will be returned. If the caller is an administrator, any owner may be specified. If the caller is an End User, the user may specify his own userID. Otherwise, an exception is thrown. For performance reasons, the AddrBook objects returned by this method do not contain the distribution list. This method is available only to the administrator and the Address Book owner.

Parameters:
owner - The owner of the Address Book, as a String.
method - The method of distribution, as a String constant.
Returns:
an Array of AddrBook objects.
Throws:
CasterException

getAddressBookProperty

AddrBook getAddressBookProperty(java.lang.String bookName)
                                throws CasterException
Returns an AddrBook object specified by bookName. For performance reasons, the AddrBook objects returned by this method do not contain the distribution list. This method is available only to the administrator and the Address Book owner.

Parameters:
bookName - The name of the Address Book stored in the database, as a String.
Returns:
AddrBook An AddrBook object associated with the bookname.
Throws:
CasterException

getAddressBook

AddrBook getAddressBook(java.lang.String bookName)
                        throws CasterException
Returns an AddrBook object specified by bookName. The AddrBook objects returned by this method contain distribution list information in the form of a DestinationElement Array. This method is available only to the administrator and the Address Book owner.

Parameters:
bookName - The name of the Address Book stored in the database, as a String.
Returns:
AddrBook
Throws:
CasterException

addAddressBook

void addAddressBook(AddrBook addrBook)
                    throws CasterException
Creates an Address Book in the ReportCaster Repository. Parameter AddrBook may or may not contain a DestinationElement Array. All distribution lists represented by the DestinationElement Array will also be inserted into the repository. This method is available only to the administrator and the Address Book owner.

Parameters:
addrBook - AddrBook object associated with the repository data that is to be added.
Throws:
CasterException

updateAddressBookProperty

void updateAddressBookProperty(AddrBook addrBook)
                               throws CasterException
Address Book's properties in the ReportCaster Repository. It does not update the DestinationElement Array. This method is available only to the administrator and the Address Book owner.

Parameters:
addrBook - AddrBook object containing the data that is to be updated in the repository.
Throws:
CasterException

updateAddressBook

void updateAddressBook(AddrBook addrBook)
                       throws CasterException
Updates an Address Book's properties, deletes all existing distribution lists and inserts the new ones, which are represented by the DestinationElement Array stored in AddrBook. This method is available only to the administrator and the Address Book owner.

Parameters:
addrBook - object containing the data that is to be updated in the repository.
Throws:
CasterException

deleteAddressBook

void deleteAddressBook(java.lang.String bookName)
                       throws CasterException
Deletes the Address Book specified by bookName. This method is available only to the administrator and the Address Book owner.

Parameters:
bookName - The name of the Address Book stored in the database, as a String.
Throws:
CasterException

getOwnerList

java.lang.String[] getOwnerList()
                                throws CasterException
Retrieves the Address Book owner list as a String Array from the ReportCaster Repository. This method can only be called by an administrator.

Returns:
a String Array of Address Book owners.
Throws:
CasterException

getOwnerList

java.lang.String[] getOwnerList(java.lang.String method,
                                java.lang.String access)
                                throws CasterException
Throws:
CasterException

addDestinationElement

void addDestinationElement(java.lang.String bookName,
                           DestinationElement destinationElement)
                           throws CasterException
Adds a DestinationElement to the Address Book specified by bookName. This method is available only to the administrator and the Address Book owner.

Parameters:
bookName - The name of the Address Book stored in the database, as a String.
destinationElement - DestinationElement object containing the line in the Address Book that is to be added.
Throws:
CasterException

deleteDestinationElement

void deleteDestinationElement(java.lang.String bookName,
                              DestinationElement destinationElement)
                              throws CasterException
Deletes a DestinationElement from the Address Book specified by bookName. This method is available only to the administrator and the Address Book owner.

Parameters:
bookName - The name of the Address Book stored in the database, as a String.
destinationElement - DestinationElement object containing the line in the Address Book that is to be deleted.
Throws:
CasterException


Copyright © 2006 Information Builders, Incorporated.