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

All Known Implementing Classes:
DefaultOptionsService

@ExperimentalApi
public interface OptionsService

A service to manipulate the options associated with a CustomField.

Since:
v6.1

Nested Class Summary
static class OptionsService.SetOptionParams
           
static interface OptionsService.SetValidateResult
           
 
Method Summary
 ServiceOutcome<Options> setOptions(OptionsService.SetValidateResult request)
          Replace the options on the custom field.
 ServiceOutcome<OptionsService.SetValidateResult> validateSetOptions(OptionsService.SetOptionParams param)
          Check that the options of a CustomField can be replaced with (i.e.
 

Method Detail

validateSetOptions

@Nonnull
ServiceOutcome<OptionsService.SetValidateResult> validateSetOptions(@Nonnull
                                                                            OptionsService.SetOptionParams param)
Check that the options of a CustomField can be replaced with (i.e. current options deleted and set to) the passed options. The actual operation will not be executed until a call to setOptions(com.atlassian.jira.issue.customfields.manager.OptionsService.SetValidateResult) is later made.

Parameters:
param - the request.
Returns:
the result of the operation. The OptionsService.SetValidateResult can be passed to setOptions(com.atlassian.jira.issue.customfields.manager.OptionsService.SetValidateResult) to actually perform the update.

setOptions

@Nonnull
ServiceOutcome<Options> setOptions(@Nonnull
                                           OptionsService.SetValidateResult request)
Replace the options on the custom field. The current options will be deleted (along with their values) and new options created. No attempt is made to keep the current options or their values (i.e. even if an option has the same name before and after the operation). The options are set to the values passed to the validateSetOptions(com.atlassian.jira.issue.customfields.manager.OptionsService.SetOptionParams) that generated the passed OptionsService.SetValidateResult.

Parameters:
request - a request previously validated by validateSetOptions(com.atlassian.jira.issue.customfields.manager.OptionsService.SetOptionParams).
Returns:
the result of the operation.


Copyright © 2002-2014 Atlassian. All Rights Reserved.