I think I prefer a method that takes a map and serializes it to query string as in some cases you need to add or modify one of the parameter values. I would add this method to a Velocity tool. There's no velocity tool for URLs but we could add it to the String tool. This would allow us to write:

    $stringtool.toQueryString($parameterMap)

For this we need to extend Commons Lang3 StringUtils. See the [list of Velocity tools](http://extensions.xwiki.org/xwiki/bin/view/Extension/Velocity+Module#HVelocityTools).