Class CachingTerminologyEntryDao

java.lang.Object
com.atlassian.jira.i18n.terminology.CachingTerminologyEntryDao
All Implemented Interfaces:
TerminologyEntryDao, InitializingComponent

public class CachingTerminologyEntryDao extends Object implements TerminologyEntryDao, InitializingComponent
A TerminologyEntryDao that caches gets from its delegate.

In the past the feature has been called 'Nomenclature'. The new name for the feature is 'Terminology'.

  • Field Details

    • TERMINOLOGY_CACHE_NAME

      public static final String TERMINOLOGY_CACHE_NAME
  • Constructor Details

    • CachingTerminologyEntryDao

      public CachingTerminologyEntryDao(TerminologyEntryDao delegate, com.atlassian.cache.CacheManager cacheManager, com.atlassian.event.api.EventPublisher eventPublisher)
  • Method Details

    • afterInstantiation

      public void afterInstantiation() throws Exception
      Description copied from interface: InitializingComponent
      Called after all the beans are constructed and the ApplicationContext is fully populated. Order of execution is order of bean creation, driven by InitializingComponentProcessor.
      Specified by:
      afterInstantiation in interface InitializingComponent
      Throws:
      Exception
    • onClearCache

      @EventListener public void onClearCache(ClearCacheEvent event)
    • getTerminologyEntry

      public NomenclatureEntryDTO getTerminologyEntry(String originalName)
      Description copied from interface: TerminologyEntryDao
      Returns the terminology entry with the latest timestamp for the given OriginalName.
      Specified by:
      getTerminologyEntry in interface TerminologyEntryDao
      Parameters:
      originalName - The original name of a Jira entity (e.g. "Sprint", "Epic").
      Returns:
      The latest terminology entry or null if none has been set.
    • getAllTerminologyEntries

      public Collection<NomenclatureEntryDTO> getAllTerminologyEntries()
      Description copied from interface: TerminologyEntryDao
      Returns a Collection of all terminology entries with the latest timestamps for each OriginalName.
      Specified by:
      getAllTerminologyEntries in interface TerminologyEntryDao
      Returns:
      A Collection of the latest entries for each Jira entity (e.g. "Sprint", "Epic"). It can be empty.
    • getHistoricalTerminologyEntries

      public Collection<NomenclatureEntryDTO> getHistoricalTerminologyEntries()
      Description copied from interface: TerminologyEntryDao
      Returns a collection of all terminology entries stored in a database. The entries are sorted by a timestamp in descending order.
      Specified by:
      getHistoricalTerminologyEntries in interface TerminologyEntryDao
      Returns:
      A collection of all terminology entries.
    • setTerminologyEntries

      public void setTerminologyEntries(Collection<NomenclatureEntryDTO> terminologyEntryDTOs)
      Description copied from interface: TerminologyEntryDao
      Writes a new name for multiple Jira entities (e.g. "Sprint", "Epic") to the database. Note that this is append-only; the other methods in this interface always return the latest entry for each of the entities renamed in this way.
      Specified by:
      setTerminologyEntries in interface TerminologyEntryDao
      Parameters:
      terminologyEntryDTOs - A collection of new entries to write.