Collaboration Engine 5.0.0
This is the final release of Collaboration Engine 5.0, which brings a renewed and improved API for the CollaborationList
and important bug-fixes.
Collaboration Engine 5.0 is part of Vaadin 23 and now requires Java 11 (or newer).
New Collaboration List API
CollaborationList
is a data-structure to store ordered values in Collaboration Engine topics and subscribe to their changes. In this release we are introducing new methods to get, replace and remove values in the list. The current API has now these new methods:
insertLast(Object)
to insert a new value at the end of the list: it returns aListInsertResult
object that provides aCompletableFuture
to track the completion of the operation, and aListKey
instance to identify the inserted value which can be used as a reference to its position in the list (this method replaces the now deprecatedappend
method);getItem(ListKey, Class)
to get an existing value from the list, given itsListKey
;set(ListKey, Object)
to replace an existing value with a new one;remove(ListKey)
to remove a value from the list.
ListKey key = list.insertLast("foo").getKey();
list.set(key, "bar").thenAccept(completed -> {
if (completed) {
// If the operation was successful, get the new value
String bar = list.getItem(key, String.class);
} else {
// If the operation failed, remove the value
list.remove(key);
}
});
Other new features
- The path of the browser Beacon API endpoint is now configurable, to ease configuration of security modules:
collaborationEngineConfiguration.setBeaconPath("/beacon");
Fixes
- Check if a named map exists before clearing on expiration [#55]
- Prevent "UI detached" exception on session expiration
- Preserve the order of actions in collaboration maps and lists
- Properly deactivate connections on shutdown