Package hudson.model
Class AutoCompletionCandidates
- java.lang.Object
-
- hudson.model.AutoCompletionCandidates
-
- All Implemented Interfaces:
org.kohsuke.stapler.HttpResponse
public class AutoCompletionCandidates extends Object implements org.kohsuke.stapler.HttpResponse
Data representation of the auto-completion candidates.This object should be returned from your doAutoCompleteXYZ methods.
- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description AutoCompletionCandidates()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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 modifyList
directly.static <T extends Item>
AutoCompletionCandidatesofJobNames(Class<T> type, String value, ItemGroup container)
Auto-completes possible job names.static <T extends Item>
AutoCompletionCandidatesofJobNames(Class<T> type, String value, Item self, ItemGroup container)
Auto-completes possible job names.
-
-
-
Method Detail
-
add
public AutoCompletionCandidates add(String v)
-
add
public AutoCompletionCandidates add(String... v)
-
getValues
public List<String> getValues()
Exposes the raw value, in case you want to modifyList
directly.- Since:
- 1.402
-
generateResponse
public void generateResponse(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, Object o) throws IOException, javax.servlet.ServletException
- Specified by:
generateResponse
in interfaceorg.kohsuke.stapler.HttpResponse
- Throws:
IOException
javax.servlet.ServletException
-
ofJobNames
public static <T extends Item> AutoCompletionCandidates ofJobNames(Class<T> type, String value, @CheckForNull Item self, ItemGroup container)
Auto-completes possible job names.- Parameters:
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 contextualItemGroup
to resolve relative job names from.- Since:
- 1.489
-
ofJobNames
public static <T extends Item> AutoCompletionCandidates ofJobNames(Class<T> type, String value, ItemGroup container)
Auto-completes possible job names.- Parameters:
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 contextualItemGroup
to resolve relative job names from.- Since:
- 1.553
-
-