Interface InputContext
public interface InputContext
InvocationDocument is abstraction for original input document for the executed Stitch Invocation.
It is used for extracting single or list of values based on pathExpressions.
Actual sub-class is
JsonInputContext.
JsonInputContext is used for Json/YAML inputs. If YAML was in original input it is transformed into
equivalent Json document.
Extraction of values and lists is done by calling methods with valid JsonPath expression
(see referral implementation of jayway.jsonPath:json-path)-
Method Summary
Modifier and TypeMethodDescriptiongetBooleanList(String pathExpression) getBooleanValue(String pathExpression) ReturnsBooleanvalue in given path.getDoubleList(String pathExpression) getDoubleValue(String pathExpression) ReturnsDoublevalue in given path.getIntegerList(String pathExpression) getIntegerValue(String pathExpression) ReturnsIntegervalue in given path.com.fasterxml.jackson.databind.JsonNodegetJsonNode(String pathExpression) ReturnsJsonNodevalue in given path.List<com.fasterxml.jackson.databind.JsonNode>getJsonNodeList(String pathExpression) ReturnsListofJsonNodefor given path.getLongList(String pathExpression) getLongValue(String pathExpression) ReturnsLongvalue in given path.getStringList(String pathExpression) ReturnsListfor given path.getStringValue(String pathExpression) ReturnsStringvalue in given path.booleanpathExistsWithValue(String pathExpression) Returns true if path exists and has assigned value to it.
-
Method Details
-
pathExistsWithValue
Returns true if path exists and has assigned value to it.- Parameters:
pathExpression- on which we run check- Returns:
- evaluated flag for given
pathExpression
-
getStringValue
ReturnsStringvalue in given path. If path doesn't exist or isn't single valuenullwill be returned.- Parameters:
pathExpression- on which we run check- Returns:
- evaluated
Stringvalue for givenpathExpression
-
getBooleanValue
ReturnsBooleanvalue in given path. If path doesn't exist or isn't single valuenullwill be returned.- Parameters:
pathExpression- on which we run check- Returns:
- evaluated @link Boolean} value for given
pathExpression
-
getIntegerValue
ReturnsIntegervalue in given path. If path doesn't exist or isn't single valuenullwill be returned.- Parameters:
pathExpression- on which we run check- Returns:
- evaluated
Integervalue for givenpathExpression
-
getLongValue
ReturnsLongvalue in given path. If path doesn't exist or isn't single valuenullwill be returned.- Parameters:
pathExpression- on which we run check- Returns:
- evaluated
Longvalue for givenpathExpression
-
getDoubleValue
ReturnsDoublevalue in given path. If path doesn't exist or isn't single valuenullwill be returned.- Parameters:
pathExpression- on which we run check- Returns:
- evaluated
Doublevalue for givenpathExpression
-
getJsonNode
ReturnsJsonNodevalue in given path. If path doesn't existnullwill be returned.- Parameters:
pathExpression- on which we run check- Returns:
- evaluated
JsonNodevalue for givenpathExpression - See Also:
-
JsonNode
-
getStringList
ReturnsListfor given path. If path doesn't existnullwill be returned.- Parameters:
pathExpression- on which we run check- Returns:
- evaluated
Listvalue for givenpathExpression
-
getBooleanList
-
getIntegerList
-
getLongList
-
getDoubleList
-
getJsonNodeList
- Parameters:
pathExpression- on which we run check- Returns:
- evaluated
ListofJsonNodevalue for givenpathExpression - See Also:
-
JsonNode
-