diff options
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/mapping-models')
2 files changed, 33 insertions, 11 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/mapping-models/CBAPacakge.model.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/mapping-models/CBAPacakge.model.ts index cbb82f118..a5f5ec70a 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/mapping-models/CBAPacakge.model.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/mapping-models/CBAPacakge.model.ts @@ -1,19 +1,39 @@ - import {MetaDataTabModel} from './metadata/MetaDataTab.model'; export class Definition { - public files: Map<string, string> = new Map<string, string>(); - constructor(files: Map<string, string>) { - this.files = files; + public metaDataTab: MetaDataTabModel; + public imports: Map<string, string>; + + // public dslDefinition: + + constructor() { + this.imports = new Map<string, string>(); + this.metaDataTab = new MetaDataTabModel(); + } + + public setImports(key: string, value: string) { + this.imports.set(key, value); + return this; + } + + public setMetaData(metaDataTab: MetaDataTabModel) { + this.metaDataTab = metaDataTab; + return this; } + } export class Scripts { - public files: Map<string, string> = new Map<string, string>(); + public files: Map<string, string>; - constructor(files: Map<string, string>) { - this.files = files; + constructor() { + this.files = new Map<string, string>(); + } + + public setScripts(key: string, value: string) { + this.files.set(key, value); + return this; } } @@ -23,12 +43,14 @@ export class CBAPackage { public definitions: Definition; public scripts: Scripts; + constructor() { - this.definitions = new Definition(new Map<string, string>()); - this.scripts = new Scripts(new Map<string, string>()); + this.definitions = new Definition(); + this.scripts = new Scripts(); this.metaData = new MetaDataTabModel(); } + } diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/mapping-models/metadata/MetaDataTab.model.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/mapping-models/metadata/MetaDataTab.model.ts index c62694213..194e660c7 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/mapping-models/metadata/MetaDataTab.model.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/mapping-models/metadata/MetaDataTab.model.ts @@ -45,7 +45,7 @@ Content-Type: application/vnd.oasis.bpmn*/ export class MetaDataFile { - static getObjectInstance(metaDataTab: MetaDataTabModel): string { + static getValueOfMetaData(metaDataTab: MetaDataTabModel): string { return 'TOSCA-Meta-File-Version: 1.0.0\n' + 'CSAR-Version: 1.0\n' + 'Created-By: Shaaban Ebrahim <shaaban.eltanany.ext@orange.con>\n' + @@ -109,7 +109,7 @@ export class FolderNodeElement { export class FilesContent { - public static mapOfFilesNamesAndContent: Map<string, string> = new Map<string, string>(); + private static mapOfFilesNamesAndContent: Map<string, string> = new Map<string, string>(); public static getMapOfFilesNamesAndContent(): Map<string, string> { return FilesContent.mapOfFilesNamesAndContent; |