diff --git a/core/src/main/java/hudson/search/SearchGroup.java b/core/src/main/java/hudson/search/SearchGroup.java new file mode 100644 index 000000000000..fc13f724a4c7 --- /dev/null +++ b/core/src/main/java/hudson/search/SearchGroup.java @@ -0,0 +1,31 @@ +package hudson.search; + +import org.kohsuke.stapler.export.Exported; +import org.kohsuke.stapler.export.ExportedBean; + +@ExportedBean(defaultVisibility = 999) +public class SearchGroup { + + private final String displayName; + + public SearchGroup(String displayName) { + this.displayName = displayName; + } + + @Exported + public String getDisplayName() { + return displayName; + } + + public static final SearchGroup VIEW = new SearchGroup(Messages.SearchGroup_views()); + + public static final SearchGroup BUILD = new SearchGroup(Messages.SearchGroup_builds()); + + public static final SearchGroup COMPUTER = new SearchGroup(Messages.SearchGroup_nodes()); + + public static final SearchGroup PROJECT = new SearchGroup(Messages.SearchGroup_projects()); + + public static final SearchGroup PEOPLE = new SearchGroup(Messages.SearchGroup_people()); + + public static final SearchGroup OTHER = new SearchGroup(Messages.SearchGroup_other()); +} diff --git a/core/src/main/resources/hudson/search/Messages.properties b/core/src/main/resources/hudson/search/Messages.properties index de6cfa4f1c04..f147e47eaf23 100644 --- a/core/src/main/resources/hudson/search/Messages.properties +++ b/core/src/main/resources/hudson/search/Messages.properties @@ -21,3 +21,9 @@ # THE SOFTWARE. UserSearchProperty.DisplayName=Setting for search +SearchGroup.views=Views +SearchGroup.builds=Builds +SearchGroup.nodes=Nodes +SearchGroup.other=Other +SearchGroup.people=People +SearchGroup.projects=Projects