com.atlassian.jira.project.util
Class CachingProjectKeyStore

java.lang.Object
  extended by com.atlassian.jira.project.util.CachingProjectKeyStore
All Implemented Interfaces:
ProjectKeyStore

public class CachingProjectKeyStore
extends Object
implements ProjectKeyStore


Constructor Summary
CachingProjectKeyStore(ProjectKeyStore delegateProjectKeyStore, com.atlassian.cache.CacheManager cacheManager)
           
 
Method Summary
 void addProjectKey(Long projectId, String projectKey)
           
 void deleteProjectKeys(Long projectId)
           
 Map<String,Long> getAllProjectKeys()
           
 Long getProjectId(String key)
           
 Long getProjectIdByKeyIgnoreCase(String projectKey)
           
 Set<String> getProjectKeys(Long projectId)
           
 void onClearCache(ClearCacheEvent event)
           
 void refresh()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingProjectKeyStore

public CachingProjectKeyStore(ProjectKeyStore delegateProjectKeyStore,
                              com.atlassian.cache.CacheManager cacheManager)
Method Detail

onClearCache

@EventListener
public void onClearCache(ClearCacheEvent event)

getProjectId

@Nullable
public Long getProjectId(String key)
Specified by:
getProjectId in interface ProjectKeyStore

addProjectKey

public void addProjectKey(Long projectId,
                          String projectKey)
Specified by:
addProjectKey in interface ProjectKeyStore

deleteProjectKeys

public void deleteProjectKeys(Long projectId)
Specified by:
deleteProjectKeys in interface ProjectKeyStore

getAllProjectKeys

@Nonnull
public Map<String,Long> getAllProjectKeys()
Specified by:
getAllProjectKeys in interface ProjectKeyStore

getProjectIdByKeyIgnoreCase

@Nullable
public Long getProjectIdByKeyIgnoreCase(String projectKey)
Specified by:
getProjectIdByKeyIgnoreCase in interface ProjectKeyStore

getProjectKeys

@Nonnull
public Set<String> getProjectKeys(Long projectId)
Specified by:
getProjectKeys in interface ProjectKeyStore

refresh

public void refresh()
Specified by:
refresh in interface ProjectKeyStore


Copyright © 2002-2014 Atlassian. All Rights Reserved.