Object transformers
Identity
Data parameter | Type | Description |
---|
data | java.lang.Object |
Piece of data to be passed (no transformations done).
|
Map transformers
MapAsBean
Config parameter | Type | Required | Default value | Description |
---|
beanClassName | java.lang.String | Yes | |
Class name for the object (bean) which will be instantiated.
|
setProperties | java.lang.String[] | Yes | |
Names of the properties which will be set in the bean. The value for each of these
properties (e.g. property anything ) will be retrieved from the Map
and set into the bean (e.g. setAnything(value) would be called).
Many property names may be declared separated by spaces.
|
Data parameter | Type | Description |
---|
data | java.lang.Map |
Piece of data to be transformed.
|
MultivaluedMapAsBeanMap
Config parameter | Type | Required | Default value | Description |
---|
beanClassName | java.lang.String | Yes | |
Class name for the object (bean) which will be instantiated for each index in
the multivalued map.
|
setProperties | java.lang.String[] | Yes | |
Names of the properties which will be set in the beans. The value for each of these
properties (e.g. property anything ) will be retrieved from the Map
and set into each of the corresponding beans (e.g. setAnything(value)
would be called).
Many property names may be declared separated by spaces.
|
Data parameter | Type | Description |
---|
data | java.lang.Map |
Piece of data to be transformed. This will be a Map with String keys,
containing keys such as anything1 or anything2 . This
will be transformed into a Map with two keys: "1 " and "2 ",
each of them containing as a value a bean of class beanClassName
on which the setAnything() method will have been called with the
correspondent values.
|
MultivaluedMapAsMapsMap
Config parameter | Type | Required | Default value | Description |
---|
setProperties | java.lang.String[] | Yes | |
Names of the properties which will be set in the result maps. The value for each of these
properties (e.g. property anything ) will be retrieved from the source Map
and set into the corresponding (by index) result Map
(e.g. put("anything",value) would be called).
Many property names may be declared separated by spaces.
|
Data parameter | Type | Description |
---|
data | java.lang.Map |
Piece of data to be transformed. This will be a Map with String keys,
containing keys such as anything1 or anything2 . This
will be transformed into a Map with two keys: "1 " and "2 ",
each of them containing as a value a Map
on which the put("anything",value) method will have been called with the
correspondent values.
|
String transformers
StringAsBoolean
Config parameter | Type | Required | Default value | Description |
---|
trim | java.lang.Boolean | No | Boolean.TRUE |
Trim the String before transforming it.
|
nullAsFalse | java.lang.Boolean | No | Boolean.TRUE |
Convert null values into false boolean values.
|
Data parameter | Type | Description |
---|
data | java.lang.String |
Piece of data to be transformed.
|
StringAsCalendar
Config parameter | Type | Required | Default value | Description |
---|
trim | java.lang.Boolean | No | Boolean.TRUE |
Trim the String before transforming it.
|
pattern | java.lang.String | Yes | |
Date pattern to use for matching. This pattern will be defined as specified in
java.text.SimpleDateFormat . Only the date fields present in this pattern
will be set in the resulting Calendar instance.
|
locale | java.lang.String | No | (Default locale) |
Locale to be used for date constants (month names, etc). For instance:
"es", "es_ES", "es_ES.UTF-8"...
|
Data parameter | Type | Description |
---|
data | java.lang.String |
Piece of data to be transformed.
|
StringAsDouble
Config parameter | Type | Required | Default value | Description |
---|
trim | java.lang.Boolean | No | Boolean.TRUE |
Trim the String before transforming it.
|
Data parameter | Type | Description |
---|
data | java.lang.String |
Piece of data to be transformed.
|
StringAsFloat
Config parameter | Type | Required | Default value | Description |
---|
trim | java.lang.Boolean | No | Boolean.TRUE |
Trim the String before transforming it.
|
Data parameter | Type | Description |
---|
data | java.lang.String |
Piece of data to be transformed.
|
StringAsInteger
Config parameter | Type | Required | Default value | Description |
---|
trim | java.lang.Boolean | No | Boolean.TRUE |
Trim the String before transforming it.
|
Data parameter | Type | Description |
---|
data | java.lang.String |
Piece of data to be transformed.
|
StringAsUrl
Config parameter | Type | Required | Default value | Description |
---|
trim | java.lang.Boolean | No | Boolean.TRUE |
Trim the String before transforming it.
|
Data parameter | Type | Description |
---|
data | java.lang.String |
Piece of data to be transformed (result will be a java.net.URL object).
|
StringExtractPattern
Config parameter | Type | Required | Default value | Description |
---|
trim | java.lang.Boolean | No | Boolean.TRUE |
Trim the String before transforming it.
|
pattern | java.lang.String | Yes | |
Pattern (as defined by java.util.regex.Pattern ) to be used for matching.
|
patternGroup | java.lang.String | No | 0 |
Group to be extracted from the pattern (as defined by java.util.regex.Matcher ).
|
Data parameter | Type | Description |
---|
data | java.lang.String |
Piece of data to be transformed.
|
StringTrim
Data parameter | Type | Description |
---|
data | java.lang.String |
Piece of data to be transformed (string which will be trimmed).
|
SubString
Config parameter | Type | Required | Default value | Description |
---|
trim | java.lang.Boolean | No | Boolean.TRUE |
Trim the String before transforming it.
|
Data parameter | Type | Description |
---|
data | java.lang.String |
Piece of data to be transformed.
|
Iterating transformers
ArrayIterator
This transformer iterates on an array object and applies to each of its items all the
transformations declared as nested for this iterator. As a result, it returns:
- If the
successCondition
is met, it will return an array of
java.util.Map
objects, one for each item in the target array which
transformation had been successful. Each of these Maps will be in the same format
as the one obtained by calling getResults()
on a
TransformationResult
object (this is, will contain either the transformed
objects or ResolutionNotPossibleException exceptions).
- If the
successCondition
is not met, it will throw a
ResolutionNotPossibleException
.
Config parameter | Type | Required | Default value | Description |
---|
successCondition | java.lang.String | No | AND |
Condition to apply on the results of the iteration items to consider
the array transformation as successful. Possible values:
AND : All the items must be transformed OK.
OR : At least one item must be transformed OK.
EXOR : Only one item must be transformed OK.
NEXOR : Either none or all of the items must be transformed OK.
|
Data parameter | Type | Description |
---|
data | java.lang.Object[] |
Piece of data to be validated.
|
CollectionIterator
This transformer iterates on a Collection object and applies to each of its items all the
transformations declared as nested for this iterator. As a result, it returns:
- If the
successCondition
is met, it will return a Collection of
java.util.Map
objects, one for each item in the target collection which
transformation had been successful. Each of these Maps will be in the same format
as the one obtained by calling getResults()
on a
TransformationResult
object (this is, will contain either the transformed
objects or ResolutionNotPossibleException exceptions).
- If the
successCondition
is not met, it will throw a
ResolutionNotPossibleException
.
Config parameter | Type | Required | Default value | Description |
---|
successCondition | java.lang.String | No | AND |
Condition to apply on the results of the iteration items to consider
the collection transformation as successful. Possible values:
AND : All the items must be transformed OK.
OR : At least one item must be transformed OK.
EXOR : Only one item must be transformed OK.
NEXOR : Either none or all of the items must be transformed OK.
|
Data parameter | Type | Description |
---|
data | java.util.Collection |
Piece of data to be validated.
|
MapIterator
This transformer iterates on a Map object and applies to each of its entries all the
transformations declared as nested for this iterator. As a result, it returns:
- If the
successCondition
is met, it will return a Map with the
same keys as the target Map object and
java.util.Map
objects as values, one for each item in the target Map which
transformation had been successful. Each of these value Maps will be in the same format
as the one obtained by calling getResults()
on a
TransformationResult
object (this is, will contain either the transformed
objects or ResolutionNotPossibleException exceptions).
- If the
successCondition
is not met, it will throw a
ResolutionNotPossibleException
.
Config parameter | Type | Required | Default value | Description |
---|
successCondition | java.lang.String | No | AND |
Condition to apply on the results of the iteration items to consider
the map transformation as successful. Possible values:
AND : All the items must be transformed OK.
OR : At least one item must be transformed OK.
EXOR : Only one item must be transformed OK.
NEXOR : Either none or all of the items must be transformed OK.
|
Data parameter | Type | Description |
---|
data | java.util.Map |
Piece of data to be validated.
|