Class ModifierCompositeSpec
- java.lang.Object
-
- com.bazaarvoice.jolt.modifier.spec.ModifierSpec
-
- com.bazaarvoice.jolt.modifier.spec.ModifierCompositeSpec
-
- All Implemented Interfaces:
BaseSpec
,OrderedCompositeSpec
public class ModifierCompositeSpec extends ModifierSpec implements OrderedCompositeSpec
Composite spec is non-leaf level spec that contains one or many child specs and processes them based on a pre-determined execution strategy
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<ModifierSpec>
computedChildren
private static ComputedKeysComparator
computedKeysComparator
private ExecutionStrategy
executionStrategy
private java.util.Map<java.lang.String,ModifierSpec>
literalChildren
private static java.util.HashMap<java.lang.Class,java.lang.Integer>
orderMap
private DataType
specDataType
-
Fields inherited from class com.bazaarvoice.jolt.modifier.spec.ModifierSpec
checkValue, opMode, pathElement, TRAVERSAL_BUILDER
-
-
Constructor Summary
Constructors Constructor Description ModifierCompositeSpec(java.lang.String key, java.util.Map<java.lang.String,java.lang.Object> spec, OpMode opMode, TemplatrSpecBuilder specBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyElement(java.lang.String inputKey, Optional<java.lang.Object> inputOptional, MatchedElement thisLevel, WalkedPath walkedPath, java.util.Map<java.lang.String,java.lang.Object> context)
Templatr specific override that is used in BaseSpec#apply(...) The name is changed for easy identification during debuggingExecutionStrategy
determineExecutionStrategy()
java.util.List<? extends BaseSpec>
getComputedChildren()
java.util.Map<java.lang.String,? extends BaseSpec>
getLiteralChildren()
-
Methods inherited from class com.bazaarvoice.jolt.modifier.spec.ModifierSpec
apply, getPathElement, setData
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.bazaarvoice.jolt.common.spec.BaseSpec
apply, getPathElement
-
-
-
-
Field Detail
-
orderMap
private static final java.util.HashMap<java.lang.Class,java.lang.Integer> orderMap
-
computedKeysComparator
private static final ComputedKeysComparator computedKeysComparator
-
literalChildren
private final java.util.Map<java.lang.String,ModifierSpec> literalChildren
-
computedChildren
private final java.util.List<ModifierSpec> computedChildren
-
executionStrategy
private final ExecutionStrategy executionStrategy
-
specDataType
private final DataType specDataType
-
-
Constructor Detail
-
ModifierCompositeSpec
public ModifierCompositeSpec(java.lang.String key, java.util.Map<java.lang.String,java.lang.Object> spec, OpMode opMode, TemplatrSpecBuilder specBuilder)
-
-
Method Detail
-
applyElement
public void applyElement(java.lang.String inputKey, Optional<java.lang.Object> inputOptional, MatchedElement thisLevel, WalkedPath walkedPath, java.util.Map<java.lang.String,java.lang.Object> context)
Description copied from class:ModifierSpec
Templatr specific override that is used in BaseSpec#apply(...) The name is changed for easy identification during debugging- Specified by:
applyElement
in classModifierSpec
-
getLiteralChildren
public java.util.Map<java.lang.String,? extends BaseSpec> getLiteralChildren()
- Specified by:
getLiteralChildren
in interfaceOrderedCompositeSpec
-
getComputedChildren
public java.util.List<? extends BaseSpec> getComputedChildren()
- Specified by:
getComputedChildren
in interfaceOrderedCompositeSpec
-
determineExecutionStrategy
public ExecutionStrategy determineExecutionStrategy()
- Specified by:
determineExecutionStrategy
in interfaceOrderedCompositeSpec
-
-