Interface PersonService.Validator
-
- Enclosing interface:
- PersonService
public static interface PersonService.Validator
Provides methods for validating the CRUD methods.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ValidationResult
validateAddMembership(String username, String groupName)
Validate that the requesting user has permission to add the given user to the given group.ValidationResult
validateChangeMyPassword(PasswordChangeDetails passwordChangeDetails)
Validate that the input supplied for changing current user's password is valid.ValidationResult
validateChangePassword(String userName, String password)
Validate that the input supplied for changing a user's password is valid.ValidationResult
validateDelete(Person personToDelete)
Validate that the current user has permissions to remove the given personValidationResult
validateDisable(String username)
Validate that the requesting user has permission to disable the given user.ValidationResult
validateEnable(String username)
Validate that the requesting user has permission to enable the given user.ValidationResult
validateRemoveMembership(String username, String groupName)
Validate that the requesting user has permission to remove the given user from the given group.ValidationResult
validateUserCreate(UserDetailsForCreation userDetailsForCreation)
Validate the correctness of user details for a new user creationValidationResult
validateView()
Validate that current user can view user profiles
-
-
-
Method Detail
-
validateView
ValidationResult validateView()
Validate that current user can view user profiles- Returns:
- an immutable Validation result.
-
validateDisable
ValidationResult validateDisable(String username)
Validate that the requesting user has permission to disable the given user.- Parameters:
username
- The username identifying the given user.- Since:
- 8.2.0
-
validateEnable
ValidationResult validateEnable(String username)
Validate that the requesting user has permission to enable the given user.- Parameters:
username
- The username identifying the given user.- Since:
- 8.2.0
-
validateDelete
ValidationResult validateDelete(Person personToDelete)
Validate that the current user has permissions to remove the given person- Parameters:
personToDelete
-- Returns:
- an immutable Validation result
- Since:
- 6.13.0
-
validateAddMembership
ValidationResult validateAddMembership(String username, String groupName)
Validate that the requesting user has permission to add the given user to the given group.- Parameters:
username
- The username identifying the given user.groupName
- The group name identifying the given group.- Returns:
- ValidationResult
- Since:
- 8.2.0
-
validateRemoveMembership
ValidationResult validateRemoveMembership(String username, String groupName)
Validate that the requesting user has permission to remove the given user from the given group.- Parameters:
username
- The username identifying the given user.groupName
- The group name identifying the given group.- Returns:
- ValidationResult
- Since:
- 8.2.0
-
validateUserCreate
ValidationResult validateUserCreate(UserDetailsForCreation userDetailsForCreation)
Validate the correctness of user details for a new user creation- Parameters:
userDetailsForCreation
- UserDetails- Returns:
- ValidationResult
- Since:
- 8.4.0
-
validateChangePassword
ValidationResult validateChangePassword(String userName, String password)
Validate that the input supplied for changing a user's password is valid. It also includes appropriate permission checks.- Parameters:
userName
- User Namepassword
- New password- Returns:
- an immutable Validation result
- Since:
- 8.4.0
-
validateChangeMyPassword
ValidationResult validateChangeMyPassword(PasswordChangeDetails passwordChangeDetails)
Validate that the input supplied for changing current user's password is valid. It also includes appropriate permission checks.- Parameters:
passwordChangeDetails
- password change details- Returns:
- an immutable Validation result
- Since:
- 8.4.0
-
-