Class AdminUserService

java.lang.Object
edu.suffolk.litlab.efspserver.services.AdminUserService

@Produces("application/json") public class AdminUserService extends Object
Covers all of the FirmUserManagement and UserService operations. * User Service * AuthenticateUser * ChangePassword * ResetPassword * GetUser (User Service) * UpdateUser (User Service) * GetNotificationPreferences * UpdateNotificationPreferences * SelfResendActivationEmail * Firm User Management * RegisterUser: PUT on /users * AddUserRole: POST on /users/{id}/role * GetUser: GET on /users/{id} * GetUserList: GET on /users * RemoveUser: DELETE on /users/{id} * RemoveUserRole: DELETE on /users/{id}/role * ResendActivationEmail * ResetUserPassword * UpdateUser: POST on /users/{id} * GetNotificationPreferencesList
Author:
brycew
  • Constructor Details

  • Method Details

    • getAll

      @GET @Path("/") public jakarta.ws.rs.core.Response getAll()
    • getSelfUser

      @GET @Path("/user") public jakarta.ws.rs.core.Response getSelfUser(@Context jakarta.ws.rs.core.HttpHeaders httpHeaders)
    • getNotificationPrefs

      @GET @Path("/user/notification-preferences") public jakarta.ws.rs.core.Response getNotificationPrefs(@Context jakarta.ws.rs.core.HttpHeaders httpHeaders)
    • updateNotificationPrefs

      @PATCH @Path("/user/notification-preferences") public jakarta.ws.rs.core.Response updateNotificationPrefs(@Context jakarta.ws.rs.core.HttpHeaders httpHeaders, List<NotificationType> notifications)
    • selfResendActivationEmail

      @POST @Path("/user/resend-activation-email") public jakarta.ws.rs.core.Response selfResendActivationEmail(@Context jakarta.ws.rs.core.HttpHeaders httpHeaders, String emailToSendTo)
    • resendActivationEmail

      @POST @Path("/users/{id}/resend-activation-email") public jakarta.ws.rs.core.Response resendActivationEmail(@Context jakarta.ws.rs.core.HttpHeaders httpHeaders, @PathParam("id") String id)
    • resetPassword

      @POST @Path("/users/{id}/password") public jakarta.ws.rs.core.Response resetPassword(@Context jakarta.ws.rs.core.HttpHeaders httpHeaders, @PathParam("id") String id, AdminUserService.ResetPasswordParams params)
    • setPassword

      @POST @Path("/user/password") public jakarta.ws.rs.core.Response setPassword(@Context jakarta.ws.rs.core.HttpHeaders httpHeaders, AdminUserService.SetPasswordParams params)
    • selfResetPassword

      @POST @Path("/user/password/reset") public jakarta.ws.rs.core.Response selfResetPassword(@Context jakarta.ws.rs.core.HttpHeaders httpHeaders, String emailToSend)
    • getUser

      @GET @Path("/users/{id}") public jakarta.ws.rs.core.Response getUser(@Context jakarta.ws.rs.core.HttpHeaders httpHeaders, @PathParam("id") String id)
      For GetUser (Firm Service).
      Parameters:
      id - The id of the user, embedded in the URL
      Returns:
    • getUserList

      @GET @Path("/users") public jakarta.ws.rs.core.Response getUserList(@Context jakarta.ws.rs.core.HttpHeaders httpHeaders, @QueryParam("page_index") @DefaultValue("0") int pageIndex, @QueryParam("page_size") @DefaultValue("20") int pageSize)
    • updateUser

      @PATCH @Path("/user") public jakarta.ws.rs.core.Response updateUser(@Context jakarta.ws.rs.core.HttpHeaders httpHeaders, UserType updatedUser)
    • updateUserById

      @PATCH @Path("/users/{id}") public jakarta.ws.rs.core.Response updateUserById(@Context jakarta.ws.rs.core.HttpHeaders httpHeaders, @PathParam("id") String id, UserType updatedUser)
      For UpdateUser (AdminUserService).
      Parameters:
      id - The id of the user, embedded in the URL
      updatedUser - , null fields are ignored
      Returns:
    • getRoles

      @GET @Path("/users/{id}/roles") public jakarta.ws.rs.core.Response getRoles(@Context jakarta.ws.rs.core.HttpHeaders httpHeaders, @PathParam("id") String id)
      Duplicate of GetUser, but just for the roles of that user. More REST-like.
      Parameters:
      id - The id of the user, embedded in the URL
      Returns:
    • addRoles

      @POST @Path("/users/{id}/roles") public jakarta.ws.rs.core.Response addRoles(@Context jakarta.ws.rs.core.HttpHeaders httpHeaders, @PathParam("id") String id, List<RoleLocationType> toAdd)
      For AddUserRole.
      Parameters:
      id -
      toAdd -
      Returns:
    • removeRoles

      @DELETE @Path("/users/{id}/roles") public jakarta.ws.rs.core.Response removeRoles(@Context jakarta.ws.rs.core.HttpHeaders httpHeaders, @PathParam("id") String id, List<RoleLocationType> toRm)
      For RemoveUserRole.
      Parameters:
      id -
      toRm -
      Returns:
    • registerUser

      @POST @Path("/users") public jakarta.ws.rs.core.Response registerUser(@Context jakarta.ws.rs.core.HttpHeaders httpHeaders, RegistrationRequestType req)
      For RegisterUser.
      Parameters:
      req -
      Returns:
    • removeUser

      @DELETE @Path("/users/{id}") public jakarta.ws.rs.core.Response removeUser(@Context jakarta.ws.rs.core.HttpHeaders httpHeaders, @PathParam("id") String id)
      For RemoveUser.
      Parameters:
      id - The id of the user to remove, embedded in the URL
      Returns:
    • getNotificationPreferenceList

      @GET @Path("/notification-options") public jakarta.ws.rs.core.Response getNotificationPreferenceList(@Context jakarta.ws.rs.core.HttpHeaders httpHeaders)