com.sun.im.service
Interface PersonalContact

All Superinterfaces:
PersonalStoreEntry

public interface PersonalContact
extends PersonalStoreEntry

a personal contact is essentially a person listed in an address book


Field Summary
static java.lang.String EMAIL
           
static java.lang.String IM
           
static java.lang.String PHONE
           
static int SUBSCRIPTION_STATUS_CLOSED
           
static int SUBSCRIPTION_STATUS_OPEN
           
static int SUBSCRIPTION_STATUS_PENDING
           
 
Fields inherited from interface com.sun.im.service.PersonalStoreEntry
BOOKMARK, BOOKMARK_FOLDER, CONFERENCE, CONTACT, CONTACT_FOLDER, FOLDER, GATEWAY, GROUP, PROFILE, PROFILE_FOLDER, WATCHER
 
Method Summary
 void addAddress(java.lang.String addressType, java.lang.String address, int priority)
          adds an address or changes its priority
 java.lang.String getAddress(java.lang.String addressType)
          get the highest priority address for a given type of communication Elements in the list are Strings.
 java.util.List getAddresses(java.lang.String addressType)
          get the addresses for a given type of communication addresses are sorted by priority Elements in the list are Strings.
 int getInboundSubscriptionStatus()
          Determines if the current user has subscription to this contact
 int getOutboundSubscriptionStatus()
          Determines if this contact has subscription to the current user
 CollaborationPrincipal getPrincipal()
          returns the CollaborationPrincipal for this user
 void removeAddress(java.lang.String addressType, java.lang.String address)
          removes an address
 
Methods inherited from interface com.sun.im.service.PersonalStoreEntry
addToFolder, getDisplayName, getEntryId, getFolders, getType, remove, removeFromFolder, save, setDisplayName
 

Field Detail

EMAIL

public static final java.lang.String EMAIL
See Also:
Constant Field Values

PHONE

public static final java.lang.String PHONE
See Also:
Constant Field Values

IM

public static final java.lang.String IM
See Also:
Constant Field Values

SUBSCRIPTION_STATUS_CLOSED

public static final int SUBSCRIPTION_STATUS_CLOSED
See Also:
Constant Field Values

SUBSCRIPTION_STATUS_OPEN

public static final int SUBSCRIPTION_STATUS_OPEN
See Also:
Constant Field Values

SUBSCRIPTION_STATUS_PENDING

public static final int SUBSCRIPTION_STATUS_PENDING
See Also:
Constant Field Values
Method Detail

getAddresses

public java.util.List getAddresses(java.lang.String addressType)
get the addresses for a given type of communication addresses are sorted by priority Elements in the list are Strings.

Parameters:
addressType - the type of address
Returns:
a sorted list of addresses

getAddress

public java.lang.String getAddress(java.lang.String addressType)
get the highest priority address for a given type of communication Elements in the list are Strings.

Parameters:
addressType - the type of address
Returns:
an address

removeAddress

public void removeAddress(java.lang.String addressType,
                          java.lang.String address)
                   throws CollaborationException
removes an address

Parameters:
addressType - the type of address
address - the address to remove
Throws:
CollaborationException

addAddress

public void addAddress(java.lang.String addressType,
                       java.lang.String address,
                       int priority)
                throws CollaborationException
adds an address or changes its priority

Parameters:
addressType - the type of address
address - the address to remove
Throws:
CollaborationException

getOutboundSubscriptionStatus

public int getOutboundSubscriptionStatus()
Determines if this contact has subscription to the current user

Returns:
The subscription state as Defined in PersonalContact

getInboundSubscriptionStatus

public int getInboundSubscriptionStatus()
Determines if the current user has subscription to this contact

Returns:
The subscription state as Defined in PersonalContact

getPrincipal

public CollaborationPrincipal getPrincipal()
returns the CollaborationPrincipal for this user