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:

PropertyDescription
sharedEntityObject containing the Shared Entity that has changed
adaptableContextCustom 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:

PropertyDescription
ChangedAtLast time when the object was changed
ChangedByLast User who changed the object
DescriptionDescription of object being shared
EntityActual Adaptable Object being shared
EntityDependencyIdsIds of direct entity dependencies
EntityTypeType of shared entity (either Adaptable specific or custom object)
ModuleAdaptable Module to which object belongs
RevisionRevision - incremental for 'Active', always 1 for 'Snapshot'
TimestampWhen the object was shared
Type'Snapshot' (for 1-time sharing) or 'Active' (for continuous sharing)
UserNameUser who shared the object
IsReadOnlySets 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

PropertyDescriptionDefault
applySharedEntitiesAllows hooking into Shared Entities loading process
enableTeamSharingWhether Team Sharing is enabledfalse
handleCustomSharedEntityImportHandles import of Custom Shared Entities
loadSharedEntities(Async) Loads available Shared Entities - user can download and auto-merge with Adaptable Statenull
persistSharedEntities(Async) Persists Shared Entities so that they can be downloaded by other team membersnull
saveSharedEntitiesAllows hooking into Shared Entities persistence process
showUpdateNotificationOncePerUpdateWhether to show update notification once per updatefalse
suppressOverrideConfigWarningSuppress warning when an Import overrides existing Adaptable State itemfalse
updateIntervalFrequency (in minutes) to check if Active Shared Entities have a newer revision0 (never)
updateNotificationHow user is informed when Active Shared Entities have newer revisionsnull (none)

Team Sharing API

Full programmatic access to Team Sharing is available in Team Sharing API.

MethodDescription
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.