API Reference
@univerjs
@univerjs/core
classes
Resourcemanagerservice

@univerjs/core v0.4.2Docs


Class: ResourceManagerService

Extends

Implements

Constructors

new ResourceManagerService()

new ResourceManagerService(): ResourceManagerService

Returns

ResourceManagerService

Inherited from

Disposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93 (opens in a new tab)
register$publicObservable<IResourceHook<any>>undefined-submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:27 (opens in a new tab)

Methods

dispose()

dispose(): void

Returns

void

Overrides

Disposable.dispose

Defined in

submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:98 (opens in a new tab)


disposePluginResource()

disposePluginResource(pluginName): void

Parameters

ParameterType
pluginName`SHEET_${string}_PLUGIN` | `DOC_${string}_PLUGIN`

Returns

void

Implementation of

IResourceManagerService.disposePluginResource

Defined in

submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:74 (opens in a new tab)


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)


getAllResourceHooks()

getAllResourceHooks(): IResourceHook<any>[]

Returns

IResourceHook<any>[]

Implementation of

IResourceManagerService.getAllResourceHooks

Defined in

submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:29 (opens in a new tab)


getResources()

getResources(unitId)

getResources(unitId): IResources
Parameters
ParameterType
unitIdstring
Returns

IResources

Deprecated

You should get resource with type specified.

Implementation of

IResourceManagerService.getResources

Defined in

submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:34 (opens in a new tab)

getResources(unitId, type)

getResources(unitId, type): IResources
Parameters
ParameterType
unitIdstring
typeUniverInstanceType
Returns

IResources

Deprecated

You should get resource with type specified.

Implementation of

IResourceManagerService.getResources

Defined in

submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:35 (opens in a new tab)


getResourcesByType()

getResourcesByType(unitId, type): {
  data: string;
  name: resourceHook.pluginName;
 }[]

Parameters

ParameterType
unitIdstring
typeUniverInstanceType

Returns

{ data: string; name: resourceHook.pluginName; }[]

Implementation of

IResourceManagerService.getResourcesByType

Defined in

submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:52 (opens in a new tab)


loadResources()

loadResources(unitId, resources?): void

Parameters

ParameterType
unitIdstring
resources?IResources

Returns

void

Implementation of

IResourceManagerService.loadResources

Defined in

submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:78 (opens in a new tab)


registerPluginResource()

registerPluginResource<T>(hook): IDisposable

Type Parameters

Type ParameterDefault type
Tunknown

Parameters

ParameterType
hookIResourceHook<T>

Returns

IDisposable

Implementation of

IResourceManagerService.registerPluginResource

Defined in

submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:64 (opens in a new tab)


unloadResources()

unloadResources(unitId): void

Parameters

ParameterType
unitIdstring

Returns

void

Implementation of

IResourceManagerService.unloadResources

Defined in

submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:92 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.