congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
WebServer.saveProperties
Code IndexAdd Tabnine to your IDE (free)

How to use
saveProperties
method
in
org.h2.server.web.WebServer

Best Java code snippets using org.h2.server.web.WebServer.saveProperties (Showing top 12 results out of 315)

origin: com.h2database/h2

/**
 * Save the command history to the properties file.
 *
 * @param commandHistory the history
 */
public void saveCommandHistoryList(ArrayList<String> commandHistory) {
  StringBuilder sb = new StringBuilder();
  for (String s : commandHistory) {
    if (sb.length() > 0) {
      sb.append(';');
    }
    sb.append(s.replace("\\", "\\\\").replace(";", "\\;"));
  }
  commandHistoryString = sb.toString();
  saveProperties(null);
}
origin: com.h2database/h2

private String settingRemove() {
  String setting = attributes.getProperty("name", "");
  server.removeSetting(setting);
  ArrayList<ConnectionInfo> settings = server.getSettings();
  if (!settings.isEmpty()) {
    attributes.put("setting", settings.get(0));
  }
  server.saveProperties(null);
  return "index.do";
}
origin: com.h2database/h2

/**
 * Save the current connection settings to the properties file.
 *
 * @return the file to open afterwards
 */
private String settingSave() {
  ConnectionInfo info = new ConnectionInfo();
  info.name = attributes.getProperty("name", "");
  info.driver = attributes.getProperty("driver", "");
  info.url = attributes.getProperty("url", "");
  info.user = attributes.getProperty("user", "");
  server.updateSetting(info);
  attributes.put("setting", info.name);
  server.saveProperties(null);
  return "index.do";
}
origin: com.h2database/h2

private String adminSave() {
  try {
    Properties prop = new SortedProperties();
    int port = Integer.decode((String) attributes.get("port"));
    prop.setProperty("webPort", String.valueOf(port));
    server.setPort(port);
    boolean allowOthers = Utils.parseBoolean((String) attributes.get("allowOthers"), false, false);
    prop.setProperty("webAllowOthers", String.valueOf(allowOthers));
    server.setAllowOthers(allowOthers);
    boolean ssl = Utils.parseBoolean((String) attributes.get("ssl"), false, false);
    prop.setProperty("webSSL", String.valueOf(ssl));
    server.setSSL(ssl);
    server.saveProperties(prop);
  } catch (Exception e) {
    trace(e.toString());
  }
  return admin();
}
origin: com.eventsourcing/h2

/**
 * Save the command history to the properties file.
 *
 * @param commandHistory the history
 */
public void saveCommandHistoryList(ArrayList<String> commandHistory) {
  StringBuilder sb = new StringBuilder();
  for (String s : commandHistory) {
    if (sb.length() > 0) {
      sb.append(';');
    }
    sb.append(s.replace("\\", "\\\\").replace(";", "\\;"));
  }
  commandHistoryString = sb.toString();
  saveProperties(null);
}
origin: org.wowtools/h2

/**
 * Save the command history to the properties file.
 *
 * @param commandHistory the history
 */
public void saveCommandHistoryList(ArrayList<String> commandHistory) {
  StringBuilder sb = new StringBuilder();
  for (String s : commandHistory) {
    if (sb.length() > 0) {
      sb.append(';');
    }
    sb.append(s.replace("\\", "\\\\").replace(";", "\\;"));
  }
  commandHistoryString = sb.toString();
  saveProperties(null);
}
origin: com.eventsourcing/h2

private String settingRemove() {
  String setting = attributes.getProperty("name", "");
  server.removeSetting(setting);
  ArrayList<ConnectionInfo> settings = server.getSettings();
  if (settings.size() > 0) {
    attributes.put("setting", settings.get(0));
  }
  server.saveProperties(null);
  return "index.do";
}
origin: org.wowtools/h2

private String settingRemove() {
  String setting = attributes.getProperty("name", "");
  server.removeSetting(setting);
  ArrayList<ConnectionInfo> settings = server.getSettings();
  if (settings.size() > 0) {
    attributes.put("setting", settings.get(0));
  }
  server.saveProperties(null);
  return "index.do";
}
origin: org.wowtools/h2

/**
 * Save the current connection settings to the properties file.
 *
 * @return the file to open afterwards
 */
private String settingSave() {
  ConnectionInfo info = new ConnectionInfo();
  info.name = attributes.getProperty("name", "");
  info.driver = attributes.getProperty("driver", "");
  info.url = attributes.getProperty("url", "");
  info.user = attributes.getProperty("user", "");
  server.updateSetting(info);
  attributes.put("setting", info.name);
  server.saveProperties(null);
  return "index.do";
}
origin: com.eventsourcing/h2

/**
 * Save the current connection settings to the properties file.
 *
 * @return the file to open afterwards
 */
private String settingSave() {
  ConnectionInfo info = new ConnectionInfo();
  info.name = attributes.getProperty("name", "");
  info.driver = attributes.getProperty("driver", "");
  info.url = attributes.getProperty("url", "");
  info.user = attributes.getProperty("user", "");
  server.updateSetting(info);
  attributes.put("setting", info.name);
  server.saveProperties(null);
  return "index.do";
}
origin: org.wowtools/h2

private String adminSave() {
  try {
    Properties prop = new SortedProperties();
    int port = Integer.decode((String) attributes.get("port"));
    prop.setProperty("webPort", String.valueOf(port));
    server.setPort(port);
    boolean allowOthers = Boolean.parseBoolean(
        (String) attributes.get("allowOthers"));
    prop.setProperty("webAllowOthers", String.valueOf(allowOthers));
    server.setAllowOthers(allowOthers);
    boolean ssl = Boolean.parseBoolean(
        (String) attributes.get("ssl"));
    prop.setProperty("webSSL", String.valueOf(ssl));
    server.setSSL(ssl);
    server.saveProperties(prop);
  } catch (Exception e) {
    trace(e.toString());
  }
  return admin();
}
origin: com.eventsourcing/h2

private String adminSave() {
  try {
    Properties prop = new SortedProperties();
    int port = Integer.decode((String) attributes.get("port"));
    prop.setProperty("webPort", String.valueOf(port));
    server.setPort(port);
    boolean allowOthers = Boolean.parseBoolean(
        (String) attributes.get("allowOthers"));
    prop.setProperty("webAllowOthers", String.valueOf(allowOthers));
    server.setAllowOthers(allowOthers);
    boolean ssl = Boolean.parseBoolean(
        (String) attributes.get("ssl"));
    prop.setProperty("webSSL", String.valueOf(ssl));
    server.setSSL(ssl);
    server.saveProperties(prop);
  } catch (Exception e) {
    trace(e.toString());
  }
  return admin();
}
org.h2.server.webWebServersaveProperties

Javadoc

Save the settings to the properties file.

Popular methods of WebServer

  • <init>
  • getSession
    Get the web session object for the given session id.
  • init
  • addSession
    Create a session with a given connection.
  • getAllowOthers
  • getFile
    Read the given file from the file system or from the resources.
  • getStartDateTime
  • setAllowChunked
  • setAllowOthers
  • createNewSession
    Create a new web session id and object.
  • generateSessionId
  • getConnection
  • generateSessionId,
  • getConnection,
  • getPort,
  • getSSL,
  • getSessions,
  • getSetting,
  • getSettingNames,
  • getSettings,
  • loadProperties,
  • readTranslations

Popular in Java

  • Finding current android device location
  • getSystemService (Context)
  • getSharedPreferences (Context)
  • getResourceAsStream (ClassLoader)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Reference (javax.naming)
  • Table (org.hibernate.mapping)
    A relational table
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now