Updating dialect processors from version 2.1.6 to 3.x

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Updating dialect processors from version 2.1.6 to 3.x

tsurdilo
Hello, I have a small dialect processing lib using 2.1.6 - here are all the processors: https://github.com/tsurdilo/thymeleaf-kie-server-dialect/tree/master/src/main/java/org/jbpm/addons/processor

They all extend AbstractMarkupSubstitutionElementProcessor and overwrite and implement the List<Node> getMarkupSubstitutes method. Now I need to update this code to use 3.x version and am not sure which processor interface should be using, IElementTagProcessor or IElementModelProcessor (or something else?)
Are both able to modify the processing tag and replace it with a different markup structure?

Thanks for any help!
Reply | Threaded
Open this post in threaded view
|

Re: Updating dialect processors from version 2.1.6 to 3.x

tsurdilo
Answering my own question: if you want tag replacement extend AbstractElementTagProcessor and then create the mode using IModelFactory (model includes the replacement info).

then use IElementTagStructureHandler.replaceWith method to do the replacement

 
Reply | Threaded
Open this post in threaded view
|

Re: Updating dialect processors from version 2.1.6 to 3.x

tsurdilo
If anyone is interested here are all the changed I had to do to update my dialect processor to version 3:

https://github.com/tsurdilo/thymeleaf-kie-server-dialect/commit/f3d4e49d6a1d4bdb17cfe47a1124f0cdaf6acfb2