private WebErrors validateDelete(String[] ids, HttpServletRequest request) { WebErrors errors = WebErrors.create(request); errors.ifEmpty(ids, "ids"); for (String id : ids) { vldExist(id, errors); } return errors; }
private WebErrors validateUpdateTagNames( Long[] wids, String[] tagNames, HttpServletRequest request) { WebErrors errors = WebErrors.create(request); errors.ifEmpty(wids, "wids"); errors.ifEmpty(tagNames, "tagNames"); if (errors.hasErrors()) { return errors; } if (wids.length != tagNames.length) { errors.addErrorString("wids length must equals tagNames length"); return errors; } for (int i = 0, len = wids.length; i < len; i++) { vldExist(wids[i], errors); if (errors.hasErrors()) { return errors; } } return errors; }