Interface UserDetailsClient


  • public interface UserDetailsClient
    An interface that represents the exposed web services of the UserDetails application. Use the UserDetailsClient.Builder or Retrofit to generate an instance.
    • Field Detail

      • GET_USER_DETAILS_PATH

        static final java.lang.String GET_USER_DETAILS_PATH
        See Also:
        Constant Field Values
      • GET_USER_DETAILS_FROM_ID_LIST_PATH

        static final java.lang.String GET_USER_DETAILS_FROM_ID_LIST_PATH
        See Also:
        Constant Field Values
      • GET_USER_LIST_FULL_PATH

        static final java.lang.String GET_USER_LIST_FULL_PATH
        See Also:
        Constant Field Values
      • GET_USER_LIST_WITH_IDS_PATH

        static final java.lang.String GET_USER_LIST_WITH_IDS_PATH
        See Also:
        Constant Field Values
      • GET_USER_DETAILS_BY_ROLE_PATH

        static final java.lang.String GET_USER_DETAILS_BY_ROLE_PATH
        See Also:
        Constant Field Values
      • SEARCH_USERDETAILS_PATH

        static final java.lang.String SEARCH_USERDETAILS_PATH
        See Also:
        Constant Field Values
    • Method Detail

      • getUserDetails

        @POST("userDetails/getUserDetails")
        retrofit2.Call<UserDetails> getUserDetails​(@Query("userName")
                                                   java.lang.String username,
                                                   @Query("includeProps")
                                                   boolean includeProps)
        Return a JSON object containing id, email and display name for a given user, use includeProps=true to get additional information such as organisation
        Parameters:
        username - Can be either a numeric id or an email address id
        includeProps - True to include extended properties such as organisation, telephone, etc.
        Returns:
        A call that will return a UserDetails object.
      • getUserDetailsFromIdList

        @POST("userDetails/getUserDetailsFromIdList")
        retrofit2.Call<UserDetailsFromIdListResponse> getUserDetailsFromIdList​(@Body
                                                                               UserDetailsFromIdListRequest request)
        return the UserDetails objects for a list of user ids.
        Parameters:
        request - The request body - accepts numeric ids only.
        Returns:
        A response object with the matched UserDetails and any missing ids and or error messages.
      • getUserStats

        @GET("ws/getUserStats")
        retrofit2.Call<UserStatsResponse> getUserStats()
        return the User stats
        Returns:
        A response object with the user stats
      • getUserDetailsByRole

        @GET("userDetails/byRole")
        retrofit2.Call<java.util.List<UserDetails>> getUserDetailsByRole​(@Query("role")
                                                                         java.lang.String role,
                                                                         @Query("includeProps")
                                                                         boolean includeProps,
                                                                         @Query("id")
                                                                         java.util.List<java.lang.String> ids)
        Get the user details for all users with a given role, with optional filtering by user id / username / email
        Parameters:
        role - The role to filter for (eg ROLE_USER)
        includeProps - Whether to include extended properties or not
        ids - List of numeric ids as Strings / user names / passwords
        Returns:
        The list of users that match the restrictions
      • searchUserDetails

        @GET("userDetails/search")
        retrofit2.Call<java.util.List<UserDetails>> searchUserDetails​(@Query("q")
                                                                      java.lang.String query,
                                                                      @Query("max")
                                                                      int max)
        Search the users for all users whose email or name matches the query.
        Parameters:
        query - The query string to search for
        max - Max number of results to return
        Returns:
        The list of users that match the query
      • getUserListFull

        @Deprecated
        @POST("userDetails/getUserListFull")
        retrofit2.Call<java.util.List<UserDetails>> getUserListFull()
        Deprecated.
        Return all the UserDetails. This will be super slow probably so caching the result is advised.
        Returns:
        A call that returns all the UserDetails.
      • getUserList

        @Deprecated
        @POST("userDetails/getUserList")
        retrofit2.Call<java.util.Map<java.lang.String,​java.lang.String>> getUserList()
        Deprecated.
        Return a map of User email to User display name. Returns all known users.
        Returns:
        A map of User email to User display name
      • getUserListWithIds

        @Deprecated
        @POST("userDetails/getUserListWithIds")
        retrofit2.Call<java.util.Map<java.lang.String,​java.lang.String>> getUserListWithIds()
        Deprecated.
        Return a map of User numeric id to User display name. Returns all known users.
        Returns:
        A map of User numeric id to User display name