-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3faf039
commit 224ebc2
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
src/main/java/com/springboot/ratelimiter/user/service/UserService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package com.springboot.ratelimiter.user.service; | ||
|
||
import com.springboot.ratelimiter.common.model.page.CustomPage; | ||
import com.springboot.ratelimiter.user.User; | ||
import com.springboot.ratelimiter.user.payload.request.CreateUserRequest; | ||
import com.springboot.ratelimiter.user.payload.request.UpdateUserRequest; | ||
import com.springboot.ratelimiter.user.payload.request.UserPagingRequest; | ||
|
||
/** | ||
* Service interface named {@link UserService} for managing user operations. | ||
*/ | ||
public interface UserService { | ||
|
||
/** | ||
* Creates a new user based on the provided CreateUserRequest. | ||
* | ||
* @param createUserRequest the CreateUserRequest containing user details | ||
* @return the created User object | ||
*/ | ||
User createUser(CreateUserRequest createUserRequest); | ||
|
||
/** | ||
* Retrieves a user by their unique identifier. | ||
* | ||
* @param id the identifier of the user to retrieve | ||
* @return the User object if found, otherwise null | ||
*/ | ||
User getUserById(String id); | ||
|
||
/** | ||
* Updates an existing user identified by their unique identifier. | ||
* | ||
* @param id the identifier of the user to update | ||
* @param updateUserRequest the UpdateUserRequest containing updated user details | ||
* @return the updated User object | ||
*/ | ||
User updateUser(String id, UpdateUserRequest updateUserRequest); | ||
|
||
/** | ||
* Deletes a user by their unique identifier. | ||
* | ||
* @param id the identifier of the user to delete | ||
*/ | ||
void deleteUserById(String id); | ||
|
||
/** | ||
* Retrieves a paginated list of users based on the provided UserPagingRequest. | ||
* | ||
* @param userPagingRequest the UserPagingRequest containing pagination parameters | ||
* @return a CustomPage containing the list of users | ||
*/ | ||
CustomPage<User> getUsers(UserPagingRequest userPagingRequest); | ||
|
||
} |