Releases: vaadin/collaboration-kit
Collaboration Engine 5.0.0.beta1
Changes since 5.0.0.alpha3
-
Features:
- Add configurable beacon path [#58]
- Add shortcut methods in
CollaborationList
andCollaborationMap
to remove a value
-
Fixes:
- Clear connections on service destroy when using a custom executor
Collaboration Engine 5.0.0.alpha3
Changes since 5.0.0.alpha2
- Feature:
- Provide access to the item key from
ListChangeEvent
- Provide access to the item key from
Collaboration Engine 5.0.0.alpha2
Changes since 5.0.0.alpha1
- Fixes:
- Check if a named map exists before clearing on expiration [#55]
Collaboration Engine 5.0.0.alpha1
Starting with Collaboration Engine 5.0, Java 11 (or newer) is now required as part of Vaadin Platform V23.
This pre-release replaces and includes all the changes in 4.1.0.alpha1.
Collaboration Engine 4.1.0.alpha1
Replace and remove items in Collaboration Lists
CollaborationList
now supports operations to replace and remove items using a ListKey
object which is returned when inserting new values:
CollaborationEngine.getInstance().openTopicConnection(context, user, topic, connection -> {
CollaborationList list = connection.getNamedList("list");
// The `insertLast` method has replaced the deprecated `append` method and returns a `ListInsertResult`
ListInsertResult<Void> result = list.insertLast("foo");
// The result object provides a `ListKey` to identify the inserted item
ListKey fooKey = result.getKey();
// The key can be used to replace the item...
list.set(fooKey, "bar");
// ... to get the current item value...
String bar = list.getItem(fooKey, String.class);
// ... and to remove the item from the list
list.set(fooKey, null);
});
Fixes
- Deactivate connections on shutdown
This change makes Collaboration Engine storeTopicConnectionRegistration
instances and removes them onVaadinService
shutdown, waiting for asynchronous tasks to complete.
Collaboration Engine 4.0.1
Collaboration Engine 4.0.0
This is the final release of Collaboration Engine 4.0, which brings a whole set of new features for collaboration in Vaadin applications.
Message Manager
Collaboration Engine now includes a Message Manager to handle text messages in a topic. You can use it, for example, for subscribing to incoming messages and submitting new messages programmatically. The manager can also be configured to persist messages to a custom backend, such as a database, so that the messages are restored when the application restarts. It provides a flexible way to manage messages in a topic and helps create custom components with collaborative messaging features.
The following example shows how to create a new MessageManager
instance and receive messages for a given topic:
UserInfo localUser = new UserInfo("john");
String topicId = "notifications";
MessageManager messageManager = new MessageManager(this, localUser, topicId);
messageManager.setMessageHandler(context -> {
CollaborationMessage message = context.getMessage();
UserInfo user = message.getUser();
String text = message.getText();
Notification.show(user.getName() + ": " + text);
});
System Connection Context
The new SystemConnectionContext
is a connection context that is always active. This context is intended to be used in situations that are not directly associated with a UI, such as from a background thread or when integrating with external services.
You can acquire an instance with SystemConnectionContext.getInstance()
after a VaadinService
is initialized. In other situations, you can use CollaborationEngine.getSystemContext()
or create a new context instance using the constructor.
SystemConnectionContext context = collaborationEngine.getSystemContext();
Connection scoped entries
By default values will be stored in the Topic until explicitly removed. Starting with 4.0, you can use methods accepting a scope parameter and use EntryScope.CONNECTION
to have the entry removed when the connection is deactivated. For example:
collaborationEngine.openTopicConnection(context, user, topic, connection -> {
CollaborationList list = connection.getNamedList("my-list");
list.append("foo", EntryScope.CONNECTION); // <- this entry will be removed when the connection is deactivated
});
Changes since 4.0.0.rc1
- Fixes:
- Deactivate connections on shutdown
This change makes Collaboration Engine store TopicConnectionRegistration instances and removes then on VaadinService shutdown, waiting for asynchronous tasks to complete.
- Deactivate connections on shutdown
Collaboration Engine 4.0.0.rc1
This is a release candidate of Collaboration Engine 4.0, which will bring a whole set of new features for collaboration in Vaadin applications.
Message Manager
Collaboration Engine now includes a Message Manager to handle text messages in a topic. You can use it, for example, for subscribing to incoming messages and submitting new messages programmatically. The manager can also be configured to persist messages to a custom backend, such as a database, so that the messages are restored when the application restarts. It provides a flexible way to manage messages in a topic and helps create custom components with collaborative messaging features.
The following example shows how to create a new MessageManager
instance and receive messages for a given topic:
UserInfo localUser = new UserInfo("john");
String topicId = "notifications";
MessageManager messageManager = new MessageManager(this, localUser, topicId);
messageManager.setMessageHandler(context -> {
CollaborationMessage message = context.getMessage();
UserInfo user = message.getUser();
String text = message.getText();
Notification.show(user.getName() + ": " + text);
});
System Connection Context
The new SystemConnectionContext
is a connection context that is always active. This context is intended to be used in situations that are not directly associated with a UI, such as from a background thread or when integrating with external services.
You can acquire an instance with SystemConnectionContext.getInstance()
after a VaadinService
is initialized. In other situations, you can use CollaborationEngine.getSystemContext()
or create a new context instance using the constructor.
SystemConnectionContext context = collaborationEngine.getSystemContext();
Connection scoped entries
By default values will be stored in the Topic until explicitly removed. Starting with 4.0, you can use methods accepting a scope parameter and use EntryScope.CONNECTION
to have the entry removed when the connection is deactivated. For example:
collaborationEngine.openTopicConnection(context, user, topic, connection -> {
CollaborationList list = connection.getNamedList("my-list");
list.append("foo", EntryScope.CONNECTION); // <- this entry will be removed when the connection is deactivated
});
Other changes
No relevant changes since 4.0.0.beta1
Collaboration Engine 4.0.0.beta1
This is the first beta release of Collaboration Engine 4.0, which will bring a whole set of new features for collaboration in Vaadin apps:
MessageManager
to handle message data in at topic without using a the high-level UI component. It makes it possible to submit messages to a topic and set a handler to react when a new message has been submitted.SystemConnectionContext
, aConnectionContext
implementation that is always active. It allows integrating with other systems or parts of the application where a UI is not available.- Entries in
CollaborationMap
andCollaborationList
can be scoped to the connection that create the entry. Such entires are automatically removed when the connection is no longer active.
Changes since 4.0.0.alpha3
-
Breaking Changes:
- Disallow topic data access during connection deactivation
-
New Features:
- Add entry scope to collaboration-list entries
- Add
PresenceManager
constructor withConnectionContext
parameter
-
Fixes:
- Avoid race condition in connection deactivation
Collaboration Engine 4.0.0.alpha3
Vaadin 22 support
This version of collaboration engine supports Vaadin 22 web-components. Due to changes in the web-components implementation, this version of Collaboration Engine is not compatible with previous Vaadin versions, including Vaadin 14.