Skip to content

Commit c7e20a0

Browse files
authored
Adjust MDSL generator to latest MDSL release (V has been replaced with D) (#178)
1 parent cadad57 commit c7e20a0

23 files changed

+52
-52
lines changed

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-basic-data-types-as-parameters.mdsl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,33 @@ endpoint type CustomersAggregate
88
exposes
99
operation anotherMethod
1010
expecting
11-
payload V<int>
11+
payload D<int>
1212
delivering
13-
payload V<string>
13+
payload D<string>
1414
operation intMethod
1515
expecting
16-
payload V<int>
16+
payload D<int>
1717
operation booleanMethod
1818
expecting
19-
payload V<bool>
19+
payload D<bool>
2020
operation longMethod
2121
expecting
22-
payload V<long>
22+
payload D<long>
2323
operation longlongMethod
2424
expecting
25-
payload V<long>
25+
payload D<long>
2626
operation doubleMethod
2727
expecting
28-
payload V<double>
28+
payload D<double>
2929
operation doubledoubleMethod
3030
expecting
31-
payload V<double>
31+
payload D<double>
3232
operation blobMethod
3333
expecting
34-
payload V<blob>
34+
payload D<blob>
3535
operation IntegerMethod
3636
expecting
37-
payload V<int>
37+
payload D<int>
3838

3939

4040
API provider CustomerManagementContextProvider

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-cyclic-reference.mdsl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ API description CustomerManagementContextAPI
33

44

55
// You declared a cyclic reference! We had to break the cycle at CyclicVO
6-
data type CyclicVO { "name":V<string>, "refToMyself":{ "name":V<string>, "refToMyself":CyclicVO } }
6+
data type CyclicVO { "name":D<string>, "refToMyself":{ "name":D<string>, "refToMyself":CyclicVO } }
77
// You declared a cyclic reference! We had to break the cycle at CyclicVO2
8-
data type CyclicVO2 { "name":V<string>, "refToMyself":{ "name":V<string>, "refToMyself":CyclicVO2* }* }
8+
data type CyclicVO2 { "name":D<string>, "refToMyself":{ "name":D<string>, "refToMyself":CyclicVO2* }* }
99

1010

1111
endpoint type CustomersAggregate
@@ -14,17 +14,17 @@ endpoint type CustomersAggregate
1414
expecting
1515
payload CyclicVO
1616
delivering
17-
payload V<string>
17+
payload D<string>
1818
operation myMethod2
1919
expecting
2020
payload CyclicVO
2121
delivering
22-
payload V<string>
22+
payload D<string>
2323
operation myMethod3
2424
expecting
2525
payload CyclicVO2
2626
delivering
27-
payload V<string>
27+
payload D<string>
2828

2929

3030
API provider CustomerManagementContextProvider

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-date-to-string.mdsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ endpoint type CustomersAggregate
88
exposes
99
operation dateMethod
1010
expecting
11-
payload V<string>
11+
payload D<string>
1212

1313

1414
API provider CustomerManagementContextProvider

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-entity-extending-other-entity.mdsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
API description CustomerManagementContextAPI
33

44

5-
data type Address { "identifier":V<int>, "street":V<string>, "houseNumber":V<int> }
5+
data type Address { "identifier":D<int>, "street":D<string>, "houseNumber":D<int> }
66
data type Parameter1Type P // the type Parameter1Type has not been specified or does not contain any attributes in CML
77
data type Parameter2Type P // the type Parameter2Type has not been specified or does not contain any attributes in CML
88
data type ReturnType P // the type ReturnType has not been specified or does not contain any attributes in CML

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-enum-support.mdsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
API description CustomerManagementContextAPI
33

44

5-
data type Address { "street":V<string>, "houseNumber":V<int>, "enumVal":TestEnum }
5+
data type Address { "street":D<string>, "houseNumber":D<int>, "enumVal":TestEnum }
66
data type ReturnType P // the type ReturnType has not been specified or does not contain any attributes in CML
77
data type TestEnum {"VAL1"|"VAL2"}
88
data type TestEnum2 {"VAL1"|"VAL2"}

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-list-parameter-test.mdsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ API description CustomerManagementContextAPI
33

44

55
data type BankAccount P // the type BankAccount has not been specified or does not contain any attributes in CML
6-
data type Customer { "firstName":V<string>, "lastName":V<string>, "account":BankAccount, "address":{ "street":V<string>, "houseNumber":V<int> } }
6+
data type Customer { "firstName":D<string>, "lastName":D<string>, "account":BankAccount, "address":{ "street":D<string>, "houseNumber":D<int> } }
77
data type ReturnType P // the type ReturnType has not been specified or does not contain any attributes in CML
88

99

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-mixed-parameters-test.mdsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ API description CustomerManagementContextAPI
55
data type BankAccount P // the type BankAccount has not been specified or does not contain any attributes in CML
66
data type JustSomeParameterType P // the type JustSomeParameterType has not been specified or does not contain any attributes in CML
77
data type ReturnType P // the type ReturnType has not been specified or does not contain any attributes in CML
8-
data type updateCustomerParameter { "customer":{ "firstName":V<string>, "lastName":V<string>, "account":BankAccount, "address":{ "street":V<string>, "houseNumber":V<int> } }, "param2":JustSomeParameterType }
8+
data type updateCustomerParameter { "customer":{ "firstName":D<string>, "lastName":D<string>, "account":BankAccount, "address":{ "street":D<string>, "houseNumber":D<int> } }, "param2":JustSomeParameterType }
99

1010

1111
endpoint type CustomersAggregate

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-no-implementation-technology.mdsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ endpoint type CustomersAggregate
1414
exposes
1515
operation myMethod
1616
expecting
17-
payload V<void>
17+
payload D<void>
1818
delivering
19-
payload V<string>
19+
payload D<string>
2020

2121
// ** BEGIN PROTECTED REGION for API providers
2222

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-no-parameters.mdsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ endpoint type CustomersAggregate
88
exposes
99
operation myMethod
1010
expecting
11-
payload V<void>
11+
payload D<void>
1212
delivering
13-
payload V<string>
13+
payload D<string>
1414

1515

1616
API provider CustomerManagementContextProvider

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-no-return-type.mdsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ endpoint type CustomersAggregate
1414
exposes
1515
operation myMethod
1616
expecting
17-
payload V<string>
17+
payload D<string>
1818
operation myMethod2
1919
expecting
20-
payload V<string>
20+
payload D<string>
2121

2222
// ** BEGIN PROTECTED REGION for API providers
2323

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-nullable-attributes.mdsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ API description CustomerManagementContextAPI
33

44

55
data type BankAccount P // the type BankAccount has not been specified or does not contain any attributes in CML
6-
data type Customer { "firstName":V<string>?, "lastName":V<string>?, "account":BankAccount, "address":{ "street":V<string>, "houseNumber":V<int> } }
6+
data type Customer { "firstName":D<string>?, "lastName":D<string>?, "account":BankAccount, "address":{ "street":D<string>, "houseNumber":D<int> } }
77
data type ReturnType P // the type ReturnType has not been specified or does not contain any attributes in CML
88

99

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-only-use-public-operations.mdsl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ endpoint type CustomersAggregate
88
exposes
99
operation publicMethod
1010
expecting
11-
payload V<int>
11+
payload D<int>
1212
delivering
13-
payload V<string>
13+
payload D<string>
1414
operation anotherPublicMethod
1515
expecting
16-
payload V<string>
16+
payload D<string>
1717

1818

1919
API provider CustomerManagementContextProvider

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-parameter-tree-test-deep.mdsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ API description CustomerManagementContextAPI
33

44

55
data type BankAccount P // the type BankAccount has not been specified or does not contain any attributes in CML
6-
data type Customer { "firstName":V<string>, "lastName":V<string>, "account":BankAccount, "address":{ "street":V<string>, "houseNumber":V<int>, "deepAttr":{ "justSomeDeepAttribute":V<string> } } }
6+
data type Customer { "firstName":D<string>, "lastName":D<string>, "account":BankAccount, "address":{ "street":D<string>, "houseNumber":D<int>, "deepAttr":{ "justSomeDeepAttribute":D<string> } } }
77
data type ReturnType P // the type ReturnType has not been specified or does not contain any attributes in CML
88

99

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-parameter-tree-test.mdsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ API description CustomerManagementContextAPI
33

44

55
data type BankAccount P // the type BankAccount has not been specified or does not contain any attributes in CML
6-
data type Customer { "firstName":V<string>, "lastName":V<string>, "account":BankAccount, "address":{ "street":V<string>, "houseNumber":V<int> } }
6+
data type Customer { "firstName":D<string>, "lastName":D<string>, "account":BankAccount, "address":{ "street":D<string>, "houseNumber":D<int> } }
77
data type ReturnType P // the type ReturnType has not been specified or does not contain any attributes in CML
88

99

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-parameter-tree-with-list-test.mdsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ API description CustomerManagementContextAPI
33

44

55
data type BankAccount P // the type BankAccount has not been specified or does not contain any attributes in CML
6-
data type Customer { "firstName":V<string>, "lastName":V<string>, "account":BankAccount*, "address":{ "street":V<string>, "houseNumber":V<int> }* }
6+
data type Customer { "firstName":D<string>, "lastName":D<string>, "account":BankAccount*, "address":{ "street":D<string>, "houseNumber":D<int> }* }
77
data type ReturnType P // the type ReturnType has not been specified or does not contain any attributes in CML
88

99

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-protected-regions-do-not-match-commented-types-existing.mdsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
API description CustomerManagementContextAPI
33

44
// ** BEGIN PROTECTED REGION for data types
5-
// data type Address { "street":V<string>, "city":V<string> }
5+
// data type Address { "street":D<string>, "city":D<string> }
66
// ** END PROTECTED REGION for data types
77

88
data type Parameter1Type P

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-protected-regions-do-not-match-commented-types.mdsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
API description CustomerManagementContextAPI
33

44
// ** BEGIN PROTECTED REGION for data types
5-
// data type Address { "street":V<string>, "city":V<string> }
5+
// data type Address { "street":D<string>, "city":D<string> }
66
// ** END PROTECTED REGION for data types
77

88
data type Address P // the type Address has not been specified or does not contain any attributes in CML

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-protected-regions-existing.mdsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
API description CustomerManagementContextAPI
33

44
// ** BEGIN PROTECTED REGION for data types
5-
data type Address { "street":V<string>, "city":V<string> }
5+
data type Address { "street":D<string>, "city":D<string> }
66
// ** END PROTECTED REGION for data types
77

88
data type Parameter1Type P
99
data type Parameter2Type P
10-
data type ReturnType { "returnvalue1":V<string> }
10+
data type ReturnType { "returnvalue1":D<string> }
1111
data type anotherMethodParameter { "param1":Parameter1Type, "param2":Parameter2Type }
1212

1313
// ** BEGIN PROTECTED REGION for endpoint types

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-protected-regions.mdsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
API description CustomerManagementContextAPI
33

44
// ** BEGIN PROTECTED REGION for data types
5-
data type Address { "street":V<string>, "city":V<string> }
5+
data type Address { "street":D<string>, "city":D<string> }
66
// ** END PROTECTED REGION for data types
77

88
data type Parameter1Type P // the type Parameter1Type has not been specified or does not contain any attributes in CML

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-reference-to-empty-domain-object-1.mdsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
API description CustomerManagementContextAPI
33

44

5-
data type Address { "street":V<string>, "houseNumber":V<int> }
5+
data type Address { "street":D<string>, "houseNumber":D<int> }
66
data type ReturnType P // the type ReturnType has not been specified or does not contain any attributes in CML
77

88

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-reference-to-empty-domain-object-2.mdsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
API description CustomerManagementContextAPI
33

44

5-
data type Address { "street":V<string>, "houseNumber":V<int>, "refAttr":{ "attr1":V<string> } }
5+
data type Address { "street":D<string>, "houseNumber":D<int>, "refAttr":{ "attr1":D<string> } }
66
data type ReturnType P // the type ReturnType has not been specified or does not contain any attributes in CML
77

88

org.contextmapper.dsl.tests/integ-test-files/mdsl/mdsl-use-service-operations.mdsl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
API description CustomerManagementContextAPI
33

44

5-
data type Address { "street":V<string>, "houseNumber":V<int>, "city":V<string> }
5+
data type Address { "street":D<string>, "houseNumber":D<int>, "city":D<string> }
66
data type AnyReturnType P // the type AnyReturnType has not been specified or does not contain any attributes in CML
7-
data type yetAnotherMethodParameter { "param1":V<int>, "param2":V<bool> }
7+
data type yetAnotherMethodParameter { "param1":D<int>, "param2":D<bool> }
88

99

1010
endpoint type CustomersAggregate
1111
exposes
1212
operation anotherMethod
1313
expecting
14-
payload V<int>
14+
payload D<int>
1515
delivering
16-
payload V<string>
16+
payload D<string>
1717
operation yetAnotherMethod
1818
expecting
1919
payload yetAnotherMethodParameter

org.contextmapper.dsl/src/org/contextmapper/dsl/generator/mdsl/MDSLModelCreator.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public class MDSLModelCreator {
6969
private static final String PROVIDER_NAME_EXTENSION = "Provider";
7070
private static final String CLIENT_NAME_EXTENSION = "Client";
7171
private static final String BASE_TYPE = "Object";
72-
private static final String MDSL_VOID_RETURN_TYPE = "V<void>";
72+
private static final String MDSL_VOID_RETURN_TYPE = "D<void>";
7373
private static final String ENDPOINT_LOCATION = "http://localhost:";
7474
private static final String PROTOCOL_STRING_IF_NOT_DEFINED = "tbd";
7575
private static final String PROTOCOL_NOT_DEFINED_COMMENT = "The protocol is generated if you specify the implementation technology in CML";
@@ -421,19 +421,19 @@ private String mapAbstractDataType(String dataTypeName) {
421421

422422
private String getMDSLPrimitiveType(String dataTypeName) {
423423
if ("boolean".equals(dataTypeName.toLowerCase())) {
424-
return "V<bool>";
424+
return "D<bool>";
425425
} else if ("String".equals(dataTypeName)) {
426-
return "V<string>";
426+
return "D<string>";
427427
} else if ("int".equals(dataTypeName) || "Integer".equals(dataTypeName)) {
428-
return "V<int>";
428+
return "D<int>";
429429
} else if ("long".equals(dataTypeName.toLowerCase())) {
430-
return "V<long>";
430+
return "D<long>";
431431
} else if ("double".equals(dataTypeName.toLowerCase())) {
432-
return "V<double>";
432+
return "D<double>";
433433
} else if ("Blob".equals(dataTypeName)) {
434-
return "V<blob>";
434+
return "D<blob>";
435435
} else if ("Date".equals(dataTypeName)) {
436-
return "V<string>";
436+
return "D<string>";
437437
}
438438
return BASE_TYPE; // default case: we have to define a data type
439439
}

0 commit comments

Comments
 (0)