'Checks that a parameters is an integer within the specified range.'

@staticmethod
def CheckValidIntParameter(parameter, min_value, max_value, name):

    if (parameter is not None):
        if (not isinstance(parameter, (int, long))):
            raise TypeError(('%s    must    be    an    integer.' % name))
        if ((parameter > max_value) or (parameter < min_value)):
            raise BadRequestError(('%s    must    be    between    %s    and    %s.' % name), str(min_value), str(max_value))
