public class UserResource extends Object
UserEntity related methods.| Constructor and Description |
|---|
UserResource(UserDao inUserDao,
LocalUserDao inLocalUserDao,
RoleDao inRoleDao,
EmailSender inEmailSender,
I2b2Client inClient,
OAuthProviderDao inOAuthProviderDao,
LoginTypeDao inLoginTypeDao,
AuthenticationMethodDao inAuthenticationMethodDao,
ServiceProperties inProperties)
Create a UserResource object with a User DAO and a Role DAO.
|
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
addUser(org.eurekaclinical.eureka.client.comm.User user,
javax.ws.rs.core.UriInfo uriInfo)
Add a new user to the system.
|
void |
changePassword(javax.servlet.http.HttpServletRequest request,
org.eurekaclinical.eureka.client.comm.PasswordChangeRequest passwordChangeRequest)
Changes a user's password.
|
org.eurekaclinical.eureka.client.comm.User |
getMe(javax.servlet.http.HttpServletRequest req)
Get a user using the username.
|
org.eurekaclinical.eureka.client.comm.User |
getUserById(javax.servlet.http.HttpServletRequest req,
Long inId)
Get a user by the user's identification number.
|
List<org.eurekaclinical.eureka.client.comm.User> |
getUsers()
Get a list of all users in the system.
|
javax.ws.rs.core.Response |
putUser(javax.servlet.http.HttpServletRequest req,
org.eurekaclinical.eureka.client.comm.User inUser,
Long inId)
Put an updated user to the system.
|
@Inject public UserResource(UserDao inUserDao, LocalUserDao inLocalUserDao, RoleDao inRoleDao, EmailSender inEmailSender, I2b2Client inClient, OAuthProviderDao inOAuthProviderDao, LoginTypeDao inLoginTypeDao, AuthenticationMethodDao inAuthenticationMethodDao, ServiceProperties inProperties)
inUserDao - DAO used to access UserEntity related functionality.inRoleDao - DAO used to access RoleEntity related functionality.inEmailSender - Used to send emails to the user when necessary.@RolesAllowed(value="admin") public List<org.eurekaclinical.eureka.client.comm.User> getUsers()
UserEntity objects.@RolesAllowed(value={"researcher","admin"}) public org.eurekaclinical.eureka.client.comm.User getUserById(@Context javax.servlet.http.HttpServletRequest req, Long inId)
inId - The identification number for the user to fetch.@RolesAllowed(value={"researcher","admin"}) public org.eurekaclinical.eureka.client.comm.User getMe(@Context javax.servlet.http.HttpServletRequest req)
req - The HTTP request containing the user name.@RolesAllowed(value="admin") public javax.ws.rs.core.Response addUser(org.eurekaclinical.eureka.client.comm.User user, @Context javax.ws.rs.core.UriInfo uriInfo)
user - Object containing all the information about the user
to add.@RolesAllowed(value={"researcher","admin"}) public void changePassword(@Context javax.servlet.http.HttpServletRequest request, org.eurekaclinical.eureka.client.comm.PasswordChangeRequest passwordChangeRequest)
request - the incoming servlet requestpasswordChangeRequest - the request to use to make the password
changeorg.eurekaclinical.standardapis.exception.HttpStatusException - Thrown when a password cannot be properly
hashed, or the passwords are mismatched.@RolesAllowed(value={"researcher","admin"}) public javax.ws.rs.core.Response putUser(@Context javax.servlet.http.HttpServletRequest req, org.eurekaclinical.eureka.client.comm.User inUser, Long inId)
inUser - Object containing all the information about the user to
add.Copyright © 2012–2016 Emory University. All rights reserved.