private int parseParameter(String parameter,String parameterName) throws BadPaginationException {
  if (parameter.equals("")) {
    ErrorMessageFormat errorMessage=ErrorMessageFormat.PAGINATION_PARAMETER_MISSING;
    LOG.debug(errorMessage.logFormat(parameterName));
    throw new BadPaginationException(errorMessage.format(parameterName));
  }
  try {
    return Integer.parseInt(parameter);
  }
 catch (  NumberFormatException ignored) {
    ErrorMessageFormat errorMessage=ErrorMessageFormat.PAGINATION_PARAMETER_INVALID;
    LOG.debug(errorMessage.logFormat(parameterName,parameter));
    throw new BadPaginationException(errorMessage.format(parameterName,parameter));
  }
}

private int parseParameter ( String parameter , String parameterName ) throws BadPaginationException { if ( parameter . equals ( "" ) ) { ErrorMessageFormat errorMessage = ErrorMessageFormat . PAGINATION_PARAMETER_MISSING ; LOG . debug ( errorMessage . logFormat ( parameterName ) ) ; throw new BadPaginationException ( errorMessage . format ( parameterName ) ) ; } try { return Integer . parseInt ( parameter ) ; } catch ( NumberFormatException ignored ) { ErrorMessageFormat errorMessage = ErrorMessageFormat . PAGINATION_PARAMETER_INVALID ; LOG . debug ( errorMessage . logFormat ( parameterName , parameter ) ) ; throw new BadPaginationException ( errorMessage . format ( parameterName , parameter ) ) ; } }
parses the string representation of an integer query parameter .
