java.lang.Object
net.i2p.router.web.FormHandler
net.i2p.router.web.helpers.ConfigAdvancedHandler

public class ConfigAdvancedHandlerextends FormHandler
Handles form submissions from the advanced configuration page. Processes and saves changes to router configuration including floodfill settings and advanced router properties. Validates permissions and applies configuration changes.
  • Field Details

    • _shouldSave

      private boolean _shouldSave
      True when the form asks for the settings to be written.
    • _oldConfig

      private String _oldConfig
      Settings as they were before the form.
    • _config

      private String _config
      Settings as the form submitted them.
    • _ff

      private String _ff
      Property filter the page is showing.
  • Constructor Details

    • ConfigAdvancedHandler

      public ConfigAdvancedHandler()
      Creates a handler; the container calls it with no arguments before each submission.
  • Method Details

    • processForm

      protected void processForm()
      Description copied from class: FormHandler
      Implement this to perform the final processing (in turn, adding formNotice and formError messages, etc)

      Will only be called if _action is non-null and the nonce is valid.

      Specified by:
      processForm in class FormHandler
    • setShouldsave

      public void setShouldsave(String moo)
      Set whether to save configuration.
      Parameters:
      moo - ignored; the value only marks saving as enabled
    • setFf

      public void setFf(String ff)
      Set the floodfill status from form submission.
      Parameters:
      ff - the floodfill status
    • setNofilter_config

      public void setNofilter_config(String val)
      Set the config text.
      Parameters:
      val - the config text
    • setNofilter_oldConfig

      public void setNofilter_oldConfig(String val)
      Set the previous config text for diff comparison.
      Parameters:
      val - the previous config text
    • saveChanges

      private void saveChanges()
      The user made changes to the config and wants to save them, so lets go ahead and do so.

      We saved the previous config in the form, so we do a diff between the two. This will reduce the chance of undoing some change that happened in-between.

    • saveFF

      private void saveFF()
      Save floodfill settings.