public class ServerStoredContactListSipImpl extends ServerStoredContactList
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PRES_CONTENT_IMAGE_NAME
Presence content for image.
|
parentOperationSet, ROOT_GROUP_NAME, rootGroup, sipProvider
Constructor and Description |
---|
ServerStoredContactListSipImpl(ProtocolProviderServiceSipImpl sipProvider,
OperationSetPresenceSipImpl parentOperationSet)
Creates a ServerStoredContactList wrapper for the specified BuddyList.
|
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
addContactToBlockList(ContactSipImpl contact)
Adds contact to the "block" rule.
|
(package private) boolean |
addContactToPoliteBlockList(ContactSipImpl contact)
Adds contact to the "polite block" rule.
|
(package private) boolean |
addContactToWhiteList(ContactSipImpl contact)
Adds contact to the "white" rule.
|
void |
authorizationAccepted(ContactSipImpl contact)
The user accepted authorization request for contact
|
void |
authorizationIgnored(ContactSipImpl contact)
The user ignored authorization request for contact
|
void |
authorizationRejected(ContactSipImpl contact)
The user rejected authorization request for contact
|
ContactSipImpl |
createContact(ContactGroupSipImpl parentGroup,
java.lang.String contactId,
java.lang.String displayName,
boolean persistent,
java.lang.String contactType)
Creates contact for the specified address and inside the
specified group .
|
ContactGroupSipImpl |
createGroup(ContactGroupSipImpl parentGroup,
java.lang.String groupName,
boolean persistent)
Creates a group with the specified name and parent in the server stored
contact list.
|
void |
deleteAccountImage()
Deletes current account image from server.
|
void |
destroy()
Destroys the server stored list.
|
ServerStoredDetails.ImageDetail |
getAccountImage()
Get current account image from server if any.
|
java.lang.String |
getContactType(Contact contact)
Access the contact type.
|
byte[] |
getImage(java.net.URI imageUri)
Gets image from the specified uri.
|
java.net.URI |
getImageUri()
Gets the pres-content image uri.
|
void |
init()
Initializes the server stored list.
|
boolean |
isAccountImageSupported()
Whether current contact list supports account image.
|
void |
moveContactToGroup(ContactSipImpl contact,
ContactGroupSipImpl newParentGroup)
Removes the specified contact from its current parent and places it
under newParent.
|
void |
removeContact(ContactSipImpl contact)
Removes a contact.
|
(package private) boolean |
removeContactFromBlockList(ContactSipImpl contact)
Removes contact from the "block" rule.
|
(package private) boolean |
removeContactFromPoliteBlockList(ContactSipImpl contact)
Removes contact from the "polite block" rule.
|
(package private) boolean |
removeContactFromWhiteList(ContactSipImpl contact)
Removes contact from the "white" rule.
|
void |
removeGroup(ContactGroupSipImpl group)
Removes the specified group from the server stored contact list.
|
void |
renameContact(ContactSipImpl contact,
java.lang.String newName)
Renames the specified contact.
|
void |
renameGroup(ContactGroupSipImpl group,
java.lang.String newName)
Renames the specified group from the server stored contact list.
|
void |
setAccountImage(byte[] newImageBytes)
Change the image of the account on server.
|
void |
setContactType(Contact contact,
java.lang.String contactType)
Sets the contact type of the contact.
|
(package private) void |
updatePresRules()
Puts pres-rules to the server.
|
(package private) void |
updateResourceLists()
Puts resource-lists to the server.
|
addGroupListener, createContact, createUnresolvedContact, createUnresolvedContactGroup, findGroupByName, fireContactAdded, fireContactMoved, fireContactRemoved, fireContactResolved, fireGroupEvent, getAllContacts, getAllGroups, getRootGroup, getUniqueContacts, removeGroupListener
public static final java.lang.String PRES_CONTENT_IMAGE_NAME
ServerStoredContactListSipImpl(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 eventspublic ContactSipImpl createContact(ContactGroupSipImpl parentGroup, java.lang.String contactId, java.lang.String displayName, boolean persistent, java.lang.String contactType) throws OperationFailedException
createContact
in class ServerStoredContactList
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 void removeContact(ContactSipImpl contact) throws OperationFailedException
removeContact
in class ServerStoredContactList
contact
- contact to be removed.OperationFailedException
- with code NETWORK_FAILURE if the
operation if failed during network
communication.public void moveContactToGroup(ContactSipImpl contact, ContactGroupSipImpl newParentGroup) throws OperationFailedException
moveContactToGroup
in class ServerStoredContactList
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 void renameContact(ContactSipImpl contact, java.lang.String newName)
renameContact
in class ServerStoredContactList
contact
- the contact to be renamed.newName
- the new contact name.public ContactGroupSipImpl createGroup(ContactGroupSipImpl parentGroup, java.lang.String groupName, boolean persistent) throws OperationFailedException
createGroup
in class ServerStoredContactList
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 void removeGroup(ContactGroupSipImpl group)
removeGroup
in class ServerStoredContactList
group
- the group to delete.public void renameGroup(ContactGroupSipImpl group, java.lang.String newName)
renameGroup
in class ServerStoredContactList
group
- the group to rename.newName
- the new name of the group.public void init()
init
in class ServerStoredContactList
public java.net.URI getImageUri()
getImageUri
in class ServerStoredContactList
java.lang.IllegalStateException
- if the user has not been connected.public byte[] getImage(java.net.URI imageUri)
getImage
in class ServerStoredContactList
imageUri
- the image uri.public void destroy()
destroy
in class ServerStoredContactList
boolean addContactToWhiteList(ContactSipImpl contact) throws XCapException
contact
- the contact to add.XCapException
boolean addContactToBlockList(ContactSipImpl contact) throws XCapException
contact
- the contact to add.XCapException
boolean addContactToPoliteBlockList(ContactSipImpl contact) throws XCapException
contact
- the contact to add.XCapException
boolean removeContactFromWhiteList(ContactSipImpl contact) throws XCapException
contact
- the contact to remove.XCapException
boolean removeContactFromBlockList(ContactSipImpl contact) throws XCapException
contact
- the contact to remove.XCapException
boolean removeContactFromPoliteBlockList(ContactSipImpl contact) throws XCapException
contact
- the contact to remove.XCapException
void updateResourceLists() throws XCapException
XCapException
- if there is some error during operation.void updatePresRules() throws XCapException
XCapException
- if there is some error during operation.public void authorizationAccepted(ContactSipImpl contact)
authorizationAccepted
in class ServerStoredContactList
contact
- the user has accepted.public void authorizationRejected(ContactSipImpl contact)
authorizationRejected
in class ServerStoredContactList
contact
- the user has rejected.public void authorizationIgnored(ContactSipImpl contact)
authorizationIgnored
in class ServerStoredContactList
contact
- the user has ignored.public ServerStoredDetails.ImageDetail getAccountImage() throws OperationFailedException
getAccountImage
in class ServerStoredContactList
OperationFailedException
public void deleteAccountImage() throws OperationFailedException
deleteAccountImage
in class ServerStoredContactList
OperationFailedException
public boolean isAccountImageSupported()
isAccountImageSupported
in class ServerStoredContactList
public void setAccountImage(byte[] newImageBytes) throws OperationFailedException
setAccountImage
in class ServerStoredContactList
newImageBytes
- the new image.OperationFailedException
public java.lang.String getContactType(Contact contact)
contact
- the contact to be queried for type.public void setContactType(Contact contact, java.lang.String contactType)
contact
- the contact to be changed.contactType
- the type set to the contact.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.