public class AnonymizePluginPointsStep extends Object implements AnonymizeOperationStep, StepWithPluginPointInvocations
Constructor and Description |
---|
AnonymizePluginPointsStep(UserAnonymizationService userAnonymizationService) |
Modifier and Type | Method and Description |
---|---|
ServiceOutcomeWithWarnings<Collection<AffectedEntity>> |
getAffectedEntities(AnonymizeUserService.AnonymizeProcessData anonymizationData)
Gets affected entities for this action.
|
AnonymizeUserService.AnonymizeOperation |
getAnonymizeOperation()
Type of operation this handler supports.
|
int |
getNumberOfTasks(AnonymizeUserService.AnonymizeValidationResult validationResult)
Returns number of tasks/stages to be executed as part of this anonymization step.
|
Optional<AnonymizeUserService.SingleOperationReport<Void>> |
performOperation(AnonymizeUserService.OperationsReport<Void> anonymizeReport,
AnonymizeUserService.AnonymizeValidationResult validationResult,
Context asyncTaskContext)
Performs operations only if all proper parameters are filled in passed parameters.
|
ServiceResult |
validate(AnonymizeUserService.AnonymizeProcessData anonymizationProcessData,
I18nHelper i18nHelper,
boolean preValidate)
Validate should ensure that request and anonymizationProcessData contain all data needed to
#performOperation(OperationsReport, AnonymizeValidationResult, Context) . |
BusinessLogicValidationResult |
validateBusinessLogic(AnonymizationParameters anonymizationParameters) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
shouldPerformOperation
public AnonymizePluginPointsStep(UserAnonymizationService userAnonymizationService)
@Nonnull public Optional<AnonymizeUserService.SingleOperationReport<Void>> performOperation(@Nonnull AnonymizeUserService.OperationsReport<Void> anonymizeReport, @Nonnull AnonymizeUserService.AnonymizeValidationResult validationResult, @Nonnull Context asyncTaskContext)
AnonymizeOperationStep
#validate(AnonymizeProcessData, I18nHelper, boolean)
should be called prior this method to ensure that
all required parameters to perform operation are present.performOperation
in interface AnonymizeOperationStep
anonymizeReport
- Anonymization report, can be used to check if previous operations were executed/succeeded/failed.validationResult
- Validation result. See AnonymizeUserService.validateAnonymize(AnonymizationParameters)
asyncTaskContext
- Task context to report the anonymization process progress to@Nonnull public ServiceResult validate(@Nonnull AnonymizeUserService.AnonymizeProcessData anonymizationProcessData, I18nHelper i18nHelper, boolean preValidate)
AnonymizeOperationStep
#performOperation(OperationsReport, AnonymizeValidationResult, Context)
.
Also validates if system allows specific operation eg. in order for user to be renamed it has to be editable in system.validate
in interface AnonymizeOperationStep
anonymizationProcessData
- Data to validate.i18nHelper
- I18n helperpreValidate
- True for pre-validation phase. See AnonymizeUserService.preValidateAnonymize(AnonymizationParameters)
@Nonnull public ServiceOutcomeWithWarnings<Collection<AffectedEntity>> getAffectedEntities(AnonymizeUserService.AnonymizeProcessData anonymizationData)
AnonymizeOperationStep
getAffectedEntities
in interface AnonymizeOperationStep
anonymizationData
- Anonymization data.@Nonnull public AnonymizeUserService.AnonymizeOperation getAnonymizeOperation()
AnonymizeOperationStep
getAnonymizeOperation
in interface AnonymizeOperationStep
public int getNumberOfTasks(@Nonnull AnonymizeUserService.AnonymizeValidationResult validationResult)
AnonymizeOperationStep
#performOperation(OperationsReport, AnonymizeValidationResult, Context)
.getNumberOfTasks
in interface AnonymizeOperationStep
validationResult
- Validation result@Nonnull public BusinessLogicValidationResult validateBusinessLogic(@Nonnull AnonymizationParameters anonymizationParameters)
validateBusinessLogic
in interface StepWithPluginPointInvocations
Copyright © 2002-2022 Atlassian. All Rights Reserved.