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 StringdescribeAnotherItem()protected StringdescribeItem(SUser item)protected SUserdoFindAnotherItemWithTheSameValue(SUser editee, String value)protected booleanequal(SUser item, SUser editee)SUserfindAnotherUserWithTheSameValue(SUser editee, String value)protected Collection<SUser>getAllItems()Stringvalidate(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:UserPropertyValidatorReturns error text if property value is not valid, null otherwise- Specified by:
validatein 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:
getAllItemsin classBasePropertyUniquenessValidator<SUser,UserForm,UserPropertyDefaultValueProvider,UserPropertyValueCanonizer>
-
equal
protected boolean equal(@NotNull SUser item, @NotNull SUser editee)- Specified by:
equalin classBasePropertyUniquenessValidator<SUser,UserForm,UserPropertyDefaultValueProvider,UserPropertyValueCanonizer>
-
describeItem
@NotNull protected String describeItem(@NotNull SUser item)
- Specified by:
describeItemin classBasePropertyUniquenessValidator<SUser,UserForm,UserPropertyDefaultValueProvider,UserPropertyValueCanonizer>
-
describeAnotherItem
@NotNull protected String describeAnotherItem()
- Specified by:
describeAnotherItemin classBasePropertyUniquenessValidator<SUser,UserForm,UserPropertyDefaultValueProvider,UserPropertyValueCanonizer>
-
-