diff --git a/core/src/main/java/org/apache/hop/metadata/api/HopMetadataProperty.java b/core/src/main/java/org/apache/hop/metadata/api/HopMetadataProperty.java
index 4ac530a32e9..b32fee39c62 100644
--- a/core/src/main/java/org/apache/hop/metadata/api/HopMetadataProperty.java
+++ b/core/src/main/java/org/apache/hop/metadata/api/HopMetadataProperty.java
@@ -17,13 +17,12 @@
package org.apache.hop.metadata.api;
-import org.apache.hop.core.injection.DefaultInjectionTypeConverter;
-import org.apache.hop.core.injection.InjectionTypeConverter;
-
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import org.apache.hop.core.injection.DefaultInjectionTypeConverter;
+import org.apache.hop.core.injection.InjectionTypeConverter;
/** A field which is painted with this annotation is picked up by the Hop Metadata serializers */
@Retention(RetentionPolicy.RUNTIME)
@@ -118,14 +117,29 @@ Class extends InjectionTypeConverter> injectionConverter() default
*/
boolean inline() default false;
+ /**
+ * Reads old format XML where a list of values is stored inline. XML like the following needs to
+ * be turned into 3 KeyValue pairs:
+ *
+ *
{@code k1v1k2v2
+ * k3v3 }
+ *
+ *
In this scenario we would specify the tags "key" and "value" to populate the list correctly.
+ *
+ * @return
+ */
+ String[] inlineListTags() default {};
+
/**
* For metadata injection: if you want to convert an integer to a code (and vice-versa)
+ *
* @return The integer-to-string converter
*/
Class extends IIntCodeConverter> intCodeConverter() default IIntCodeConverter.None.class;
/**
* For metadata injection: if you want to convert a String (XML, JSON, ...) to an object
+ *
* @return The string-to-object converter
*/
Class extends IStringObjectConverter> injectionStringObjectConverter() default
diff --git a/core/src/main/java/org/apache/hop/metadata/serializer/xml/XmlMetadataUtil.java b/core/src/main/java/org/apache/hop/metadata/serializer/xml/XmlMetadataUtil.java
index 68cb2d65892..79396e62a94 100644
--- a/core/src/main/java/org/apache/hop/metadata/serializer/xml/XmlMetadataUtil.java
+++ b/core/src/main/java/org/apache/hop/metadata/serializer/xml/XmlMetadataUtil.java
@@ -17,6 +17,12 @@
package org.apache.hop.metadata.serializer.xml;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.ParameterizedType;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.apache.hop.core.Const;
import org.apache.hop.core.encryption.Encr;
@@ -35,13 +41,6 @@
import org.apache.hop.metadata.util.ReflectionUtil;
import org.w3c.dom.Node;
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.lang.reflect.ParameterizedType;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
public class XmlMetadataUtil {
/**
* This method looks at the fields in the class of the provided object. It then sees which fields
@@ -295,7 +294,7 @@ public static T deSerializeFromXml(
try {
// Do not create a new object if the node is null
//
- if (node==null) {
+ if (node == null) {
return null;
}
@@ -362,6 +361,7 @@ public static T deSerializeFromXml(
boolean storeWithName = property.storeWithName();
boolean password = property.password();
boolean storeWithCode = property.storeWithCode();
+ String[] inlineListTags = property.inlineListTags();
Node tagNode;
if (property.inline()) {
@@ -388,7 +388,8 @@ public static T deSerializeFromXml(
metadataProvider,
password,
storeWithCode,
- property.intCodeConverter());
+ property.intCodeConverter(),
+ inlineListTags);
try {
// Only set a value if we have something to set.
@@ -424,7 +425,8 @@ private static Object deSerializeFromXml(
IHopMetadataProvider metadataProvider,
boolean password,
boolean storeWithCode,
- Class extends IIntCodeConverter> intCodeConverterClass)
+ Class extends IIntCodeConverter> intCodeConverterClass,
+ String[] inlineListTags)
throws HopXmlException {
String elementString = XmlHandler.getNodeValue(elementNode);
@@ -536,6 +538,26 @@ private static Object deSerializeFromXml(
//
List