public class CustomFieldBulkDeleteManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CustomFieldBulkDeleteManager.LockNotAcquiredException |
Modifier and Type | Field and Description |
---|---|
static String |
BULK_DELETE_FEATURE_FLAG |
static String |
BULK_DELETE_LOCK_NAME |
static String |
LOCK_NOT_ACQUIRED_MESSAGE |
static int |
MAX_NUMBER_OF_CUSTOM_FIELDS_TO_DELETE |
static String |
VALIDATION_FOR_CUSTOM_FIELD_DELETION_FAILED_MESSAGE |
Constructor and Description |
---|
CustomFieldBulkDeleteManager(CustomFieldManager customFieldManager,
CustomFieldService customFieldService,
ClusterManager clusterManager,
FeatureManager featureManager,
ManagedConfigurationItemService managedConfigurationItemService,
com.atlassian.beehive.ClusterLockService clusterLockService,
FieldScreenManager fieldScreenManager,
com.atlassian.event.api.EventPublisher eventPublisher) |
Modifier and Type | Method and Description |
---|---|
boolean |
isDCAndFeatureFlagOn()
Feature is available since 8.16 for DC instances and can be turned off with jira.customfields.bulk.delete flag.
|
void |
onLicenseChanged(LicenseChangedEvent event) |
Map<String,String> |
validateAndDeleteCustomFields(JiraAuthenticationContext jiraAuthenticationContext,
List<String> customFieldsIds,
Long bulkOperationStartTime)
For each custom field in the list validates if the custom field can be deleted.
|
boolean |
validateNumberOfArguments(List<String> customFields)
We allow a maximum of 50 custom fields in delete request as this is the number of custom fields per page on custom field view.
|
public static final int MAX_NUMBER_OF_CUSTOM_FIELDS_TO_DELETE
public static final String BULK_DELETE_FEATURE_FLAG
public static final String BULK_DELETE_LOCK_NAME
public static final String LOCK_NOT_ACQUIRED_MESSAGE
public static final String VALIDATION_FOR_CUSTOM_FIELD_DELETION_FAILED_MESSAGE
public CustomFieldBulkDeleteManager(CustomFieldManager customFieldManager, CustomFieldService customFieldService, ClusterManager clusterManager, FeatureManager featureManager, ManagedConfigurationItemService managedConfigurationItemService, com.atlassian.beehive.ClusterLockService clusterLockService, FieldScreenManager fieldScreenManager, com.atlassian.event.api.EventPublisher eventPublisher)
public boolean isDCAndFeatureFlagOn()
public boolean validateNumberOfArguments(List<String> customFields)
customFields
- list of custom fields selected for deletionpublic Map<String,String> validateAndDeleteCustomFields(JiraAuthenticationContext jiraAuthenticationContext, List<String> customFieldsIds, Long bulkOperationStartTime)
jiraAuthenticationContext
- contextcustomFieldsIds
- ids of custom fields to be deletedbulkOperationStartTime
- timestamp of when the bulk delete request was sent (for analytics events' purpose)@EventListener public void onLicenseChanged(LicenseChangedEvent event)
Copyright © 2002-2022 Atlassian. All Rights Reserved.
View cookie preferences