Details
-
Type:
Improvement
-
Status: To Do
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.0.1
-
Fix Version/s: Waiting for Triage
-
Labels:None
-
Story Points:8
-
Rank (Obsolete):46577
-
Acceptance Criteria:
Description
Often one has to perform some basic conversion / parsings in Stream definitions. It would be helpful if one could provide some helper functions to simplify SpEL expressions.
E.g. instead of:
transform --expression=T(java.lang.Long).parseLong(payload.value.toString())
it would be nice to be able to write:
transform --expression=parseLong(payload.value)
I'm thinking of support for:
- parseByte
- parseInt
- parseShort
- parseLong
- parseFloat
- parseDouble
- parseBoolean
- parseTuple
(I don't think we'd need support for parseCharacter)
This issue is about:
1) providing the centralised infrastructure for defining the SpEL expressions
2) Add support for the above listed predefined SpEL expressions
Those functions should be able to work with String based as well as JsonToStringFriendlyNode as input.
Attachments
Issue Links
- relates to
-
INT-1639 Provide hook for registering custom SpEL functions with StandardEvaluationContext used by SI
-
- Closed
-