public class CachingVersionStore extends Object implements VersionStore
| Constructor and Description |
|---|
CachingVersionStore(VersionStore delegate,
com.atlassian.cache.CacheManager cacheManager) |
| Modifier and Type | Method and Description |
|---|---|
Version |
createVersion(Version version) |
void |
deleteAllVersions(Long projectId)
Deletes all versions in a given project by removing them from database.
|
void |
deleteVersion(Version version)
Deletes given Version object by removing it from database.
|
Iterable<Version> |
getAllVersions()
Returns a list of GenericValues representing all Versions in JIRA, ordered by sequence.
|
Version |
getVersion(Long id) |
Iterable<Version> |
getVersionsByName(String name)
Returns a list of GenericValues representing all Versions in JIRA with a given name, case insensitively.
|
Iterable<Version> |
getVersionsByProject(Long projectId)
Returns a list of GenericValues representing all Versions in a project.
|
void |
onClearCache(ClearCacheEvent event) |
void |
storeVersion(Version version)
Stores an individual Version in the DB.
|
void |
storeVersions(Collection<Version> versions)
Stores a collection of Version objects.
|
public CachingVersionStore(VersionStore delegate, com.atlassian.cache.CacheManager cacheManager)
@EventListener public void onClearCache(ClearCacheEvent event)
@Nonnull public Iterable<Version> getAllVersions()
VersionStoregetAllVersions in interface VersionStorepublic Version getVersion(Long id)
getVersion in interface VersionStore@Nonnull public Version createVersion(@Nonnull Version version)
createVersion in interface VersionStorepublic void storeVersion(@Nonnull Version version)
VersionStoreVersionStore.storeVersions(java.util.Collection<com.atlassian.jira.project.version.Version>), it can be more efficient.storeVersion in interface VersionStoreversion - The Version to store.VersionStore.storeVersions(java.util.Collection<com.atlassian.jira.project.version.Version>)public void storeVersions(@Nonnull Collection<Version> versions)
VersionStorestoreVersion() multiple times.
eg the CachingVersionStore will reload the cache from DB with every call to storeVersion().storeVersions in interface VersionStoreversions - Collection of Version objects.VersionStore.storeVersion(Version)public void deleteVersion(@Nonnull Version version)
VersionStoredeleteVersion in interface VersionStoreversion - to be deletedpublic void deleteAllVersions(@Nonnull Long projectId)
VersionStoredeleteAllVersions in interface VersionStoreprojectId - of the project in which the versions will be deleted.@Nonnull public Iterable<Version> getVersionsByName(String name)
VersionStoregetVersionsByName in interface VersionStorename - Version name@Nonnull public Iterable<Version> getVersionsByProject(Long projectId)
VersionStoregetVersionsByProject in interface VersionStoreprojectId - Project IdCopyright © 2002-2018 Atlassian. All Rights Reserved.