Wildfire 3.2.4 Javadoc

org.jivesoftware.wildfire.vcard
Class DefaultVCardProvider

java.lang.Object
  extended by org.jivesoftware.wildfire.vcard.DefaultVCardProvider
All Implemented Interfaces:
VCardProvider

public class DefaultVCardProvider
extends Object
implements VCardProvider

Default implementation of the VCardProvider interface, which reads and writes data from the jiveVCard database table.

Author:
Gaston Dombiak

Constructor Summary
DefaultVCardProvider()
           
 
Method Summary
 void 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.
 void updateVCard(String username, org.dom4j.Element vCardElement)
          Updates the user vcard in the backend store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultVCardProvider

public DefaultVCardProvider()
Method Detail

loadVCard

public org.dom4j.Element loadVCard(String username)
Description copied from interface: VCardProvider
Loads the specified user vcard by username. Returns null if no vCard was found for the specified username.

Specified by:
loadVCard in interface VCardProvider
Parameters:
username - the username
Returns:
the vCard as an DOM element or null if none was found.

createVCard

public void createVCard(String username,
                        org.dom4j.Element vCardElement)
                 throws AlreadyExistsException
Description copied from interface: VCardProvider
Creates and saves the new user vcard. This method should throw an UnsupportedOperationException if this operation is not supported by the backend vcard store.

Specified by:
createVCard in interface VCardProvider
Parameters:
username - the username.
vCardElement - the vCard to save.
Throws:
AlreadyExistsException - if the user already has a vCard.

updateVCard

public void updateVCard(String username,
                        org.dom4j.Element vCardElement)
                 throws NotFoundException
Description copied from interface: VCardProvider
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.

Specified by:
updateVCard in interface VCardProvider
Parameters:
username - the username.
vCardElement - the vCard to save.
Throws:
NotFoundException - if the vCard to update does not exist.

deleteVCard

public void deleteVCard(String username)
Description copied from interface: VCardProvider
Delets a user vcard. This method should throw an UnsupportedOperationException if this operation is not supported by the backend vcard store.

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

isReadOnly

public boolean isReadOnly()
Description copied from interface: VCardProvider
Returns true if this VCardProvider is read-only. When read-only, vcards can not be created, deleted, or modified.

Specified by:
isReadOnly in interface VCardProvider
Returns:
true if the vcard provider is read-only.

Wildfire 3.2.4 Javadoc

Copyright © 2003-2007 Jive Software.