public class MockOptionsManager extends Object implements OptionsManager
| Constructor and Description |
|---|
MockOptionsManager() |
| 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. |
List<Option> |
getOptions(CustomField field,
Collection<Long> projectIds,
Collection<String> issueTypeIds)
Returns all options in the context of given projects and issue types for the custom field.
|
Options |
getOptions(FieldConfig fieldConfig)
Get options for this particular custom field type.
|
static List<String> |
optionsToPaths(Iterable<? extends Option> options) |
void |
removeCustomFieldConfigOptions(FieldConfig fieldConfig) |
void |
removeCustomFieldOptions(CustomField customField) |
void |
setRootOptions(FieldConfig fieldConfig,
Options options) |
void |
setValue(Option option,
String value) |
void |
store(Option option) |
void |
updateOptions(Collection<Option> options)
Update a set of options.
|
public Options getOptions(FieldConfig fieldConfig)
OptionsManagergetOptions in interface OptionsManagerfieldConfig - For example, retrieved from CustomField.getRelevantConfig(com.atlassian.jira.issue.Issue)public void setRootOptions(FieldConfig fieldConfig, Options options)
setRootOptions in interface OptionsManagerpublic void removeCustomFieldOptions(CustomField customField)
removeCustomFieldOptions in interface OptionsManagerpublic void removeCustomFieldConfigOptions(FieldConfig fieldConfig)
removeCustomFieldConfigOptions in interface OptionsManagerpublic void updateOptions(Collection<Option> options)
OptionsManagerOptions objects may be stale, and should be
re-fetched with OptionsManager.getOptions(com.atlassian.jira.issue.fields.config.FieldConfig).updateOptions in interface OptionsManageroptions - Usually an Options implementation.public Option createOption(FieldConfig fieldConfig, Long parentOptionId, Long sequence, String value)
createOption in interface OptionsManagerpublic List<Option> createOptions(FieldConfig config, Long parentOptionId, Long sequence, Iterable<String> options)
OptionsManagerOptionsManager.createOption(FieldConfig, Long, Long, String) methodcreateOptions in interface OptionsManagerpublic void deleteOptionAndChildren(Option option)
deleteOptionAndChildren in interface OptionsManagerpublic Option findByOptionId(Long optionId)
findByOptionId in interface OptionsManagerpublic List<Option> getAllOptions()
OptionsManagerOption in the system.getAllOptions in interface OptionsManagerpublic void enableOption(Option option)
OptionsManagerenableOption in interface OptionsManageroption - The Option to enable.public void disableOption(Option option)
OptionsManagerdisableOption in interface OptionsManageroption - The option to be disabled.public void setValue(Option option, String value)
setValue in interface OptionsManagerpublic List<Option> findByOptionValue(String value)
OptionsManagerfindByOptionValue in interface OptionsManagervalue - the value of the options to find (case insensitive). Must not be null.public List<Option> findByParentId(Long parentOptionId)
findByParentId in interface OptionsManager@Nonnull public List<Option> getOptions(@Nonnull CustomField field, @Nonnull Collection<Long> projectIds, @Nonnull Collection<String> issueTypeIds)
OptionsManagergetOptions in interface OptionsManagerfield - a custom field whose options are requestedprojectIds - a collection of project idsissueTypeIds - a collection of issue types idsSearchContext,
CustomField.getReleventConfig(SearchContext),
FieldConfigpublic void store(Option option)
Copyright © 2002-2024 Atlassian. All Rights Reserved.