Interface GenericConfigManager

All Known Implementing Classes:
CachedGenericConfigManager, DefaultGenericConfigManager

public interface GenericConfigManager
Used to store Generic configuration values (mostly default values for certain fields). Implementations should aim to manage any plain java object. Two implementations of this interface exist in Jira: An in memory cache (CachedGenericConfigManager) and an implementation responsible for storing the config values in the DB (DefaultGenericConfigManager). For DB persistence, objects are serialized to XML.
  • Field Details

  • Method Details

    • create

      void create(String dataType, String key, @Nullable Object obj)
      Stores a new entry for the config manager. For example a customfield may have a default value.
      Parameters:
      dataType - The datatype for which to store the generic config (e.g.: DefaultValue)
      key - A key that identifies the element (e.g.: 10000)
      obj - The actual object to store.
    • update

      void update(String dataType, String key, @Nullable Object obj)
      Updates an entry.
      Parameters:
      dataType - The datatype for which to store the generic config (e.g.: DefaultValue)
      key - A key that identifies the element (e.g.: 10000)
      obj - The actual object to store.
    • retrieve

      Object retrieve(String dataType, String key)
      Retrieves a particular entry.
      Parameters:
      dataType - The datatype for which to store the generic config (e.g.: DefaultValue)
      key - A key that identifies the element (e.g.: 10000)
      Returns:
      The entry, or null if it doesn't exist.
    • remove

      void remove(String dataType, String key)
      Removes a generic config value.
      Parameters:
      dataType - The datatype for which to store the generic config (e.g.: DefaultValue)
      key - A key that identifies the element (e.g.: 10000)