Class: CatalogEntityRegistry#
Renderer.Catalog.CatalogEntityRegistry
Table of contents#
Constructors#
Accessors#
Methods#
Constructors#
constructor#
• new CatalogEntityRegistry()
Accessors#
activeEntity#
• get activeEntity(): CatalogEntity<CatalogEntityMetadata, CatalogEntityStatus, CatalogEntitySpec>
Currently active/visible entity
Returns#
CatalogEntity<CatalogEntityMetadata, CatalogEntityStatus, CatalogEntitySpec>
entities#
• get entities(): Map<string, CatalogEntity<CatalogEntityMetadata, CatalogEntityStatus, CatalogEntitySpec>>
Returns#
Map<string, CatalogEntity<CatalogEntityMetadata, CatalogEntityStatus, CatalogEntitySpec>>
Methods#
addOnBeforeRun#
▸ addOnBeforeRun(onBeforeRun): Disposer
Add a onBeforeRun hook to a catalog entities. If onBeforeRun was previously
added then it will not be added again.
Parameters#
| Name | Type | Description | 
|---|---|---|
onBeforeRun | 
CatalogEntityOnBeforeRun | 
The function to be called with a CatalogRunEvent event target will be the catalog entity. onBeforeRun hook can call event.preventDefault() to stop run sequence | 
Returns#
Disposer
A function to remove that hook
getById#
▸ getById(id): CatalogEntity<CatalogEntityMetadata, CatalogEntityStatus, CatalogEntitySpec>
Parameters#
| Name | Type | 
|---|---|
id | 
string | 
Returns#
CatalogEntity<CatalogEntityMetadata, CatalogEntityStatus, CatalogEntitySpec>
getItemsForApiKind#
▸ getItemsForApiKind<T>(apiVersion, kind): T[]
Type parameters#
| Name | Type | 
|---|---|
T | 
extends CatalogEntity<CatalogEntityMetadata, CatalogEntityStatus, CatalogEntitySpec, T> | 
Parameters#
| Name | Type | 
|---|---|
apiVersion | 
string | 
kind | 
string | 
Returns#
T[]
getItemsForCategory#
▸ getItemsForCategory<T>(category): T[]
Type parameters#
| Name | Type | 
|---|---|
T | 
extends CatalogEntity<CatalogEntityMetadata, CatalogEntityStatus, CatalogEntitySpec, T> | 
Parameters#
| Name | Type | 
|---|---|
category | 
CatalogCategory | 
Returns#
T[]