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

B16235-01

oracle.collabsuite.addressbook
Class AddressBookContact

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

public class AddressBookContact
extends oracle.collabsuite.addressbook.AddressBookObject

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


Method Summary
void delete()
Deletes this contact from the user's addressbook.
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 contact attributes.
java.lang.String getDN()
Returns the DN of the contact.
java.lang.String getGUID()
Returns the GUID of the contact.
java.lang.String getOwnerDN()
Returns the DN of the contact owner.
java.lang.String getOwnerGUID()
Returns the GUID of the contact owner.
boolean ifWritable()
This API lets the caller know if this contact is writable or not.
void refresh(java.lang.String[] attributeNames)
Refreshes this contact entry
void setAttributes(AddressBookAttribute[] mods)
Sets the value of the given contact 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 contact.
Parameters:
void -
Returns:
contact DN

getGUID

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

getOwnerDN

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

getOwnerGUID

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

ifWritable

public boolean ifWritable()
This API lets the caller know if this contact 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 contact 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:
contact 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 contact 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 contact 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 contact ...mailAttr = new AddressBookAttribute(AddressBookListConstants.MAILADRESSES); mailAttr.setValue(AddressBookListConstants.DELETE_ATTRIBUTE, "tuser1@oracle.com");
Returns:
void
Throws:
AddressBookException - Throws AddressBookException if any error is encountered.

delete

public void delete()
            throws AddressBookException
Deletes this contact from the user's addressbook. This also deletes all the references to this contact 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.