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
Users.- Author:
- Heiko Scherrer
-
Method Summary
Modifier and TypeMethodDescription@NotNull Usercreate(@NotNull(groups=Create.class) @Valid User user, List<String> roleNames) Create a non-existing User.@NotNull SystemUserCreate and return theSystemUserwithout persisting this user.voidDelete anUser.@NotNull UserfindByPKey(@NotBlank String pKey) Find and return anUserinstance.findByUsername(@NotBlank String username) Find and return anUserinstance.@NotNull Usersave(@NotNull(groups=Modify.class) @Valid User user, List<String> roleNames) Save or update an already existingUser.@NotNull UserVOupdatePassword(@NotBlank String pKey, @NotNull CharSequence newPassword) Update the password of theUser.voiduploadImageFile(@NotBlank String pKey, @jakarta.validation.constraints.NotNull byte[] image) Methods inherited from interface org.ameba.integration.FindOperations
findAll, findByIdMethods 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 theSystemUserwithout 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 anUserinstance.- Parameters:
username- The unique name of the User to search for- Returns:
- The instance
-
findByPKey
Find and return anUserinstance.- 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
-