Class FieldConfigManagerImpl

  extended by com.atlassian.jira.issue.fields.config.manager.FieldConfigManagerImpl
All Implemented Interfaces:

public class FieldConfigManagerImpl
extends Object
implements FieldConfigManager

Constructor Summary
FieldConfigManagerImpl(FieldConfigPersister configPersister, FieldConfigCleanup fieldConfigCleanup)
Method Summary
 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)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public FieldConfigManagerImpl(FieldConfigPersister configPersister,
                              FieldConfigCleanup fieldConfigCleanup)
Method Detail


public FieldConfig getFieldConfig(Long configId)
Description copied from interface: FieldConfigManager
Retrieve field configuration by database ID.

Specified by:
getFieldConfig in interface FieldConfigManager
configId - the database id
the FieldConfig object


public FieldConfig createFieldConfig(FieldConfig newConfig,
                                     List<FieldConfigItemType> configurationItemTypes)
Specified by:
createFieldConfig in interface FieldConfigManager


public FieldConfig createWithDefaultValues(ConfigurableField field)
Specified by:
createWithDefaultValues in interface FieldConfigManager


public FieldConfig updateFieldConfig(FieldConfig newConfig)
Specified by:
updateFieldConfig in interface FieldConfigManager


public void removeConfigsForConfigScheme(Long fieldConfigSchemeId)
Description copied from interface: FieldConfigManager
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.

Specified by:
removeConfigsForConfigScheme in interface FieldConfigManager
fieldConfigSchemeId - the scheme id of the fieldConfigScheme the fieldConfigs are exclusive to.

Copyright © 2002-2013 Atlassian. All Rights Reserved.