Class GetRequestChecker

    • Constructor Detail

      • GetRequestChecker

        public GetRequestChecker()
    • Method Detail

      • checkLimit

        public static int checkLimit​(int limit)
        Checks whether the number of documents to return is between 0 and the maximum.
        Parameters:
        limit - the maximum number of documents to return in results list
        Returns:
        the checked number of documents to return
        Throws:
        IllegalArgumentException - if the number of documents to return is out of range
      • checkStartDocId

        public static String checkStartDocId​(String startDocId)
        Checks whether the given start document Is legal.
        Parameters:
        startDocId - the start ocument Id to be checked.
        Returns:
        the checked start document Id.
        Throws:
        IllegalArgumentException - if the start document Id is illegal.
      • checkListDocumentsParams

        public static com.google.appengine.api.search.proto.SearchServicePb.ListDocumentsParams checkListDocumentsParams​(com.google.appengine.api.search.proto.SearchServicePb.ListDocumentsParams params)
        Checks the values of the SearchServicePb.ListDocumentsParams params.
        Parameters:
        params - The SearchServicePb.ListDocumentsParams to check
        Returns:
        the checked params
        Throws:
        IllegalArgumentException - if some of the values of params are invalid