public interface

FieldConfigSchemeManager

com.atlassian.jira.issue.fields.config.manager.FieldConfigSchemeManager
Known Indirect Subclasses

Summary

Fields
public static final List<GenericValue> ALL_ISSUE_TYPES This magic value list contains a single null element.
Public Methods
FieldConfigScheme createDefaultScheme(ConfigurableField field, List<JiraContextNode> contexts, List<GenericValue> issueTypes)
FieldConfigScheme createDefaultScheme(ConfigurableField field, List<JiraContextNode> contexts)
FieldConfigScheme createFieldConfigScheme(FieldConfigScheme newConfigScheme, List<JiraContextNode> contexts, List<GenericValue> issueTypes, ConfigurableField field)
List<Project> getAssociatedProjectObjects(ConfigurableField field)
Returns a non-null list of Projects associated with the given field.
List<GenericValue> getAssociatedProjects(ConfigurableField field)
This method is deprecated. Use getAssociatedProjectObjects(ConfigurableField) instead. Since v5.2.
FieldConfigScheme getConfigSchemeForFieldConfig(FieldConfig fieldConfig)
Retrieves the FieldConfigScheme associated with the FieldConfig
List<FieldConfigScheme> getConfigSchemesForField(ConfigurableField field)
FieldConfigScheme getFieldConfigScheme(Long configSchemeId)
Collection getInvalidFieldConfigSchemesForIssueTypeRemoval(IssueType issueType)
Returns a collection of FieldConfigSchemes for all Configuration Contexts that will become invalid after the issuetype has been removed.
FieldConfig getRelevantConfig(IssueContext issueContext, ConfigurableField field)
FieldConfigScheme getRelevantConfigScheme(IssueContext issueContext, ConfigurableField field)
Object getValue(BandanaContext context, String key)
Object getValue(BandanaContext context, String key, boolean lookUp)
void init()
void removeFieldConfigScheme(Long fieldConfigSchemeId)
Removes a field config scheme, as well as its associated contexts and field configs (which includes option sets and generic configs)
void removeInvalidFieldConfigSchemesForCustomField(String customFieldId)
Given a CustomField, this method will correctly remove the fieldConfigSchemes if necessary.
void removeInvalidFieldConfigSchemesForIssueType(IssueType issueType)
Given an issueType, this method will correctly remove the fieldConfigSchemes if necessary.
void removeSchemeAssociation(List<JiraContextNode> contexts, ConfigurableField configurableField)
void setValue(BandanaContext context, String key, Object value)
FieldConfigScheme updateFieldConfigScheme(FieldConfigScheme newScheme, List<JiraContextNode> contexts, ConfigurableField field)
Updates the config schemes with the new contexts
FieldConfigScheme updateFieldConfigScheme(FieldConfigScheme scheme)
Only update the name & description of a field

Fields

public static final List<GenericValue> ALL_ISSUE_TYPES

This magic value list contains a single null element. Do not change to an empty list.

Public Methods

public FieldConfigScheme createDefaultScheme (ConfigurableField field, List<JiraContextNode> contexts, List<GenericValue> issueTypes)

public FieldConfigScheme createDefaultScheme (ConfigurableField field, List<JiraContextNode> contexts)

public FieldConfigScheme createFieldConfigScheme (FieldConfigScheme newConfigScheme, List<JiraContextNode> contexts, List<GenericValue> issueTypes, ConfigurableField field)

public List<Project> getAssociatedProjectObjects (ConfigurableField field)

Returns a non-null list of Projects associated with the given field.

Parameters
field the Field
Returns
  • a non-null list of Projects associated with the given field.

public List<GenericValue> getAssociatedProjects (ConfigurableField field)

This method is deprecated.
Use getAssociatedProjectObjects(ConfigurableField) instead. Since v5.2.

Returns a non-null list of Projects associated with the given field.

Parameters
field the Field
Returns
  • a non-null list of Projects associated with the given field.

public FieldConfigScheme getConfigSchemeForFieldConfig (FieldConfig fieldConfig)

Retrieves the FieldConfigScheme associated with the FieldConfig

Parameters
fieldConfig the field config to retrieve the FieldConfigScheme of; cannot be null.
Returns
  • the config scheme for the FieldConfig. Null if the config scheme can not be found.

public List<FieldConfigScheme> getConfigSchemesForField (ConfigurableField field)

public FieldConfigScheme getFieldConfigScheme (Long configSchemeId)

public Collection getInvalidFieldConfigSchemesForIssueTypeRemoval (IssueType issueType)

Returns a collection of FieldConfigSchemes for all Configuration Contexts that will become invalid after the issuetype has been removed. That is the configuration contexts that will no longer be linked to ANY issue types after the issue type passed is has been deleted.

Parameters
issueType The issueType to be deleted
Returns

public FieldConfig getRelevantConfig (IssueContext issueContext, ConfigurableField field)

public FieldConfigScheme getRelevantConfigScheme (IssueContext issueContext, ConfigurableField field)

public Object getValue (BandanaContext context, String key)

public Object getValue (BandanaContext context, String key, boolean lookUp)

public void init ()

public void removeFieldConfigScheme (Long fieldConfigSchemeId)

Removes a field config scheme, as well as its associated contexts and field configs (which includes option sets and generic configs)

Parameters
fieldConfigSchemeId the id of the field config scheme to remove

public void removeInvalidFieldConfigSchemesForCustomField (String customFieldId)

Given a CustomField, this method will correctly remove the fieldConfigSchemes if necessary. In other words if a FieldConfigScheme is linked to only a single CustomField, and we're deleting that field then that FieldConfigScheme will be deleted. If a FieldConfigScheme is associated with multiple fields, then only the association for the field we're deleting will be removed, but the FieldConfigScheme will remain.

Parameters
customFieldId The id of the CustomField being deleted

public void removeInvalidFieldConfigSchemesForIssueType (IssueType issueType)

Given an issueType, this method will correctly remove the fieldConfigSchemes if necessary. In other words if a FieldConfigScheme is linked to only a single issueType, and we're deleting that issuetype then that FieldConfigScheme will be deleted. If a FieldConfigScheme is associated with multiple issueTypes, then only the association for the issueType we're deleting will be removed, but the FieldConfigScheme will remain.

Parameters
issueType The IssueType being deleted

public void removeSchemeAssociation (List<JiraContextNode> contexts, ConfigurableField configurableField)

public void setValue (BandanaContext context, String key, Object value)

public FieldConfigScheme updateFieldConfigScheme (FieldConfigScheme newScheme, List<JiraContextNode> contexts, ConfigurableField field)

Updates the config schemes with the new contexts

Returns
  • The updated scheme

public FieldConfigScheme updateFieldConfigScheme (FieldConfigScheme scheme)

Only update the name & description of a field

Parameters
scheme scheme with the name & description to be updated
Returns
  • the updated scheme