Team Sharing Technical Reference

View as Markdown

Team Sharing Event

AdapTable fires the TeamSharingEntityChanged Event whenever an Active Shared Entity is synchronised.

TeamSharingEntityChangedInfo

The TeamSharingEntityChangedInfo object provided by the event contains a single sharedEntity property:

It is of type sharedentity which provides very full details of what is shared and when and how it was updated:

AdaptableSharedEntity

Defines an AdaptableObject shared with Team Sharing

ChangedAt

number

Last time when the object was changed

ChangedBy

string

Last User who changed the object

Description of object being shared

Actual Adaptable Object being shared

Ids of direct entity dependencies

EntityType

'adaptableEntity'

Type of shared entity (either Adaptable specific or custom object)

Shared Layouts only: names of the objects, per Module, extended into the Layout when it was shared;
applied to the importing user's Layout Extensions so the Extended Layout arrives complete

Adaptable Module to which object belongs

Revision

number

Revision - incremental for 'Active', always 1 for 'Snapshot'

Major AdapTable version this entity was last shared or migrated with.
When it matches the running major, the upgrade chain is skipped.

Timestamp

number

When the object was shared

'Snapshot' (for 1-time sharing) or 'Active' (for continuous sharing)

UserName

string

User who shared the object

IsReadOnly?

boolean

Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')

Type is a SharedEntityType:

Value
'Snapshot'
'Active'

Module is an AdaptableModule:

Value
'Alert'
'BulkUpdate'
'CalculatedColumn'
'CellSummary'
'Charting'
'Comment'
'CustomSort'
'Dashboard'
'DataChangeHistory'
'DataSet'
'Export'
'Fdc3'
'ColumnFilter'
'FlashingCell'
'FormatColumn'
'FreeTextColumn'
'GridInfo'
'ColumnInfo'
'IPushPull'
'Layout'
'OpenFin'
'PlusMinus'
'QuickSearch'
'SettingsPanel'
'Shortcut'
'SmartEdit'
'StyledColumn'
'StateManagement'
'StatusBar'
'SystemStatus'
'TeamSharing'
'Theme'
'ToolPanel'
'Note'
'DataImport'
'GridFilter'
'NamedQuery'
'Expression'

LayoutExtensions is a LayoutExtension without LayoutName. The properties are on the Layout technical reference.

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

TeamSharingOptions

Options for managing Team Sharing - which enables Adaptable Objects to be shared between colleagues

Allows hooking into Shared Entities loading process

Whether Team Sharing is enabled

Default

false

Handles import of Custom Shared Entities

(Async) Loads available Shared Entities - user can download and auto-merge with Adaptable State

Default

null

When true (the default), a user with full Team Sharing rights writes shared
entities back once per grid session after they are migrated on load, so the
server copy matches the current shape. That write does not change Revision
or ChangedAt.

Set to false when the server is read-only for most users.

Default

true

persistSharedEntities

(sharedEntities:SharedEntity[], context:SharedEntitiesContext) => Promise<void>

(Async) Persists Shared Entities so that they can be downloaded by other team members

Default

null

Allows hooking into Shared Entities persistence process

Whether to show update notification once per update

Default

false

Suppress warning when an Import overrides existing Adaptable State item

Default

false

Frequency (in minutes) to check if Active Shared Entities have a newer revision

Default

0 (never)

updateNotification?

'Alert' | 'AlertWithNotification' | 'SystemStatus'

How user is informed when Active Shared Entities have newer revisions

Default

null (none)

applySharedEntities receives a SharedEntitiesContext:

handleCustomSharedEntityImport receives a CustomSharedEntity:

CustomSharedEntity

Defines a Custom object that will be shared using Team Sharing

ChangedAt

number

Last time when the object was changed

ChangedBy

string

Last User who changed the object

Description of object being shared

Custom Object being shared

EntityType

'customEntity'

Type of shared entity (either Adaptable specific or custom object)

IsReadOnly?

boolean

Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')

Name

string

Name of object being shared

List of Tags associated with the Object

Timestamp

number

When the object was shared

UserName

string

User who shared the object

Uuid

TypeUuid

Unique identifier for the Custom Shared Entity

Team Sharing State

TeamSharingState is run-time state. It is not supplied in Initial Adaptable State.

TeamSharingState

State for Team Sharing; internal so not designed to be provided as part of Initial Adaptable State

Extends

BaseState

Mapping of active AdaptableObjects which are shared with the local state.
Maps UUIDs of local AdaptableObjects to a snapshot of the latest synchronized SharedEntity

TRUE if an import is in progress, FALSE otherwise.
This is required to skip the TEAMSHARING_UPDATE_ITEM action as a result of the import

List of objects currently being Team Shared

Team Sharing API

TeamSharingApi

Team Sharing: load shared objects, share an object, and import an entry someone else shared.

Checks if active Shared Entities have updates (higher revisions than the local counterpart objects)

Retrieves locally loaded Adaptable Shared Entries.

Retrieves locally loaded Custom Shared Entries.

Retrieves all locally loaded shared entries (AdaptableSharedEntity & CustomSharedEntity).

Whether current user has full Team Sharing rights (for creating & updating shared items)

Import the given Shared Entity. In case of CustomSharedEntity, the import logic will be delegated to TeamSharingOptions.handleCustomSharedEntityImport(...).

Whether Team Sharing is available to use

Retrieves all currently shared entities; async operation leveraging TeamSharingOptions.loadSharedEntities(...) method

Opens Settings Panel with Team Sharing section selected and visible

Sets currently shared entities; async operation leveraging TeamSharingOptions.persistSharedEntities(...) method

Refreshes the local TeamSharing state by (re)loading the remote state.

Puts an Adaptable Object into Team Share

Puts an custom Object into Team Share

Removes a Shared Entity from the Team Share.