@univerjs-procollaborationclassesSnapshotservice

@univerjs-pro/collaboration v0.5.4


Class: SnapshotService

Defined in: packages/collaboration/src/services/snapshot/snapshot.service.ts:78

The service provides methods to load snapshots from the snapshot server.

Constructors

new SnapshotService()

new SnapshotService(
   _revisionService, 
   _univerInstanceService, 
   _snapshotServerService, 
   _commandService, 
   _injector, 
   _compressMutationService, 
   _resourceManagerService): SnapshotService

Defined in: packages/collaboration/src/services/snapshot/snapshot.service.ts:79

Parameters

ParameterType
_revisionServiceRevisionService
_univerInstanceServiceIUniverInstanceService
_snapshotServerServiceISnapshotServerService
_commandServiceICommandService
_injectorInjector
_compressMutationServiceCompressMutationService
_resourceManagerServiceIResourceManagerService

Returns

SnapshotService

Methods

loadDoc()

loadDoc(
   unitID, 
   rev, 
context): Promise<DocumentDataModel>

Defined in: packages/collaboration/src/services/snapshot/snapshot.service.ts:165

Parameters

ParameterType
unitIDstring
revnumber
contextILogContext

Returns

Promise<DocumentDataModel>


loadSheet()

loadSheet(
   unitId, 
   rev, 
context): Promise<Workbook>

Defined in: packages/collaboration/src/services/snapshot/snapshot.service.ts:89

Parameters

ParameterType
unitIdstring
revnumber
contextILogContext

Returns

Promise<Workbook>


save()

save(_context, workbook): IWorkbookData

Defined in: packages/collaboration/src/services/snapshot/snapshot.service.ts:214

Parameters

ParameterType
_contextILogContext
workbookWorkbook

Returns

IWorkbookData

Deprecated

This should be moved to ResourceLoaderService.saveUnit.


saveDoc()

saveDoc(_context, document): IDocumentData

Defined in: packages/collaboration/src/services/snapshot/snapshot.service.ts:228

Parameters

ParameterType
_contextILogContext
documentDocumentDataModel

Returns

IDocumentData

Deprecated

This should be moved to ResourceLoaderService.saveUnit.