Example #1
0
 protected ValidationErrors validateMandatory() {
   ValidationErrors errors = new ValidationErrors();
   for (RequestParam p : getMandatoryParams()) {
     if (p.isEmpty()) {
       errors.append(p.getName(), "Please specify a value, " + p.getName() + " is required");
     }
   }
   return errors;
 }
Example #2
0
 protected void addParam(RequestParam param, boolean isMandatory) {
   paramMap.put(param.getName(), param);
   if (isMandatory) {
     mandatoryParamSet.add(param);
   }
 }