com.atlassian.jira.issue.customfields.manager
Interface OptionsManager

All Known Implementing Classes:
CachedOptionsManager, DefaultOptionsManager

public interface OptionsManager

Manages option values for fields (eg. custom field select lists).


Method Summary
 Option createOption(FieldConfig fieldConfig, java.lang.Long parentOptionId, java.lang.Long sequence, java.lang.String value)
           
 void deleteOptionAndChildren(Option option)
           
 Option findByOptionId(java.lang.Long optionId)
           
 java.util.List<Option> findByOptionValue(java.lang.String value)
          Finds all options with the given value.
 java.util.List<Option> findByParentId(java.lang.Long parentOptionId)
           
 java.util.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 updateOptions(java.util.Collection<Option> options)
          Update a set of options.
 

Method Detail

getOptions

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 CustomField.getRelevantConfig(com.atlassian.jira.issue.Issue)
Returns:
An option Object of Options

setRootOptions

void setRootOptions(FieldConfig fieldConfig,
                    Options options)

removeCustomFieldOptions

void removeCustomFieldOptions(CustomField customField)

removeCustomFieldConfigOptions

void removeCustomFieldConfigOptions(FieldConfig fieldConfig)

updateOptions

void updateOptions(java.util.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.

createOption

Option createOption(FieldConfig fieldConfig,
                    java.lang.Long parentOptionId,
                    java.lang.Long sequence,
                    java.lang.String value)

deleteOptionAndChildren

void deleteOptionAndChildren(Option option)

findByOptionId

Option findByOptionId(java.lang.Long optionId)

getAllOptions

java.util.List<Option> getAllOptions()
Retreives all Option in the system.

Returns:
a list of all options in the system

findByOptionValue

java.util.List<Option> findByOptionValue(java.lang.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.

findByParentId

java.util.List<Option> findByParentId(java.lang.Long parentOptionId)


Copyright © 2002-2010 Atlassian. All Rights Reserved.