ToolRegistry Class
The ToolRegistry holds a mapping between toolIds and their corresponding Tool class. This provides the mechanism to find Tools by their toolId, and also a way to iterate over the set of Tools available.
Methods
Name | Description | |
---|---|---|
create(toolId: string, ...args: any[]): Tool | undefined | Look up a tool by toolId and, if found, create an instance with the supplied arguments. | |
find(toolId: string): ToolType | undefined | Look up a tool by toolId | |
getToolList(): ToolList | Get a list of Tools currently registered, excluding hidden tools | |
register(toolClass: ToolType, namespace?: I18NNamespace, i18n?: I18N): void | Register a Tool class. | |
registerModule(moduleObj: any, namespace?: I18NNamespace, i18n?: I18N): void | Register all the Tool classes found in a module. | |
run(toolId: string, ...args: any[]): boolean | Look up a tool by toolId and, if found, create an instance with the supplied arguments and run it. | |
unRegister(toolId: string): void | Un-register a previously registered Tool class. |
Properties
Name | Type | Description | |
---|---|---|---|
tools | Map<string, Tool> |
Defined in
Last Updated: 05 June, 2020