public abstract class UserPropertyChangeService<H extends AnonymizationHandler<P>,P extends TaskContextAware> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
UserPropertyChangeService.UserPropertyChangeRequest<P>
Represents request to change user property.
|
static class |
UserPropertyChangeService.UserPropertyChangeValidationResult<P>
User property change validation result.
|
| Constructor and Description |
|---|
UserPropertyChangeService() |
@Nonnull protected abstract UserPropertyChangeManager<H,P> getManager()
UserPropertyChangeManager appropriate for the user property handled by the implementation@Nonnull protected abstract String getHandlerDescriptionKey()
public int getNumberOfTasks(@Nonnull P userPropertyChangeParameter)
userPropertyChangeInOtherEntities(UserPropertyChangeValidationResult).@Nonnull public abstract UserPropertyChangeService.UserPropertyChangeValidationResult<P> validateUserPropertyChange(@Nonnull UserPropertyChangeService.UserPropertyChangeRequest<P> userPropertyChangeRequest)
userPropertyChangeRequest - Change user property request.@Nonnull public abstract UserPropertyChangeService.UserPropertyChangeValidationResult<P> validateUserPropertyChangeInOtherEntities(@Nonnull UserPropertyChangeService.UserPropertyChangeRequest<P> userPropertyChangeRequest)
userPropertyChangeRequest - Change user property request.@Nonnull public ServiceResult userPropertyChange(@Nonnull UserPropertyChangeService.UserPropertyChangeValidationResult<P> userPropertyChangeValidationResult)
validateUserPropertyChange(UserPropertyChangeRequest))validateUserPropertyChange(UserPropertyChangeRequest) was not called
prior to this method an IllegalArgumentException would get thrown.userPropertyChangeValidationResult - The validated result.@Nonnull public ServiceResultWithWarnings userPropertyChangeInOtherEntities(@Nonnull UserPropertyChangeService.UserPropertyChangeValidationResult<P> userPropertyChangeValidationResult)
AnonymizationHandler).
Errors from handlers are reported in warning map, they don't cause error result.userPropertyChangeValidationResult - Validation result.@Nonnull public ServiceOutcomeWithWarnings<Collection<AffectedEntity>> getAffectedEntities(@Nonnull UserPropertyChangeService.UserPropertyChangeRequest<P> userPropertyChangeRequest)
validateUserPropertyChange(UserPropertyChangeRequest)AnonymizationHandler extension pointAnonymizationHandler.getAffectedEntities(Object)}
are treated as warnings and end up in ServiceOutcomeWithWarnings.getWarnings()userPropertyChangeRequest - Change request.AffectedEntity).@Nonnull public BusinessLogicValidationResult validateBusinessLogic(@Nonnull AnonymizationParameters anonymizationParameters)
@Nonnull protected ServiceOutcomeWithWarnings<Collection<AffectedEntity>> getAffectedEntitiesFromHandlers(@Nonnull UserPropertyChangeService.UserPropertyChangeRequest<P> userPropertyChangeRequest)
protected boolean isAdministrator(@Nullable ApplicationUser user)
protected boolean isSysAdmin(@Nullable ApplicationUser user)
protected I18nHelper getI18nBean(ApplicationUser user)
Copyright © 2002-2024 Atlassian. All Rights Reserved.