@univerjs-pro/collaboration-client v0.5.4


Class: abstract CollaborationEntity

Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:24

Each univer document instance would map to an CollaborationEntity to handle collaborated editing events.

Extends

Extended by

Constructors

new CollaborationEntity()

new CollaborationEntity(
   unitID, 
   session, 
   _type, 
   _injector, 
   _compressMutationService, 
   _localeService, 
   _revisionService, 
   _eventService, 
   _logService, 
   _commandService, 
   _permissionService, 
   _singleActiveUnitService?, 
   _localCacheService?): CollaborationEntity

Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:49

Parameters

ParameterType
unitIDstring
sessionCollaborationSession
_typeUniverType
_injectorInjector
_compressMutationServiceCompressMutationService
_localeServiceLocaleService
_revisionServiceRevisionService
_eventServiceCollaborationUIEventService
_logServiceILogService
_commandServiceICommandService
_permissionServiceIPermissionService
_singleActiveUnitService?ISingleActiveUnitService
_localCacheService?ILocalCacheService

Returns

CollaborationEntity

Overrides

RxDisposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_changesetReqIdprotectednumber0-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:36
_changesetSessionIdprotectedstring''-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:35
_collaborationPausedprotectedbooleanfalse-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:33
_commandServicereadonlyICommandServiceundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:59
_compressMutationServicereadonlyCompressMutationServiceundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:54
_disposedprotectedbooleanfalseRxDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:96
_eventServicereadonlyCollaborationUIEventServiceundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:57
_injectorreadonlyInjectorundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:53
_localCacheService?readonlyILocalCacheServiceundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:62
_localeServicereadonlyLocaleServiceundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:55
_logServicereadonlyILogServiceundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:58
_revisionServicereadonlyRevisionServiceundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:56
_singleActiveUnitService?readonlyISingleActiveUnitServiceundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:61
_stateprotectedCollaborationStateundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:28
_state$protectedBehaviorSubject<Nullable<CollaborationState>>undefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:25
_typereadonlyUniverTypeundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:52
dispose$protectedSubject<void>undefinedRxDisposable.dispose$submodules/univer/packages/core/src/shared/lifecycle.ts:120
sessionreadonlyCollaborationSessionundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:51
state$readonlyObservable<Nullable<CollaborationState>>undefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:26
status$readonlyObservable<CollaborationStatus>undefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:38
unitIDreadonlystringundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:50

Accessors

state

Get Signature

get state(): CollaborationState

Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:29

Returns

CollaborationState

Methods

_createHandler()

protected _createHandler(): ICollaborationStateHandler

Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:289

Returns

ICollaborationStateHandler


_init()

protected _init(): Promise<CollaborationState>

Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:99

Returns

Promise<CollaborationState>


_onLocalMutation()

protected _onLocalMutation(command): void

Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:189

Parameters

ParameterType
commandIMutationInfo

Returns

void


dispose()

dispose(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:122

Returns

void

Inherited from

RxDisposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

RxDisposable.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

RxDisposable.ensureNotDisposed


init()

init(): Promise<void>

Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:67

Returns

Promise<void>


onLocalMutation()

onLocalMutation(command): void

Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:90

Parameters

ParameterType
commandIMutationInfo

Returns

void


pauseCollaboration()

pauseCollaboration(): IDisposable

Defined in: packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:81

Pause collaboration on the document. Remote changesets would be inserted to a queue and wait for resuming.

Returns

IDisposable

a disposable which will resume collaboration when called.