package uk.ac.ebi.quickgo.rest.controller;

import uk.ac.ebi.quickgo.rest.ParameterException;

import java.util.List;

/**
 * Contains common validation logic used by REST controllers.
 *
 * Created 18/04/16
 * @author Edd
 */
public interface ControllerValidationHelper {
    /**
     * Checks the validity of a list of IDs in CSV format.
     * @param ids a list of IDs in CSV format
     * @throws ParameterException is thrown if an ID is not valid, or if
     * number of IDs listed is greater than the maximum permissible number of results.
     */
    List<String> validateCSVIds(String ids);

    /**
     * Checks if the user has set {@code requestedPages} to a valid value
     *
     * @param requestedPage the page the client would like to view
     */
    void validatePageRequest(int requestedPage);

    /**
     * Checks whether the requested number of results is valid.
     * @param requestedResultsSize the number of results being requested
     * @throws ParameterException if the number is greater than the maximum permissible number of results.
     */
    void validateRequestedResults(int requestedResultsSize);

    List<String> csvToList(String csv);
}

@@ -749,16 +749,100 @@
 to view%0A
+     * @throws ParameterException is thrown if the %7B@code requestedPage%7D is invalid%0A
      */%0A

Add @throws to Javadoc.