Class HvlAuthzUserRestController

java.lang.Object
tr.com.havelsan.javarch.oauth.authz.starter.module.user.controller.HvlAuthzUserRestController
All Implemented Interfaces:
HvlAuthzUserOperationalRestService, HvlAuthzUserRestService

@RestController @RequestMapping("${hvl.oauth.authz.service.user.controller-path:/users}") @HvlActuatorService(name="HvlAuthzUserRestService", groupName="HvlAuthzUser") public class HvlAuthzUserRestController extends Object implements HvlAuthzUserOperationalRestService, HvlAuthzUserRestService
The class in which service endpoints are defined for user operations.
  • Constructor Details

    • HvlAuthzUserRestController

      public HvlAuthzUserRestController(HvlAuthzUserService userService)
      Instantiates a new HvlAuthzUserRestController.
      Parameters:
      userService - the user service
  • Method Details

    • save

      @PreAuthorize("hasAuthority(\'keysis\')") public tr.com.havelsan.javarch.service.data.HvlResponse<HvlOAuthUserModel> save(@NotNull @Valid @RequestBody @NotNull @Valid HvlOAuthUserModel userModel)
      Save user.
      Specified by:
      save in interface HvlAuthzUserOperationalRestService
      Parameters:
      userModel - the user model
      Returns:
      the hvl response
    • saveWithPredefinedValues

      @PreAuthorize("hasAuthority(\'keysis\')") public tr.com.havelsan.javarch.service.data.HvlResponse<Void> saveWithPredefinedValues(@NotNull @Valid @RequestBody @NotNull @Valid HvlOAuthUserModel userModel)
      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 HvlAuthzUserOperationalRestService
      Parameters:
      userModel - the user model
      Returns:
      hvl response
    • update

      @Validated(tr.com.havelsan.javarch.data.commons.validation.HvlConstraintGroups.ModifyingOperation.class) @PreAuthorize("hasAuthority(\'keysis\')") public tr.com.havelsan.javarch.service.data.HvlResponse<Void> update(@NotNull @Valid @RequestBody @NotNull @Valid HvlOAuthUserModel userModel)
      Update user.
      Specified by:
      update in interface HvlAuthzUserOperationalRestService
      Parameters:
      userModel - the user model
      Returns:
      the hvl response
    • deleteByUuid

      @PreAuthorize("hasAuthority(\'keysis\')") public tr.com.havelsan.javarch.service.data.HvlResponse<Void> deleteByUuid(@NotBlank @Size(min=36,max=36) @PathVariable("uuid") @NotBlank @Size(min=36,max=36) String uuid)
      Delete user by uuid.
      Specified by:
      deleteByUuid in interface HvlAuthzUserOperationalRestService
      Parameters:
      uuid - the uuid
      Returns:
      the hvl response
    • changePasswordByAdmin

      @PreAuthorize("hasAuthority(\'keysis\')") public tr.com.havelsan.javarch.service.data.HvlResponse<Void> changePasswordByAdmin(@NotNull @Valid @RequestBody @NotNull @Valid HvlOAuthUserChangePasswordByAdminModel userChangePasswordByAdminModel)
      Change password by admin.
      Specified by:
      changePasswordByAdmin in interface HvlAuthzUserOperationalRestService
      Parameters:
      userChangePasswordByAdminModel - the user change password by admin model
      Returns:
      the hvl response
    • changePassword

      public tr.com.havelsan.javarch.service.data.HvlResponse<Void> changePassword(@NotNull @Valid @RequestBody @NotNull @Valid HvlOAuthUserChangePasswordModel userChangePasswordModel)
      Change password by user.
      Specified by:
      changePassword in interface HvlAuthzUserOperationalRestService
      Parameters:
      userChangePasswordModel - the user change password model
      Returns:
      the hvl response
    • changePasswordUsingVerification

      public tr.com.havelsan.javarch.service.data.HvlResponse<Void> changePasswordUsingVerification(@NotNull @Valid @RequestBody @NotNull @Valid HvlOAuthUserChangePasswordWithVerificationModel userChangePasswordWithVerificationModel)
      changePasswordUsingVerification is a method which is used to change user password using verification way.
      Specified by:
      changePasswordUsingVerification in interface HvlAuthzUserOperationalRestService
      Parameters:
      userChangePasswordWithVerificationModel - the user change password with verification model
      Returns:
      the hvl response
    • lock

      @PreAuthorize("hasAuthority(\'keysis\')") public tr.com.havelsan.javarch.service.data.HvlResponse<Void> lock(@NotNull @Valid @RequestBody @NotNull @Valid HvlOAuthUserLockModel userLockModel)
      Lock user.
      Specified by:
      lock in interface HvlAuthzUserOperationalRestService
      Parameters:
      userLockModel - the userLockModel
      Returns:
      the hvl response
    • unlock

      @PreAuthorize("hasAuthority(\'keysis\')") public tr.com.havelsan.javarch.service.data.HvlResponse<Void> unlock(@NotBlank @Size(min=36,max=36) @PathVariable("uuid") @NotBlank @Size(min=36,max=36) String uuid)
      Unlock user.
      Specified by:
      unlock in interface HvlAuthzUserOperationalRestService
      Parameters:
      uuid - the uuid
      Returns:
      the hvl response
    • saveLdapEntry

      @PreAuthorize("hasAuthority(\'keysis\')") public tr.com.havelsan.javarch.service.data.HvlResponse<HvlOAuthUserLdapResultModel> saveLdapEntry(@NotNull @Valid @RequestBody @NotNull @Valid HvlOAuthUserLdapPersistModel persistLdapModel)
      Save ldap entry hvl response.
      Specified by:
      saveLdapEntry in interface HvlAuthzUserOperationalRestService
      Parameters:
      persistLdapModel - the persist ldap model
      Returns:
      the hvl response
    • getByUuid

      @PreAuthorize("hasAuthority(\'keysis\')") public tr.com.havelsan.javarch.service.data.HvlResponse<HvlOAuthUserModel> getByUuid(@NotBlank @Size(min=36,max=36) @PathVariable("uuid") @NotBlank @Size(min=36,max=36) String uuid)
      Gets user by uuid.
      Specified by:
      getByUuid in interface HvlAuthzUserRestService
      Parameters:
      uuid - the uuid
      Returns:
      the hvl response
    • getByUsername

      @PreAuthorize("hasAuthority(\'keysis\')") public tr.com.havelsan.javarch.service.data.HvlResponse<HvlOAuthUserModel> getByUsername(@NotBlank @Size(max=50) @PathVariable("username") @NotBlank @Size(max=50) String username)
      Gets user by username.
      Specified by:
      getByUsername in interface HvlAuthzUserRestService
      Parameters:
      username - the username
      Returns:
      the hvl response
    • getByIntegrationCode

      @PreAuthorize("hasAuthority(\'keysis\')") public tr.com.havelsan.javarch.service.data.HvlResponse<HvlOAuthUserModel> getByIntegrationCode(@NotBlank @Size(max=20) @PathVariable("code") @NotBlank @Size(max=20) String code)
      Gets user by integration code.
      Specified by:
      getByIntegrationCode in interface HvlAuthzUserRestService
      Parameters:
      code - the code
      Returns:
      the hvl response
    • queryPage

      public tr.com.havelsan.javarch.service.data.HvlResponse<tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlOAuthUserDataModel>> queryPage(@NotNull @Valid @RequestBody @NotNull @Valid HvlOAuthUserQueryModel userQueryModel)
      Returns a page of user matching the query criteria.
      Specified by:
      queryPage in interface HvlAuthzUserRestService
      Parameters:
      userQueryModel - the user query model
      Returns:
      the hvl response
    • queryClaimDataPage

      @PreAuthorize("hasAuthority(\'default_authority\')") public tr.com.havelsan.javarch.service.data.HvlResponse<tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlOAuthUserClaimDataModel>> queryClaimDataPage(@NotNull @Valid @RequestBody @NotNull @Valid HvlOAuthUserClaimQueryModel userClaimQueryModel)
      Returns a page of user claim for assigned entity relation matching the query criteria.
      Specified by:
      queryClaimDataPage in interface HvlAuthzUserRestService
      Parameters:
      userClaimQueryModel - the user claim query model
      Returns:
      the hvl response