com.atlassian.jira.issue.fields.config.manager
Interface FieldConfigManager

All Known Implementing Classes:
FieldConfigManagerImpl

public interface FieldConfigManager

Manager for field configurations.

See Also:
FieldConfig

Method Summary
 FieldConfig createFieldConfig(FieldConfig newConfig, List configurationItemTypes)
           
 FieldConfig createWithDefaultValues(ConfigurableField field)
           
 FieldConfig getFieldConfig(Long configId)
          Retrieve field configuration by database ID.
 void removeConfigsForConfigScheme(FieldConfigScheme fieldConfigScheme)
          Removes FieldConfig objects that are only associated to the specified FieldConfigScheme.
 FieldConfig updateFieldConfig(FieldConfig newConfig)
           
 

Method Detail

getFieldConfig

FieldConfig getFieldConfig(Long configId)
Retrieve field configuration by database ID.

Parameters:
configId - the database id
Returns:
the FieldConfig object

createFieldConfig

FieldConfig createFieldConfig(FieldConfig newConfig,
                              List configurationItemTypes)

updateFieldConfig

FieldConfig updateFieldConfig(FieldConfig newConfig)

createWithDefaultValues

FieldConfig createWithDefaultValues(ConfigurableField field)

removeConfigsForConfigScheme

void removeConfigsForConfigScheme(FieldConfigScheme fieldConfigScheme)
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:
fieldConfigScheme - the scheme object the fieldConfigs are exclusive to.


Copyright © 2002-2008 Atlassian. All Rights Reserved.