df723d58fd3a8e213a4480304c7764af297b406e
[ccsdk/cds.git] /
1 /*
2 ============LICENSE_START==========================================
3 ===================================================================
4 Copyright (C) 2019 Orange. All rights reserved.
5 ===================================================================
6
7 Unless otherwise specified, all software contained herein is licensed
8 under the Apache License, Version 2.0 (the License);
9 you may not use this software except in compliance with the License.
10 You may obtain a copy of the License at
11
12     http://www.apache.org/licenses/LICENSE-2.0
13
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19 ============LICENSE_END============================================
20 */
21
22
23 export class MetaDataTabModel {
24
25     mode: string;
26     name: string;
27     description: string;
28     version: string;
29     tags: string;
30     mapOfCustomKey: Map<string, string> = new Map<string, string>();
31     entryFileName: string;
32     templateName: string;
33
34 }
35
36 /*TOSCA-Meta-File-Version: 1.0.0
37 CSAR-Version: 1.0
38 Created-By: PLATANIA, MARCO <platania@research.att.com>
39 Entry-Definitions: Definitions/vLB_CDS.json
40 Template-Name: baseconfiguration
41 Template-Version: 1.0.0
42 Template-Type: DEFAULT
43 Template-Tags: vDNS-CDS-test1
44 Content-Type: application/vnd.oasis.bpmn*/
45
46 export class MetaDataFile {
47
48
49 }
50
51
52 export interface FolderNodes {
53     name: string;
54     children?: FolderNodes[];
55 }
56
57 export class FolderNodeElement {
58     TREE_DATA: FolderNodes[] = [
59         {
60             name: 'Definitions',
61             children: [
62                 {name: 'activation-blueprint.json'},
63                 {name: 'artifacts_types.json'},
64                 {name: 'data_types.json'},
65                 {name: 'vLB_CDS.json'},
66             ]
67         },
68         {
69             name: 'Scripts',
70             children: [
71                 {
72                     name: 'kotlin',
73                     children: [
74                         {name: 'ScriptComponent.cba.kts'},
75                         {name: 'ResourceAssignmentProcessor.cba.kts'},
76                     ]
77                 }
78             ]
79         },
80         {
81             name: 'Templates',
82             children: [
83                 {
84                     name: 'baseconfig-template'
85                 }
86             ]
87         },
88         {
89             name: 'TOSCA-Metadata',
90             children: [
91                 {
92                     name: 'TOSCA.meta'
93                 }
94             ]
95         },
96     ];
97 }
98
99 export class FilesContent {
100
101     private static mapOfFilesNamesAndContent: Map<string, string> = new Map<string, string>();
102
103     public static getMapOfFilesNamesAndContent(): Map<string, string> {
104         return FilesContent.mapOfFilesNamesAndContent;
105     }
106
107     public static putData(fileName: string, content: string) {
108         FilesContent.mapOfFilesNamesAndContent.set(fileName, content);
109     }
110
111     public static clear() {
112         this.mapOfFilesNamesAndContent = new Map<string, string>();
113     }
114 }