This weeks SnTT post is about adding drag’n’drop of Lotus Sametime buddies in the Notes 8.0.x Standard and Notes 8.5 Standard client in SWT plug-ins. Unfortunately the Sametime API for dragging buddies around changed between Sametime 8.0.0 and Sametime 8.0.1 so you have to take this into account when developing drag’n’drop functionality that works across Notes 8.0.x and Notes 8.5. Read on…
As mentioned in my Drag’n’drop in SWT components post drag’n’drop uses a socalled Transfer classes to signal which types of data a drag source delivers and a drop target accepts. To allow Sametime buddies to dropped on your component you use PersonGroupTransfer class but this class changed package from Sametime 8.0.0 to Sametime 8.0.1… 😦
In Sametime 8.0.0 (Notes 8.0.x) the class is com.ibm.collaboration.realtime.people.PersonGroupTransfer and in Sametime 8.0.1 (Notes 8.5) the class is com.ibm.collaboration.realtime.people.PersonGroupTransfer (do not mind that the Sametime 8.0.0 class is in an “internal” package as it is exported from the plug-in). This means that if you develop a plug-in that needs to run on both Notes 8.0.x and Notes 8.5 you need to factor the drag’n’drop support out into two separate plug-ins and match based on perfect version numbers of the com.ibm.rcp.collaboration.realtime.people.impl plug-in.
It’s a bit cumbersome but it works fine.