|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.project.ProjectCache
This is a very basic cache that stores projects, versions and components When constructed, or when you call refresh() - it will find and cache all projects, components and versions
Constructor Summary | |
protected |
ProjectCache()
Create a new project cache. |
protected |
ProjectCache(boolean refresh)
For testing purposes, we may not want to load the cache at the start. |
Method Summary | |
static ProjectCache |
getCache()
|
GenericValue |
getComponent(java.lang.Long id)
|
java.util.Collection |
getComponents(GenericValue project)
|
GenericValue |
getProject(java.lang.Long id)
|
GenericValue |
getProjectByKey(java.lang.String key)
|
GenericValue |
getProjectByName(java.lang.String name)
|
java.util.Collection |
getProjectCategories()
|
GenericValue |
getProjectCategory(java.lang.Long id)
|
GenericValue |
getProjectCategoryFromProject(GenericValue project1)
|
java.util.Collection |
getProjects()
|
java.util.Collection |
getProjectsFromProjectCategory(GenericValue projectCat)
|
java.util.Collection |
getProjectsWithNoCategory()
|
GenericValue |
getVersion(java.lang.Long id)
|
java.util.Collection |
getVersions(GenericValue project)
|
java.util.Collection |
getVersionsArchived(GenericValue project)
|
java.util.Collection |
getVersionsReleased(GenericValue project,
boolean includeArchived)
|
java.util.Collection |
getVersionsUnarchived(GenericValue project)
|
java.util.Collection |
getVersionsUnreleased(GenericValue project,
boolean includeArchived)
|
void |
refresh()
|
void |
refresh(GenericValue project)
Refresh a single project - called when a single project has been updated (ie counter incremented) but you don't want to refresh the whole cache IMPACT: 3 SQL statements (1 + 2) |
protected void |
refreshProject(GenericValue project)
Get all the components and versions for a project - only called internally IMPACT: Should perform only 2 SQL select statements |
protected void |
refreshProjectCategories()
|
protected void |
refreshProjectCategoriesToProjects()
|
protected void |
refreshProjectsWithNoCategory()
|
protected void |
refreshProjectToProjectCategories()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected ProjectCache()
protected ProjectCache(boolean refresh)
It is recommended that you use ProjectCache()
instead.
refresh
- Method Detail |
public static ProjectCache getCache()
public void refresh()
public void refresh(GenericValue project) throws GenericEntityException
GenericEntityException
protected void refreshProjectCategories() throws GenericEntityException
GenericEntityException
protected void refreshProject(GenericValue project) throws GenericEntityException
GenericEntityException
public GenericValue getProject(java.lang.Long id)
public GenericValue getComponent(java.lang.Long id)
public GenericValue getVersion(java.lang.Long id)
public GenericValue getProjectByName(java.lang.String name)
public GenericValue getProjectByKey(java.lang.String key)
public java.util.Collection getComponents(GenericValue project)
public java.util.Collection getVersions(GenericValue project)
public java.util.Collection getVersionsReleased(GenericValue project, boolean includeArchived)
public java.util.Collection getVersionsUnreleased(GenericValue project, boolean includeArchived)
public java.util.Collection getVersionsArchived(GenericValue project)
public java.util.Collection getVersionsUnarchived(GenericValue project)
public java.util.Collection getProjects()
public java.util.Collection getProjectCategories()
public GenericValue getProjectCategory(java.lang.Long id)
protected void refreshProjectCategoriesToProjects()
public java.util.Collection getProjectsFromProjectCategory(GenericValue projectCat)
protected void refreshProjectToProjectCategories()
public GenericValue getProjectCategoryFromProject(GenericValue project1)
public java.util.Collection getProjectsWithNoCategory()
protected void refreshProjectsWithNoCategory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |