Package org.openwms.core.uaa
Interface UserService
- All Superinterfaces:
org.ameba.integration.FindOperations<User,
,Long> org.ameba.integration.SaveOperations<User,
Long>
- All Known Implementing Classes:
UserServiceImpl
public interface UserService
extends org.ameba.integration.FindOperations<User,Long>, org.ameba.integration.SaveOperations<User,Long>
An UserService offers functionality according to the handling with
User
s.- Author:
- Heiko Scherrer
-
Method Summary
Modifier and TypeMethodDescription@NotNull User
create
(@NotNull(groups=Create.class) @Valid User user, List<String> roleNames) Create a non-existing User.@NotNull SystemUser
Create and return theSystemUser
without persisting this user.void
Delete anUser
.@NotNull User
findByPKey
(@NotBlank String pKey) Find and return anUser
instance.findByUsername
(@NotBlank String username) Find and return anUser
instance.@NotNull User
save
(@NotNull(groups=Modify.class) @Valid User user, List<String> roleNames) Save or update an already existingUser
.@NotNull UserVO
updatePassword
(@NotBlank String pKey, @NotNull CharSequence newPassword) Update the password of theUser
.void
uploadImageFile
(@NotBlank String pKey, @jakarta.validation.constraints.NotNull byte[] image) Methods inherited from interface org.ameba.integration.FindOperations
findAll, findById
Methods inherited from interface org.ameba.integration.SaveOperations
save
-
Method Details
-
save
@NotNull @NotNull User save(@NotNull(groups=Modify.class) @Valid @NotNull(groups=Modify.class) @Valid User user, List<String> roleNames) Save or update an already existingUser
.- Parameters:
user
- The instance to saveroleNames
- A list of Role names to assign the User to- Returns:
- The saved instance
-
uploadImageFile
void uploadImageFile(@NotBlank @NotBlank String pKey, @NotNull @jakarta.validation.constraints.NotNull byte[] image) - Parameters:
pKey
- The persistent key of the Userimage
- Image to be stored
-
createSystemUser
Create and return theSystemUser
without persisting this user.- Returns:
- the SystemUser instance
-
create
@NotNull @NotNull User create(@NotNull(groups=Create.class) @Valid @NotNull(groups=Create.class) @Valid User user, List<String> roleNames) Create a non-existing User.- Parameters:
user
- The User instance to createroleNames
- A list of Role names to assign the User to- Returns:
- The created instance
-
findByUsername
Find and return anUser
instance.- Parameters:
username
- The unique name of the User to search for- Returns:
- The instance
-
findByPKey
Find and return anUser
instance.- Parameters:
pKey
- The persistent identifier of the User to search for- Returns:
- The instance
-
delete
Delete anUser
.- Parameters:
pKey
- The identifiable persistent key
-
updatePassword
@NotNull @NotNull UserVO updatePassword(@NotBlank @NotBlank String pKey, @NotNull @NotNull CharSequence newPassword) throws InvalidPasswordException Update the password of theUser
.- Parameters:
pKey
- The identifiable persistent keynewPassword
- The new password- Returns:
- The updated instance
- Throws:
InvalidPasswordException
-