/** * Checks the request attributes for presence, format, etc. If the check * fails, then a response status CLIENT_ERROR_BAD_REQUEST is returned with * the proper status description. * * @param attribute * Name of the attribute to look for. * @param required * Indicates if the attribute presence is required. * @param format * Format of the attribute value, using Regex pattern syntax. */ public void validate(String attribute, boolean required, String format) { getValidations().add(new ValidateInfo(attribute, required, format)); }
for (final ValidateInfo validate : getValidations()) { if (validate.required && !request.getAttributes().containsKey(