@univerjs-pro/collaboration-client v0.5.4


Class: DocCollaborationEntity

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

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

Extends

Constructors

new DocCollaborationEntity()

new DocCollaborationEntity(
   unitID, 
   type, 
   session, 
   injector, 
   compressMutationService, 
   localeService, 
   revisionService, 
   eventService, 
   logService, 
   commandService, 
   permissionService, 
   singleActiveUnitService?, 
   localCacheService?): DocCollaborationEntity

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

Parameters

ParameterType
unitIDstring
typeUniverType
sessionCollaborationSession
injectorInjector
compressMutationServiceCompressMutationService
localeServiceLocaleService
revisionServiceRevisionService
eventServiceCollaborationUIEventService
logServiceILogService
commandServiceICommandService
permissionServiceIPermissionService
singleActiveUnitService?ISingleActiveUnitService
localCacheService?ILocalCacheService

Returns

DocCollaborationEntity

Overrides

CollaborationEntity.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_changesetReqIdprotectednumber0CollaborationEntity._changesetReqIdpackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:36
_changesetSessionIdprotectedstring''CollaborationEntity._changesetSessionIdpackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:35
_collaborationPausedprotectedbooleanfalseCollaborationEntity._collaborationPausedpackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:33
_commandServicereadonlyICommandServiceundefinedCollaborationEntity._commandServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:59
_compressMutationServicereadonlyCompressMutationServiceundefinedCollaborationEntity._compressMutationServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:54
_disposedprotectedbooleanfalseCollaborationEntity._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:96
_eventServicereadonlyCollaborationUIEventServiceundefinedCollaborationEntity._eventServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:57
_injectorreadonlyInjectorundefinedCollaborationEntity._injectorpackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:53
_localCacheService?readonlyILocalCacheServiceundefinedCollaborationEntity._localCacheServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:62
_localeServicereadonlyLocaleServiceundefinedCollaborationEntity._localeServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:55
_logServicereadonlyILogServiceundefinedCollaborationEntity._logServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:58
_revisionServicereadonlyRevisionServiceundefinedCollaborationEntity._revisionServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:56
_singleActiveUnitService?readonlyISingleActiveUnitServiceundefinedCollaborationEntity._singleActiveUnitServicepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:61
_stateprotectedCollaborationStateundefinedCollaborationEntity._statepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:28
_state$protectedBehaviorSubject<Nullable<CollaborationState>>undefinedCollaborationEntity._state$packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:25
_typereadonlyUniverTypeundefinedCollaborationEntity._typepackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:52
dispose$protectedSubject<void>undefinedCollaborationEntity.dispose$submodules/univer/packages/core/src/shared/lifecycle.ts:120
sessionreadonlyCollaborationSessionundefinedCollaborationEntity.sessionpackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:51
state$readonlyObservable<Nullable<CollaborationState>>undefinedCollaborationEntity.state$packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:26
status$readonlyObservable<CollaborationStatus>undefinedCollaborationEntity.status$packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:38
typereadonlyUniverTypeundefined-packages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:410
unitIDreadonlystringundefinedCollaborationEntity.unitIDpackages/collaboration-client/src/controllers/collaboration/collaboration-entity.ts:409

Accessors

state

Get Signature

get state(): CollaborationState

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

Returns

CollaborationState

Inherited from

CollaborationEntity.state

Methods

_createHandler()

protected _createHandler(): ICollaborationStateHandler

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

Returns

ICollaborationStateHandler

Overrides

CollaborationEntity._createHandler


_init()

protected _init(): Promise<CollaborationState>

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

Returns

Promise<CollaborationState>

Overrides

CollaborationEntity._init


_onLocalMutation()

protected _onLocalMutation(command): void

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

Parameters

ParameterType
commandIMutationInfo

Returns

void

Inherited from

CollaborationEntity._onLocalMutation


addHandlerCallback()

addHandlerCallback(cb): void

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

Parameters

ParameterType
cbIDocCollaborationEntityCallback

Returns

void


dispose()

dispose(): void

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

Returns

void

Overrides

CollaborationEntity.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

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

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

CollaborationEntity.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

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

Returns

void

Inherited from

CollaborationEntity.ensureNotDisposed


init()

init(): Promise<void>

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

Returns

Promise<void>

Inherited from

CollaborationEntity.init


onLocalMutation()

onLocalMutation(command): void

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

Parameters

ParameterType
commandIMutationInfo

Returns

void

Inherited from

CollaborationEntity.onLocalMutation


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.

Inherited from

CollaborationEntity.pauseCollaboration