UNPKG

zowe-cli-cics-deploy-plugin

Version:

IBM CICS Bundle generation and deployment for Zowe CLI

130 lines (129 loc) 3.89 kB
import { BundlePart } from "./BundlePart"; import { IHandlerParameters } from "@zowe/imperative"; /** * Class to represent a CICS Bundle manifest. * * @export * @class Manifest */ export declare class Manifest { private MAX_BUNDLEID_LEN; private fs; private path; private manifestAsJson; private bundleDirectory; private metainfDir; private manifestFile; private manifestExists; private merge; private overwrite; private params; private manifestAction; /** * Constructor for creating a Manifest. * * @static * @param {string} directory - The bundle directory. * @param {boolean} merge - Changes to the bundle manifest should be merged into any existing manifest. * @param {boolean} overwrite - Changes to the bundle contents should replace any existing contents. * @param {IHandlerParameters} params - The current Imperative handler parameters * @throws ImperativeError * @memberof Manifest */ constructor(directory: string, merge: boolean, overwrite: boolean, params?: IHandlerParameters); /** * Perform whatever validation can be done in advance of attempting to save the * manifest, thereby reducing the possibility of a failure after some of the * bundle parts have already been persisted to the file system. * * @throws ImperativeError * @memberof Manifest */ prepareForSave(): void; /** * Save the Manifest file. * * @throws ImperativeError * @memberof Manifest */ save(): void; /** * Validates that a manifest file exists. If the manifest has not yet been saved then it is * invalid. * * @returns {object} * @throws ImperativeError * @memberof Manifest */ validate(): void; /** * Returns the Manifest contents as a JSON Object. * * @returns {object} * @throws ImperativeError * @memberof Manifest */ getJson(): object; /** * Returns the Manifest contents as XML text. * * @returns {string} * @throws ImperativeError * @memberof Manifest */ getXML(): string; /** * Returns the Bundle's identity (id) value. * * @returns {string} * @throws ImperativeError * @memberof Manifest */ getBundleId(): string; /** * Set the Bundle's identity (id) value. * @param {string} id - The identiry value for the Bundle. * @throws ImperativeError * @memberof Manifest */ setBundleId(id: string): void; /** * Returns the Bundle's version number. * * @returns {string} * @throws ImperativeError * @memberof Manifest */ getBundleVersion(): string; /** * Set the Bundle's version number. * @param {number} majorVersion - The major version number. * @param {number} minorVersion - The minor version number. * @param {number} microVersion - The micro version number. * @throws ImperativeError * @memberof Manifest */ setBundleVersion(majorVersion: number, minorVersion: number, microVersion: number): void; /** * Add a resource definition to the Manifest. If a part of the same name and type * already exists then it is replaced with the new part data. * * @param {BundlePart} bundlePart - the BundlePart to add. * @throws ImperativeError * @memberof Manifest */ addDefinition(bundlePart: BundlePart): void; /** * Does the bundle contain any resource definitions of the * specified type? * * @param {String} resourceType - the resource type * @throws ImperativeError * @memberof Manifest */ containsDefinitionsOfType(resourceType: string): boolean; private prepareDefinitionsArray; private readManifest; private mangle; private logCreation; }