I\'ve coded a method something like this. But I guess this should undergo refactoring. Can any one suggest the best approach to avoid using this multiple if statements?
You can always use a Groovy class here as it allows for switch-case on Strings :)