TeamSharingApi
Provides run-time access to Team Sharing Module and associated state
export interfaceMethods
| 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. |
Method Details
checkForUpdates
Checks if active Shared Entities have updates (higher revisions than the local counterpart objects)
checkForUpdates(): void;Returns
void
getLoadedAdaptableSharedEntities
Retrieves locally loaded Adaptable Shared Entries.
getLoadedAdaptableSharedEntities(): AdaptableSharedEntity[];Returns
getLoadedCustomSharedEntities
Retrieves locally loaded Custom Shared Entries.
getLoadedCustomSharedEntities(): CustomSharedEntity[];Returns
getLoadedSharedEntities
Retrieves all locally loaded shared entries (AdaptableSharedEntity & CustomSharedEntity).
getLoadedSharedEntities(): SharedEntity[];Returns
hasTeamSharingFullRights
Whether current user has full Team Sharing rights (for creating & updating shared items)
hasTeamSharingFullRights(): boolean;Returns
boolean
importSharedEntry
Import the given Shared Entity. In case of CustomSharedEntity, the import logic will be delegated to TeamSharingOptions.handleCustomSharedEntityImport(...).
importSharedEntry(sharedEntity: SharedEntity): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| sharedEntity | SharedEntity | shared entry to import |
Returns
void
isTeamSharingAvailable
Whether Team Sharing is available to use
isTeamSharingAvailable(): boolean;Returns
boolean
loadSharedEntities
Retrieves all currently shared entities; async operation leveraging TeamSharingOptions.loadSharedEntities(...) method
loadSharedEntities(): Promise<SharedEntity[]>;Returns
Promise<SharedEntity[]>
openTeamSharingSettingsPanel
Opens Settings Panel with Team Sharing section selected and visible
openTeamSharingSettingsPanel(): void;Returns
void
persistSharedEntities
Sets currently shared entities; async operation leveraging TeamSharingOptions.persistSharedEntities(...) method
persistSharedEntities(sharedEntities: SharedEntity[]): Promise<boolean>;Parameters
| Parameter | Type | Description |
|---|---|---|
| sharedEntities | SharedEntity[] | the shared entities either TRUE if the shared entities were successfully set or FALSE if the shared entities were not set |
Returns
Promise<boolean>
refreshTeamSharing
Refreshes the local TeamSharing state by (re)loading the remote state.
refreshTeamSharing(): void;Returns
void
shareAdaptableEntity
Puts an Adaptable Object into Team Share
shareAdaptableEntity(adaptableObject: AdaptableObject, module: AdaptableModule, sharedEntityConfig: AdaptableSharedEntityConfig): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| adaptableObject | AdaptableObject | Adaptable Object to Share |
| module | AdaptableModule | module which Shared Entity belongs to |
| sharedEntityConfig | AdaptableSharedEntityConfig | Config info about the Sharing Actions |
Returns
void
shareCustomEntity
Puts an custom Object into Team Share
shareCustomEntity(customObject: any, sharedEntityConfig: CustomSharedEntityConfig): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| customObject | any | custom object to Share |
| sharedEntityConfig | CustomSharedEntityConfig | shared entity config |
Returns
void
unshareEntity
Removes a Shared Entity from the Team Share.
unshareEntity(entityId: string): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| entityId | string | the technical ID (SharedEntity.Uuid) of the Shared Entity to be removed from Team Share |
Returns
void