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

## org.jivesoftware.openfire.clearspace
Class ClearspaceVCardProvider

    java.lang.Object
      org.jivesoftware.openfire.clearspace.ClearspaceVCardProvider

All Implemented Interfaces:
  VCardProvider

    public class ClearspaceVCardProvider

extends Object
implements VCardProvider

The ClearspaceLockOutProvider uses the UserService web service inside of Clearspace to retrieve, edit and delete user information from Clearspace. With this information the provider builds user's VCard.

Author:
  Gabriel Guardincerri

Field Summary
`protected static String` | `AVATAR_URL_PREFIX`
`protected static String` | `PROFILE_FIELDS_URL_PREFIX`
`protected static String` | `PROFILE_URL_PREFIX`

Constructor Summary
`ClearspaceVCardProvider()`

Method Summary
`org.dom4j.Element` | `createVCard(String username, org.dom4j.Element vCardElement)` Creates the user's VCard.
`void` | `deleteVCard(String username)` Deletes the profiles and avatar information of the user.
`boolean` | `isReadOnly()` Always return false since Clearspace always support some changes.
`org.dom4j.Element` | `loadVCard(String username)` Loads the VCard with information from CS.
`org.dom4j.Element` | `updateVCard(String username, org.dom4j.Element vCardElement)` Updates the user vcard in Clearspace.

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

Field Detail

### PROFILE_URL_PREFIX

    protected static final String PROFILE_URL_PREFIX

See Also:
  Constant Field Values

### PROFILE_FIELDS_URL_PREFIX

    protected static final String PROFILE_FIELDS_URL_PREFIX

See Also:
  Constant Field Values

### AVATAR_URL_PREFIX

    protected static final String AVATAR_URL_PREFIX

See Also:
  Constant Field Values

Constructor Detail

### ClearspaceVCardProvider

    public ClearspaceVCardProvider()

Method Detail

### loadVCard

    public org.dom4j.Element loadVCard(String username)

  Loads the VCard with information from CS. It uses information from the user, the user profile and the avatar. With this 3 sources of informations it builds the VCard.

  Specified by:
    `loadVCard` in interface `VCardProvider`
  Parameters:
    `username` - username of user to load VCard of
  Returns:
    the user's VCard

### createVCard

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

  Creates the user's VCard. CS always has some information of users. So creating it is actually updating. Throws an UnsupportedOperationException if Clearspace can't save some changes. Returns the VCard after the change.

  Specified by:
    `createVCard` in interface `VCardProvider`
  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` - it's never throw by this implementation
    `UnsupportedOperationException` - if the provider does not support the operation.

### updateVCard

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

  Updates the user vcard in Clearspace. Throws an UnsupportedOperationException if Clearspace can't save some changes. Returns the VCard after the change.

  Specified by:
    `updateVCard` in interface `VCardProvider`
  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.

### isReadOnly

    public boolean isReadOnly()

  Always return false since Clearspace always support some changes.

  Specified by:
    `isReadOnly` in interface `VCardProvider`
  Returns:
    true

### deleteVCard

    public void deleteVCard(String username)

  Deletes the profiles and avatar information of the user.

  Specified by:
    `deleteVCard` in interface `VCardProvider`
  Parameters:
    `username` - the username.

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

Copyright © 2003-2008 Jive Software.