phaseContext.setEntityPlugin(plugin);
phaseContext.setRequestMethod(getHttpMethod(request.getRequestMethod()));
String requestMethod = getEffectiveMethod(request);
HttpMethod httpMethod = getHttpMethod(requestMethod);
if(!plugin.isMethodAllowed(httpMethod))
throw new NotAllowedException(String.format("%s is not allowed.",httpMethod));
if(serviceStatus.getReadOnly() && httpMethod.isWriteOperation())
throw new NotAllowedException("Service is in read only mode.");
phaseContext.setEffectiveMethod(httpMethod);
// special case where version is in the URI