This class is used to record and access plugin errors and warnings. It is a singleton and should be accessed via PluginIssues.instance.

### Hierarchy

- PluginIssues

## Index

### Properties

- installedPlugins
- pluginIssues
- mInstance

### Accessors

- instance

### Methods

- doesPluginHaveIssueSev
- getAllIssues
- getInstalledPlugins
- getIssueListForPlugin
- recordIssue
- removeIssuesForPlugin

## Properties

### Private installedPlugins

installedPlugins: IPluginJson = null

- Defined in @zowe/imperative/src/imperative/src/plugins/utilities/PluginIssues.ts:79

The set of installed plugins. We access this class property only through its accompanying function [getInstalledPlugins]{@link PluginIssues#getInstalledPlugins} to ensure that we only read the file once and reduce excessive I/O.

### Private pluginIssues

pluginIssues: IPluginIssues

- Defined in @zowe/imperative/src/imperative/src/plugins/utilities/PluginIssues.ts:68

A map containing issues for each plugin for which problems were detected.

### Static Private mInstance

mInstance: PluginIssues

- Defined in @zowe/imperative/src/imperative/src/plugins/utilities/PluginIssues.ts:60

This is the variable that stores the specific instance of the PluginIssues. Defined as static so that it can be accessed from anywhere.

## Accessors

### Static instance

- get instance(): PluginIssues

- - Defined in @zowe/imperative/src/imperative/src/plugins/utilities/PluginIssues.ts:89

  Gets a single instance of the PluginIssues. On the first call of PluginIssues.instance, a new Plugin Issues object is initialized and returned. Every subsequent call will use the one that was first created.

  #### Returns PluginIssues

  The newly initialized PMF object.

## Methods

### doesPluginHaveIssueSev

- doesPluginHaveIssueSev(pluginName: string, issueSevs: IssueSeverity[]): boolean

- - Defined in @zowe/imperative/src/imperative/src/plugins/utilities/PluginIssues.ts:109

  Reports whether or not a plugin has any issues with any of the specified severities.

  #### Parameters

  - ##### pluginName: string

    The name of the plugin

  - ##### issueSevs: IssueSeverity[]

    An array of issue severities.

  #### Returns boolean

  - True if any plugin issues have any of the severities.

                       False otherwise.

### getAllIssues

- getAllIssues(): IPluginIssues

- - Defined in @zowe/imperative/src/imperative/src/plugins/utilities/PluginIssues.ts:127

  Get the issues recorded for all plugins.

  #### Returns IPluginIssues

  - Map of plugin names to their array of issues.

### getInstalledPlugins

- getInstalledPlugins(): IPluginJson

- - Defined in @zowe/imperative/src/imperative/src/plugins/utilities/PluginIssues.ts:138

  Get the set of installed plugins. This function should be the only means used to access our installedPlugins class variable.

  #### Returns IPluginJson

  - The set of installed plugins.

### getIssueListForPlugin

- getIssueListForPlugin(pluginName: string): IPluginIssue[]

- - Defined in @zowe/imperative/src/imperative/src/plugins/utilities/PluginIssues.ts:170

  Get the array of issues for the specified plugin.

  #### Parameters

  - ##### pluginName: string

    The name of the plugin

  #### Returns IPluginIssue[]

  - Array of issues for the plugin.

                              If no issues, an empty array is returned.

### recordIssue

- recordIssue(pluginName: string, issueSev: IssueSeverity, issueText: string): void

- - Defined in @zowe/imperative/src/imperative/src/plugins/utilities/PluginIssues.ts:197

  Record an issue that was discovered in a plugin into an in-memory structure. The plugin issues can later be accessed to report the health of a plugin.

  #### Parameters

  - ##### pluginName: string

    The name of the plugin

  - ##### issueSev: IssueSeverity

    The severity of the issue. Use PluginIssues.ERROR or PluginIssues.WARNING

  - ##### issueText: string

    The issue message text to record.

  #### Returns void

### removeIssuesForPlugin

- removeIssuesForPlugin(pluginName: string): void

- - Defined in @zowe/imperative/src/imperative/src/plugins/utilities/PluginIssues.ts:182

  Remove the specified plugin from the collection of plugin issues.

  #### Parameters

  - ##### pluginName: string

    The name of the plugin to remove

  #### Returns void

Generated using TypeDoc