Only need this for 2.2.x and above. Hope you can include in your rework efforts. Here is the code that I added to a base macro that is used for a number of macros that needs to have access to the original parameters (before having their case changed). Basically, a subclass of ConfluenceMacro just needs the option to use either the execute(MacroInfo info) or the execute(MacroInfo info, Map params) call.
public String execute(Map params, String body, RenderContext renderCtx) throws MacroException
{
if (!(renderCtx instanceof PageContext))
throw new MacroException("This macro can only be used in Confluence.");
MacroInfo ctx = createMacroInfo(params, body, (PageContext)renderCtx);
return execute(ctx, params);
}
public String execute(MacroInfo info, Map params) throws MacroException
{
return execute(info);
}