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 Summary
ConstructorDescriptionHvlAuthzUserRestController
(HvlAuthzUserService userService) Instantiates a new HvlAuthzUserRestController. -
Method Summary
Modifier and TypeMethodDescriptiontr.com.havelsan.javarch.service.data.HvlResponse
<Void> changePassword
(@NotNull @Valid HvlOAuthUserChangePasswordModel userChangePasswordModel) Change password by user.tr.com.havelsan.javarch.service.data.HvlResponse
<Void> changePasswordByAdmin
(@NotNull @Valid HvlOAuthUserChangePasswordByAdminModel userChangePasswordByAdminModel) Change password by admin.tr.com.havelsan.javarch.service.data.HvlResponse
<Void> changePasswordUsingVerification
(@NotNull @Valid HvlOAuthUserChangePasswordWithVerificationModel userChangePasswordWithVerificationModel) changePasswordUsingVerification is a method which is used to change user password using verification way.tr.com.havelsan.javarch.service.data.HvlResponse
<Void> deleteByUuid
(@NotBlank @Size(min=36,max=36) String uuid) Delete user by uuid.tr.com.havelsan.javarch.service.data.HvlResponse
<HvlOAuthUserModel> getByIntegrationCode
(@NotBlank @Size(max=20) String code) Gets user by integration code.tr.com.havelsan.javarch.service.data.HvlResponse
<HvlOAuthUserModel> getByUsername
(@NotBlank @Size(max=50) String username) Gets user by username.tr.com.havelsan.javarch.service.data.HvlResponse
<HvlOAuthUserModel> Gets user by uuid.tr.com.havelsan.javarch.service.data.HvlResponse
<Void> lock
(@NotNull @Valid HvlOAuthUserLockModel userLockModel) Lock user.tr.com.havelsan.javarch.service.data.HvlResponse
<tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlOAuthUserClaimDataModel>> queryClaimDataPage
(@NotNull @Valid HvlOAuthUserClaimQueryModel userClaimQueryModel) Returns a page of user claim for assigned entity relation matching the query criteria.tr.com.havelsan.javarch.service.data.HvlResponse
<tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlOAuthUserDataModel>> queryPage
(@NotNull @Valid HvlOAuthUserQueryModel userQueryModel) Returns a page of user matching the query criteria.tr.com.havelsan.javarch.service.data.HvlResponse
<HvlOAuthUserModel> save
(@NotNull @Valid HvlOAuthUserModel userModel) Save user.tr.com.havelsan.javarch.service.data.HvlResponse
<HvlOAuthUserLdapResultModel> saveLdapEntry
(@NotNull @Valid HvlOAuthUserLdapPersistModel persistLdapModel) Save ldap entry hvl response.tr.com.havelsan.javarch.service.data.HvlResponse
<Void> saveWithPredefinedValues
(@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.tr.com.havelsan.javarch.service.data.HvlResponse
<Void> Unlock user.tr.com.havelsan.javarch.service.data.HvlResponse
<Void> update
(@NotNull @Valid HvlOAuthUserModel userModel) Update user.
-
Constructor Details
-
HvlAuthzUserRestController
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 interfaceHvlAuthzUserOperationalRestService
- 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 interfaceHvlAuthzUserOperationalRestService
- 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 interfaceHvlAuthzUserOperationalRestService
- 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 interfaceHvlAuthzUserOperationalRestService
- 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 interfaceHvlAuthzUserOperationalRestService
- 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 interfaceHvlAuthzUserOperationalRestService
- 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 interfaceHvlAuthzUserOperationalRestService
- 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 interfaceHvlAuthzUserOperationalRestService
- 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 interfaceHvlAuthzUserOperationalRestService
- 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 interfaceHvlAuthzUserOperationalRestService
- 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 interfaceHvlAuthzUserRestService
- 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 interfaceHvlAuthzUserRestService
- 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 interfaceHvlAuthzUserRestService
- 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 interfaceHvlAuthzUserRestService
- 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 interfaceHvlAuthzUserRestService
- Parameters:
userClaimQueryModel
- the user claim query model- Returns:
- the hvl response
-