Exemplo n.º 1
0
 @Override
 protected void validateRequiredParams() {
   if (getType() == null) {
     throw new BadRequestException("Required parameter '" + TYPE_PARAMETER + "' is missing");
   }
   super.validateRequiredParams();
 }
 @Override
 protected void validateRequiredParams() {
   super.validateRequiredParams();
   List<String> errors = new ArrayList<String>();
   if (getLists().isEmpty()) {
     errors.add(
         "Both '"
             + LISTS_PARAMETER
             + "' and '"
             + SUBTRACT_PARAM
             + "' are missing, at least one is required");
   }
   if (!getSubtractLists().isEmpty() && !super.getLists().isEmpty()) {
     errors.add(
         "Values have been supplied for both '"
             + LISTS_PARAMETER
             + "' and '"
             + SUBTRACT_PARAM
             + "'. At most"
             + " one is permitted");
   }
   if (getReferenceLists().isEmpty()) {
     errors.add("Required parameter '" + REFERENCE_PARAMETER + "' is missing");
   }
   if (!errors.isEmpty()) {
     String message = StringUtils.join(errors, ", ");
     throw new BadRequestException(message + ". PARAMS:" + request.getQueryString());
   }
 }
Exemplo n.º 3
0
 @Override
 protected String getNewListType(final ListInput input) {
   return input.getType();
 }