|
Oracle® Collaboration Suite Contacts Java API Reference 10g Release 1 (10.1.1) B16235-01 |
|||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Object | +--oracle.collabsuite.addressbook.UserAddressBook
This class manages user private address book in 9.0.5. Callers must get a handle to UserAddressBook using OCSUser.getAddressBook(). Using methods in this class various operations like addition, deletion, query address book entries (contacts, private lists) can be performed. Before any of there operations can be performed, authentication to directory must be done. These APIs support the following -
An option to use connections from the common OCS pool of ldap connection for all addressbook operations. For setting up the connection pool properties, refer to OCSUser.
Other applications might already have ldap connections set up and might wish not to create additional ldap connections for using these APIs. For these cases, callers can pass their DirContext to be used using setDirContext(DirContext dirCtx) method.
| Constructor Summary | |
UserAddressBook(javax.naming.directory.DirContext dirCtx, java.lang.String subScriberLocation, java.lang.String userDN)This constructor can be invoked when caller application already have a pool of LDAP connections set up through some other means and wants to reuse connections from that pool. |
|
UserAddressBook(java.lang.String subScriberLocation, java.lang.String userDN)This constructor makes use of the common OCS ldap pool. |
|
| Method Summary | |
void |
clearPiecewiseContactsFlag()This method clears the ldap handle and flags etc. |
void |
clearPiecewiseListsFlag()This method clears the ldap handle and flags etc. |
AddressBookContact |
createContact(AddressBookAttribute[] attrs)This method adds a contact to the given user's addressbook. |
AddressBookContact |
createContactInSharedAddressBook(java.lang.String ownerUserGUID, AddressBookAttribute[] attrs)This method adds a contact in another given user's addressbook. |
AddressBookList |
createList(AddressBookAttribute[] attrs, AddressBookContact[] contacts, AddressBookList[] lists)This method adds a list to the given user's addressbook. |
AddressBookList |
createListInSharedAddressBook(java.lang.String ownerUserGUID, AddressBookAttribute[] attrs, AddressBookContact[] contacts, AddressBookList[] lists)This method adds a list in another given user's addressbook. |
java.lang.String[] |
deleteContactByFilter(java.lang.String filter)This method deletes contacts from user's address book matching the given criteria. |
java.lang.String[] |
deleteListByFilter(java.lang.String filter)This method deletes lists from user's address book matching the given criteria. |
java.lang.String |
getAddressBookDN() |
AddressBookContact[] |
getAllContacts(java.lang.String[] attrsToFetch, int batchSize, int sizeLimit, java.lang.String sortingAttr)This method retrieves All Contacts for the given user.For large number of contacts, the callers can retrieve them piecewise in batches. |
AddressBookList[] |
getAllLists(java.lang.String[] attrsToFetch, int batchSize, int sizeLimit, java.lang.String sortingAttr)This method retrieves all Lists for the given user. |
java.lang.String[] |
getCategories(int category_type)This method retrieves the possible address book categories. |
java.lang.String[] |
getCategoriesFromSharedAddressbook(java.lang.String ownerUserGUID)This method retrieves the possible address book categories from for a shared addressbook. |
AddressBookContact[] |
getContacts(java.lang.String searchCriteria, java.lang.String[] attrsToFetch, int batchSize, int sizeLimit, java.lang.String sortingAttr)This method retrieves Contacts for the given user for the matching search criteria. |
SchemaObject |
getContactSchema()This method will return the representation of a contact in LDAP, ie. |
AddressBookList[] |
getLists(java.lang.String searchCriteria, java.lang.String[] attrsToFetch, int batchSize, int sizeLimit, java.lang.String sortingAttr)This method retrieves Lists for the given user for the matching search criteria. |
SchemaObject |
getListSchema()This method will return the representation of a list in LDAP, ie. |
java.util.Hashtable |
getReadersAndWritersList()This API gets the list of users having read only and read/write permission on user's address book. |
java.lang.String[] |
getReadersList()This API gets the list of users having read permission on user's address book. |
java.util.Hashtable |
getSharedAddressBookOwnerGUIDs()This API gets the list of user GUIDs who have shared their address book with this user. |
AddressBookContact[] |
getSharedContacts(java.lang.String[] usersGUIDs, java.lang.String searchCriteria, java.lang.String[] attrsToFetch, int batchSize, int sizeLimit, java.lang.String sortingAttr)This method retrieves Contacts other users have shared with this user for the matching search criteria. |
AddressBookList[] |
getSharedLists(java.lang.String[] usersGUIDs, java.lang.String searchCriteria, java.lang.String[] attrsToFetch, int batchSize, int sizeLimit, java.lang.String sortingAttr)This method retrieves lists other users have shared with this user for the matching search criteria. |
java.lang.String[] |
getUserGUIDsSharingAddressBook()This API gets the list of user GUIDs who have shared their address book with this user. |
java.lang.String[] |
getWritersList()This API gets the list of users having read and write permission on user's address book. |
boolean |
ifNextBatchContacts()This method tells whether more data is to be fetched from server side for the prior piecewise fetch of user contacts. |
boolean |
ifNextBatchLists()This method tells whether more data is to be fetched from server side for the prior piecewise fetch of user lists. |
void |
setDirContext(javax.naming.directory.DirContext dirCtx)This method can be invoked to set the DirContext for the user addressbook operations. |
java.lang.String[] |
share(java.lang.String[] readAccessGUIDs, java.lang.String[] writeAccessGUIDs)This API lets the user share his/her addressbook with other users. |
java.lang.String[] |
unshare(java.lang.String[] userGUIDs)This API lets the user unshare his/her addressbook from the given list of users. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public UserAddressBook(java.lang.String subScriberLocation,
java.lang.String userDN)
throws AddressBookException
subScriberLocation - DN of the subscriber for the given user - can be null in case applications are not aware of ituserDN - DN of the given User in the subscriber tree
public UserAddressBook(javax.naming.directory.DirContext dirCtx,
java.lang.String subScriberLocation,
java.lang.String userDN)
throws AddressBookException
dirCtx - The JNDI DirContextsubScriberLocation - DN of the subscriber for the given user - can be null in case applications are not aware of ituserDN - DN of the given user in the subscriber tree| Method Detail |
public void setDirContext(javax.naming.directory.DirContext dirCtx)
throws AddressBookException
dirCtx - The JNDI DirContext
public java.lang.String[] getCategories(int category_type)
throws AddressBookException
category_type - the types of categories to be fetched. AddressBookConstants.USER_CATEGORY - this will return only user defined categories AddressBookConstants.SYSTEM_CATEGORY - this will return only system level categories
public SchemaObject getContactSchema()
throws AddressBookException
void -
public AddressBookContact createContact(AddressBookAttribute[] attrs)
throws AddressBookException
attrs - The contact attributes. The following example shows how to set a value for mail id of a contact. ...mailAttr = new AddressBookAttribute(AddressBookContactConstants.MAILID); mailAttr.setValue("testuser@oracle.com");
public java.lang.String[] deleteContactByFilter(java.lang.String filter)
throws AddressBookException
filter - Filter for searching contacts, must be a valid LDAP filter (Note: it's caller's responsibility to pass a valid filter)
public AddressBookContact[] getAllContacts(java.lang.String[] attrsToFetch,
int batchSize,
int sizeLimit,
java.lang.String sortingAttr)
throws AddressBookException
attrsToFetch - The list of contact attributes to be returned. null means fetch all attributesbatchSize - The no of contacts to fetch in one batch. 0 or -1 means fetch all contacts matching the search criteriasizeLimit - The maximum no of contacts to fetch. 0 or -1 means fetch all contacts matching the search criteriasortingAttr - The name of the attribute for which results are to be sorted, this will be using server side sorting feature (provided server side ldap sorting is supported by OID). null implies no sorting
public AddressBookContact[] getContacts(java.lang.String searchCriteria,
java.lang.String[] attrsToFetch,
int batchSize,
int sizeLimit,
java.lang.String sortingAttr)
throws AddressBookException
searchCriteria - The search criteria in the ldap filter formatattrsToFetch - The list of contact attributes to be returned. null means fetch all attributesbatchSize - The no of contacts to fetch in one batch. 0 or -1 means fetch all contacts matching the search criteriasizeLimit - The maximum no of contacts to fetch. 0 or -1 means fetch all contacts matching the search criteriasortingAttr - The name of the attribute for which results are to be sorted, this will be using server side sorting feature (provided server side ldap sorting is supported by OID). null implies no sorting
public void clearPiecewiseContactsFlag()
throws AddressBookException
void -public boolean ifNextBatchContacts()
void -
public SchemaObject getListSchema()
throws AddressBookException
void -
public AddressBookList createList(AddressBookAttribute[] attrs,
AddressBookContact[] contacts,
AddressBookList[] lists)
throws AddressBookException
attrs - The list attributes. The following example shows how to add 2 mail ids for a new list ...mailAttr = new AddressBookAttribute(AddressBookListConstants.MAILADDRESSES); mailAttr.setValue(new String[] {"testuser1@oracle.com", "testuser2@oracle.com"}); Contact members and lists can be added to the given list using add/delete methods of AddressBookList or by passing the contacts and lists parameterscontacts - list of contacts to be added to this list [ for contacts, the AddressBookContact objects can be obtained by performing a query.]. null means no contact memberslists - other lists to be added to this list [ for these lists, the AddressBookList objects can be obtained by performing a query.] null means no list members
public java.lang.String[] deleteListByFilter(java.lang.String filter)
throws AddressBookException
filter - Filter for searching lists, must be a valid LDAP filter (Note: it's caller's responsibility to pass a valid filter)
public AddressBookList[] getAllLists(java.lang.String[] attrsToFetch,
int batchSize,
int sizeLimit,
java.lang.String sortingAttr)
throws AddressBookException
attrsToFetch - The list of list attributes to be returned. null means fetch all attributesbatchSize - The no of lists to fetch in one batch. 0 or -1 means fetch all lists matching the search criteriasizeLimit - The maximum no of lists to fetch. 0 or -1 means fetch all contacts matching the search criteriasortingAttr - The name of the attribute for which results are to be sorted, this will be using server side sorting feature (provided server side ldap sorting is supported by OID). null implies no sorting
public AddressBookList[] getLists(java.lang.String searchCriteria,
java.lang.String[] attrsToFetch,
int batchSize,
int sizeLimit,
java.lang.String sortingAttr)
throws AddressBookException
searchCriteria - The search criteria in the ldap filter formatattrsToFetch - The list of list attributes to be returned. null means fetch all attributesbatchSize - The no of lists to fetch in one batch. 0 or -1 means fetch all lists matching the search criteriasizeLimit - The maximum no of lists to fetch. 0 or -1 means fetch all contacts matching the search criteriasortingAttr - The name of the attribute for which results are to be sorted, this will be using server side sorting feature (provided server side ldap sorting is supported by OID). null implies no sorting
public void clearPiecewiseListsFlag()
throws AddressBookException
void -public boolean ifNextBatchLists()
void -
public java.lang.String[] getCategoriesFromSharedAddressbook(java.lang.String ownerUserGUID)
throws AddressBookException
ownerUserGUID - The GUID of the user in whose address book this contact is getting created
public java.lang.String[] share(java.lang.String[] readAccessGUIDs,
java.lang.String[] writeAccessGUIDs)
throws AddressBookException
readAccessGUIDs - An array of Strings containing user GUIDs for giving read permission - can be null if user is giving only write permissionswriteAccessGUIDs - An array of Strings containing user GUIDs for giving write permission - can be null if user is giving only read permissions
public java.lang.String[] unshare(java.lang.String[] userGUIDs)
throws AddressBookException
userGUIDs - An array of Strings containing user GUIDs for removing access. When this is null, this means remove sharing access from all users
public java.lang.String[] getReadersList()
throws AddressBookException
void -
public java.lang.String[] getWritersList()
throws AddressBookException
void -
public java.util.Hashtable getReadersAndWritersList()
throws AddressBookException
void -
public java.lang.String[] getUserGUIDsSharingAddressBook()
throws AddressBookException
void -
public java.util.Hashtable getSharedAddressBookOwnerGUIDs()
throws AddressBookException
void -
public AddressBookContact createContactInSharedAddressBook(java.lang.String ownerUserGUID,
AddressBookAttribute[] attrs)
throws AddressBookException
ownerUserGUID - The GUID of the user in whose address book this contact is getting createdattrs - The contact attributes. The following example shows how to set a value for mail id of a contact. ...mailAttr = new AddressBookAttribute(AddressBookContactConstants.MAILID); mailAttr.setValue("testuser@oracle.com");
public AddressBookContact[] getSharedContacts(java.lang.String[] usersGUIDs,
java.lang.String searchCriteria,
java.lang.String[] attrsToFetch,
int batchSize,
int sizeLimit,
java.lang.String sortingAttr)
throws AddressBookException
usersGUIDs - The list of user GUIDs whose addressbook needs to be searched. When this is null, this API gets any shared contacts from all user's address book.searchCriteria - The search criteria in the ldap filter formatattrsToFetch - The list of contact attributes to be returned. null means fetch all attributesbatchSize - The no of contacts to fetch in one batch. 0 or -1 means fetch all contacts matching the search criteriasizeLimit - The maximum no of contacts to fetch. 0 or -1 means fetch all contacts matching the search criteriasortingAttr - The name of the attribute for which results are to be sorted, this will be using server side sorting feature (provided server side ldap sorting is supported by OID). null implies no sorting [this sorting is done per user]
public AddressBookList createListInSharedAddressBook(java.lang.String ownerUserGUID,
AddressBookAttribute[] attrs,
AddressBookContact[] contacts,
AddressBookList[] lists)
throws AddressBookException
ownerUserGUID - The GUID of the user in whose address book this list is getting createdattrs - The list attributes. The following example shows how to set a value for mail id of a list. ...mailAttr = new AddressBookAttribute(AddressBookContactConstants.MAILID); mailAttr.setValue("testuser@oracle.com");contacts - list of contacts to be added to this list [ for contacts, the AddressBookContact objects can be obtained by performing a query.]. null means no contact members. The contact members must belong to the address book of ownerUserGUID user.lists - other lists to be added to this list [ for these lists, the AddressBookList objects can be obtained by performing a query.] null means no list members. The list members must belong to the address book of ownerUserGUID user.
public AddressBookList[] getSharedLists(java.lang.String[] usersGUIDs,
java.lang.String searchCriteria,
java.lang.String[] attrsToFetch,
int batchSize,
int sizeLimit,
java.lang.String sortingAttr)
throws AddressBookException
usersGUIDs - The list of user GUIDs whose addressbook needs to be searched. When this is null, this API gets any shared lists from all user's address book.searchCriteria - The search criteria in the ldap filter formatattrsToFetch - The list of list attributes to be returned. null means fetch all attributesbatchSize - The no of lists to fetch in one batch. 0 or -1 means fetch all lists matching the search criteriasizeLimit - The maximum no of lists to fetch. 0 or -1 means fetch all contacts matching the search criteriasortingAttr - The name of the attribute for which results are to be sorted, this will be using server side sorting feature (provided server side ldap sorting is supported by OID). null implies no sorting [this sorting is done per user]public java.lang.String getAddressBookDN()
|
Oracle® Collaboration Suite Contacts Java API Reference 10g Release 1 (10.1.1) B16235-01 |
|||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||