@univerjs-pro/collaboration-client v0.5.0-beta.1 • Docs


Class: abstract CollaborationEntity

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, 
   _localCacheService, 
   _compressMutationService, 
   _localeService, 
   _revisionService, 
   _logService, 
   _commandService, 
   _messageService, 
   _permissionService, 
   _singleActiveUnitService?): CollaborationEntity

Parameters

ParameterType
unitIDstring
sessionCollaborationSession
_typeUniverType
_injectorInjector
_localCacheServiceLocalCacheService
_compressMutationServiceCompressMutationService
_localeServiceLocaleService
_revisionServiceRevisionService
_logServiceILogService
_commandServiceICommandService
_messageServiceIMessageService
_permissionServiceIPermissionService
_singleActiveUnitService?ISingleActiveUnitService

Returns

CollaborationEntity

Overrides

RxDisposable.constructor

Defined in

packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:53

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_changesetReqIdprotectednumber0-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:40
_changesetSessionIdprotectedstring''-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:39
_collaborationPausedprotectedbooleanfalse-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:37
_commandServicereadonlyICommandServiceundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:63
_compressMutationServicereadonlyCompressMutationServiceundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:59
_disposedprotectedbooleanfalseRxDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93
_injectorreadonlyInjectorundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:57
_localCacheServicereadonlyLocalCacheServiceundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:58
_localeServicereadonlyLocaleServiceundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:60
_logServicereadonlyILogServiceundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:62
_messageServicereadonlyIMessageServiceundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:64
_revisionServicereadonlyRevisionServiceundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:61
_singleActiveUnitService?readonlyISingleActiveUnitServiceundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:66
_stateprotectedCollaborationStateundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:32
_state$protectedBehaviorSubject<Nullable<CollaborationState>>undefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:29
_typereadonlyUniverTypeundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:56
dispose$protectedSubject<void>undefinedRxDisposable.dispose$submodules/univer/packages/core/src/shared/lifecycle.ts:117
sessionreadonlyCollaborationSessionundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:55
state$readonlyObservable<Nullable<CollaborationState>>undefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:30
status$readonlyObservable<CollaborationStatus>undefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:42
unitIDreadonlystringundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:54

Accessors

state

Get Signature

get state(): CollaborationState
Returns

CollaborationState

Defined in

packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:33

Methods

_createHandler()

protected _createHandler(): ICollaborationStateHandler

Returns

ICollaborationStateHandler

Defined in

packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:288


_init()

protected _init(): Promise<CollaborationState>

Returns

Promise<CollaborationState>

Defined in

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


_onLocalMutation()

protected _onLocalMutation(command): void

Parameters

ParameterType
commandIMutationInfo<object>

Returns

void

Defined in

packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:188


dispose()

dispose(): void

Returns

void

Inherited from

RxDisposable.dispose

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:119


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

RxDisposable.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

RxDisposable.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100


init()

init(): Promise<void>

Returns

Promise<void>

Defined in

packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:71


pauseCollaboration()

pauseCollaboration(): IDisposable

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.

Defined in

packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:85