From 80f24cbfdcbadd52801c987e75cffec761df8fc6 Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Wed, 11 Dec 2024 21:25:23 +0000 Subject: [PATCH] Init --- .../main/java/hudson/search/SearchGroup.java | 31 +++++++++++++++++++ .../hudson/search/Messages.properties | 6 ++++ 2 files changed, 37 insertions(+) create mode 100644 core/src/main/java/hudson/search/SearchGroup.java 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