com.pyxis.greenhopper.jira.configurations.layout
Class LayoutsCacheImpl

java.lang.Object
  extended by com.pyxis.greenhopper.jira.configurations.layout.LayoutsCacheImpl
All Implemented Interfaces:
GreenHopperCache, LayoutsCache

@Service
public class LayoutsCacheImpl
extends java.lang.Object
implements LayoutsCache, GreenHopperCache


Nested Class Summary
 class LayoutsCacheImpl.FieldLayoutCacheLoader
          Loads a list of issue fields for a given IssueTypeLayoutsCacheKey.
 
Constructor Summary
LayoutsCacheImpl()
           
 
Method Summary
 void flushCache()
          Invoked when all caches in the plugin need to be cleared.
 java.util.List<IssueField> getLayouts(IssueTypeLayoutsCacheKey cacheKey)
          Retrieves the cached field layouts.
 int getLines(IssueTypeLayoutsCacheKey cacheKey)
          Retrieves the cached lines count.
 java.lang.Integer getMaxLineCount(GlobalLayoutsCacheKey cacheKey)
          Retrieves the cached max line count cache.
 void init()
           
 void removeCachedObjects(GlobalLayoutsCacheKey globalLayoutsCacheKey)
          Remove cached objects related to the global key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutsCacheImpl

public LayoutsCacheImpl()
Method Detail

init

@PostConstruct
public void init()

getLayouts

public java.util.List<IssueField> getLayouts(IssueTypeLayoutsCacheKey cacheKey)
Description copied from interface: LayoutsCache
Retrieves the cached field layouts.

Specified by:
getLayouts in interface LayoutsCache
Parameters:
cacheKey - the key
Returns:
the fields
See Also:
AbstractLayouts.getLayout(com.atlassian.greenhopper.service.issue.IssueFieldManager, com.atlassian.jira.issue.issuetype.IssueType)

getLines

public int getLines(IssueTypeLayoutsCacheKey cacheKey)
Description copied from interface: LayoutsCache
Retrieves the cached lines count.

Specified by:
getLines in interface LayoutsCache
Parameters:
cacheKey - the key
Returns:
the line count
See Also:
AbstractLayouts.getLineCount(com.atlassian.greenhopper.service.issue.IssueFieldManager, String)

getMaxLineCount

public java.lang.Integer getMaxLineCount(GlobalLayoutsCacheKey cacheKey)
Description copied from interface: LayoutsCache
Retrieves the cached max line count cache. This is independent of issue type.

Specified by:
getMaxLineCount in interface LayoutsCache
Parameters:
cacheKey - the key
Returns:
the max number of lines
See Also:
AbstractLayouts.getMaxLineCount(com.atlassian.greenhopper.service.issue.IssueFieldManager)

removeCachedObjects

public void removeCachedObjects(GlobalLayoutsCacheKey globalLayoutsCacheKey)
Description copied from interface: LayoutsCache
Remove cached objects related to the global key. This will clear all three kinds of cached objects, as they are linked to one another.

Specified by:
removeCachedObjects in interface LayoutsCache
Parameters:
globalLayoutsCacheKey - the global key

flushCache

public void flushCache()
Description copied from interface: GreenHopperCache
Invoked when all caches in the plugin need to be cleared.

Specified by:
flushCache in interface GreenHopperCache


Copyright © 2007-2014 Atlassian. All Rights Reserved.