Uploaded image for project: 'Nuxeo Java Client'
  1. Nuxeo Java Client
  2. JAVACLIENT-132

Cannot do paging when listing users (limited to 50)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.6
    • Component/s: API

      Description

      Whereas the REST API allows to do the following:
      http://localhost:8080/nuxeo/site/api/v1/user/search?q=*&pageSize=2000&currentPageIndex=0

      This cannot be done using the Java Client.

      Looking at UserManagerAPI the interface only supports a query parameter:

          @GET("user/search")
          Call<Users> searchUser(@Query("q") String query);
      

      Looking at the server side at PaginableObject:

          @Override
          protected void initialize(Object... args) {
              super.initialize(args);
      
              final HttpServletRequest request = ctx.getRequest();
              currentPageIndex = extractLongParam(request, "currentPageIndex", 0L);
              pageSize = extractLongParam(request, "pageSize", 50L);
              maxResults = request.getParameter("maxResults");
          }
      

      The page size is set to 50 when not present in the request parameters.

      Ideally, it should be possible to pass the currentPageIndex, pageSize and maxResults parameters

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h