Skip to content

Releases: vaadin/collaboration-kit

Collaboration Engine 5.2.0.alpha2

21 Jul 07:33
7a5d690
Compare
Choose a tag to compare
Pre-release

New Collaboration List operation

ListOperation now supports the moveBefore, moveAfter and moveBetween operations.

ListOperation op = ListOperation.moveBetween(keyToMove, keyBefore, keyAfter);
list.apply(op).getCompletableFuture().thenAccept(success -> {
    if (success) {
        log("Operation applied");
    } else {
        log("Operation failed");
    }
});

This will move the value of keyToMove so that it is between keyBefore and keyAfter if and only if keyBefore is currently the previous item to keyAfter.

Other changes since 5.2.0.alpha1

  • Fixes
    • Upgrade to license checker 1.5.1
    • Make user colors consistent across a clustered environment

Collaboration Engine 5.2.0.alpha1

01 Jul 10:24
7a5d690
Compare
Choose a tag to compare
Pre-release

This is the first pre-release of Collaboration Engine 5.2.

New Collaboration List operation and condition

ListOperation now supports the set operation and a new ifValue condition.

ListOperation op = ListOperation.set(key, "bar").ifValue(key, "foo");
list.apply(op).getCompletableFuture().thenAccept(success -> {
    if (success) {
        log("Operation applied");
    } else {
        log("Operation failed");
    }
});

This will change the value of the key to "bar" if and only if the current value of that key is "foo".

New convenience method in the avatar group component

CollaborationAvatarGroup now provides a method that returns an avatar for the local user.

Given an instance of CollaborationAvatarGroup:

Avatar avatar = avatarGroup.createOwnAvatar();

Collaboration Engine 5.1.1

05 Sep 08:18
7a5d690
Compare
Choose a tag to compare

Collaboration Engine 5.1.0

07 Jun 14:57
7a5d690
Compare
Choose a tag to compare

This is the final release of Collaboration Engine 5.1, which brings the FormManager and a new API for CollaborationList advanced operations. It also introduces the experimental Backend API to provide support to run Collaboration Engine in clustered environments.

Collaboration Engine 5.1 is part of Vaadin 23.1.

Manage Form Values and Field Highlighting

Collaboration Engine now includes the FormManager to set property values and field highlighting in a form, and to react to changes in fields and highlight state. It is a mid-level API and it provides a simple way to create a custom form component with collaborative features.

The manager can be used in conjunction with a CollaborationBinder connected to the same topic: any changes made to property values or highlighting via the FormManager will be reflected in any fields bound to the same properties, and vice versa.

Here some examples on how to use the FormManager:

UserInfo localUser = new UserInfo("john");

FormManager manager = new FormManager(form, localUser, "my-topic"); 

manager.highlight("name", true); 

manager.setHighlightHandler(context -> { 
    String propertyName = context.getPropertyName();
    UserInfo user = context.getUser();

    // Executed when a field is highlighted

    return () -> { 
        // Executed when a field is no longer highlighted
    };
});

manager.setValue("name", "John"); 

manager.setPropertyChangeHandler(event -> { 
        String propertyName = event.getPropertyName();
        Object value = event.getValue();

        // Executed when a property value is changed
    });

Latest documentation: https://vaadin.com/docs/latest/ce/managers/form-manager

Conditional list operations

The ListOperation class allows you to prepare a list operation that can then be applied to the list using the CollaborationList::apply method.

The reason you may want to use this class is to define certain conditions that must be met when the operation is attempted. If a condition is not met, the operation will not be completed. This is useful to protect against duplicate operations.

Currently supported static methods in ListOperation:

  • insertFirst(value): value will be inserted at the beginning of the list.
  • insertLast(value): value will be inserted at the end of the list.
  • insertBefore(key, value): value will be inserted immediately before a specified key.
  • insertAfter(key, value): value will be inserted immediately after a specified key.
  • insertBetween(keyBefore, keyAfter, value): shorthand for insertAfter(value, keyBefore).ifNext(keyBefore, keyAfter).

Methods to add conditions to the list operation:

  • ifFirst(key): the specified key must be the first in the list.
  • ifLast(key): the specified key must be the last in the list.
  • ifPrev(key, keyPrev): the specified keyPrev must be immediately before key.
  • ifNext(key, keyNext): the specified keyNext must be immediately after key.
  • ifEmpty(): the list must have no entries.
  • ifNotEmpty(): the list must have at least one entry.

The operation can also be scoped to the current connection with the method withScope(scope).

Latest documentation: https://vaadin.com/docs/latest/ce/advanced/collaboration-list/#advanced-list-operations

Clustering Support with the Backend API (experimental)

Using Collaboration Engine in an application running in a clustered environment would result in users being able to collaborate only with others connected to the same app instance. To properly run clustered application deployments, Collaboration Engine now provides the Backend superclass that can be extended to support such multi-instance environments.

Latest documentation: https://vaadin.com/docs/latest/ce/advanced/backend-api

Other new features

  • CollaborationList now has two new methods: moveBefore(key, keyToMove) and moveAfter(key, keyToMove).

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

Collaboration Engine 5.1.0.rc2

07 Jun 06:42
7a5d690
Compare
Choose a tag to compare
Pre-release

No changes since 5.1.0.rc1

Collaboration Engine 5.1.0.rc1

07 Jun 06:41
7a5d690
Compare
Choose a tag to compare
Pre-release

Changes since 5.1.0.beta2

  • New Features:
    • Backend event-log truncation: this adds the ability to truncate event-logs to grow infinitely

Collaboration Engine 5.1.0.beta2

19 May 08:34
7a5d690
Compare
Choose a tag to compare
Pre-release

Changes since 5.1.0.beta1

  • New Features:
    • Add FormManager constructor overload with a component argument.
    • Put Backend API behind a feature flag.
      To provide custom implementations of the Backend interface, the new feature flag com.vaadin.experimental.collaborationEngineBackend should be enabled.

Collaboration Engine 5.1.0.beta1

19 May 08:31
7a5d690
Compare
Choose a tag to compare
Pre-release

Changes since 5.1.0.alpha4

  • Security Fixes:
    • Bump Jackson dependencies to fix vulnerabilities.
  • Breaking Changes:
    • Turn Backend into an abstract class.

Collaboration Engine 5.1.0.alpha4

19 May 08:27
7a5d690
Compare
Choose a tag to compare
Pre-release

Handle Form Values and Field Highlighting with Your Own Logic

Collaboration Engine now includes FormManager to set property values and field highlighting in a form, and to react to changes in these. It provides a simple way to create a custom form component with collaborative features.

The manager can also be used in conjunction with a CollaborationBinder connected to the same topic. Any changes made to property values or highlighting via the FormManager will be reflected in any fields bound to the same properties, and vice versa.

FormManager manager = new FormManager(form, localUser, "my-topic"); 

manager.highlight("name", true); 

manager.setHighlightHandler(context -> { 
    String propertyName = context.getPropertyName();
    UserInfo user = context.getUser();

    // Executed when a field is highlighted

    return () -> { 
        // Executed when a field is no longer highlighted
    };
});

manager.setValue("name", "John"); 

manager.setPropertyChangeHandler(event -> { 
    String propertyName = event.getPropertyName();
    Object value = event.getValue();

    // Executed when a property value is changed
});

Other changes since 5.1.0.alpha3

  • Breaking Changes:
    • Use plain strings as backend payload.

Collaboration Engine 5.1.0.alpha3

19 May 08:18
7a5d690
Compare
Choose a tag to compare
Pre-release

No changes since 5.1.0.alpha2