public abstract class AbstractDefaultCustomFieldProvider extends Object implements DefaultCustomFieldProvider
DefaultCustomFieldProvider interface. Provides the common patterns of
checking for "default" custom field existence and creation if it does not exist.
This class should only be used to manage custom field instances where the CustomFieldType is provided by
JIRA's system plugins, and not JIRA Agile. This is because this implementation does not adequately handle scenarios
where the Custom Field Type plugin module is not known to JIRA's CustomFieldManager at the time of querying.
For contrast, see SprintCustomFieldServiceImpl.| Modifier and Type | Field and Description |
|---|---|
protected CustomFieldMetadata |
customFieldMetadata |
protected CustomFieldService |
customFieldService |
protected com.atlassian.jira.security.JiraAuthenticationContext |
jiraAuthenticationContext |
protected LoggerWrapper |
log |
| Constructor and Description |
|---|
AbstractDefaultCustomFieldProvider(CustomFieldService customFieldService,
com.atlassian.jira.security.JiraAuthenticationContext jiraAuthenticationContext,
com.atlassian.jira.config.ReindexMessageManager reindexMessageManager,
com.atlassian.beehive.compat.ClusterLockService clusterLockService,
String typeName,
CustomFieldMetadata customFieldMetadata) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterFieldIsProduced(com.atlassian.jira.issue.fields.CustomField field)
Post-creation code that is also executed while the
Lock is being held. |
boolean |
doesDefaultFieldExist() |
com.atlassian.jira.issue.fields.CustomField |
getOrCreateDefaultField()
Get the default custom field that JIRA Agile is aware of.
|
protected abstract Long |
getStoredCustomFieldId() |
protected abstract void |
setStoredCustomFieldId(Long id)
Persist the custom field ID for later retrieval
|
protected final LoggerWrapper log
protected final CustomFieldService customFieldService
protected final CustomFieldMetadata customFieldMetadata
protected final com.atlassian.jira.security.JiraAuthenticationContext jiraAuthenticationContext
public AbstractDefaultCustomFieldProvider(CustomFieldService customFieldService, com.atlassian.jira.security.JiraAuthenticationContext jiraAuthenticationContext, com.atlassian.jira.config.ReindexMessageManager reindexMessageManager, com.atlassian.beehive.compat.ClusterLockService clusterLockService, String typeName, CustomFieldMetadata customFieldMetadata)
public com.atlassian.jira.issue.fields.CustomField getOrCreateDefaultField()
DefaultCustomFieldProvidergetOrCreateDefaultField in interface DefaultCustomFieldProviderpublic boolean doesDefaultFieldExist()
doesDefaultFieldExist in interface DefaultCustomFieldProvider@Nullable protected abstract Long getStoredCustomFieldId()
protected abstract void setStoredCustomFieldId(@Nullable Long id)
id - the custom field IDprotected void afterFieldIsProduced(com.atlassian.jira.issue.fields.CustomField field)
Lock is being held.field - the field which was just createdCopyright © 2007–2025 Atlassian. All rights reserved.