Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.8.2 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jivesoftware.openfire.vcard
Interface VCardProvider

All Known Implementing Classes:
  ClearspaceVCardProvider, CrowdVCardProvider, DefaultVCardProvider, LdapVCardProvider

    public interface VCardProvider

Provider interface for users vcards.

Author:
  Gaston Dombiak

Method Summary
`org.dom4j.Element` | `createVCard(String username, org.dom4j.Element vCardElement)` Creates and saves the new user vcard.
`void` | `deleteVCard(String username)` Delets a user vcard.
`boolean` | `isReadOnly()` Returns true if this VCardProvider is read-only.
`org.dom4j.Element` | `loadVCard(String username)` Loads the specified user vcard by username.
`org.dom4j.Element` | `updateVCard(String username, org.dom4j.Element vCardElement)` Updates the user vcard in the backend store.

Method Detail

### loadVCard

    org.dom4j.Element loadVCard(String username)

  Loads the specified user vcard by username. Returns `null` if no vCard was found for the specified username.

  Parameters:
    `username` - the username
  Returns:
    the vCard as an DOM element or `null` if none was found.

### createVCard

    org.dom4j.Element createVCard(String username,
                                  org.dom4j.Element vCardElement)
                                  throws AlreadyExistsException

  Creates and saves the new user vcard. This method should throw an UnsupportedOperationException if this operation is not supported by the backend vcard store. The method is expected to return the vCard after it has had a chance to make any modifications to it that it needed to. In many cases, this may be a simple return of the passed in vCard. This change was made in 3.4.4.

  Parameters:
    `username` - the username.
    `vCardElement` - the vCard to save.
  Returns:
    vCard as it is after the provider has a chance to adjust it.
  Throws:
    `AlreadyExistsException` - if the user already has a vCard.
    `UnsupportedOperationException` - if the provider does not support the operation.

### updateVCard

    org.dom4j.Element updateVCard(String username,
                                  org.dom4j.Element vCardElement)
                                  throws NotFoundException

  Updates the user vcard in the backend store. This method should throw an UnsupportedOperationException if this operation is not supported by the backend vcard store. The method is expected to return the vCard after it has had a chance to make any modifications to it that it needed to. In many cases, this may be a simple return of the passed in vCard. This change was made in 3.4.4.

  Parameters:
    `username` - the username.
    `vCardElement` - the vCard to save.
  Returns:
    vCard as it is after the provider has a chance to adjust it.
  Throws:
    `NotFoundException` - if the vCard to update does not exist.
    `UnsupportedOperationException` - if the provider does not support the operation.

### deleteVCard

    void deleteVCard(String username)

  Delets a user vcard. This method should throw an UnsupportedOperationException if this operation is not supported by the backend vcard store.

  Parameters:
    `username` - the username to delete.
  Throws:
    `UnsupportedOperationException` - if the provider does not support the operation.

### isReadOnly

    boolean isReadOnly()

  Returns true if this VCardProvider is read-only. When read-only, vcards can not be created, deleted, or modified.

  Returns:
    true if the vcard provider is read-only.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.8.2 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Jive Software.