Package hudson.util.ListBoxModel

Examples of hudson.util.ListBoxModel.Option


         if (server == null) {       
            return new ListBoxModel();
         }

         ListBoxModel d = null;
         Option temp = null;
         List<String> depots = new ArrayList<String>();
        
         // Execute the login command first & upon success of that run show depots
         // command. If any of the command's exitvalue is 1 proper error message is
         // logged
View Full Code Here


        public ListBoxModel doFillNotificationLevelItems(@QueryParameter("serverName") final String serverName) {
            Map<Notify, String> levelTextsById = GerritServer.notificationLevelTextsById();
            ListBoxModel items = new ListBoxModel(levelTextsById.size() + 1);
            items.add(getOptionForNotificationLevelDefault(serverName, levelTextsById));
            for (Entry<Notify, String> level : levelTextsById.entrySet()) {
                items.add(new Option(level.getValue(), level.getKey().toString()));
            }
            return items;
        }
View Full Code Here

                final String serverName, Map<Notify, String> levelTextsById) {
            if (ANY_SERVER.equals(serverName)) {
                // We do not know which server is selected, so we cannot tell the
                // currently active default value.  It might be the global default,
                // but also a different value.
                return new Option(Messages.NotificationLevel_DefaultValue(), "");
            } else if (serverName != null) {
                GerritServer server = PluginImpl.getInstance().getServer(serverName);
                if (server != null) {
                    Notify level = server.getConfig().getNotificationLevel();
                    if (level != null) {
                        String levelText = levelTextsById.get(level);
                        if (levelText == null) { // new/unknown value
                            levelText = level.toString();
                        }
                        return new Option(Messages.NotificationLevel_DefaultValueFromServer(levelText), "");
                    }
                }
            }

            // fall back to global default
            String defaultText = levelTextsById.get(Config.DEFAULT_NOTIFICATION_LEVEL);
            return new Option(Messages.NotificationLevel_DefaultValueFromServer(defaultText), "");
        }
View Full Code Here

         */
        public ListBoxModel doFillNotificationLevelItems() {
            Map<Notify, String> levelTextsById = notificationLevelTextsById();
            ListBoxModel items = new ListBoxModel(levelTextsById.size());
            for (Entry<Notify, String> level : levelTextsById.entrySet()) {
                items.add(new Option(level.getValue(), level.getKey().toString()));
            }
            return items;
        }
View Full Code Here

TOP

Related Classes of hudson.util.ListBoxModel.Option

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.