private void validateRequiredParameter(LinkParameter parameter, Map<String, Object> parameters, Link link)
throws OpenShiftRequestException {
if (parameters == null
|| !parameters.containsKey(parameter.getName())) {
throw new OpenShiftRequestException(
"Requesting {0}: required request parameter \"{1}\" is missing", link.getHref(),
parameter.getName());
}
Object parameterValue = parameters.get(parameter.getName());
if (parameterValue == null
|| isEmptyString(parameter, parameterValue)) {
throw new OpenShiftRequestException("Requesting {0}: required request parameter \"{1}\" is empty",
link.getHref(), parameter.getName());
}
// TODO: check valid options (still reported in a very incosistent way)
}