docs: @SuppressWarnings({"UnusedDeclaration"})
      public void doSubmit(StaplerRequest req, StaplerResponse resp) throws IOException, ServletException {
          getACL().checkPermission(getPermission());
  
          bindParameters(req);
          // current user is bound to the thread and will be lost in the perform method
          User user = User.current();
          String ciUser = (user == null) ? "anonymous" : user.getId();
  
          JSONObject formData = req.getSubmittedForm();
          if (formData.has("promotionPlugin")) {
              JSONObject pluginSettings = formData.getJSONObject("promotionPlugin");
              if (pluginSettings.has("pluginName")) {
                  String pluginName = pluginSettings.getString("pluginName");
                  if (!UserPluginInfo.NO_PLUGIN_KEY.equals(pluginName)) {
                      PluginSettings settings = new PluginSettings();
                      Map<String, String> paramMap = Maps.newHashMap();
                      settings.setPluginName(pluginName);
                      Map<String, Object> filteredPluginSettings = Maps.filterKeys(pluginSettings,
                              new Predicate<String>() {
                                  public boolean apply(String input) {
                                      return StringUtils.isNotBlank(input) && !"pluginName".equals(input);
                                  }
                              });
                      for (Map.Entry<String, Object> settingsEntry : filteredPluginSettings.entrySet()) {
                          String key = settingsEntry.getKey();
                          paramMap.put(key, pluginSettings.getString(key));
                      }
                      paramMap.put("ciUser", ciUser);
                      if (!paramMap.isEmpty()) {
                          settings.setParamMap(paramMap);
                      }
                      setPromotionPlugin(settings);
                  }
              }
          }
  
          final BuildInfoAwareConfigurator configurator = getCurrentConfigurator();
          ArtifactoryServer server = configurator.getArtifactoryServer();
  
          new PromoteWorkerThread(server, CredentialManager.getPreferredDeployer((DeployerOverrider) configurator, server), ciUser).start();
  
          resp.sendRedirect(".");
      }