This class is used by the auto init command handler as the base class for its implementation.

### Hierarchy

- BaseAutoInitHandler

### Implements

- ICommandHandler

## Index

### Properties

- mProfileType
- mServiceDescription
- mSession

### Methods

- createSessCfgFromArgs
- displayAutoInitChanges
- doAutoInit
- process
- processAutoInit

## Properties

### Protected Abstract mProfileType

mProfileType: string

- Defined in @zowe/imperative/src/imperative/src/config/cmd/auto-init/handlers/BaseAutoInitHandler.ts:31

The profile type where connection information should be stored

### Protected Abstract mServiceDescription

mServiceDescription: string

- Defined in @zowe/imperative/src/imperative/src/config/cmd/auto-init/handlers/BaseAutoInitHandler.ts:36

The description of your service to be used in CLI prompt messages

### Protected mSession

mSession: AbstractSession

- Defined in @zowe/imperative/src/imperative/src/config/cmd/auto-init/handlers/BaseAutoInitHandler.ts:41

The session being created from the command line arguments / profile

## Methods

### Protected Abstract createSessCfgFromArgs

- createSessCfgFromArgs(args: ICommandArguments): ISession

- - Defined in @zowe/imperative/src/imperative/src/config/cmd/auto-init/handlers/BaseAutoInitHandler.ts:51

  This is called by the {@link BaseAuthHandler#process} when it needs a session. Should be used to create a session to connect to the auto-init service.

  abstract

  #### Parameters

  - ##### args: ICommandArguments

    The command line arguments to use for building the session

  #### Returns ISession

  The session object built from the command line arguments.

### Protected Abstract displayAutoInitChanges

- displayAutoInitChanges(response: IHandlerResponseApi): void

- - Defined in @zowe/imperative/src/imperative/src/config/cmd/auto-init/handlers/BaseAutoInitHandler.ts:78

  This is called by processAutoInit() to display the report of configuration updates.

  abstract

  #### Parameters

  - ##### response: IHandlerResponseApi

  #### Returns void

### Protected Abstract doAutoInit

- doAutoInit(session: AbstractSession, params: IHandlerParameters): Promise<IConfig>

- - Defined in @zowe/imperative/src/imperative/src/config/cmd/auto-init/handlers/BaseAutoInitHandler.ts:71

  This is called by the "auto-init" command after it creates a session, to obtain information that can be used to automatically create a config

  abstract

  #### Parameters

  - ##### session: AbstractSession

    The session object to use to connect to the auth service

  - ##### params: IHandlerParameters

  #### Returns Promise<IConfig>

  The response from the auth service containing a token

### process

- process(commandParameters: IHandlerParameters): Promise<void>

- Implementation of ICommandHandler.process

  - Defined in @zowe/imperative/src/imperative/src/config/cmd/auto-init/handlers/BaseAutoInitHandler.ts:60

  This handler is used for the "auto-init" command, and calls processAutoInit

  #### Parameters

  - ##### commandParameters: IHandlerParameters

    Command parameters sent by imperative.

  #### Returns Promise<void>

### Private processAutoInit

- processAutoInit(params: IHandlerParameters): Promise<void>

- - Defined in @zowe/imperative/src/imperative/src/config/cmd/auto-init/handlers/BaseAutoInitHandler.ts:86

  Processes the auto init command to the auto init service. Applies the changes to whichever config layer is specified by IHandlerParameters. Can also perform a dry run and display the changes, or open the config for editing.

  #### Parameters

  - ##### params: IHandlerParameters

    Command parameters sent by imperative.

  #### Returns Promise<void>

Generated using TypeDoc