Interface UserService
-
- All Known Implementing Classes:
DefaultUserService
@Path("/users") public interface UserService
Service interface for user management
-
-
Method Summary
-
-
-
Method Detail
-
getUser
@Path("{userId}") @GET @Produces("application/json") UserInfo getUser(@PathParam("userId") String userId) throws RedbackServiceException
- Throws:
RedbackServiceException
-
getUsers
@Path("") @GET @Produces("application/json") org.apache.archiva.components.rest.model.PagedResult<UserInfo> getUsers(@QueryParam("q") @DefaultValue("") String searchTerm, @QueryParam("offset") @DefaultValue("0") Integer offset, @QueryParam("limit") @DefaultValue("100") Integer limit, @QueryParam("orderBy") @DefaultValue("id") List<String> orderBy, @QueryParam("order") @DefaultValue("asc") String order) throws RedbackServiceException
- Throws:
RedbackServiceException
-
createUser
@Path("") @POST @Produces("application/json") @Consumes("application/json") UserInfo createUser(User user) throws RedbackServiceException
- Throws:
RedbackServiceException
-
deleteUser
@Path("{userId}") @DELETE @Produces("application/json") void deleteUser(@PathParam("userId") String userId) throws RedbackServiceException
- Throws:
RedbackServiceException
-
updateUser
@Path("{userId}") @PUT @Produces("application/json") UserInfo updateUser(@PathParam("userId") String userId, User user) throws RedbackServiceException
- Throws:
RedbackServiceException
-
createAdminUser
@Path("admin") @POST @Produces("application/json") @Consumes("application/json") UserInfo createAdminUser(User user) throws RedbackServiceException
will create admin user only if not exists !! if exists will return false- Throws:
RedbackServiceException
-
getAdminStatus
@Path("admin/status") @GET @Produces("application/json") AvailabilityStatus getAdminStatus() throws RedbackServiceException
- Throws:
RedbackServiceException
-
lockUser
@Path("{userId}/lock/set") @POST @Produces("application/json") void lockUser(@PathParam("userId") String userId) throws RedbackServiceException
- Throws:
RedbackServiceException
-
unlockUser
@Path("{userId}/lock/clear") @POST @Produces("application/json") void unlockUser(@PathParam("userId") String userId) throws RedbackServiceException
- Throws:
RedbackServiceException
-
setRequirePasswordChangeFlag
@Path("{userId}/password/require/set") @POST @Produces("application/json") void setRequirePasswordChangeFlag(@PathParam("userId") String userId) throws RedbackServiceException
- Throws:
RedbackServiceException
-
clearRequirePasswordChangeFlag
@Path("{userId}/password/require/clear") @POST @Produces("application/json") void clearRequirePasswordChangeFlag(@PathParam("userId") String userId) throws RedbackServiceException
- Throws:
RedbackServiceException
-
updateMe
@Path("me") @PUT @Produces("application/json") UserInfo updateMe(SelfUserData user) throws RedbackServiceException
Update only the current logged in user and this fields: fullname, email, password. The service verifies the current logged user with the one passed in the method- Returns:
- the user info object
- Throws:
RedbackServiceException
-
getLoggedInUser
@Path("me") @GET @Produces("application/json") UserInfo getLoggedInUser() throws RedbackServiceException
- Throws:
RedbackServiceException
-
ping
@Path("___ping___") @GET @Produces("application/json") PingResult ping() throws RedbackServiceException
- Throws:
RedbackServiceException
-
removeFromCache
@Path("{userId}/cache/clear") @POST @Produces("application/json") javax.ws.rs.core.Response removeFromCache(@PathParam("userId") String userId) throws RedbackServiceException
- Throws:
RedbackServiceException
-
registerUser
@Path("{userId}/register") @POST @Produces("application/json") RegistrationKey registerUser(@PathParam("userId") String userId, UserRegistrationRequest userRegistrationRequest) throws RedbackServiceException
- Returns:
- the registration key
- Throws:
RedbackServiceException
-
resetPassword
@Path("{userId}/password/reset") @POST @Produces("application/json") @Consumes("application/json") javax.ws.rs.core.Response resetPassword(@PathParam("userId") String userId) throws RedbackServiceException
Asks for a password reset of the given User. Normally this results in a password reset email sent to the stored email address for the given user.- Throws:
RedbackServiceException
-
getUserPermissions
@Path("{userId}/permissions") @GET @Produces("application/json") Collection<Permission> getUserPermissions(@PathParam("userId") String userName) throws RedbackServiceException
- Throws:
RedbackServiceException
-
getGuestPermissions
@Path("guest/permissions") @GET @Produces("application/json") Collection<Permission> getGuestPermissions() throws RedbackServiceException
- Throws:
RedbackServiceException
-
getUserOperations
@Path("{userId}/operations") @GET @Produces("application/json") Collection<Operation> getUserOperations(@PathParam("userId") String userName) throws RedbackServiceException
- Throws:
RedbackServiceException
- Since:
- 1.4
-
getCurrentUserPermissions
@Path("me/permissions") @GET @Produces("application/json") Collection<Permission> getCurrentUserPermissions() throws RedbackServiceException
- Returns:
- the current logged user permissions, if no logged user guest permissions are returned
- Throws:
RedbackServiceException
- Since:
- 1.4
-
getCurrentUserOperations
@Path("me/operations") @GET @Produces("application/json") Collection<Operation> getCurrentUserOperations() throws RedbackServiceException
- Returns:
- the current logged user operations, if no logged user guest operations are returned
- Throws:
RedbackServiceException
- Since:
- 1.4
-
validateUserRegistration
@Path("{userId}/register/{key}/validate") @POST @Produces("application/json") VerificationStatus validateUserRegistration(@PathParam("userId") String userId, @PathParam("key") String key) throws RedbackServiceException
- Throws:
RedbackServiceException
-
getEffectivelyAssignedRoles
@Path("{userId}/roles") @GET @Produces("application/json") List<RoleInfo> getEffectivelyAssignedRoles(@PathParam("userId") String username) throws RedbackServiceException
Returns all roles for a given user id. Recurses all child roles.- Throws:
RedbackServiceException
- Since:
- 3.0
-
getRoleTree
@Path("{userId}/roletree") @GET @Produces("application/json") RoleTree getRoleTree(@PathParam("userId") String username) throws RedbackServiceException
- Throws:
RedbackServiceException
- Since:
- 3.0
-
changePassword
@Path("me/password/update") @POST @Consumes("application/json") javax.ws.rs.core.Response changePassword(PasswordChange passwordChange) throws RedbackServiceException
- Throws:
RedbackServiceException
-
changePasswordUnauthenticated
@Path("{userId}/password/update") @POST @Consumes("application/json") javax.ws.rs.core.Response changePasswordUnauthenticated(@PathParam("userId") String userId, PasswordChange passwordChange) throws RedbackServiceException
- Throws:
RedbackServiceException
-
-