public class CachedOptionsManager extends DefaultOptionsManager
ENTITY_CONFIG_ID, fieldConfigManager
Constructor and Description |
---|
CachedOptionsManager(OfBizDelegator delegator,
FieldConfigManager fieldConfigManager,
com.atlassian.cache.CacheManager cacheManager) |
Modifier and Type | Method and Description |
---|---|
Option |
createOption(FieldConfig fieldConfig,
Long parentOptionId,
Long sequence,
String value) |
List<Option> |
createOptions(FieldConfig config,
Long parentOptionId,
Long sequence,
Iterable<String> options)
Bulk version of
OptionsManager.createOption(FieldConfig, Long, Long, String) method |
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.
|
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.
|
getOptions
public CachedOptionsManager(OfBizDelegator delegator, FieldConfigManager fieldConfigManager, com.atlassian.cache.CacheManager cacheManager)
@EventListener public void onClearCache(ClearCacheEvent event)
public List<Option> getAllOptions()
OptionsManager
Option
in the system.getAllOptions
in interface OptionsManager
getAllOptions
in class DefaultOptionsManager
public List<Option> findByOptionValue(String value)
OptionsManager
findByOptionValue
in interface OptionsManager
findByOptionValue
in class DefaultOptionsManager
value
- the value of the options to find (case insensitive). Must not be null.public Options getOptions(FieldConfig fieldConfig)
OptionsManager
getOptions
in interface OptionsManager
getOptions
in class DefaultOptionsManager
fieldConfig
- For example, retrieved from CustomField.getRelevantConfig(com.atlassian.jira.issue.Issue)
public void setRootOptions(FieldConfig fieldConfig, Options options)
setRootOptions
in interface OptionsManager
setRootOptions
in class DefaultOptionsManager
public void removeCustomFieldOptions(CustomField customField)
removeCustomFieldOptions
in interface OptionsManager
removeCustomFieldOptions
in class DefaultOptionsManager
public void removeCustomFieldConfigOptions(FieldConfig fieldConfig)
removeCustomFieldConfigOptions
in interface OptionsManager
removeCustomFieldConfigOptions
in class DefaultOptionsManager
public void updateOptions(Collection<Option> options)
OptionsManager
Options
objects may be stale, and should be
re-fetched with OptionsManager.getOptions(com.atlassian.jira.issue.fields.config.FieldConfig)
.updateOptions
in interface OptionsManager
updateOptions
in class DefaultOptionsManager
options
- Usually an Options
implementation.public Option createOption(FieldConfig fieldConfig, Long parentOptionId, Long sequence, String value)
createOption
in interface OptionsManager
createOption
in class DefaultOptionsManager
public List<Option> createOptions(FieldConfig config, Long parentOptionId, Long sequence, Iterable<String> options)
OptionsManager
OptionsManager.createOption(FieldConfig, Long, Long, String)
methodcreateOptions
in interface OptionsManager
createOptions
in class DefaultOptionsManager
public void deleteOptionAndChildren(Option option)
deleteOptionAndChildren
in interface OptionsManager
deleteOptionAndChildren
in class DefaultOptionsManager
public void setValue(Option option, String value)
setValue
in interface OptionsManager
setValue
in class DefaultOptionsManager
public void disableOption(Option option)
OptionsManager
disableOption
in interface OptionsManager
disableOption
in class DefaultOptionsManager
option
- The option to be disabled.public void enableOption(Option option)
OptionsManager
enableOption
in interface OptionsManager
enableOption
in class DefaultOptionsManager
option
- The Option to enable.public Option findByOptionId(Long optionId)
findByOptionId
in interface OptionsManager
findByOptionId
in class DefaultOptionsManager
public List<Option> findByParentId(Long parentOptionId)
findByParentId
in interface OptionsManager
findByParentId
in class DefaultOptionsManager
Copyright © 2002-2024 Atlassian. All Rights Reserved.