LPS-45564 SF - remove not needed casts

Hey Minhchau, this looks good to me :+1: 

I have just one question and 2 requests :)

- I think we should deprecate the old methods because developers shouldn't use those anymore. Could you do the proper deprecation in the API and replace existing usage to the new method?
- We should add also the javadoc to the new methods in the API in a separated commit (you can copy most of it from the methods you are going to deprecate).

The question: Was this working in velocity already? Why do we only check for XSL and FTL in the code you sent me?

Thank you!