@Internal public class

CachingFieldConfigContextPersister

extends Object
implements Startable FieldConfigContextPersister
java.lang.Object
   ↳ com.atlassian.jira.issue.context.persistence.CachingFieldConfigContextPersister

@Internal

This class is an internal implementation detail and will change without notice.

Clients that depend on @Internal classes and interfaces can not expect to be compatible with any version other than the version they were compiled against (even minor version and milestone releases may break binary compatibility with respect to @Internal elements).

Class Overview

Caching decorator for FieldConfigContextPersister. This corresponds to the configurationcontext table, which is essentially an association table between CustomField and either a ProjectCategory or a Project, but not both (in practice it is always a Project). Each association also has FieldConfigScheme as a property of the association, and this is where things like default values for custom fields are ultimately stored. When both the project and projectCategory are null, then that database row is in fact a special row holding the FieldConfigScheme for the "Global Context".

See CustomField Configuration - DB Entity Model for a more in-depth explanation of how this all works.

Summary

Public Constructors
CachingFieldConfigContextPersister(OfBizDelegator delegator, ProjectManager projectManager, CacheManager cacheManager)
Creates a new CachingFieldConfigContextPersister that wraps a new FieldConfigContextPersisterImpl instance.
Public Methods
List<JiraContextNode> getAllContextsForConfigScheme(FieldConfigScheme fieldConfigScheme)
@Nullable Long getRelevantConfigSchemeId(Long projectId, String fieldId)
@Nullable Long getRelevantConfigSchemeId(IssueContext issueContext, String fieldId)
@EventListener void onClearCache(ClearCacheEvent clearCacheEvent)
Clears this CachingFieldConfigContextPersister's cache upon receiving a ClearCacheEvent.
void removeContextsForConfigScheme(FieldConfigScheme fieldConfigScheme)
void removeContextsForProject(Project project)
void start()
Registers this CachingFieldConfigContextPersister's cache in the JIRA instrumentation.
void store(String fieldId, Collection<? extends JiraContextNode> contextNodes, FieldConfigScheme fieldConfigScheme)
Bulk store fieldId/contextNode/scheme triplets.
void store(String fieldId, JiraContextNode contextNode, FieldConfigScheme fieldConfigScheme)
Store a fieldId/contextNode/scheme triplet.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.extension.Startable
From interface com.atlassian.jira.issue.context.persistence.FieldConfigContextPersister

Public Constructors

public CachingFieldConfigContextPersister (OfBizDelegator delegator, ProjectManager projectManager, CacheManager cacheManager)

Creates a new CachingFieldConfigContextPersister that wraps a new FieldConfigContextPersisterImpl instance.

Parameters
delegator the OfBizDelegator
projectManager the ProjectManager

Public Methods

public List<JiraContextNode> getAllContextsForConfigScheme (FieldConfigScheme fieldConfigScheme)

@Nullable public Long getRelevantConfigSchemeId (Long projectId, String fieldId)

@Nullable public Long getRelevantConfigSchemeId (IssueContext issueContext, String fieldId)

@EventListener public void onClearCache (ClearCacheEvent clearCacheEvent)

Clears this CachingFieldConfigContextPersister's cache upon receiving a ClearCacheEvent.

Parameters
clearCacheEvent a ClearCacheEvent

public void removeContextsForConfigScheme (FieldConfigScheme fieldConfigScheme)

public void removeContextsForProject (Project project)

public void start ()

Registers this CachingFieldConfigContextPersister's cache in the JIRA instrumentation.

Throws
Exception

public void store (String fieldId, Collection<? extends JiraContextNode> contextNodes, FieldConfigScheme fieldConfigScheme)

Bulk store fieldId/contextNode/scheme triplets.

public void store (String fieldId, JiraContextNode contextNode, FieldConfigScheme fieldConfigScheme)

Store a fieldId/contextNode/scheme triplet.