Skip to content

Collaboration Engine 5.0.0

Compare
Choose a tag to compare
@heruan heruan released this 01 Mar 15:31
· 2 commits to main since this release
cd9acf0

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 a ListInsertResult object that provides a CompletableFuture to track the completion of the operation, and a ListKey instance to identify the inserted value which can be used as a reference to its position in the list (this method replaces the now deprecated append method);
  • getItem(ListKey, Class) to get an existing value from the list, given its ListKey;
  • 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