changeset 1158:539e52cb5d8c

FieldValueExtractorTransformerNodeDefCreator - $gen operator definition
author Devel 2
date Mon, 15 Jun 2020 12:47:22 +0200
parents cbc27572188d
children 2f509607b05d
files stress-tester/src/main/java/com/passus/st/config/FieldValueExtractorTransformerNodeDefCreator.java
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/config/FieldValueExtractorTransformerNodeDefCreator.java	Mon Jun 15 11:53:41 2020 +0200
+++ b/stress-tester/src/main/java/com/passus/st/config/FieldValueExtractorTransformerNodeDefCreator.java	Mon Jun 15 12:47:22 2020 +0200
@@ -1,20 +1,26 @@
 package com.passus.st.config;
 
+import com.passus.config.schema.ConfigurationSchemaBuilder;
 import com.passus.config.schema.NodeDefinition;
 import com.passus.config.schema.NodeDefinitionCreator;
 import com.passus.lookup.filter.LookupValueExtractorDefinitionCreator;
+import com.passus.st.generator.GeneratorFactory;
 
 import static com.passus.config.schema.ConfigurationSchemaBuilder.*;
+import static com.passus.st.config.CommonNodeDefs.STRING_DEF;
 
 public class FieldValueExtractorTransformerNodeDefCreator implements NodeDefinitionCreator {
 
     public static NodeDefinition createNodeDef() {
         NodeDefinition lookupNodeDef = LookupValueExtractorDefinitionCreator.createNodeDef();
+        NodeDefinition generatorNodeDef = ConfigurationSchemaBuilder.dynaKeyValueVaryDef("type", GeneratorFactory.getInstance());
+        
         return mixedDef(
-                valueDef(),
+                STRING_DEF,
                 mapDef(
-                        tupleDef("$expr", valueDef()).setRequired(false),
-                        tupleDef("$lookup", lookupNodeDef).setRequired(false)
+                        tupleDef("$expr", STRING_DEF).setRequired(false),
+                        tupleDef("$lookup", lookupNodeDef).setRequired(false),
+                        tupleDef("$gen", generatorNodeDef).setRequired(false)
                 )
         );
     }