aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/mapping-models/CBAPacakge.model.ts
blob: c8c93cd145b146d47c39096764356c8710ca7b2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
import {MetaDataTabModel} from './metadata/MetaDataTab.model';
import {TemplateTopology} from './definitions/CBADefinition';

export class Definition {

    // public metaDataTab: MetaDataTabModel;
    public imports: Map<string, string>;
    public dslDefinition: DslDefinition;

    // public dslDefinition:

    constructor() {
        this.imports = new Map<string, string>();
        // this.metaDataTab = new MetaDataTabModel();
        this.dslDefinition = new DslDefinition();
    }

    public setImports(key: string, value: string) {
        this.imports.set(key, value);
        return this;
    }

    // public setMetaData(metaDataTab: MetaDataTabModel) {
    //     this.metaDataTab = metaDataTab;
    //     return this;
    // }

    public setDslDefinition(dslDefinition: DslDefinition): Definition {
        this.dslDefinition = dslDefinition;
        return this;
    }
}

export class DslDefinition {
    content: string;
}

export class Base {
    public files: Map<string, string>;

    constructor() {
        this.files = new Map<string, string>();
    }

    public setContent(key: string, value: string) {
        this.files.set(key, value);
        return this;
    }

    public getValue(key: string): string {
        return this.files.get(key);
    }
}

export class Scripts {
    public files: Map<string, string>;

    constructor() {
        this.files = new Map<string, string>();
    }

    public setScripts(key: string, value: string) {
        this.files.set(key, value);
        return this;
    }
}

export class Plans extends Base {

}

export class Requirements extends Base {
}


export class Template {
    public files: Map<string, string>;

    constructor() {
        this.files = new Map<string, string>();
    }

    public setTemplates(key: string, value: string) {
        this.files.set(key, value);
        return this;
    }

    public getValue(key: string): string {
        return this.files.get(key);
    }
}

export class Mapping extends Base {
}

export class CBAPackage {

    public metaData: MetaDataTabModel;
    public definitions: Definition;
    public scripts: Scripts;
    public templates: Template;
    public mapping: Mapping;
    public templateTopology: TemplateTopology;
    public plans: Plans;
    public requirements: Requirements;


    constructor() {
        this.definitions = new Definition();
        this.scripts = new Scripts();
        this.metaData = new MetaDataTabModel();
        this.templates = new Template();
        this.mapping = new Mapping();
        this.templateTopology = new TemplateTopology();
        this.plans = new Plans();
        this.requirements = new Requirements();
    }


}