Class PropertySetBackedUserFormatTypeConfiguration

java.lang.Object
com.atlassian.jira.plugin.userformat.configuration.PropertySetBackedUserFormatTypeConfiguration
All Implemented Interfaces:
UserFormatTypeConfiguration

public class PropertySetBackedUserFormatTypeConfiguration extends Object implements UserFormatTypeConfiguration
Responsible for storing the configured user format modules for each user format type in a property set.

The underlying property set stores the name of a user format type as a key an its value is the plugin module key of the user format descriptor currently configured for that type.

Since:
v3.13
  • Constructor Details

    • PropertySetBackedUserFormatTypeConfiguration

      public PropertySetBackedUserFormatTypeConfiguration(JiraPropertySetFactory jiraPropertySetFactory, com.atlassian.cache.CacheManager cacheManager)
  • Method Details

    • onClearCache

      @EventListener public void onClearCache(ClearCacheEvent event)
    • setUserFormatKeyForType

      public void setUserFormatKeyForType(String userFormatType, String moduleKey)
      Description copied from interface: UserFormatTypeConfiguration
      Stores a configuration entry for the specified type agains a user format module descriptor key.
      Specified by:
      setUserFormatKeyForType in interface UserFormatTypeConfiguration
      Parameters:
      userFormatType - the user format type to configure.
      moduleKey - The complete module key of the .
    • getUserFormatKeyForType

      public String getUserFormatKeyForType(String userFormatType)
      Description copied from interface: UserFormatTypeConfiguration
      Retrieves the module key of the user format descriptor configured to render the specified type.
      Specified by:
      getUserFormatKeyForType in interface UserFormatTypeConfiguration
      Parameters:
      userFormatType - The type to retrieve a module key for.
      Returns:
      the module key of the user format descriptor configured to render the specified type, or null if there is no module key configured for that type.
    • containsType

      public boolean containsType(String userFormatType)
      Description copied from interface: UserFormatTypeConfiguration
      Whether there is a configuration entry stored for the specified type.
      Specified by:
      containsType in interface UserFormatTypeConfiguration
      Parameters:
      userFormatType - The type find a confiuration entry for.
      Returns:
      true if there is configuration entry stored for the specified type; otherwise false.
    • remove

      public void remove(String userFormatType)
      Description copied from interface: UserFormatTypeConfiguration
      Removes the configuration entry for the specified type if one exists.
      Specified by:
      remove in interface UserFormatTypeConfiguration
      Parameters:
      userFormatType - The type to remove from the configuration.