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
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic interface -
Method Summary
Modifier and TypeMethodDescriptionReplace the options on the custom field.Check that the options of aCustomFieldcan be replaced with (i.e.
-
Method Details
-
validateSetOptions
@Nonnull ServiceOutcome<OptionsService.SetValidateResult> validateSetOptions(@Nonnull OptionsService.SetOptionParams param) Check that the options of aCustomFieldcan be replaced with (i.e. current options deleted and set to) the passed options. The actual operation will not be executed until a call tosetOptions(com.atlassian.jira.issue.customfields.manager.OptionsService.SetValidateResult)is later made.- Parameters:
param- the request.- Returns:
- the result of the operation. The
OptionsService.SetValidateResultcan be passed tosetOptions(com.atlassian.jira.issue.customfields.manager.OptionsService.SetValidateResult)to actually perform the update.
-
setOptions
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 thevalidateSetOptions(com.atlassian.jira.issue.customfields.manager.OptionsService.SetOptionParams)that generated the passedOptionsService.SetValidateResult.- Parameters:
request- a request previously validated byvalidateSetOptions(com.atlassian.jira.issue.customfields.manager.OptionsService.SetOptionParams).- Returns:
- the result of the operation.
-