|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.issue.context.persistence.CachingFieldConfigContextPersister
@Internal public class CachingFieldConfigContextPersister
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".
Constructor Summary | |
---|---|
CachingFieldConfigContextPersister(OfBizDelegator delegator,
ProjectManager projectManager,
JiraContextTreeManager treeManager,
com.atlassian.cache.CacheManager cacheManager)
Creates a new CachingFieldConfigContextPersister that wraps a new FieldConfigContextPersisterImpl instance. |
Method Summary | |
---|---|
void |
flushCaches()
|
List<JiraContextNode> |
getAllContextsForConfigScheme(FieldConfigScheme fieldConfigScheme)
|
List<JiraContextNode> |
getAllContextsForCustomField(String key)
|
void |
onClearCache(ClearCacheEvent clearCacheEvent)
Clears this CachingFieldConfigContextPersister's cache upon receiving a ClearCacheEvent. |
void |
remove(com.atlassian.bandana.BandanaContext context)
|
void |
remove(com.atlassian.bandana.BandanaContext context,
String customField)
|
void |
removeContextsForConfigScheme(FieldConfigScheme fieldConfigScheme)
|
void |
removeContextsForConfigScheme(Long fieldConfigSchemeId)
Remove contexts for a scheme |
void |
removeContextsForProject(org.ofbiz.core.entity.GenericValue project)
|
void |
removeContextsForProject(Project project)
|
void |
removeContextsForProjectCategory(ProjectCategory projectCategory)
|
Object |
retrieve(com.atlassian.bandana.BandanaContext context,
String key)
|
void |
start()
Registers this CachingFieldConfigContextPersister's cache in the JIRA instrumentation. |
void |
store(com.atlassian.bandana.BandanaContext context,
String customField,
Object fieldConfigScheme)
|
void |
store(Collection<? extends com.atlassian.bandana.BandanaContext> contexts,
String customField,
Object fieldConfigScheme)
Bulk store context/key/value triplets. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CachingFieldConfigContextPersister(OfBizDelegator delegator, ProjectManager projectManager, JiraContextTreeManager treeManager, com.atlassian.cache.CacheManager cacheManager)
delegator
- the OfBizDelegatorprojectManager
- the ProjectManagertreeManager
- the JiraContextTreeManagerMethod Detail |
---|
public void start() throws Exception
start
in interface Startable
Exception
@EventListener public void onClearCache(ClearCacheEvent clearCacheEvent)
clearCacheEvent
- a ClearCacheEventpublic List<JiraContextNode> getAllContextsForCustomField(String key)
getAllContextsForCustomField
in interface FieldConfigContextPersister
public List<JiraContextNode> getAllContextsForConfigScheme(FieldConfigScheme fieldConfigScheme)
getAllContextsForConfigScheme
in interface FieldConfigContextPersister
public void removeContextsForConfigScheme(FieldConfigScheme fieldConfigScheme)
removeContextsForConfigScheme
in interface FieldConfigContextPersister
public void removeContextsForConfigScheme(Long fieldConfigSchemeId)
FieldConfigContextPersister
removeContextsForConfigScheme
in interface FieldConfigContextPersister
fieldConfigSchemeId
- ID of scheme to remove.public void removeContextsForProject(org.ofbiz.core.entity.GenericValue project)
removeContextsForProject
in interface FieldConfigContextPersister
project
- the projectpublic void removeContextsForProject(Project project)
removeContextsForProject
in interface FieldConfigContextPersister
public void removeContextsForProjectCategory(ProjectCategory projectCategory)
removeContextsForProjectCategory
in interface FieldConfigContextPersister
public Object retrieve(com.atlassian.bandana.BandanaContext context, String key)
retrieve
in interface com.atlassian.bandana.BandanaPersister
public void store(com.atlassian.bandana.BandanaContext context, String customField, Object fieldConfigScheme)
store
in interface com.atlassian.bandana.BandanaPersister
public void store(Collection<? extends com.atlassian.bandana.BandanaContext> contexts, String customField, Object fieldConfigScheme)
FieldConfigContextPersister
store
in interface FieldConfigContextPersister
public void flushCaches()
flushCaches
in interface com.atlassian.bandana.BandanaPersister
public void remove(com.atlassian.bandana.BandanaContext context)
remove
in interface com.atlassian.bandana.BandanaPersister
public void remove(com.atlassian.bandana.BandanaContext context, String customField)
remove
in interface com.atlassian.bandana.BandanaPersister
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |