public class MapConverter extends Object
DslProperty
into their client / server representation and
returns the resultModifier and Type | Field and Description |
---|---|
static Function<String,Object> |
IDENTITY
Function used to return its input argument.
|
static groovy.lang.Closure<Object> |
JSON_PARSING_CLOSURE
Generic
Closure used to deserialize a json file. |
static Function<String,Object> |
JSON_PARSING_FUNCTION
Generic
Function used to deserialize a json file. |
Modifier and Type | Method and Description |
---|---|
static Object |
getClientOrServerSideValues(Object json,
boolean clientSide) |
static Object |
getClientOrServerSideValues(Object json,
boolean clientSide,
Function<String,Object> parsingFunction)
If
clientSide is true returns the client side value for the
provided object. |
static Object |
getStubSideValues(Object json) |
static Object |
getStubSideValues(Object json,
Function<String,Object> parsingClosure) |
static Object |
getStubSideValuesForNonBody(Object object) |
static Object |
getTestSideValues(Object json) |
static Object |
getTestSideValues(Object json,
Function<String,Object> parsingClosure) |
static Object |
getTestSideValuesForNonBody(Object object) |
static Object |
getTestSideValuesForText(Object json) |
static Object |
transformToClientValues(Object value) |
protected static Object |
transformValue(Function<Object,?> function,
Object value,
Function<String,Object> parsingFunction)
Transforms a value with the given function.
|
static Object |
transformValues(Object value,
Function<Object,?> function) |
static Object |
transformValues(Object value,
Function<Object,?> function,
Function<String,Object> parsingFunction)
Iterates over the structure of the object and executes the function on each element
of that structure.
|
public static final Function<String,Object> JSON_PARSING_FUNCTION
Function
used to deserialize a json file.public static final groovy.lang.Closure<Object> JSON_PARSING_CLOSURE
Closure
used to deserialize a json file.public static final Function<String,Object> IDENTITY
Function.identity()
cannot be
used as the return type is Function<T,T>, whilst this function return type is
Function<T,R>public static Object transformToClientValues(Object value)
DslProperty
public static Object transformValues(Object value, Function<Object,?> function, Function<String,Object> parsingFunction)
protected static Object transformValue(Function<Object,?> function, Object value, Function<String,Object> parsingFunction)
public static Object getClientOrServerSideValues(Object json, boolean clientSide)
public static Object getClientOrServerSideValues(Object json, boolean clientSide, Function<String,Object> parsingFunction)
clientSide
is true
returns the client side value for the
provided object.public static Object getStubSideValues(Object json, Function<String,Object> parsingClosure)
public static Object getTestSideValues(Object json, Function<String,Object> parsingClosure)
Copyright © 2016–2021 Spring. All rights reserved.