@Override
    protected void doApply(ApiRequest request, IPolicyContext context, JsonpConfigBean config,
            IPolicyChain<ApiRequest> chain) {
        String callbackParamName = config.getCallbackParamName();
        String callbackFunctionName = request.getQueryParams().get(callbackParamName);
        request.getQueryParams().remove(callbackParamName);
        if (callbackFunctionName != null) {
            context.setAttribute(CALLBACK_FUNCTION_NAME, callbackFunctionName);
        }
        super.doApply(request, context, config, chain);
    }
Policy that turns an endpoint into a JSONP compatible endpoint. It removes the callback function param from the
request and uses it to wrap the response. The content type is set to <code>application/javascript</code>.

@see <a href="http://en.wikipedia.org/wiki/JSONP" target="_blank">JSONP - Wikipedia</a>

@author Alexandre Kieling {@literal <alex.kieling@gmail.com>}
plugins/jsonp-policy/src/main/java/io/apiman/plugins/jsonp_policy/JsonpPolicy.java