Package au.org.ala.userdetails
Interface UserDetailsClient
-
public interface UserDetailsClientAn interface that represents the exposed web services of the UserDetails application. Use the UserDetailsClient.Builder or Retrofit to generate an instance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classUserDetailsClient.BuilderA Builder for generating UserDetailsClient instances.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringGET_USER_DETAILS_BY_ROLE_PATHstatic java.lang.StringGET_USER_DETAILS_FROM_ID_LIST_PATHstatic java.lang.StringGET_USER_DETAILS_PATHstatic java.lang.StringGET_USER_LIST_FULL_PATHstatic java.lang.StringGET_USER_LIST_PATHstatic java.lang.StringGET_USER_LIST_WITH_IDS_PATHstatic java.lang.StringGET_USER_STATS_PATHstatic java.lang.StringSEARCH_USERDETAILS_PATH
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description retrofit2.Call<UserDetails>getUserDetails(java.lang.String username, 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 organisationretrofit2.Call<java.util.List<UserDetails>>getUserDetailsByRole(java.lang.String role, boolean includeProps, 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 / emailretrofit2.Call<UserDetailsFromIdListResponse>getUserDetailsFromIdList(UserDetailsFromIdListRequest request)return the UserDetails objects for a list of user ids.retrofit2.Call<java.util.Map<java.lang.String,java.lang.String>>getUserList()Deprecated.retrofit2.Call<java.util.List<UserDetails>>getUserListFull()Deprecated.retrofit2.Call<java.util.Map<java.lang.String,java.lang.String>>getUserListWithIds()Deprecated.retrofit2.Call<UserStatsResponse>getUserStats()return the User statsretrofit2.Call<java.util.List<UserDetails>>searchUserDetails(java.lang.String query, int max)Search the users for all users whose email or name matches the query.
-
-
-
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_PATH
static final java.lang.String GET_USER_LIST_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
-
GET_USER_STATS_PATH
static final java.lang.String GET_USER_STATS_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 idincludeProps- 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 notids- 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 formax- 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
-
-