Class HvlOAuthUserOperationalManagerImpl

java.lang.Object
tr.com.havelsan.javarch.oauth.jpa.data.provider.module.user.manager.HvlOAuthUserOperationalManagerImpl
All Implemented Interfaces:
HvlOAuthUserOperationalManager

@Service public class HvlOAuthUserOperationalManagerImpl extends Object implements HvlOAuthUserOperationalManager
The class which implements HvlOAuthUserOperationalManager.
  • Constructor Details

  • Method Details

    • save

      public HvlOAuthUserModel save(@NotNull @Valid @NotNull @Valid HvlOAuthUserModel userModel, @NotNull @NotNull HvlOAuthUserRegistrationSourceType userRegistrationSourceType)
      Save user.
      Specified by:
      save in interface HvlOAuthUserOperationalManager
      Parameters:
      userModel - the user model
      userRegistrationSourceType - the user registration source type
      Returns:
      the user model
    • saveWithPredefinedValues

      public HvlOAuthUserModel saveWithPredefinedValues(@NotNull @Valid @NotNull @Valid HvlOAuthUserModel userModel, @NotNull @NotNull HvlOAuthUserRegistrationSourceType userRegistrationSourceType)
      saveWithPredefinedValues is a method which is used to add new user data with predefined values which can be defined by administrator. For example, If there is a record for user type of user trying to be added matching with predefined role, system would create a profile authorized with this predefined roles for this user.
      Specified by:
      saveWithPredefinedValues in interface HvlOAuthUserOperationalManager
      Parameters:
      userModel - the user model
      userRegistrationSourceType - the user registration source type
      Returns:
      the user model
    • update

      @Validated(tr.com.havelsan.javarch.data.commons.validation.HvlConstraintGroups.ModifyingOperation.class) @CacheEvict(value={"user::uuid","user::username","user::integration_code"}, allEntries=true) public HvlOAuthUserModel update(@NotNull @Valid @NotNull @Valid HvlOAuthUserModel userModel, Consumer<Set<String>> affectedUsersAction)
      Update user.
      Specified by:
      update in interface HvlOAuthUserOperationalManager
      Parameters:
      userModel - the user model
      affectedUsersAction - the affected users action
      Returns:
      the user model
    • updateUserPassword

      @CacheEvict(value={"user::uuid","user::username","user::integration_code"}, allEntries=true) public void updateUserPassword(@NotBlank @Size(max=50) @NotBlank @Size(max=50) String username, @NotBlank @Size(max=100) @NotBlank @Size(max=100) String newPassword)
      Update user password.
      Specified by:
      updateUserPassword in interface HvlOAuthUserOperationalManager
      Parameters:
      username - the username
      newPassword - the new password
    • updateUserPassword

      @CacheEvict(value={"user::uuid","user::username","user::integration_code"}, allEntries=true) public void updateUserPassword(@NotBlank @Size(max=50) @NotBlank @Size(max=50) String username, @NotBlank @Size(max=100) @NotBlank @Size(max=100) String oldPassword, @NotBlank @Size(max=100) @NotBlank @Size(max=100) String newPassword)
      Update user password.
      Specified by:
      updateUserPassword in interface HvlOAuthUserOperationalManager
      Parameters:
      username - the username
      oldPassword - the old password
      newPassword - the new password
    • updateUserFailedCountAndLockedDate

      @CacheEvict(value={"user::uuid","user::username","user::integration_code"}, allEntries=true) public void updateUserFailedCountAndLockedDate(@NotBlank @Size(max=50) @NotBlank @Size(max=50) String username, Integer failedCount, OffsetDateTime lockedDate)
      Update user password.
      Specified by:
      updateUserFailedCountAndLockedDate in interface HvlOAuthUserOperationalManager
      Parameters:
      username - the username
      failedCount - the failed count
      lockedDate - the locked date
    • deleteByUuid

      @CacheEvict(value={"user::uuid","user::username","user::integration_code"}, allEntries=true) public String deleteByUuid(@NotBlank @Size(min=36,max=36) @NotBlank @Size(min=36,max=36) String uuid)
      Delete user by uuid.
      Specified by:
      deleteByUuid in interface HvlOAuthUserOperationalManager
      Parameters:
      uuid - the uuid
      Returns:
      the username
    • changePasswordByAdmin

      @CacheEvict(value={"user::uuid","user::username","user::integration_code"}, allEntries=true) public void changePasswordByAdmin(@NotNull @NotNull Long id, @NotBlank @Size(max=100) @NotBlank @Size(max=100) String password, boolean passwordMustBeChanged)
      Change password by admin.
      Specified by:
      changePasswordByAdmin in interface HvlOAuthUserOperationalManager
      Parameters:
      id - the id
      password - the password
      passwordMustBeChanged - the password must be changed
    • lock

      @CacheEvict(value={"user::uuid","user::username","user::integration_code"}, allEntries=true) public String lock(@NotNull @Valid @NotNull @Valid HvlOAuthUserLockModel userLockModel)
      Lock user.
      Specified by:
      lock in interface HvlOAuthUserOperationalManager
      Parameters:
      userLockModel - the userLockModel
      Returns:
      the string
    • unlock

      @CacheEvict(value={"user::uuid","user::username","user::integration_code"}, allEntries=true) public void unlock(@NotBlank @Size(min=36,max=36) @NotBlank @Size(min=36,max=36) String uuid)
      Unlock user.
      Specified by:
      unlock in interface HvlOAuthUserOperationalManager
      Parameters:
      uuid - the uuid
    • activePasswordMustBeChangeAllUser

      @CacheEvict(value={"user::username_without_detail","user::uuid","user::username","user::integration_code"}, allEntries=true) public void activePasswordMustBeChangeAllUser()
      Active password must be change all user.
      Specified by:
      activePasswordMustBeChangeAllUser in interface HvlOAuthUserOperationalManager