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

public class ConfigReseedHandlerextends FormHandler
Handler for reseed configuration form processing.
  • Field Details

    • changes

      private final Map<String,String> changes
      Reseed URLs the form set, by name.
    • removes

      private final List<String> removes
      Reseed URL names the form cleared.
  • Constructor Details

    • ConfigReseedHandler

      public ConfigReseedHandler()
      Construct a new ConfigReseedHandler.
  • 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
    • addCheckerStatus

      private boolean addCheckerStatus(ReseedChecker checker)
      Add checker error or status messages to the form.
      Parameters:
      checker - the reseed checker whose error or status text is displayed
      Returns:
      true if anything was output
    • resetUrlList

      private void resetUrlList()
      Replaces the form's URLs with the ones in the config.
    • saveString

      private void saveString(String config, String param)
      Save a string reseed setting.
      Parameters:
      config - the reseed configuration property to change
      param - the form field name to read the value from, empty means remove
    • saveBoolean

      private void saveBoolean(String config, String param)
      Save a boolean reseed setting.
      Parameters:
      config - the reseed configuration property to change
      param - the form field name, true if the field is present in the request
    • saveChanges

      private void saveChanges()
      Writes the submitted URLs into the config.
    • ngettext

      public String ngettext(String s, String p, int n)
      Translate a message with plural forms.
      Parameters:
      s - the singular form
      p - the plural form
      n - the count for plural selection
      Returns:
      the translated string