Oracle® Collaboration Suite Contacts Java API Reference
10g Release 1 (10.1.1)

B16235-01

oracle.collabsuite.addressbook
Class AddressBookList

java.lang.Object
  |
  +--oracle.collabsuite.addressbook.AddressBookObject
        |
        +--oracle.collabsuite.addressbook.AddressBookList

public class AddressBookList
extends oracle.collabsuite.addressbook.AddressBookObject

This class represents a private list in user address book. Using methods in this class, various attributes of a list can be retrived or modified.


Method Summary
void addContactMembers(AddressBookContact[] contacts)
Adds the given contacts to this private list
void addContactNListMembers(AddressBookContact[] contacts, AddressBookList[] lists)
Adds the given contacts and list to this private list
void addListMembers(AddressBookList[] lists)
Adds the given lists from this private list
void delete()
Deletes this list from the user's addressbook.
void deleteContactMembers(AddressBookContact[] contacts)
Removes the given contacts from this private list
void deleteContactNListMembers(AddressBookContact[] contacts, AddressBookList[] lists)
Removes the given contacts and lists from this private list
void deleteListMembers(AddressBookList[] lists)
Removes the given lists from this private list
java.lang.String[] getAttributeNames()
Returns an array of String containing the name of all the attribute names currently cached in this object
AddressBookAttribute[] getAttributes(java.lang.String[] attributeNames)
Returns the attribute values for the list of list attributes.
AddressBookContact[] getContactMembers(java.lang.String[] contactAttrs)
Returns contacts who are members of this private list
java.lang.String getDN()
Returns the DN of the list.
java.lang.String getGUID()
Returns the GUID of the list.
AddressBookList[] getListMembers(java.lang.String[] listAttrs)
Returns the other lists who are members of this private list
java.util.Hashtable getMembers(java.lang.String[] membAttrs)
Returns the members of this private list.
java.lang.String getOwnerDN()
Returns the DN of the list owner.
java.lang.String getOwnerGUID()
Returns the GUID of the list owner.
boolean ifWritable()
This API lets the caller know if this list is writable or not.
void modifyMembers(AddressBookContact[] contacts, AddressBookList[] lists, int modType)
Adds/deletes/replaces the given contacts and lists from this private list based on the modification type
void refresh(java.lang.String[] attributeNames)
Refreshes this list entry
java.util.Vector resolve(java.lang.String[] resolutionType)
This method resolves this list to the given resolution types.
void setAttributes(AddressBookAttribute[] mods)
Sets the value of the given list attributes

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getDN

public java.lang.String getDN()
Returns the DN of the list.
Parameters:
void -
Returns:
list DN

getGUID

public java.lang.String getGUID()
Returns the GUID of the list.
Parameters:
void -
Returns:
list GUID

getOwnerDN

public java.lang.String getOwnerDN()
Returns the DN of the list owner.
Parameters:
void -
Returns:
list owner DN

getOwnerGUID

public java.lang.String getOwnerGUID()
Returns the GUID of the list owner.
Parameters:
void -
Returns:
list owner GUID

ifWritable

public boolean ifWritable()
This API lets the caller know if this list is writable or not. This API is to be used for delegation purpose.
Parameters:
void -
Returns:
boolean - true implies this entry can be modified by the caller

getAttributes

public AddressBookAttribute[] getAttributes(java.lang.String[] attributeNames)
                                     throws AddressBookException
Returns the attribute values for the list of list attributes. If some of these attributes were not fetched during the previous query, then it goes to the ldap server to fetch the additional attributes and sets the values in this object.
Parameters:
attributeNames - Names of the attribute whose values are to be fetched
Returns:
list attribute values - an array of AddressBookAttribute
Throws:
AddressBookException - Throws AddressBookException if any error is encountered.

refresh

public void refresh(java.lang.String[] attributeNames)
             throws AddressBookException
Refreshes this list entry
Parameters:
attributeNames - Names of the attribute whose values are to be fetched. null means fetch all attributes
Returns:
void
Throws:
AddressBookException - Throws AddressBookException if any error is encountered.

getAttributeNames

public java.lang.String[] getAttributeNames()
Returns an array of String containing the name of all the attribute names currently cached in this object
Returns:
a String array containing attribute names.

setAttributes

public void setAttributes(AddressBookAttribute[] mods)
                   throws AddressBookException
Sets the value of the given list attributes
Parameters:
mods - An array of AddressBookAttribute for each attribute to be modified. The following example shows how to delete the mail id of the list ...mailAttr = new AddressBookAttribute(AddressBookListConstants.MAILADRESSES); mailAttr.setValue(AddressBookListConstants.DELETE_ATTRIBUTE, "tuser1@oracle.com");
Returns:
void
Throws:
AddressBookException - Throws AddressBookException if any error is encountered.

getMembers

public java.util.Hashtable getMembers(java.lang.String[] membAttrs)
                               throws AddressBookException
Returns the members of this private list.
Parameters:
listAttrs - The list/contact member attributes to fetch
Returns:
a Hashtable containing all members of the list. Use the key AddressBookListConstants.MEMBER_CONTACT to get contact members and the key AddressBookListConstants.MEMBER_LIST to get list members. The value is an array of AddressBookContact for contact members and an array of AddressBookList for list members. Returns null if list does not contain any member.
Throws:
AddressBookException - Throws AddressBookException if any error is encountered.

getContactMembers

public AddressBookContact[] getContactMembers(java.lang.String[] contactAttrs)
                                       throws AddressBookException
Returns contacts who are members of this private list
Parameters:
contactAttrs - The contact member attributes to fetch
Returns:
an array of contacts
Throws:
AddressBookException - Throws AddressBookException if any error is encountered.

getListMembers

public AddressBookList[] getListMembers(java.lang.String[] listAttrs)
                                 throws AddressBookException
Returns the other lists who are members of this private list
Parameters:
listAttrs - The list member attributes to fetch
Returns:
an array of Strings containing list names
Throws:
AddressBookException - Throws AddressBookException if any error is encountered.

addContactMembers

public void addContactMembers(AddressBookContact[] contacts)
                       throws AddressBookException
Adds the given contacts to this private list
Parameters:
contacts - an array of contacts
Returns:
void
Throws:
AddressBookException - Throws AddressBookException if any error is encountered.

deleteContactMembers

public void deleteContactMembers(AddressBookContact[] contacts)
                          throws AddressBookException
Removes the given contacts from this private list
Parameters:
contacts - an array of contacts
Returns:
void
Throws:
AddressBookException - Throws AddressBookException if any error is encountered.

addListMembers

public void addListMembers(AddressBookList[] lists)
                    throws AddressBookException
Adds the given lists from this private list
Parameters:
lists - an array of lists
Returns:
void
Throws:
AddressBookException - Throws AddressBookException if any error is encountered.

deleteListMembers

public void deleteListMembers(AddressBookList[] lists)
                       throws AddressBookException
Removes the given lists from this private list
Parameters:
lists - an array lists
Returns:
void
Throws:
AddressBookException - Throws AddressBookException if any error is encountered.

addContactNListMembers

public void addContactNListMembers(AddressBookContact[] contacts,
                                   AddressBookList[] lists)
                            throws AddressBookException
Adds the given contacts and list to this private list
Parameters:
contacts - an array of contacts
lists - an array of lists
Returns:
void
Throws:
AddressBookException - Throws AddressBookException if any error is encountered.

deleteContactNListMembers

public void deleteContactNListMembers(AddressBookContact[] contacts,
                                      AddressBookList[] lists)
                               throws AddressBookException
Removes the given contacts and lists from this private list
Parameters:
contacts - an array of contacts
lists - an array of lists
Returns:
void
Throws:
AddressBookException - Throws AddressBookException if any error is encountered.

modifyMembers

public void modifyMembers(AddressBookContact[] contacts,
                          AddressBookList[] lists,
                          int modType)
                   throws AddressBookException
Adds/deletes/replaces the given contacts and lists from this private list based on the modification type
Parameters:
contacts - an array of contacts
lists - an array of lists
modType - - The type of modification add/delete/replace [Use constants AddressBookConstants.ADD_ATTRIBUTE AddressBookConstants.DELETE_ATTRIBUTE and AddressBookConstants.REPLACE_ATTRIBUTE]
Returns:
void
Throws:
AddressBookException - Throws AddressBookException if any error is encountered.

resolve

public java.util.Vector resolve(java.lang.String[] resolutionType)
                         throws AddressBookException
This method resolves this list to the given resolution types. If it contains other contacts and lists, it would resolve the contacts and lists too. For ex., when resolutionType is AddressBookListConstants.MAILID and AddressBookContactConstants.SECONDARY_EMAIL, it will resolve the given entry to the these two attributes. For ex., when a private list dl1 is resolved, it would retrun all the mail ids and secondary mailids contained in dl1. If dl1 contains other dls and contacts, it resolves the included dls and contacts also for these attributes.
Parameters:
resolutionType - The resolution type, which is the attribute names to resolve to, for example array containing MAILID, SECONDARY_EMAIL etc. It's an array os Strings
Returns:
A Vector containing the resolved values. Caller must type cast the values in the vector Each element of the Vector represents one value. Value will be - a string when attribute type is not binary. In case of binary attribute, it will be a byte[]. Returns null Vector if it can not resolve to the given types.
Throws:
AddressBookException - Throws AddressBookException if any error is encountered.

delete

public void delete()
            throws AddressBookException
Deletes this list from the user's addressbook. This also deletes all the references to this list in the user's address book.
Parameters:
void -
Returns:
void
Throws:
AddressBookException - Throws AddressBookException if any error is encountered.

Oracle® Collaboration Suite Contacts Java API Reference
10g Release 1 (10.1.1)

B16235-01

Copyright © 1988, 2005, Oracle. All rights reserved.