Project: springxd
Issue XD-2371: Allow registering default SpEL functions to simplify expressions
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: {code} transform --expression=T(java.lang.Long).parseLong(payload.value.toString()) {code} it would be nice to be able to write: {code} transform --expression=parseLong(payload.value) {code} 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.
Story points: 8