Team Sharing Technical Reference
Summary
- AdapTable fires an Event when an Active Shared Entity is updated
- The Team Sharing API enables run-time, progamattic access to Team Sharing
Team Sharing Event
AdapTable fires the TeamSharingEntityChanged Event whenever an Active Shared Entity is sychronised.
TeamSharingEntityChangedInfo
The TeamSharingEntityChangedInfo object provided by the event contains a single sharedEntity property:
| Property | Description |
|---|---|
| sharedEntity | Object containing the Shared Entity that has changed |
| adaptableContext | Custom application Context provided in AdaptableOptions.adaptableContext |
It is of type sharedentity which provides very full details of what is shared and when and how it was updated:
| Property | Description |
|---|---|
| ChangedAt | Last time when the object was changed |
| ChangedBy | Last User who changed the object |
| Description | Description of object being shared |
| Entity | Actual Adaptable Object being shared |
| EntityDependencyIds | Ids of direct entity dependencies |
| EntityType | Type of shared entity (either Adaptable specific or custom object) |
| Module | Adaptable Module to which object belongs |
| Revision | Revision - incremental for 'Active', always 1 for 'Snapshot' |
| Timestamp | When the object was shared |
| Type | 'Snapshot' (for 1-time sharing) or 'Active' (for continuous sharing) |
| UserName | User who shared the object |
| IsReadOnly | Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full') |
Event Subscription
Subscribing to the Event is done the same way as with all Adaptable Events:
api.eventApi.on('TeamSharingEntityChanged', (eventInfo: TeamSharingEntityChangedInfo) => {
// do something with the info
});Team Sharing Options
There are a number of properties to configure Team Sharing Team Sharing Options
| Property | Description | Default |
|---|---|---|
| applySharedEntities | Allows hooking into Shared Entities loading process | |
| enableTeamSharing | Whether Team Sharing is enabled | false |
| handleCustomSharedEntityImport | Handles import of Custom Shared Entities | |
| loadSharedEntities | (Async) Loads available Shared Entities - user can download and auto-merge with Adaptable State | null |
| persistSharedEntities | (Async) Persists Shared Entities so that they can be downloaded by other team members | null |
| saveSharedEntities | Allows hooking into Shared Entities persistence process | |
| showUpdateNotificationOncePerUpdate | Whether to show update notification once per update | false |
| suppressOverrideConfigWarning | Suppress warning when an Import overrides existing Adaptable State item | false |
| updateInterval | Frequency (in minutes) to check if Active Shared Entities have a newer revision | 0 (never) |
| updateNotification | How user is informed when Active Shared Entities have newer revisions | null (none) |
Team Sharing API
Full programmatic access to Team Sharing is available in Team Sharing API.
| Method | Description |
|---|---|
| checkForUpdates() | Checks if active Shared Entities have updates (higher revisions than the local counterpart objects) |
| getLoadedAdaptableSharedEntities() | Retrieves locally loaded Adaptable Shared Entries. |
| getLoadedCustomSharedEntities() | Retrieves locally loaded Custom Shared Entries. |
| getLoadedSharedEntities() | Retrieves all locally loaded shared entries (AdaptableSharedEntity & CustomSharedEntity). |
| hasTeamSharingFullRights() | Whether current user has full Team Sharing rights (for creating & updating shared items) |
| importSharedEntry(sharedEntity) | Import the given Shared Entity. In case of CustomSharedEntity, the import logic will be delegated to TeamSharingOptions.handleCustomSharedEntityImport(...). |
| isTeamSharingAvailable() | Whether Team Sharing is available to use |
| loadSharedEntities() | Retrieves all currently shared entities; async operation leveraging TeamSharingOptions.loadSharedEntities(...) method |
| openTeamSharingSettingsPanel() | Opens Settings Panel with Team Sharing section selected and visible |
| persistSharedEntities(sharedEntities) | Sets currently shared entities; async operation leveraging TeamSharingOptions.persistSharedEntities(...) method |
| refreshTeamSharing() | Refreshes the local TeamSharing state by (re)loading the remote state. |
| shareAdaptableEntity(adaptableObject, module, sharedEntityConfig) | Puts an Adaptable Object into Team Share |
| shareCustomEntity(customObject, sharedEntityConfig) | Puts an custom Object into Team Share |
| unshareEntity(entityId) | Removes a Shared Entity from the Team Share. |