private BulkParameterFactory getParameters(PrintWriter w, HttpServletRequest request) {
   BulkParameterFactory f = BulkParameterFactory.forCommercial();
   for (final ParameterType t : ParameterType.values()) {
     final String param = request.getParameter(t.name());
     if (param != null && !param.isEmpty()) {
       try {
         f = f.copyWithChangedParam(t, t.parse(param));
       } catch (final RuntimeException e) {
         this.printParseError(w, t.toString(), e);
       }
     }
   }
   return f;
 }
  private BulkParameterFactory loadParameters(int requestId) throws IOException {
    final File requestDir = this.getRequestDir(requestId);
    final File paramsFile = new File(requestDir, PARAMS_PROPERTIES);
    try (FileInputStream in = new FileInputStream(paramsFile)) {
      final Properties properties = new Properties();
      properties.load(in);

      BulkParameterFactory ret = BulkParameterFactory.forCommercial();
      for (final String name : properties.stringPropertyNames()) {
        final ParameterType type = ParameterType.valueOf(name);
        ret = ret.copyWithChangedParam(type, type.parse(properties.getProperty(name)));
      }
      return ret;
    }
  }