public interface FieldConfigSchemeManager
Modifier and Type | Field and Description |
---|---|
static List<IssueType> |
ALL_ISSUE_TYPES
This magic value list contains a single null element.
|
Modifier and Type | Method and Description |
---|---|
FieldConfigScheme |
createDefaultScheme(ConfigurableField field,
List<JiraContextNode> contexts) |
FieldConfigScheme |
createDefaultScheme(ConfigurableField field,
List<JiraContextNode> contexts,
List<IssueType> issueTypes) |
FieldConfigScheme |
createFieldConfigScheme(FieldConfigScheme newConfigScheme,
List<JiraContextNode> contexts,
List<IssueType> issueTypes,
ConfigurableField field) |
List<Project> |
getAssociatedProjectObjects(ConfigurableField field)
Returns a non-null list of Projects associated with the given field.
|
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
FieldConfigScheme s for all Configuration
Contexts that will become invalid after the issuetype has been removed. |
FieldConfig |
getRelevantConfig(IssueContext issueContext,
ConfigurableField field)
Returns the relevant field config of this custom field for the give issue context
|
FieldConfigScheme |
getRelevantConfigScheme(IssueContext issueContext,
ConfigurableField field)
Deprecated.
Use
getRelevantConfigScheme(Project, ConfigurableField) instead. Since v6.3.7. |
FieldConfigScheme |
getRelevantConfigScheme(Project project,
ConfigurableField field)
Returns the FieldConfigScheme for the given Project and ConfigurableField.
|
void |
init() |
boolean |
isRelevantForIssueContext(IssueContext issueContext,
ConfigurableField field)
Returns true if the custom field has a config for the Project and Issue Type of the given IssueContext.
|
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) |
FieldConfigScheme |
updateFieldConfigScheme(FieldConfigScheme scheme)
Only update the name & description of a field
|
FieldConfigScheme |
updateFieldConfigScheme(FieldConfigScheme newScheme,
List<JiraContextNode> contexts,
ConfigurableField field)
Updates the config schemes with the new contexts
|
void init()
List<FieldConfigScheme> getConfigSchemesForField(ConfigurableField field)
FieldConfigScheme getConfigSchemeForFieldConfig(FieldConfig fieldConfig)
FieldConfigScheme
associated with the
FieldConfig
fieldConfig
- the field config to retrieve the FieldConfigScheme
of; cannot be null.FieldConfig
. Null if the config scheme can not be found.FieldConfigScheme getFieldConfigScheme(Long configSchemeId)
FieldConfigScheme createDefaultScheme(ConfigurableField field, List<JiraContextNode> contexts, List<IssueType> issueTypes)
FieldConfigScheme updateFieldConfigScheme(FieldConfigScheme newScheme, List<JiraContextNode> contexts, ConfigurableField field)
newScheme
- contexts
- field
- FieldConfigScheme updateFieldConfigScheme(FieldConfigScheme scheme)
scheme
- scheme with the name & description to be updatedvoid removeFieldConfigScheme(Long fieldConfigSchemeId)
fieldConfigSchemeId
- the id of the field config scheme to removeboolean isRelevantForIssueContext(IssueContext issueContext, ConfigurableField field)
This is equivalent to calling
getRelevantConfig(issueContext, field) != nullbut in general can run faster because it does not have to resolve the actual FieldConfig.
issueContext
- IssueContext whose project and issue type will be used to check if the field has a configgetRelevantConfig(com.atlassian.jira.issue.context.IssueContext, com.atlassian.jira.issue.fields.ConfigurableField)
FieldConfig getRelevantConfig(IssueContext issueContext, ConfigurableField field)
issueContext
- issue context to find the relevant field config forisRelevantForIssueContext(com.atlassian.jira.issue.context.IssueContext, com.atlassian.jira.issue.fields.ConfigurableField)
FieldConfigScheme createFieldConfigScheme(FieldConfigScheme newConfigScheme, List<JiraContextNode> contexts, List<IssueType> issueTypes, ConfigurableField field)
FieldConfigScheme createDefaultScheme(ConfigurableField field, List<JiraContextNode> contexts)
void removeSchemeAssociation(List<JiraContextNode> contexts, ConfigurableField configurableField)
List<Project> getAssociatedProjectObjects(ConfigurableField field)
field
- the Field@Nullable FieldConfigScheme getRelevantConfigScheme(IssueContext issueContext, ConfigurableField field)
getRelevantConfigScheme(Project, ConfigurableField)
instead. Since v6.3.7.issueContext
- actually we ignore the Issue Type and just use the Project.field
- the ConfigurableField@Nullable FieldConfigScheme getRelevantConfigScheme(Project project, ConfigurableField field)
project
- the Project.field
- the ConfigurableFieldCollection getInvalidFieldConfigSchemesForIssueTypeRemoval(IssueType issueType)
FieldConfigScheme
s 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.issueType
- The issueType to be deletedFieldConfigScheme
svoid removeInvalidFieldConfigSchemesForIssueType(IssueType issueType)
issueType
- The IssueType being deletedvoid removeInvalidFieldConfigSchemesForCustomField(String customFieldId)
customFieldId
- The id of the CustomField being deletedCopyright © 2002-2019 Atlassian. All Rights Reserved.