public class

FieldConfigManagerImpl

extends Object
implements FieldConfigManager
java.lang.Object
   ↳ com.atlassian.jira.issue.fields.config.manager.FieldConfigManagerImpl

Summary

Public Constructors
FieldConfigManagerImpl(FieldConfigPersister configPersister, FieldConfigCleanup fieldConfigCleanup)
Public Methods
FieldConfig createFieldConfig(FieldConfig newConfig, List<FieldConfigItemType> configurationItemTypes)
FieldConfig createWithDefaultValues(ConfigurableField field)
FieldConfig getFieldConfig(Long configId)
Retrieve field configuration by database ID.
void removeConfigsForConfigScheme(Long fieldConfigSchemeId)
Removes FieldConfig objects that are only associated to the specified FieldConfigScheme.
FieldConfig updateFieldConfig(FieldConfig newConfig)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.issue.fields.config.manager.FieldConfigManager

Public Constructors

public FieldConfigManagerImpl (FieldConfigPersister configPersister, FieldConfigCleanup fieldConfigCleanup)

Public Methods

public FieldConfig createFieldConfig (FieldConfig newConfig, List<FieldConfigItemType> configurationItemTypes)

public FieldConfig createWithDefaultValues (ConfigurableField field)

public FieldConfig getFieldConfig (Long configId)

Retrieve field configuration by database ID.

Parameters
configId the database id
Returns
  • the FieldConfig object

public void removeConfigsForConfigScheme (Long fieldConfigSchemeId)

Removes FieldConfig objects that are only associated to the specified FieldConfigScheme. In theory, a FieldConfig should only ever be associated to one FieldConfigScheme, but here we take a defensive approach.

When FieldConfig objects are removed, their associated OptionSets and GenericConfigs are also removed.

Note that the mapping from FieldConfig to FieldConfigScheme in FieldConfigSchemeIssueType is not removed until FieldConfigScheme#remove() is called. Thus, if someone calls FieldConfigSchemeManager#getFieldConfigScheme() after this method is called but before the FieldConfigScheme is removed, a NullPointerException will occur because the FieldConfig referenced by the mapping record no longer exists.

Parameters
fieldConfigSchemeId the scheme id of the fieldConfigScheme the fieldConfigs are exclusive to.

public FieldConfig updateFieldConfig (FieldConfig newConfig)