public class

CachedOptionsManager

extends DefaultOptionsManager
java.lang.Object
   ↳ com.atlassian.jira.issue.customfields.manager.DefaultOptionsManager
     ↳ com.atlassian.jira.issue.customfields.manager.CachedOptionsManager

Class Overview

Cache for Options Manager. Not particularly neat More a problem with how the OptionsManager is used really

Summary

[Expand]
Inherited Constants
From class com.atlassian.jira.issue.customfields.manager.DefaultOptionsManager
[Expand]
Inherited Fields
From class com.atlassian.jira.issue.customfields.manager.DefaultOptionsManager
Public Constructors
CachedOptionsManager(OfBizDelegator delegator, CollectionReorderer<Option> reorderer, FieldConfigManager fieldConfigManager, CacheManager cacheManager)
Public Methods
Option createOption(FieldConfig fieldConfig, Long parentOptionId, Long sequence, String value)
void deleteOptionAndChildren(Option option)
void disableOption(Option option)
Set an option to disabled.
void enableOption(Option option)
Set an option to enabled.
Option findByOptionId(Long optionId)
List<Option> findByOptionValue(String value)
Finds all options with the given value.
List<Option> findByParentId(Long parentOptionId)
List<Option> getAllOptions()
Retreives all Option in the system.
Options getOptions(FieldConfig fieldConfig)
Get options for this particular custom field type.
@EventListener void onClearCache(ClearCacheEvent event)
void removeCustomFieldConfigOptions(FieldConfig fieldConfig)
void removeCustomFieldOptions(CustomField customField)
void setRootOptions(FieldConfig fieldConfig, Options options)
void setValue(Option option, String value)
void updateOptions(Collection<Option> options)
Update a set of options.
[Expand]
Inherited Methods
From class com.atlassian.jira.issue.customfields.manager.DefaultOptionsManager
From class java.lang.Object
From interface com.atlassian.jira.issue.customfields.manager.OptionsManager

Public Constructors

public CachedOptionsManager (OfBizDelegator delegator, CollectionReorderer<Option> reorderer, FieldConfigManager fieldConfigManager, CacheManager cacheManager)

Public Methods

public Option createOption (FieldConfig fieldConfig, Long parentOptionId, Long sequence, String value)

public void deleteOptionAndChildren (Option option)

public void disableOption (Option option)

Set an option to disabled. A disabled option will is not available to be assigned to this associated custom field, It remains valid historically and for searching with.

Parameters
option The option to be disabled.

public void enableOption (Option option)

Set an option to enabled.

Parameters
option The Option to enable.

public Option findByOptionId (Long optionId)

public List<Option> findByOptionValue (String value)

Finds all options with the given value. Returns and empty list if no options are found.

Parameters
value the value of the options to find (case insensitive). Must not be null.
Returns
  • the list of found options, empty if non found.

public List<Option> findByParentId (Long parentOptionId)

public List<Option> getAllOptions ()

Retreives all Option in the system.

Returns
  • a list of all options in the system

public Options getOptions (FieldConfig fieldConfig)

Get options for this particular custom field type. As a custom field may have multiple types of options (eg cascading drop downs), the type can be used to signify this

Parameters
fieldConfig For example, retrieved from getRelevantConfig(com.atlassian.jira.issue.Issue)
Returns
  • An option Object of Options

@EventListener public void onClearCache (ClearCacheEvent event)

public void removeCustomFieldConfigOptions (FieldConfig fieldConfig)

public void removeCustomFieldOptions (CustomField customField)

public void setRootOptions (FieldConfig fieldConfig, Options options)

public void setValue (Option option, String value)

public void updateOptions (Collection<Option> options)

Update a set of options. After doing this, any existing Options objects may be stale, and should be re-fetched with getOptions(com.atlassian.jira.issue.fields.config.FieldConfig).

Parameters
options Usually an Options implementation.