@univerjs/core v0.5.0-beta.1 • Docs
Class: ResourceManagerService
Extends
Implements
Constructors
new ResourceManagerService()
new ResourceManagerService(): ResourceManagerService
Returns
Inherited from
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:93 |
register$ | public | Observable <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
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
Parameter | Type |
---|---|
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
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:96
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
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
Parameter | Type |
---|---|
unitId | string |
Returns
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
Parameter | Type |
---|---|
unitId | string |
type | UniverInstanceType |
Returns
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
Parameter | Type |
---|---|
unitId | string |
type | UniverInstanceType |
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
Parameter | Type |
---|---|
unitId | string |
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 Parameter | Default type |
---|---|
T | unknown |
Parameters
Parameter | Type |
---|---|
hook | IResourceHook <T > |
Returns
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
Parameter | Type |
---|---|
unitId | string |
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