Changeset 5608


Ignore:
Timestamp:
Apr 15, 2011, 10:42:40 AM (11 years ago)
Author:
Nicklas Nordborg
Message:

References #1593: Extension system for the core API

Added possibility to disable external extensions since this can interfere with test programs.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/config/dist/base.config

    r5570 r5608  
    183183
    184184
     185# =======================
     186# Plug-ins and extensions
     187# =======================
     188
     189# The path to the directory where external plugins are installed
     190plugins.dir=/usr/local/base2/plugins
     191
     192# Set this flag to disable all external extensions
     193extensions.disabled = false
     194
     195
    185196# ===============
    186197# General section
     
    189200# The path to the directory where uploaded files are stored
    190201userfiles = /usr/local/base2/files
    191 
    192 # The path to the directory where external plugins are installed
    193 plugins.dir=/usr/local/base2/plugins
    194202
    195203# Number of minutes to keep permission information for the logged
  • trunk/config/dist/log4j.properties

    r5416 r5608  
    4040
    4141### Extensions API
     42#log4j.logger.net.sf.basedb.util.extensions=debug
    4243#log4j.logger.net.sf.basedb.clients.web.extensions=debug
    4344
     
    4546#log4j.logger.net.sf.basedb.util.overview=debug
    4647
    47 # -----------------
    48 # Migration loggers
    49 # -----------------
    50 #log4j.logger.net.sf.basedb.clients.migrate=warn
    51 log4j.logger.net.sf.basedb.clients.migrate=warn
    5248
    5349# -----------------
  • trunk/src/core/net/sf/basedb/core/Application.java

    r5607 r5608  
    561561        xtManager.addURI(Application.class.getResource("/core-extensions.xml").toURI());
    562562       
    563         // Add plugins directory to the manager
    564         xtManager.addDirectory(pluginsDirectory);
     563        if (!Config.getBoolean("extensions.disabled"))
     564        {
     565          // Add plugins directory to the manager (unless disabled)
     566          xtManager.addDirectory(pluginsDirectory);
     567        }
    565568       
    566569        // Register and load core extensions
  • trunk/src/test/TestUtil.java

    r5595 r5608  
    2727import net.sf.basedb.core.Item;
    2828import net.sf.basedb.core.Permission;
     29import net.sf.basedb.core.Version;
    2930import net.sf.basedb.util.MD5;
    3031
     
    152153    {
    153154      Config.setProperty("plugins.dir", System.getProperty("user.dir"));
     155      Config.setProperty("extensions.disabled", "true");
    154156      showDbInfo();
    155157      Application.start(false);
     
    285287    String message =
    286288      "--System information-----------------------------\n" +
    287       "BASE     : " + Application.getMajorVersion() + "." +
    288         Application.getMinorVersion() + "." +
    289         Application.getMaintenanceVersion() + "\n" +
     289      "BASE     : " + Version.getMajor() + "." +
     290        Version.getMinor() + "." + Version.getMaintenance() + Version.getSuffix() + "\n" +
    290291      "Database : " + database + "\n" +
    291292      "Dialect  : " + Config.getString("db.dialect") + "\n" +
Note: See TracChangeset for help on using the changeset viewer.