@univerjscoreclassesResourcemanagerservice

@univerjs/core v0.5.0-beta.1Docs


Class: ResourceManagerService

Extends

Implements

Constructors

new ResourceManagerService()

new ResourceManagerService(): ResourceManagerService

Returns

ResourceManagerService

Inherited from

Disposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:93
register$publicObservable<IResourceHook<any>>undefined-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:27

Methods

dispose()

dispose(): void

Returns

void

Overrides

Disposable.dispose

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:98


disposePluginResource()

disposePluginResource(pluginName): void

Parameters

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

Returns

void

Implementation of

IResourceManagerService.disposePluginResource

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:74


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:100


getAllResourceHooks()

getAllResourceHooks(): IResourceHook<any>[]

Returns

IResourceHook<any>[]

Implementation of

IResourceManagerService.getAllResourceHooks

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:29


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

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:34

getResources(unitId, type)

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

IResources

Implementation of

IResourceManagerService.getResources

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:35


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

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:52


loadResources()

loadResources(unitId, resources?): void

Parameters

ParameterType
unitIdstring
resources?IResources

Returns

void

Implementation of

IResourceManagerService.loadResources

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:78


registerPluginResource()

registerPluginResource<T>(hook): IDisposable

Type Parameters

Type ParameterDefault type
Tunknown

Parameters

ParameterType
hookIResourceHook<T>

Returns

IDisposable

Implementation of

IResourceManagerService.registerPluginResource

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:64


unloadResources()

unloadResources(unitId): void

Parameters

ParameterType
unitIdstring

Returns

void

Implementation of

IResourceManagerService.unloadResources

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:92