Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BasicProfileManager<T>

Basic Profile Manager is the most basic implementation of the Imperative Profile Manager. In general, it invokes all of the utility/services from the Abstract Profile manager to load, save, delete, validate, etc. Imperative profiles. See the "AbstractProfileManager" header for more profile management details.

The main differences between the abstract and the basic include:

  1. The "loadAll()" API in the basic profile manager loads ALL profiles from all types.
  2. The Basic Profile Manager includes the "initialize()" API, which will create all type directories and persist the schema in the meta files.

The Basic Profile Manager can be used "stand-alone" from an Imperative CLI. The intent is to provide apps built using Imperative CLI's to take advantage of the profiles that the user has defined, without having to "locate" the configuration documents used to construct the CLI's. This is why the initialize() API persists the configuration documents within the meta files for each type.

export

Type parameters

Hierarchy

Index

Constructors

constructor

Properties

Static Readonly META_FILE_SUFFIX

META_FILE_SUFFIX: string = "_meta"

The meta file suffix - always appended to the meta file to distinguish from other profiles. Users then cannot supply a profile name that would conflict with the meta file.

static
memberof

AbstractProfileManager

Static Readonly PROFILE_EXTENSION

PROFILE_EXTENSION: string = ".yaml"

The default profile file extension (YAML format) - all profiles are stored in YAML format including the meta profile file.

static
memberof

ProfileManager

Accessors

configurations

Protected loadCounter

  • get loadCounter(): Map<string, number>

Protected log

Protected managerParameters

Protected productDisplayName

  • get productDisplayName(): string

Protected profileRootDirectory

  • get profileRootDirectory(): string

Protected profileType

  • get profileType(): string

Protected profileTypeConfiguration

  • get profileTypeConfiguration(): T

Protected profileTypeConfigurations

  • get profileTypeConfigurations(): T[]

Protected profileTypeMetaFileName

  • get profileTypeMetaFileName(): string

Protected profileTypeRootDirectory

  • get profileTypeRootDirectory(): string

Protected profileTypeSchema

Methods

clearDefault

  • clearDefault(): string

Protected constructFullProfilePath

  • constructFullProfilePath(name: string, type?: string): string

delete

Protected deleteProfile

Protected deleteProfileFromDisk

  • deleteProfileFromDisk(name: string): string

getAllProfileNames

  • getAllProfileNames(): string[]

getDefaultProfileName

  • getDefaultProfileName(): string

Protected isProfileEmpty

  • isProfileEmpty(profile: IProfile): boolean

load

loadAll

Protected loadDependencies

Protected loadFailed

  • loadFailed(name: string): void

Protected loadProfile

Protected loadSpecificProfile

  • loadSpecificProfile(name: string, failNotFound?: boolean, loadDependencies?: boolean): Promise<IProfileLoaded>

Protected locateExistingProfile

  • locateExistingProfile(name: string): string

mergeProfiles

save

Protected saveProfile

setDefault

  • setDefault(name: string): string

update

Protected updateProfile

validate

Protected validateProfile

Protected validateProfileAgainstSchema

  • validateProfileAgainstSchema(name: string, profile: IProfile, strict?: boolean): void

Protected validateProfileObject

  • validateProfileObject(name: string, type: string, profile: IProfile): void

Private validateRequiredDependenciesAreSpecified

  • validateRequiredDependenciesAreSpecified(profile: IProfile): void

Static initialize

  • Static method to initialize the profile environment. Accepts the profile root directory (normally supplied by your Imperative configuration documents) and all profile "type" configuration documents and constructs the directories needed to manage profiles of all types. You must execute this method before beginning to use profiles OR you must supply all the type configuration documents (normally obtained from your Imperative configuration document) to the constructor of

    static
    memberof

    AbstractProfileManager

    Parameters

    Returns Promise<IProfileInitialized[]>

Generated using TypeDoc