Package hudson.search
Class SuggestedItem
- java.lang.Object
-
- hudson.search.SuggestedItem
-
public class SuggestedItem extends Object
One item of a search result.- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description SearchItem
item
-
Constructor Summary
Constructors Constructor Description SuggestedItem(SearchItem top)
SuggestedItem(SuggestedItem parent, SearchItem item)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SuggestedItem
build(SearchableModelObject searchContext, SearchItem si)
Given a SearchItem, builds a SuggestedItem hierarchy by looking up parent items (if applicable).String
getPath()
String
getUrl()
Gets the URL to this item.
-
-
-
Field Detail
-
item
public final SearchItem item
-
-
Constructor Detail
-
SuggestedItem
public SuggestedItem(SearchItem top)
-
SuggestedItem
public SuggestedItem(SuggestedItem parent, SearchItem item)
-
-
Method Detail
-
getPath
public String getPath()
-
getUrl
public String getUrl()
Gets the URL to this item.- Returns:
- URL that starts with '/' but doesn't end with '/'.
The path is the combined path from the
SearchIndex
where the search started to the final item found. Thus to convert to the actual URL, the caller would need to prepend the URL of the object where the search started.
-
build
public static SuggestedItem build(SearchableModelObject searchContext, SearchItem si)
Given a SearchItem, builds a SuggestedItem hierarchy by looking up parent items (if applicable). This allows search results for items not contained within the sameItemGroup
to be distinguished. If provided searchContext is null, results will be interpreted from the rootJenkins
object- Since:
- 1.527
-
-