Interface OwnershipTransferHandler
- All Superinterfaces:
AnonymizationHandler<OwnershipTransferParameter>
- All Known Implementing Classes:
ComponentLeadOwnershipTransferHandler
,FilterSubscriptionOwnershipTransferHandler
,OwnershipTransferHandlerWithBLValidationErrors
,ProjectLeadOwnershipTransferHandler
,ReferenceOwnershipTransferHandler
Transfers ownership of entities before a user is disabled, to make sure the system keeps working properly. For example,
changes project lead and component lead, as having disabled users there can break the default assignee option.
This extension point is executed as the first step of the user anonymization process. Any errors returned by the implementations will stop the process.
To register an instance of this handler to be executed by Jira, implement this interface and add
an ownership-transfer-handler
module to the atlassian-plugin.xml, e.g.:
<ownership-transfer-handler
key="my-ownership-transfer-handler"
class="com.example.OwnershipTransferHandlerImpl"
i18n-name-key="ownership.transfer.handler.name">
<restrict application="jira" version="[8.3.0,)" />
</ownership-transfer-handler>
- Since:
- 8.3
- See Also:
-
Field Summary
Fields inherited from interface com.atlassian.jira.user.anonymize.AnonymizationHandler
DEFAULT_NUMBER_OF_TASKS
-
Method Summary
Modifier and TypeMethodDescriptiongetAffectedEntities
(OwnershipTransferParameter ownershipTransferParameter) Used to display in the UI a list of entities that require an ownership transfer, without actually performing the operation yet.Methods inherited from interface com.atlassian.jira.user.anonymize.AnonymizationHandler
getNumberOfTasks, update, validateBusinessLogic
-
Method Details
-
getAffectedEntities
@Nonnull Collection<AffectedEntity> getAffectedEntities(@Nonnull OwnershipTransferParameter ownershipTransferParameter) Used to display in the UI a list of entities that require an ownership transfer, without actually performing the operation yet. Its goal is to inform the end-user about the scope of the changes. Implementation should not useOwnershipTransferParameter.getTransferToUserKey()
during computing affected entities.This method should return results as fast as possible, as it is affecting the UI.
- Specified by:
getAffectedEntities
in interfaceAnonymizationHandler<OwnershipTransferParameter>
- Parameters:
ownershipTransferParameter
- stores original and target user keys- Returns:
- a collection of entities that will be affected by the ownership transfer
-