Index: trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadNotesTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadNotesTask.java	(revision 8217)
+++ trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadNotesTask.java	(revision 8218)
@@ -15,4 +15,5 @@
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.notes.Note;
+import org.openstreetmap.josm.data.preferences.IntegerProperty;
 import org.openstreetmap.josm.gui.PleaseWaitRunnable;
 import org.openstreetmap.josm.gui.layer.NoteLayer;
@@ -30,4 +31,8 @@
     private static final String PATTERN_API_URL = "https?://.*/api/0.6/notes.*";
     private static final String PATTERN_DUMP_FILE = "https?://.*/(.*\\.osn(.bz2)?)";
+    /** Property defining the number of notes to be downloaded */
+    public static final IntegerProperty DOWNLOAD_LIMIT = new IntegerProperty("osm.notes.downloadLimit", 1000);
+    /** Property defining number of days a bug needs to be closed to no longer be downloaded */
+    public static final IntegerProperty DAYS_CLOSED = new IntegerProperty("osm.notes.daysClosed", 7);
 
     private DownloadTask downloadTask;
@@ -143,5 +148,5 @@
             ProgressMonitor subMonitor = progressMonitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false);
             try {
-                notesData = reader.parseNotes(null, null, subMonitor);
+                notesData = reader.parseNotes(DOWNLOAD_LIMIT.get(), DAYS_CLOSED.get(), subMonitor);
             } catch (BoundingBoxDownloader.MoreNotesException e) {
                 notesData = e.notes;
Index: trunk/src/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferencesPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferencesPanel.java	(revision 8217)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferencesPanel.java	(revision 8218)
@@ -16,4 +16,5 @@
 import javax.swing.JPanel;
 import javax.swing.JRadioButton;
+import javax.swing.JSeparator;
 
 import org.openstreetmap.josm.Main;
@@ -42,5 +43,5 @@
     private OAuthAuthenticationPreferencesPanel pnlOAuthPreferences;
     /** the panel for messages notifier preferences */
-    private MessagesNotifierPanel pnlMessagesPreferences;
+    private FeaturesPanel pnlFeaturesPreferences;
 
     /**
@@ -94,9 +95,12 @@
         pnlAuthenticationParameteters.add(pnlBasicAuthPreferences, BorderLayout.CENTER);
 
-        //-- the panel for messages preferences
         gc.gridy = 2;
+        add(new JSeparator(), gc);
+
+        //-- the panel for API feature preferences
+        gc.gridy = 3;
         gc.fill = GridBagConstraints.NONE;
-        pnlMessagesPreferences = new MessagesNotifierPanel();
-        add(pnlMessagesPreferences, gc);
+        pnlFeaturesPreferences = new FeaturesPanel();
+        add(pnlFeaturesPreferences, gc);
     }
 
@@ -125,5 +129,5 @@
         pnlBasicAuthPreferences.initFromPreferences();
         pnlOAuthPreferences.initFromPreferences();
-        pnlMessagesPreferences.initFromPreferences();
+        pnlFeaturesPreferences.initFromPreferences();
     }
 
@@ -152,5 +156,5 @@
         }
         // save message notifications preferences. To be done after authentication preferences.
-        pnlMessagesPreferences.saveToPreferences();
+        pnlFeaturesPreferences.saveToPreferences();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/server/FeaturesPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/server/FeaturesPanel.java	(revision 8218)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/server/FeaturesPanel.java	(revision 8218)
@@ -0,0 +1,111 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.preferences.server;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.GridBagLayout;
+
+import javax.swing.BorderFactory;
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+
+import org.openstreetmap.josm.actions.downloadtasks.DownloadNotesTask;
+import org.openstreetmap.josm.gui.widgets.JosmTextField;
+import org.openstreetmap.josm.io.MessageNotifier;
+import org.openstreetmap.josm.tools.GBC;
+
+/**
+ * Preferences panel for OSM messages notifier.
+ * @since 6349
+ */
+public class FeaturesPanel extends JPanel {
+
+    private JCheckBox notifier;
+    private JLabel intervalLabel;
+    private final JosmTextField notifierInterval = new JosmTextField(4);
+    private final JosmTextField notesDaysClosed = new JosmTextField(4);
+
+    /**
+     * Constructs a new {@code MessagesNotifierPanel}.
+     */
+    public FeaturesPanel() {
+        build();
+        initFromPreferences();
+        updateEnabledState();
+    }
+
+    private void build() {
+        setLayout(new GridBagLayout());
+        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+
+        notifier = new JCheckBox(tr("Periodically check for new messages"));
+        add(notifier, GBC.eol());
+        notifier.addChangeListener(new ChangeListener() {
+            @Override
+            public void stateChanged(ChangeEvent e) {
+                updateEnabledState();
+            }
+        });
+        
+        intervalLabel = new JLabel(tr("Check interval (minutes):"));
+        add(intervalLabel, GBC.std().insets(25, 0, 0, 0));
+
+        notifierInterval.setToolTipText(tr("Default value: {0}", MessageNotifier.PROP_INTERVAL.getDefaultValue()));
+        notifierInterval.setMinimumSize(notifierInterval.getPreferredSize());
+        add(notifierInterval, GBC.eol().insets(5,0,0,0));
+
+        final JLabel notesDaysClosedLabel = new JLabel(tr("Max age for closed notes (days):"));
+        notesDaysClosedLabel.setToolTipText(tr("Specifies the number of days a note needs to be closed to no longer be downloaded"));
+        add(notesDaysClosedLabel, GBC.std().insets(0, 20, 0, 0));
+        notesDaysClosed.setToolTipText(tr("Default value: {0}", DownloadNotesTask.DAYS_CLOSED.getDefaultValue()));
+        notesDaysClosed.setMinimumSize(notesDaysClosed.getPreferredSize());
+        add(notesDaysClosed, GBC.eol().insets(5, 20, 0, 0));
+
+    }
+    
+    private void updateEnabledState() {
+        boolean enabled = notifier.isSelected();
+        intervalLabel.setEnabled(enabled);
+        notifierInterval.setEnabled(enabled);
+        notifierInterval.setEditable(enabled);
+        notesDaysClosed.setEditable(enabled);
+    }
+
+    /**
+     * Initializes the panel from preferences
+     */
+    public final void initFromPreferences() {
+        notifier.setSelected(MessageNotifier.PROP_NOTIFIER_ENABLED.get());
+        notifierInterval.setText(Integer.toString(MessageNotifier.PROP_INTERVAL.get()));
+        notesDaysClosed.setText(Integer.toString(DownloadNotesTask.DAYS_CLOSED.get()));
+    }
+
+    /**
+     * Saves the current values to preferences
+     */
+    public void saveToPreferences() {
+        final boolean enabled = notifier.isSelected();
+        boolean changed = MessageNotifier.PROP_NOTIFIER_ENABLED.put(enabled);
+        changed |= MessageNotifier.PROP_INTERVAL.parseAndPut(notifierInterval.getText());
+        changed |= DownloadNotesTask.DAYS_CLOSED.parseAndPut(notesDaysClosed.getText());
+        // If parameters have changed, restart notifier
+        if (changed) {
+            MessageNotifier.stop();
+            if (enabled) {
+                MessageNotifier.start();
+            }
+        // Even if they have not changed,
+        } else {
+            // notifier should be stopped if user is no more identified enough 
+            if (!MessageNotifier.isUserEnoughIdentified()) {
+                MessageNotifier.stop();
+            // or restarted if user is again identified and notifier was enabled in preferences
+            } else if (enabled && !MessageNotifier.isRunning()) {
+                MessageNotifier.start();
+            }
+        }
+    }
+}
Index: trunk/src/org/openstreetmap/josm/gui/preferences/server/MessagesNotifierPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/server/MessagesNotifierPanel.java	(revision 8217)
+++ 	(revision )
@@ -1,98 +1,0 @@
-// License: GPL. For details, see LICENSE file.
-package org.openstreetmap.josm.gui.preferences.server;
-
-import static org.openstreetmap.josm.tools.I18n.tr;
-
-import java.awt.GridBagLayout;
-
-import javax.swing.BorderFactory;
-import javax.swing.JCheckBox;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.event.ChangeEvent;
-import javax.swing.event.ChangeListener;
-
-import org.openstreetmap.josm.gui.widgets.JosmTextField;
-import org.openstreetmap.josm.io.MessageNotifier;
-import org.openstreetmap.josm.tools.GBC;
-
-/**
- * Preferences panel for OSM messages notifier.
- * @since 6349
- */
-public class MessagesNotifierPanel extends JPanel {
-
-    private JCheckBox notifier;
-    private JLabel intervalLabel;
-    private final JosmTextField notifierInterval = new JosmTextField(4);
-
-    /**
-     * Constructs a new {@code MessagesNotifierPanel}.
-     */
-    public MessagesNotifierPanel() {
-        build();
-        initFromPreferences();
-        updateEnabledState();
-    }
-
-    private void build() {
-        setLayout(new GridBagLayout());
-        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
-
-        notifier = new JCheckBox(tr("Periodically check for new messages"));
-        add(notifier, GBC.eol());
-        notifier.addChangeListener(new ChangeListener() {
-            @Override
-            public void stateChanged(ChangeEvent e) {
-                updateEnabledState();
-            }
-        });
-        
-        intervalLabel = new JLabel(tr("Check interval (minutes):"));
-        add(intervalLabel, GBC.std().insets(25,0,0,0));
-
-        notifierInterval.setToolTipText(tr("Default value: {0}", MessageNotifier.PROP_INTERVAL.getDefaultValue()));
-        notifierInterval.setMinimumSize(notifierInterval.getPreferredSize());
-        add(notifierInterval, GBC.eol().insets(5,0,0,0));
-    }
-    
-    private void updateEnabledState() {
-        boolean enabled = notifier.isSelected();
-        intervalLabel.setEnabled(enabled);
-        notifierInterval.setEnabled(enabled);
-        notifierInterval.setEditable(enabled);
-    }
-
-    /**
-     * Initializes the panel from preferences
-     */
-    public final void initFromPreferences() {
-        notifier.setSelected(MessageNotifier.PROP_NOTIFIER_ENABLED.get());
-        notifierInterval.setText(Integer.toString(MessageNotifier.PROP_INTERVAL.get()));
-    }
-
-    /**
-     * Saves the current values to preferences
-     */
-    public void saveToPreferences() {
-        final boolean enabled = notifier.isSelected();
-        boolean changed = MessageNotifier.PROP_NOTIFIER_ENABLED.put(enabled);
-        changed |= MessageNotifier.PROP_INTERVAL.parseAndPut(notifierInterval.getText());
-        // If parameters have changed, restart notifier
-        if (changed) {
-            MessageNotifier.stop();
-            if (enabled) {
-                MessageNotifier.start();
-            }
-        // Even if they have not changed,
-        } else {
-            // notifier should be stopped if user is no more identified enough 
-            if (!MessageNotifier.isUserEnoughIdentified()) {
-                MessageNotifier.stop();
-            // or restarted if user is again identified and notifier was enabled in preferences
-            } else if (enabled && !MessageNotifier.isRunning()) {
-                MessageNotifier.start();
-            }
-        }
-    }
-}
Index: trunk/src/org/openstreetmap/josm/io/BoundingBoxDownloader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/BoundingBoxDownloader.java	(revision 8217)
+++ trunk/src/org/openstreetmap/josm/io/BoundingBoxDownloader.java	(revision 8218)
@@ -8,5 +8,4 @@
 import java.util.List;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.DataSource;
@@ -162,19 +161,11 @@
 
     @Override
-    public List<Note> parseNotes(Integer noteLimit, Integer daysClosed, ProgressMonitor progressMonitor) throws OsmTransferException, MoreNotesException {
+    public List<Note> parseNotes(int noteLimit, int daysClosed, ProgressMonitor progressMonitor) throws OsmTransferException, MoreNotesException {
         progressMonitor.beginTask("Downloading notes");
-        noteLimit = checkNoteLimit(noteLimit);
-        daysClosed = checkDaysClosed(daysClosed);
-        String url = new StringBuilder()
-        .append("notes?limit=")
-        .append(noteLimit)
-        .append("&closed=")
-        .append(daysClosed)
-        .append("&bbox=")
-        .append(lon1)
-        .append(",").append(lat1)
-        .append(",").append(lon2)
-        .append(",").append(lat2)
-        .toString();
+        CheckParameterUtil.ensureThat(noteLimit > 0, "Requested note limit is less than 1.");
+        // see max_number_of_nodes in https://github.com/openstreetmap/openstreetmap-website/blob/master/config/example.application.yml
+        CheckParameterUtil.ensureThat(noteLimit <= 50000, "Requested note limit is over API hard limit of 50000.");
+        CheckParameterUtil.ensureThat(daysClosed >= 0, "Requested note limit is less than 0.");
+        String url = "notes?limit=" + noteLimit + "&closed=" + daysClosed + "&bbox=" + lon1 + "," + lat1 + "," + lon2 + "," + lat2;
         try {
             InputStream is = getInputStream(url, progressMonitor.createSubTaskMonitor(1, false));
@@ -213,30 +204,3 @@
     }
 
-    private Integer checkNoteLimit(Integer limit) {
-        if (limit == null) {
-            limit = Main.pref.getInteger("osm.notes.downloadLimit", 1000);
-        }
-        if (limit > 50000) {
-            // see max_number_of_nodes in https://github.com/openstreetmap/openstreetmap-website/blob/master/config/example.application.yml
-            Main.error("Requested note limit is over API hard limit of 50000. Reducing to 50000.");
-            limit = 50000;
-        }
-        if (limit < 1) {
-            Main.error("Requested note limit is less than 1. Setting to 1.");
-            limit = 1;
-        }
-        return limit;
-    }
-
-    private Integer checkDaysClosed(Integer days) {
-        if (days == null) {
-            days = Main.pref.getInteger("osm.notes.daysClosed", 7);
-        }
-        if (days < -1) {
-            Main.error("Requested days closed must be greater than -1");
-            days = -1;
-        }
-        return days;
-    }
-
 }
Index: trunk/src/org/openstreetmap/josm/io/OsmServerReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerReader.java	(revision 8217)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerReader.java	(revision 8218)
@@ -354,5 +354,5 @@
      * Downloads notes from the API, given API limit parameters
      *
-     * @param noteLimit How many notes to download. Defaults to 1000 if not specified. API has a hard limit of 10000
+     * @param noteLimit How many notes to download.
      * @param daysClosed Return notes closed this many days in the past. -1 means all notes, ever. 0 means only unresolved notes.
      * @param progressMonitor Progress monitor for user feedback
@@ -360,5 +360,5 @@
      * @throws OsmTransferException if any errors happen
      */
-    public List<Note> parseNotes(Integer noteLimit, Integer daysClosed, ProgressMonitor progressMonitor) throws OsmTransferException {
+    public List<Note> parseNotes(int noteLimit, int daysClosed, ProgressMonitor progressMonitor) throws OsmTransferException {
         return null;
     }
