Class LegacyNestedElementModelTypeAdapter
java.lang.Object
com.google.gson.TypeAdapter<org.mule.runtime.api.meta.model.nested.NestableElementModel>
org.mule.runtime.extension.internal.persistence.LegacyNestedElementModelTypeAdapter
public class LegacyNestedElementModelTypeAdapter
extends com.google.gson.TypeAdapter<org.mule.runtime.api.meta.model.nested.NestableElementModel>
This type adapter maintains backwards compatibility at the serialization levels after the changes done in MULE-19605.
TL;DR, NestableElementModel now has the NestedRouteModel.getMinOccurs() and
NestedRouteModel.getMaxOccurs() concepts.
This adapter allows to still being able to read serialized models which don't contain such properties, by inferring them based
on the NestableElementModel.isRequired() property.
- Since:
- 1.4.0
-
Constructor Summary
ConstructorsConstructorDescriptionLegacyNestedElementModelTypeAdapter(com.google.gson.TypeAdapter<org.mule.runtime.api.meta.model.nested.NestableElementModel> delegate) -
Method Summary
Methods inherited from class com.google.gson.TypeAdapter
fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
-
Constructor Details
-
LegacyNestedElementModelTypeAdapter
public LegacyNestedElementModelTypeAdapter(com.google.gson.TypeAdapter<org.mule.runtime.api.meta.model.nested.NestableElementModel> delegate)
-
-
Method Details
-
write
public void write(com.google.gson.stream.JsonWriter out, org.mule.runtime.api.meta.model.nested.NestableElementModel value) throws IOException - Specified by:
writein classcom.google.gson.TypeAdapter<org.mule.runtime.api.meta.model.nested.NestableElementModel>- Throws:
IOException
-
read
public org.mule.runtime.api.meta.model.nested.NestableElementModel read(com.google.gson.stream.JsonReader in) throws IOException - Specified by:
readin classcom.google.gson.TypeAdapter<org.mule.runtime.api.meta.model.nested.NestableElementModel>- Throws:
IOException
-