public class

CachedFieldConfigSchemePersister

extends FieldConfigSchemePersisterImpl
java.lang.Object
   ↳ com.atlassian.jira.issue.fields.config.persistence.FieldConfigSchemePersisterImpl
     ↳ com.atlassian.jira.issue.fields.config.persistence.CachedFieldConfigSchemePersister

Class Overview

A simple caching wrapper

NOTE : you may be wondering about the cache invalidation strategy on this cache. Will the top level classes that use this cache such as com.atlassian.jira.issue.CustomFieldManager@refreshCache call init() and this clears the cache.

TODO: This probably should be rewritten so that the upper lays of code are not responsible for clearing the lower level caches and also the "cache inheritance" pattern should be removed.

Summary

[Expand]
Inherited Constants
From class com.atlassian.jira.issue.fields.config.persistence.FieldConfigSchemePersisterImpl
Public Constructors
CachedFieldConfigSchemePersister(OfBizDelegator delegator, ConstantsManager constantsManager, FieldConfigPersister fieldConfigPersister, FieldConfigContextPersister fieldContextPersister, CacheManager cacheManager, FieldConfigManager fieldConfigManager, CacheManager ca)
Public Methods
@Nullable FieldConfigScheme getConfigSchemeForFieldConfig(FieldConfig fieldConfig)
Finds the FieldConfigScheme that contains the FieldConfig
@Nullable List<FieldConfigScheme> getConfigSchemesForCustomField(ConfigurableField field)
@Nullable FieldConfigScheme getFieldConfigScheme(Long configSchemeId)
void init()
@EventListener void onClearCache(ClearCacheEvent event)
void remove(Long fieldConfigSchemeId)
FieldConfigScheme update(FieldConfigScheme configScheme)
Protected Methods
void removeRelatedConfigsForUpdate(FieldConfigScheme configScheme, GenericValue gv)
[Expand]
Inherited Methods
From class com.atlassian.jira.issue.fields.config.persistence.FieldConfigSchemePersisterImpl
From class java.lang.Object
From interface com.atlassian.jira.issue.fields.config.persistence.FieldConfigSchemePersister

Public Constructors

public CachedFieldConfigSchemePersister (OfBizDelegator delegator, ConstantsManager constantsManager, FieldConfigPersister fieldConfigPersister, FieldConfigContextPersister fieldContextPersister, CacheManager cacheManager, FieldConfigManager fieldConfigManager, CacheManager ca)

Public Methods

@Nullable public FieldConfigScheme getConfigSchemeForFieldConfig (FieldConfig fieldConfig)

Finds the FieldConfigScheme that contains the FieldConfig

Parameters
fieldConfig the config to find the containing FieldConfigScheme of; cannot be null.
Returns
  • the first scheme that contains the FieldConfig. Not Null.

@Nullable public List<FieldConfigScheme> getConfigSchemesForCustomField (ConfigurableField field)

@Nullable public FieldConfigScheme getFieldConfigScheme (Long configSchemeId)

public void init ()

@EventListener public void onClearCache (ClearCacheEvent event)

public void remove (Long fieldConfigSchemeId)

public FieldConfigScheme update (FieldConfigScheme configScheme)

Protected Methods

protected void removeRelatedConfigsForUpdate (FieldConfigScheme configScheme, GenericValue gv)

Throws
GenericEntityException