public class DefaultOptionsManager extends Object implements OptionsManager
Modifier and Type | Field and Description |
---|---|
static String |
ENTITY_CONFIG_ID |
protected FieldConfigManager |
fieldConfigManager |
Constructor and Description |
---|
DefaultOptionsManager(OfBizDelegator delegator,
FieldConfigManager fieldConfigManager) |
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 |
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.
|
public static final String ENTITY_CONFIG_ID
protected final FieldConfigManager fieldConfigManager
public DefaultOptionsManager(OfBizDelegator delegator, FieldConfigManager fieldConfigManager)
public Options getOptions(FieldConfig fieldConfig)
OptionsManager
getOptions
in interface OptionsManager
fieldConfig
- For example, retrieved from CustomField.getRelevantConfig(com.atlassian.jira.issue.Issue)
public void setRootOptions(FieldConfig fieldConfig, Options options)
setRootOptions
in interface OptionsManager
public void removeCustomFieldOptions(CustomField customField)
removeCustomFieldOptions
in interface OptionsManager
public void removeCustomFieldConfigOptions(FieldConfig fieldConfig)
removeCustomFieldConfigOptions
in interface OptionsManager
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
options
- Usually an Options
implementation.public Option createOption(FieldConfig fieldConfig, Long parentOptionId, Long sequence, String value)
createOption
in interface OptionsManager
public List<Option> createOptions(FieldConfig config, Long parentOptionId, Long sequence, Iterable<String> options)
OptionsManager
OptionsManager.createOption(FieldConfig, Long, Long, String)
methodcreateOptions
in interface OptionsManager
public void deleteOptionAndChildren(Option option)
deleteOptionAndChildren
in interface OptionsManager
public List<Option> getAllOptions()
OptionsManager
Option
in the system.getAllOptions
in interface OptionsManager
public void disableOption(Option option)
OptionsManager
disableOption
in interface OptionsManager
option
- The option to be disabled.public void enableOption(Option option)
OptionsManager
enableOption
in interface OptionsManager
option
- The Option to enable.public void setValue(Option option, String value)
setValue
in interface OptionsManager
public List<Option> findByOptionValue(String value)
OptionsManager
findByOptionValue
in interface OptionsManager
value
- the value of the options to find (case insensitive). Must not be null.public Option findByOptionId(Long optionId)
findByOptionId
in interface OptionsManager
public List<Option> findByParentId(Long parentOptionId)
findByParentId
in interface OptionsManager
Copyright © 2002-2019 Atlassian. All Rights Reserved.