Interface FieldConfigSchemePersister
- All Known Implementing Classes:
CachedFieldConfigSchemePersister,FieldConfigSchemePersisterImpl
public interface FieldConfigSchemePersister
-
Method Summary
Modifier and TypeMethodDescriptioncreate(FieldConfigScheme configScheme, ConfigurableField field) createWithDefaultValues(ConfigurableField field, Map<String, FieldConfig> configs) filterRelevantFields(IssueContext issueContext, Set<String> candidateFields) Given a set of candidate fields, returns only those applicable to a given project and issue type.getConfigSchemeForFieldConfig(FieldConfig fieldConfig) Finds theFieldConfigSchemethat contains theFieldConfiggetConfigSchemeIdsForCustomFieldId(String customFieldId) Retrieves the ids of the field config schemes for the specified customfield id.getFieldConfigScheme(Long configSchemeId) Returns a collection of theFieldConfigSchemes that will be made invalid if the issueType is removed (that is the FieldConfigScheme would no longer be bound to ANY issue types).getRelevantFields(Long projectId, String issueTypeId) Deprecated.voidinit()voidvoidremoveByIssueType(IssueType issueType) RemovesFieldConfigSchemeassociations for the given issue type.update(FieldConfigScheme configScheme)
-
Method Details
-
create
-
update
-
remove
-
getFieldConfigScheme
-
getConfigSchemesForCustomField
-
getConfigSchemeForFieldConfig
Finds theFieldConfigSchemethat contains theFieldConfig- Parameters:
fieldConfig- the config to find the containingFieldConfigSchemeof; cannot be null.- Returns:
- the first scheme that contains the
FieldConfig. Not Null.
-
getConfigSchemeIdsForCustomFieldId
Retrieves the ids of the field config schemes for the specified customfield id. This method should be used when fullFieldConfigSchemedomain objects are not required, for example when removing them from the system.- Parameters:
customFieldId- the id of the customfield- Returns:
- a list of ids of the
FieldConfigSchemeobjects associated with this customfield. Should not be null.
-
createWithDefaultValues
-
getInvalidFieldConfigSchemeAfterIssueTypeRemoval
Returns a collection of theFieldConfigSchemes that will be made invalid if the issueType is removed (that is the FieldConfigScheme would no longer be bound to ANY issue types). If there are still any other issue types that a FieldConfigScheme will be bound to after the removal then it will not be included in the collection returned.- Parameters:
issueType- to be removed- Returns:
- A collection of
FieldConfigSchemes or an empty collection. - Since:
- 3.11
-
removeByIssueType
RemovesFieldConfigSchemeassociations for the given issue type. Please note that this method call on it's own is NOT safe. it removes rows from a many-to-many table without considering other entities in the many-to-many relationship. What this means is that if there's only one row left in the table, this method may remove it, and you'll end up with orphaned values. Only use this in conjunction withgetInvalidFieldConfigSchemeAfterIssueTypeRemoval(com.atlassian.jira.issue.issuetype.IssueType).Also see
FieldConfigSchemeManagerImpl.removeInvalidFieldConfigSchemesForIssueType(com.atlassian.jira.issue.issuetype.IssueType)for correct usage.- Parameters:
issueType- the issue type to remove the associations for- Since:
- 3.11
-
init
void init() -
getRelevantFields
Deprecated.since 8.12 usefilterRelevantFields(IssueContext, Set)insteadReturns a set of field id that are applicable to a given project and issue type.- Since:
- 8.10
-
filterRelevantFields
Given a set of candidate fields, returns only those applicable to a given project and issue type.- Since:
- 8.12
-
filterRelevantFields(IssueContext, Set)instead