Class TransformAndSetSection
java.lang.Object
org.elasticsearch.test.rest.yaml.section.TransformAndSetSection
- All Implemented Interfaces:
ExecutableSection
public class TransformAndSetSection extends java.lang.Object implements ExecutableSection
Represents a transform_and_set section:
In the following example,
- transform_and_set: { login_creds: "#base64EncodeCredentials(user,password)" }
user and password are from the response which are joined by ':' and Base64 encoded and then stashed as 'login_creds'
-
Field Summary
Fields inherited from interface org.elasticsearch.test.rest.yaml.section.ExecutableSection
DEFAULT_EXECUTABLE_CONTEXTS, XCONTENT_REGISTRY
-
Constructor Summary
Constructors Constructor Description TransformAndSetSection(org.elasticsearch.common.xcontent.XContentLocation location)
-
Method Summary
Modifier and Type Method Description void
addSet(java.lang.String stashedField, java.lang.String transformThis)
void
execute(ClientYamlTestExecutionContext executionContext)
Executes the section passing in the execution contextorg.elasticsearch.common.xcontent.XContentLocation
getLocation()
Get the location in the test that this was defined.java.util.Map<java.lang.String,java.lang.String>
getStash()
static TransformAndSetSection
parse(org.elasticsearch.common.xcontent.XContentParser parser)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
TransformAndSetSection
public TransformAndSetSection(org.elasticsearch.common.xcontent.XContentLocation location)
-
-
Method Details
-
parse
public static TransformAndSetSection parse(org.elasticsearch.common.xcontent.XContentParser parser) throws java.io.IOException- Throws:
java.io.IOException
-
addSet
public void addSet(java.lang.String stashedField, java.lang.String transformThis) -
getStash
public java.util.Map<java.lang.String,java.lang.String> getStash() -
getLocation
public org.elasticsearch.common.xcontent.XContentLocation getLocation()Description copied from interface:ExecutableSection
Get the location in the test that this was defined.- Specified by:
getLocation
in interfaceExecutableSection
-
execute
Description copied from interface:ExecutableSection
Executes the section passing in the execution context- Specified by:
execute
in interfaceExecutableSection
- Throws:
java.io.IOException
-