Creates an instance of ProfileManager - Performs basic parameter validation and will create the required profile root directory (if it does not exist) and will attempt to load type configurations from the existing profile root directory (unless the type definitions are passed on the constructor parameters).
See the interface for details.
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.
The default profile file extension (YAML format) - all profiles are stored in YAML format including the meta profile file.
Accessor that returns a copy of of the profile configuration document.
Accessor for the load counter (protects against circular loading)
Accessor for the logger instance - passed on the constructor
Accessor the input parameters to the constructor - used sometimes to create other instances of profile managers.
Accesor for the product display name.
Accessor for the profile root directory - supplied on the constructor - used to construct the profile type directory.
Accessor for the profile type specified on the constructor.
Accessor for the profile type configuration for this manager.
Accessor for the full set of type configurations - passed on the constructor or obtained from reading the profile root directories and meta files.
Accessor for the profile meta file name - constructed as "
Accessor for the profile type root directory (contained within the profile root directory and named by the type itself)
Accessor for the schema of this type - JSON schema standard
Clears the default profile for the profile managers type.
Constructs the full path to the profile of the managers "type".
The profile name to construct the path
Deletes a profile from disk. Ensures that the parameters are correct and removes the profile. If the profile is listed as a dependency of other profiles it will NOT delete the profile unless "rejectIfDependency" is set to false.
See the interface for details
Delete a profile from disk - invokes the "deleteProfileFromDisk" method in the abstract to perform the load.
Delete control params - see the interface for full details
Invokes the profile IO method to delete the profile from disk.
The name of the profile to delete.
Obtains all profile names for the profile "type" specified on the manager. The names are obtained from the filesystem (in the profile type directory) and the meta file is NOT returned in the list.
Returns the default profile name for this "type" or "undefined" if no default is set.
Checks if the profile object passed is "empty" - meaning it has no contents other than that type or name. A profile can only specify "dependencies", in the event that it is just acting as a "pointer" to another profile.
The profile to check for "emptiness".
True if the profile object is empty.
Load a profile from disk. Ensures that the parameters are valid and loads the profile specified by name OR the default profile if requested. If load default is requested, any name supplied is ignored.
See the interface for details.
Loads all profiles from every type. Profile types are deteremined by reading all directories within the profile root directory.
Loads all dependencies for the profile specified - returns the list in the response structure. Sub-dependencies are also loaded.
the name of hte profile to load dependencies for
The profile to load dependencies.
Standard load failed error message and Imperative Error.
The name of the profile for which the load failed.
Load a profile from disk - invokes the "loadSpecificProfile" method in the abstract to perform the load.
Load control params - see the interface for full details
Loads a specific profile (by name).
The name of the profile to load.
Locate the existing profile for the name specified.
The profile to locate
Merge two profiles together. Useful when updating existing profiles with a few new fields, for example.
the old profile, fields on this will have lower precedence
the new profile, fields on this will have higher precedence
Save a profile to disk. Ensures that the profile specified is valid (basic and schema validation) and invokes the implementations "saveProfile" method to perform the save and formulate the response.
See interface for details
Save the profile to disk. First ensures that all dependencies are valid and writes the profile.
Save control params - see the interface for full details
Sets the default profile for the profile managers type.
The name of the new default
Update the profile - The action performed is dictacted by the implementation of the Abstract manager.
See the interface for details
Update a profile - Accepts the "new" version of the profile and overwrites the existing profile on disk.
Update control params - see the interface for full details
Validate a profile. Includes basic and schema validation. Can be called explicitly, but is also called during loads and saves to protect the integrity of the profiles against the type definitions.
See the interface for details
Validate profile - ensures that the profile is valid agaisnt the schema and configuration document
Validate control params - see the interface for full details
Validates the profile against the schema for its type and reports and errors located.
the name of the profile to validate
The profile to validate.
Performs basic validation of a profile object - ensures that all fields are present (if required).
the name of the profile to validate
the type of profile to validate
The profile to validate.
Validates a profiles contents against the required dependencies specified on the profile configuration type document. If the document indicates that a dependency is required and that dependency is missing from the input profile, an error is thrown.
The profile to validate dependency specs
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
Generated using TypeDoc
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:
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.