Skip to content

Commit b6fc36c

Browse files
authored
Merge pull request #942 from sachithKay/jsonproperty-8.0.0
Add JSON data type to property mediator.
2 parents 8a9c045 + 11b708d commit b6fc36c

File tree

5 files changed

+29
-1
lines changed

5 files changed

+29
-1
lines changed

components/esb-tools/plugins/org.wso2.integrationstudio.gmf.esb.persistence/src/org/wso2/integrationstudio/gmf/esb/internal/persistence/PropertyMediatorTransformer.java

+6
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ public static org.apache.synapse.mediators.builtin.PropertyMediator createProper
160160
case STRING:
161161
propMediator.setValue(visualProp.getValue(), XMLConfigConstants.DATA_TYPES.STRING.toString());
162162
break;
163+
case JSON:
164+
propMediator.setValue(visualProp.getValue(), XMLConfigConstants.DATA_TYPES.JSON.toString());
165+
break;
163166
}
164167
} else {
165168
if (visualProp.getValueExpression() != null) {
@@ -210,6 +213,9 @@ public static org.apache.synapse.mediators.builtin.PropertyMediator createProper
210213
case STRING:
211214
propMediator.setExpression(xpath, XMLConfigConstants.DATA_TYPES.STRING.toString());
212215
break;
216+
case JSON:
217+
propMediator.setExpression(xpath, XMLConfigConstants.DATA_TYPES.JSON.toString());
218+
break;
213219
}
214220
}
215221
}

components/esb-tools/plugins/org.wso2.integrationstudio.gmf.esb/model/esb.ecore

+1
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,7 @@
713713
<eLiterals name="LONG" value="5"/>
714714
<eLiterals name="SHORT" value="6"/>
715715
<eLiterals name="OM" value="7"/>
716+
<eLiterals name="JSON" value="8"/>
716717
</eClassifiers>
717718
<eClassifiers xsi:type="ecore:EEnum" name="PropertyAction">
718719
<eLiterals name="SET" literal="set"/>

components/esb-tools/plugins/org.wso2.integrationstudio.gmf.esb/model/esb.genmodel

+1
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@
160160
<genEnumLiterals ecoreEnumLiteral="esb.ecore#//PropertyDataType/LONG"/>
161161
<genEnumLiterals ecoreEnumLiteral="esb.ecore#//PropertyDataType/SHORT"/>
162162
<genEnumLiterals ecoreEnumLiteral="esb.ecore#//PropertyDataType/OM"/>
163+
<genEnumLiterals ecoreEnumLiteral="esb.ecore#//PropertyDataType/JSON"/>
163164
</genEnums>
164165
<genEnums typeSafeEnumCompatible="false" ecoreEnum="esb.ecore#//PropertyAction">
165166
<genEnumLiterals ecoreEnumLiteral="esb.ecore#//PropertyAction/SET"/>

components/esb-tools/plugins/org.wso2.integrationstudio.gmf.esb/src/org/wso2/integrationstudio/gmf/esb/PropertyDataType.java

+20-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,15 @@ public enum PropertyDataType implements Enumerator {
100100
* @generated
101101
* @ordered
102102
*/
103-
OM(7, "OM", "OM");
103+
OM(7, "OM", "OM"), /**
104+
* The '<em><b>JSON</b></em>' literal object.
105+
* <!-- begin-user-doc -->
106+
* <!-- end-user-doc -->
107+
* @see #JSON_VALUE
108+
* @generated
109+
* @ordered
110+
*/
111+
JSON(8, "JSON", "JSON");
104112

105113
/**
106114
* The '<em><b>STRING</b></em>' literal value.
@@ -222,6 +230,17 @@ public enum PropertyDataType implements Enumerator {
222230
*/
223231
public static final int OM_VALUE = 7;
224232

233+
/**
234+
* The '<em><b>JSON</b></em>' literal value.
235+
* <!-- begin-user-doc -->
236+
* <!-- end-user-doc -->
237+
* @see #JSON
238+
* @model
239+
* @generated
240+
* @ordered
241+
*/
242+
public static final int JSON_VALUE = 8;
243+
225244
/**
226245
* An array of all the '<em><b>Property Data Type</b></em>' enumerators.
227246
* <!-- begin-user-doc -->

components/esb-tools/plugins/org.wso2.integrationstudio.gmf.esb/src/org/wso2/integrationstudio/gmf/esb/impl/EsbPackageImpl.java

+1
Original file line numberDiff line numberDiff line change
@@ -25165,6 +25165,7 @@ public void initializePackageContents() {
2516525165
addEEnumLiteral(propertyDataTypeEEnum, PropertyDataType.LONG);
2516625166
addEEnumLiteral(propertyDataTypeEEnum, PropertyDataType.SHORT);
2516725167
addEEnumLiteral(propertyDataTypeEEnum, PropertyDataType.OM);
25168+
addEEnumLiteral(propertyDataTypeEEnum, PropertyDataType.JSON);
2516825169

2516925170
initEEnum(propertyActionEEnum, PropertyAction.class, "PropertyAction");
2517025171
addEEnumLiteral(propertyActionEEnum, PropertyAction.SET);

0 commit comments

Comments
 (0)