|
Openfire 3.8.2 Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jivesoftware.openfire.ldap.LdapVCardProvider
public class LdapVCardProvider
Read-only LDAP provider for vCards.Configuration consists of adding a provider:
provider.vcard.className = org.jivesoftware.openfire.ldap.LdapVCardProvider and an xml vcard-mapping in the system properties. The vcard attributes can be configured by adding anattrs="attr1,attr2"
attribute to the vcard elements.
Arbitrary text can be used for the element values as well as MessageFormat
style placeholders for the ldap attributes. For example, if you wanted to map the LDAP
attribute displayName to the vcard element FN, the xml
nippet would be:<FN attrs="displayName">{0}</FN>
The vCard XML must be escaped in CDATA and must also be well formed. It is the exact
XML this provider will send to a client after after stripping attr attributes
and populating the placeholders with the data retrieved from LDAP. This system should
be flexible enough to handle any client's vCard format. An example mapping follows.SELECT value FROM ofVCard WHERE
username='some_user' in your favorite sql querier and paste the result
into the vcard-mapping (don't forget the CDATA).
| Constructor Summary | |
|---|---|
LdapVCardProvider()
|
|
| Method Summary | |
|---|---|
org.dom4j.Element |
createVCard(String username,
org.dom4j.Element vCardElement)
Handles when a user creates a new vcard. |
void |
deleteVCard(String username)
Handles when a user deletes their vcard. |
boolean |
isReadOnly()
Returns true if this VCardProvider is read-only. |
org.dom4j.Element |
loadVCard(String username)
Loads the avatar from LDAP, based off the vcard template. |
void |
propertyDeleted(String property,
Map params)
A property was deleted. |
void |
propertySet(String property,
Map params)
A property was set. |
org.dom4j.Element |
updateVCard(String username,
org.dom4j.Element vCardElement)
Handles when a user updates their vcard. |
void |
xmlPropertyDeleted(String property,
Map params)
An XML property was deleted. |
void |
xmlPropertySet(String property,
Map params)
An XML property was set. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LdapVCardProvider()
| Method Detail |
|---|
public org.dom4j.Element loadVCard(String username)
loadVCard in interface VCardProviderusername - User we are loading the vcard for.
public org.dom4j.Element createVCard(String username,
org.dom4j.Element vCardElement)
throws UnsupportedOperationException,
AlreadyExistsException
createVCard in interface VCardProviderusername - User that created a new vcard.vCardElement - vCard element containing the new vcard.
UnsupportedOperationException - If an invalid field is changed or we are in readonly mode.
AlreadyExistsException - if the user already has a vCard.
public org.dom4j.Element updateVCard(String username,
org.dom4j.Element vCardElement)
throws UnsupportedOperationException
updateVCard in interface VCardProviderusername - User that updated their vcard.vCardElement - vCard element containing the new vcard.
UnsupportedOperationException - If an invalid field is changed or we are in readonly mode.
public void deleteVCard(String username)
throws UnsupportedOperationException
deleteVCard in interface VCardProviderusername - User that deketed their vcard.
UnsupportedOperationException - If an invalid field is changed or we are in readonly mode.public boolean isReadOnly()
VCardProvider
isReadOnly in interface VCardProvider
public void propertySet(String property,
Map params)
PropertyEventListener
propertySet in interface PropertyEventListenerproperty - the name of the property.params - event parameters.
public void propertyDeleted(String property,
Map params)
PropertyEventListener
propertyDeleted in interface PropertyEventListenerproperty - the name of the property deleted.params - event parameters.
public void xmlPropertySet(String property,
Map params)
PropertyEventListener
xmlPropertySet in interface PropertyEventListenerproperty - the name of the property.params - event parameters.
public void xmlPropertyDeleted(String property,
Map params)
PropertyEventListener
xmlPropertyDeleted in interface PropertyEventListenerproperty - the name of the property.params - event parameters.
|
Openfire 3.8.2 Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||