|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.protocol.sip.ServerStoredContactList
public abstract class ServerStoredContactList
The parent server stored contact list used in OperationSetPresenceSipImpl the underling implementation like xcap one extend it with actual contact list modifications.
| Field Summary | |
|---|---|
protected OperationSetPresenceSipImpl |
parentOperationSet
The operation set that created us and that we could use when dispatching subscription events. |
protected static String |
ROOT_GROUP_NAME
Root group name. |
protected ContactGroupSipImpl |
rootGroup
The root contact group. |
protected ProtocolProviderServiceSipImpl |
sipProvider
The provider that is on top of us. |
| Constructor Summary | |
|---|---|
ServerStoredContactList(ProtocolProviderServiceSipImpl sipProvider,
OperationSetPresenceSipImpl parentOperationSet)
Creates a ServerStoredContactList wrapper for the specified BuddyList. |
|
| Method Summary | |
|---|---|
void |
addGroupListener(ServerStoredGroupListener listener)
Registers the specified group listener so that it would receive events on group modification/creation/destruction. |
abstract void |
authorizationAccepted(ContactSipImpl contact)
The user accepted authorization request for contact |
abstract void |
authorizationIgnored(ContactSipImpl contact)
The user ignored authorization request for contact |
abstract void |
authorizationRejected(ContactSipImpl contact)
The user rejected authorization request for contact |
ContactSipImpl |
createContact(ContactGroupSipImpl parentGroup,
String contactId,
boolean persistent,
String contactType)
Creates contact for the specified address and inside the specified group . |
abstract ContactSipImpl |
createContact(ContactGroupSipImpl parentGroup,
String contactId,
String displayName,
boolean persistent,
String contactType)
Creates contact for the specified address and inside the specified group . |
abstract ContactGroupSipImpl |
createGroup(ContactGroupSipImpl parentGroup,
String groupName,
boolean persistent)
Creates a group with the specified name and parent in the server stored contact list. |
ContactSipImpl |
createUnresolvedContact(ContactGroupSipImpl parentGroup,
String contactId,
String persistentData)
Creates a non resolved contact for the specified address and inside the specified group. |
ContactGroupSipImpl |
createUnresolvedContactGroup(ContactGroupSipImpl parentGroup,
String groupName)
Creates a non resolved contact group for the specified name. |
abstract void |
deleteAccountImage()
Deletes current account image from server. |
abstract void |
destroy()
Destroys the server stored list. |
protected void |
fireContactAdded(ContactGroupSipImpl parentGroup,
ContactSipImpl contact)
Make the parent persistent presence operation set dispatch a contact added event. |
protected void |
fireContactMoved(ContactGroupSipImpl oldParentGroup,
ContactGroupSipImpl newParentGroup,
ContactSipImpl contact)
Make the parent persistent presence operation set dispatch a subscription moved event. |
protected void |
fireContactRemoved(ContactGroupSipImpl parentGroup,
ContactSipImpl contact)
Make the parent persistent presence operation set dispatch a contact removed event. |
protected void |
fireContactResolved(ContactGroupSipImpl parentGroup,
ContactSipImpl contact)
Make the parent persistent presence operation set dispatch a contact resolved event. |
protected void |
fireGroupEvent(ContactGroup group,
int eventID)
Creates the corresponding event and notifies all ServerStoredGroupListeners that the source group has been removed, changed, renamed or whatever happened to it. |
abstract ServerStoredDetails.ImageDetail |
getAccountImage()
Get current account image from server if any. |
List<ContactSipImpl> |
getAllContacts(ContactGroupSipImpl group)
Returns all avaliable contacts from group and all subgroups. |
List<ContactGroupSipImpl> |
getAllGroups(ContactGroupSipImpl group)
Returns all avaliable groups from group and all subgroups. |
abstract byte[] |
getImage(URI imageUri)
Gets image from the specified uri. |
abstract URI |
getImageUri()
Gets the pres-content image uri. |
ContactGroupSipImpl |
getRootGroup()
Returns the root group of the contact list. |
List<ContactSipImpl> |
getUniqueContacts(ContactGroupSipImpl group)
Gets all unique contacts from group and all subgroups. |
abstract void |
init()
Initializes the server stored list. |
abstract boolean |
isAccountImageSupported()
Whether current contact list supports account image. |
abstract void |
moveContactToGroup(ContactSipImpl contact,
ContactGroupSipImpl newParentGroup)
Removes the specified contact from its current parent and places it under newParent. |
abstract void |
removeContact(ContactSipImpl contact)
Removes a contact. |
abstract void |
removeGroup(ContactGroupSipImpl group)
Removes the specified group from the server stored contact list. |
void |
removeGroupListener(ServerStoredGroupListener listener)
Removes the specified group listener so that it won't receive further events on group modification/creation/destruction. |
abstract void |
renameContact(ContactSipImpl contact,
String newName)
Renames the specified contact. |
abstract void |
renameGroup(ContactGroupSipImpl group,
String newName)
Renames the specified group from the server stored contact list. |
abstract void |
setAccountImage(byte[] newImageBytes)
Change the image of the account on server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String ROOT_GROUP_NAME
protected final ProtocolProviderServiceSipImpl sipProvider
protected final OperationSetPresenceSipImpl parentOperationSet
protected final ContactGroupSipImpl rootGroup
| Constructor Detail |
|---|
ServerStoredContactList(ProtocolProviderServiceSipImpl sipProvider,
OperationSetPresenceSipImpl parentOperationSet)
sipProvider - the provider that has instantiated us.parentOperationSet - the operation set that created us and that
we could use for dispatching subscription events| Method Detail |
|---|
public ContactGroupSipImpl getRootGroup()
public void addGroupListener(ServerStoredGroupListener listener)
listener - the ServerStoredGroupListener to register for group
events.public void removeGroupListener(ServerStoredGroupListener listener)
listener - the ServerStoredGroupListener to unregister.
protected void fireGroupEvent(ContactGroup group,
int eventID)
group - the ContactGroup that has been created/modified/removed.eventID - the id of the event to generate.
public ContactSipImpl createUnresolvedContact(ContactGroupSipImpl parentGroup,
String contactId,
String persistentData)
parentGroup - the group where the unersolved contact is to be
created.contactId - the sip id of the contact to create.persistentData - a String returned Contact's getPersistentData()
method during a previous run and that has been persistently stored
locally.
public ContactGroupSipImpl createUnresolvedContactGroup(ContactGroupSipImpl parentGroup,
String groupName)
parentGroup - the group under which the new group is to be created.groupName - the name of the group to create.
protected void fireContactAdded(ContactGroupSipImpl parentGroup,
ContactSipImpl contact)
parentGroup - the group where the new contact was added.contact - the contact that was added.
protected void fireContactMoved(ContactGroupSipImpl oldParentGroup,
ContactGroupSipImpl newParentGroup,
ContactSipImpl contact)
oldParentGroup - the group where the source contact was located
before being moved.newParentGroup - the group that the source contact is currently in.contact - the contact that was added.
protected void fireContactRemoved(ContactGroupSipImpl parentGroup,
ContactSipImpl contact)
parentGroup - the group where that the removed contact belonged to.contact - the contact that was removed.
protected void fireContactResolved(ContactGroupSipImpl parentGroup,
ContactSipImpl contact)
parentGroup - the group that the resolved contact belongs to.contact - the contact that was resolved.public List<ContactSipImpl> getUniqueContacts(ContactGroupSipImpl group)
group - the parent of the contacts.
public List<ContactSipImpl> getAllContacts(ContactGroupSipImpl group)
group - the parent of the contacts.
public List<ContactGroupSipImpl> getAllGroups(ContactGroupSipImpl group)
group - the parent of the contacts.
public abstract void init()
public abstract void destroy()
public abstract URI getImageUri()
IllegalStateException - if the user has not been connected.public abstract byte[] getImage(URI imageUri)
imageUri - the image uri.
public abstract ContactGroupSipImpl createGroup(ContactGroupSipImpl parentGroup,
String groupName,
boolean persistent)
throws OperationFailedException
parentGroup - the group where the new group should be created.groupName - the name of the new group to create.persistent - specify whether created contact is persistent ot not.
OperationFailedException - with code NETWORK_FAILURE if creating
the group fails because of XCAP server
error or with code
CONTACT_GROUP_ALREADY_EXISTS if contact
group with such name already exists.
public abstract void renameGroup(ContactGroupSipImpl group,
String newName)
group - the group to rename.newName - the new name of the group.
public abstract void moveContactToGroup(ContactSipImpl contact,
ContactGroupSipImpl newParentGroup)
throws OperationFailedException
contact - the Contact to movenewParentGroup - the ContactGroup where Contact
would be placed.
OperationFailedException - with code NETWORK_FAILURE if the
operation if failed during network
communication.public abstract void removeGroup(ContactGroupSipImpl group)
group - the group to delete.
public ContactSipImpl createContact(ContactGroupSipImpl parentGroup,
String contactId,
boolean persistent,
String contactType)
throws OperationFailedException
parentGroup - the group where the unersolved contact is to be
created.contactId - the sip id of the contact to create.persistent - specify whether created contact is persistent ot not.contactType - the contact type to create, if missing null.
OperationFailedException - with code NETWORK_FAILURE if the
operation if failed during network
communication.
public abstract ContactSipImpl createContact(ContactGroupSipImpl parentGroup,
String contactId,
String displayName,
boolean persistent,
String contactType)
throws OperationFailedException
parentGroup - the group where the unersolved contact is to be
created.contactId - the sip id of the contact to create.displayName - the display name of the contact to createpersistent - specify whether created contact is persistent ot not.contactType - the contact type to create, if missing null.
OperationFailedException - with code NETWORK_FAILURE if the
operation if failed during network
communication.
public abstract void removeContact(ContactSipImpl contact)
throws OperationFailedException
contact - contact to be removed.
OperationFailedException - with code NETWORK_FAILURE if the
operation if failed during network
communication.
public abstract void renameContact(ContactSipImpl contact,
String newName)
contact - the contact to be renamed.newName - the new contact name.
OperationFailedException - with code NETWORK_FAILURE if the
operation if failed during network
communication.public abstract void authorizationAccepted(ContactSipImpl contact)
contact - the user has accepted.public abstract void authorizationRejected(ContactSipImpl contact)
contact - the user has rejected.public abstract void authorizationIgnored(ContactSipImpl contact)
contact - the user has ignored.public abstract boolean isAccountImageSupported()
public abstract ServerStoredDetails.ImageDetail getAccountImage()
throws OperationFailedException
OperationFailedException
public abstract void deleteAccountImage()
throws OperationFailedException
OperationFailedException
public abstract void setAccountImage(byte[] newImageBytes)
throws OperationFailedException
newImageBytes - the new image.
OperationFailedException
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||