7200e121031c7354825a18516fd3bd043d1140ab
[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     mapOfCustomKey: Map<string, string> = new Map<string, string>();
30     entryFileName: string;
31     templateName: string;
32     templateTags: Set<string> = new Set<string>();
33
34     setCustomKey(mapOfCustomKey: Map<string, string>) {
35         this.mapOfCustomKey = mapOfCustomKey;
36         return this;
37     }
38
39 }
40
41 /*TOSCA-Meta-File-Version: 1.0.0
42 CSAR-Version: 1.0
43 Created-By: PLATANIA, MARCO <platania@research.att.com>
44 Entry-Definitions: Definitions/vLB_CDS.json
45 Template-Name: baseconfiguration
46 Template-Version: 1.0.0
47 Template-Type: DEFAULT
48 Template-Tags: vDNS-CDS-test1
49 Content-Type: application/vnd.oasis.bpmn*/
50
51 export class MetaDataFile {
52
53
54 }
55
56
57 export interface FolderNodes {
58     name: string;
59     children?: FolderNodes[];
60 }
61
62 export class FolderNodeElement {
63     TREE_DATA: FolderNodes[] = [
64         {
65             name: 'Definitions',
66             children: [
67                 {name: 'activation-blueprint.json'},
68                 {name: 'artifacts_types.json'},
69                 {name: 'data_types.json'},
70                 {name: 'vLB_CDS.json'},
71             ]
72         },
73         {
74             name: 'Scripts',
75             children: [
76                 {
77                     name: 'kotlin',
78                     children: [
79                         {name: 'ScriptComponent.cba.kts'},
80                         {name: 'ResourceAssignmentProcessor.cba.kts'},
81                     ]
82                 }
83             ]
84         },
85         {
86             name: 'Templates',
87             children: [
88                 {
89                     name: 'baseconfig-template'
90                 }
91             ]
92         },
93         {
94             name: 'TOSCA-Metadata',
95             children: [
96                 {
97                     name: 'TOSCA.meta'
98                 }
99             ]
100         },
101     ];
102 }
103
104 export class FilesContent {
105
106     private static mapOfFilesNamesAndContent: Map<string, string> = new Map<string, string>();
107
108     public static getMapOfFilesNamesAndContent(): Map<string, string> {
109         return FilesContent.mapOfFilesNamesAndContent;
110     }
111
112     public static putData(fileName: string, content: string) {
113         FilesContent.mapOfFilesNamesAndContent.set(fileName, content);
114     }
115
116     public static clear() {
117         this.mapOfFilesNamesAndContent = new Map<string, string>();
118     }
119 }