Class UserPropertyUniquenessValidator
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.auth.BasePropertyUniquenessValidator<SUser,UserForm,UserPropertyDefaultValueProvider,UserPropertyValueCanonizer>
-
- jetbrains.buildServer.serverSide.impl.auth.UserPropertyUniquenessValidator
-
- All Implemented Interfaces:
UserPropertyValidator
public class UserPropertyUniquenessValidator extends BasePropertyUniquenessValidator<SUser,UserForm,UserPropertyDefaultValueProvider,UserPropertyValueCanonizer> implements UserPropertyValidator
- Author:
- Maxim.Manuylov Date: 27.11.12
-
-
Field Summary
-
Fields inherited from class jetbrains.buildServer.serverSide.impl.auth.BasePropertyUniquenessValidator
myDefaultValueProvider, mySecurityContext, myValueCanonizer
-
-
Constructor Summary
Constructors Constructor Description UserPropertyUniquenessValidator(UserModel userModel, SecurityContextEx securityContext, PropertyKey propertyKey, String description, UserPropertyDefaultValueProvider defaultValueProvider, UserPropertyValueCanonizer valueCanonizer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
describeAnotherItem()
protected String
describeItem(SUser item)
protected SUser
doFindAnotherItemWithTheSameValue(SUser editee, String value)
protected boolean
equal(SUser item, SUser editee)
SUser
findAnotherUserWithTheSameValue(SUser editee, String value)
protected Collection<SUser>
getAllItems()
String
validate(String propertyValue, SUser editee, UserForm form)
Returns error text if property value is not valid, null otherwise-
Methods inherited from class jetbrains.buildServer.serverSide.impl.auth.BasePropertyUniquenessValidator
doValidate
-
-
-
-
Constructor Detail
-
UserPropertyUniquenessValidator
public UserPropertyUniquenessValidator(@NotNull UserModel userModel, @NotNull SecurityContextEx securityContext, @NotNull PropertyKey propertyKey, @NotNull String description, @Nullable UserPropertyDefaultValueProvider defaultValueProvider, @Nullable UserPropertyValueCanonizer valueCanonizer)
-
-
Method Detail
-
validate
@Nullable public String validate(@NotNull String propertyValue, @Nullable SUser editee, @NotNull UserForm form)
Description copied from interface:UserPropertyValidator
Returns error text if property value is not valid, null otherwise- Specified by:
validate
in interfaceUserPropertyValidator
- Parameters:
propertyValue
- property valueeditee
- user that is being edited (null if user is being created)form
- current user data- Returns:
- see above
-
findAnotherUserWithTheSameValue
@Nullable public SUser findAnotherUserWithTheSameValue(@Nullable SUser editee, @NotNull String value)
-
doFindAnotherItemWithTheSameValue
@Nullable protected SUser doFindAnotherItemWithTheSameValue(@Nullable SUser editee, @NotNull String value)
-
getAllItems
@NotNull protected Collection<SUser> getAllItems()
- Specified by:
getAllItems
in classBasePropertyUniquenessValidator<SUser,UserForm,UserPropertyDefaultValueProvider,UserPropertyValueCanonizer>
-
equal
protected boolean equal(@NotNull SUser item, @NotNull SUser editee)
- Specified by:
equal
in classBasePropertyUniquenessValidator<SUser,UserForm,UserPropertyDefaultValueProvider,UserPropertyValueCanonizer>
-
describeItem
@NotNull protected String describeItem(@NotNull SUser item)
- Specified by:
describeItem
in classBasePropertyUniquenessValidator<SUser,UserForm,UserPropertyDefaultValueProvider,UserPropertyValueCanonizer>
-
describeAnotherItem
@NotNull protected String describeAnotherItem()
- Specified by:
describeAnotherItem
in classBasePropertyUniquenessValidator<SUser,UserForm,UserPropertyDefaultValueProvider,UserPropertyValueCanonizer>
-
-