public class AutoCompletionCandidates extends Object implements org.kohsuke.stapler.HttpResponse
This object should be returned from your doAutoCompleteXYZ methods.
Constructor and Description |
---|
AutoCompletionCandidates() |
Modifier and Type | Method and Description |
---|---|
AutoCompletionCandidates |
add(String... v) |
AutoCompletionCandidates |
add(String v) |
void |
generateResponse(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
Object o) |
List<String> |
getValues()
Exposes the raw value, in case you want to modify
List directly. |
static <T extends Item> |
ofJobNames(Class<T> type,
String value,
ItemGroup container)
Auto-completes possible job names.
|
static <T extends Item> |
ofJobNames(Class<T> type,
String value,
Item self,
ItemGroup container)
Auto-completes possible job names.
|
public AutoCompletionCandidates add(String v)
public AutoCompletionCandidates add(String... v)
public List<String> getValues()
List
directly.public void generateResponse(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, Object o) throws IOException, javax.servlet.ServletException
generateResponse
in interface org.kohsuke.stapler.HttpResponse
IOException
javax.servlet.ServletException
public static <T extends Item> AutoCompletionCandidates ofJobNames(Class<T> type, String value, @CheckForNull Item self, ItemGroup container)
type
- Limit the auto-completion to the subtype of this type.value
- The value the user has typed in. Matched as a prefix.self
- The contextual item for which the auto-completion is provided to.
For example, if you are configuring a job, this is the job being configured.container
- The nearby contextual ItemGroup
to resolve relative job names from.public static <T extends Item> AutoCompletionCandidates ofJobNames(Class<T> type, String value, ItemGroup container)
type
- Limit the auto-completion to the subtype of this type.value
- The value the user has typed in. Matched as a prefix.container
- The nearby contextual ItemGroup
to resolve relative job names from.Copyright © 2004–2022. All rights reserved.