NOTICE: Are you looking for the latest release of the plugin? The go to its new home at http://www.eyecraft.ch/coding/ldapvcardavatar
Hi Community,
I am the developer of the LDAP vCard Avatar Plugin (see http://www.igniterealtime.org/issues/browse/JM-460). The plugin allows the users to define an avatar in their profile while using LDAP vCards. This is achieved using a “proxy” provider, which combines the functionalities of the DefaultLdapVCardProvider and LdapVCardProvider.
You may download the latest version using the following links:
-
Plugin
-
Source
Changes in this version
In this version, you don’‘t have to manually copy the plugin-ldapvcardavatar.jar into wildfires lib directory anymore. The classpath is extended at runtime to include the required jar automatically. Additionally, you don’'t have to change the vCard provider in wildfire.xml in order to use the custom provider. The provider is now automatically activated when the plugin is installed. On plugin removal, the original LdapVCardProvider is restored.
Future plans
My plans are to extend this plugin to allow the administrator to define which fields are used from the LDAP or the default DB vCard. The problem is, that vCards don’'t have a limited set of fields and other clients might use other field combinations than Spark.
In order to handle this, the administrator could define a set of fields in the admin interface using XPath expressions matching one or more elements of the vCard. When a user creates/updates his profile, the vCard is stored in the DB as is using the DefaultVCardProvider. On vCard retrieval, the generated LDAP vCard is used as a “base” vCard. Each XPath expression is then matched against the DB vCard. If one or more element matches the expression, the matched element(s) are merged into the “base” vCard according rules defined by the admin (add, replace, replace if empty etc.). When replacing, the same XPath expression could be used to select the elements in the “base” vCard which are to be replaced. Then the resulting vCard is sent to the client.
Another approach would be to use an XSLT Template but this seems to be more complicated and I am not sure if this is possible.
What do you think about this approach? Thanks in advance for any comment!
- Hannes
Message was edited by: hannes (Changed links and title to 1.0.4, since it was a little hard to find the links below in the thread)
Message was edited by: hannes