Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.compoze.contact
Class ContactSession

    java.lang.Object
      |
      +--com.compoze.contact.ContactSession

All Implemented Interfaces:
  java.io.Serializable

public class ContactSession
extends java.lang.Object
implements java.io.Serializable

This class provides a session for managing contact information, and is the entry point into the Contact API. It collects together properties used by the Contact API and is not subclassed.

An instance of the `ContactSession` can be obtained by calling `getSession()` with an authenticated user. Once a session is obtained, there are several entry points into the rest of the API. If you wish to begin manipulating contacts or distribution lists, you should use the `getContacts()` method or the `getDistributionLists()` method to get each respective collection. Alternatively, if you already have the ID of the distribution list or contact that you wish to retrieve you may use the `getDistributionList(long)` or `getContact(long)`.

See Also:
  Serialized Form

Method Summary
`Contact` | `getContact(long lContactID)` Gets a contact with the given contact id.
`Contacts` | `getContacts()` Gets the contacts collection for all of the contacts the authenticated user has `ContactPermission.READ` permission.
`DistributionList` | `getDistributionList(long lDistributionListID)` Gets a distribution list with the given id.
`DistributionLists` | `getDistributionLists()` Gets the lists collection for all top-level lists the authenticated user has `ContactPermission.READ` permission.
`static ContactSession` | `getSession(User user)` Gets the contact session using the specified user.
`User` | `getUser()` Gets the authenticated user for this session.
`java.lang.String` | `toString()` Returns a string representation of the object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Method Detail

### getSession

    public static ContactSession getSession(User user)

  Gets the contact session using the specified user.
  Parameters:
    `user` - the authenticated user
  Returns:
    the new contact session

### getDistributionLists

    public DistributionLists getDistributionLists()

  Gets the lists collection for all top-level lists the authenticated user has `ContactPermission.READ` permission.
  Returns:
    the lists collection

### getContacts

    public Contacts getContacts()

  Gets the contacts collection for all of the contacts the authenticated user has `ContactPermission.READ` permission.
  Returns:
    the contacts collection

### getContact

    public Contact getContact(long lContactID)
                       throws java.security.AccessControlException

  Gets a contact with the given contact id.
  Parameters:
    `lContactID` - the contact id
  Returns:
    the contact or `null` if not found
  Throws:
    `java.security.AccessControlException` - if the authenticated user is not allowed to read the contact

### getDistributionList

    public DistributionList getDistributionList(long lDistributionListID)
                                         throws java.security.AccessControlException

  Gets a distribution list with the given id.
  Parameters:
    `lDistributionListID` - the distribution list id
  Returns:
    the distribution list or `null` if not found
  Throws:
    `java.security.AccessControlException` - if the authenticated user is not allowed to read the distribution list

### getUser

    public User getUser()

  Gets the authenticated user for this session.
  Returns:
    the authenticated user

### toString

    public java.lang.String toString()

  Returns a string representation of the object.
  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    tthe string representation of the object

Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.