zowe-cli-cics-deploy-plugin
Version:
IBM CICS Bundle generation and deployment for Zowe CLI
150 lines (149 loc) • 5.03 kB
TypeScript
import { IBundlePartDataType } from "./BundlePart";
import { IHandlerParameters } from "@zowe/imperative";
/**
* Class to represent a CICS Bundle.
*
* @export
* @class Bundle
*/
export declare class Bundle {
/**
* Get a template version of the .zosattributes file
* @returns {string}
* @memberof Bundle
*/
static getTemplateZosAttributesFile(): string;
private path;
private fs;
private manifest;
private definedParts;
private bundleDirectory;
private merge;
private overwrite;
private preparedToSave;
private zosAttribsNeeded;
private zosAttribsAlreadyExists;
private zosAttribsFile;
private params;
/**
* Constructor for creating a Bundle.
* @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 Bundle
*/
constructor(directory: string, merge: boolean, overwrite: boolean, params?: IHandlerParameters);
/**
* Validates that a Bundle appears to be valid on the file-system
* @returns {string}
* @throws ImperativeError
* @memberof Bundle
*/
validate(): void;
/**
* Determines whether the Bundle contains the named resource
* @param {string} resource - The resource to query
* @returns {boolean}
* @throws ImperativeError
* @memberof Bundle
*/
contains(resource: string): boolean;
/**
* Determines whether the Bundle contains any resources of the specified type
* @param {string} resource - The resource to query
* @returns {boolean}
* @throws ImperativeError
* @memberof Bundle
*/
containsDefinitionsOfType(resourceType: string): boolean;
/**
* Returns the Bundle's identity (id) value.
* @returns {string}
* @throws ImperativeError
* @memberof Bundle
*/
getId(): string;
/**
* Set the Bundle's identity (id) value.
* @param {string} id - The identity value for the Bundle.
* @throws ImperativeError
* @memberof Bundle
*/
setId(id: string): void;
/**
* Returns the Bundle's version value.
* @returns {string}
* @throws ImperativeError
* @memberof Bundle
*/
getVersion(): 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 Bundle
*/
setVersion(majorVersion: number, minorVersion: number, microVersion: number): void;
/**
* Returns the Manifest contents as a JSON Object.
*
* @returns {object}
* @throws ImperativeError
* @memberof Bundle
*/
getManifest(): object;
/**
* Returns the Manifest contents as an XML string.
*
* @returns {string}
* @throws ImperativeError
* @memberof Bundle
*/
getManifestXML(): string;
/**
* Add a resource definition to the Bundle. If a part of the same name and type
* already exists then it is replaced with the new part data.
*
* @param {IBundlePartDataType} partData - the part to add.
* @throws ImperativeError
* @memberof Bundle
*/
addDefinition(partData: IBundlePartDataType): void;
/**
* Add a NODEJSAPP resource definition to the Bundle. If a NODEJSAPP of the same name
* already exists then it is replaced with the new part data.
*
* @param {string} name - the name of the NODEJSAPP to add.
* @param {string} startscript - the path to the starting script for the NODEJSAPP.
* @param {number} port - the port mumber to associate with the NODEJSAPP.
* @throws ImperativeError
* @memberof Bundle
*/
addNodejsappDefinition(name: string, startscript: string, port: number): void;
/**
* Each bundle part is prompted to ensure that it is in a fit state to be saved.
* This might involve ensuring that file system permissions are suitable and that
* existing files wont be overwritten. The goal is that errors can be detected
* before any changes are actually saved, thereby reducing the probability that
* something will go wrong after partial changes are saved, and potentially resulting
* in a damaged Bundle on the file system.
*
* @throws ImperativeError
* @memberof Bundle
*/
prepareForSave(): void;
/**
* Save the current Bundle. Any changes that have been made will be persisted.
*
* @throws ImperativeError
* @memberof Bundle
*/
save(): void;
private prepareZosAttribs;
private writeZosAttribs;
}