void load(IApplication app) {
   _prefs = app.getSquirrelPreferences();
   _plugins = app.getPluginManager().getPluginInformation();
   _appArgs = ApplicationArguments.getInstance().getRawArguments();
   _version = Version.getVersion();
   _pluginLoc = new ApplicationFiles().getPluginsDirectory().getAbsolutePath();
   URL[] urls = app.getPluginManager().getPluginURLs();
   _pluginURLs = new URLWrapper[urls.length];
   for (int i = 0; i < urls.length; ++i) {
     _pluginURLs[i] = new URLWrapper(urls[i]);
   }
 }
Beispiel #2
0
  /**
   * Create a new session.
   *
   * @param app Application API.
   * @param driver JDBC driver for session.
   * @param alias Defines URL to database.
   * @param conn Connection to database.
   * @throws IllegalArgumentException if any parameter is null.
   */
  public Session(IApplication app, ISQLDriver driver, ISQLAlias alias, SQLConnection conn) {
    super();
    if (app == null) {
      throw new IllegalArgumentException("null IApplication passed");
    }
    if (driver == null) {
      throw new IllegalArgumentException("null ISQLDriver passed");
    }
    if (alias == null) {
      throw new IllegalArgumentException("null ISQLAlias passed");
    }
    if (conn == null) {
      throw new IllegalArgumentException("null SQLConnection passed");
    }

    _app = app;
    _driver = driver;
    _alias = alias;
    _conn = conn;

    _props.assignFrom(_app.getSquirrelPreferences().getSessionProperties());
  }