User Tools

Site Tools


dev:configuration

Evergreen has numerous different types of settings, which are stored in different places and accessed in different ways. Each type of setting is useful in certain circumstances. This page attempts to explain how and why you might use each one.

OpenSRF settings

These settings are stored in the XML file opensrf.xml. If you have an opensrf.xml file that begins like this:

<?xml version="1.0"?>
<opensrf version="0.0.3">
    <default>
        <email_notify>
            <smtp_server>smtp.gmail.com</smtp_server>
        </email_notify>

You can access the value of the smtp_server setting with the following Perl code:

my $settings_client = OpenSRF::Utils::SettingsClient->new();
$settings_client->config_value("email_notify" => "smtp_server");

These settings are set on a server-by-server basis. A default value is given in the <default> section of the XML file, and can be overridden on a particular host within the <hosts> section of the same XML file.

Org unit, User, and Workstation settings

These are stored in the db.

Give a perl example and an angular example.

Include info about transferring a setting from, say, workstation to org unit.

Include info on caching

Global flags

Global flags are stored in the config.global_flag table. You can get the values with a regular old CStore editor in Perl:

my $use_geo = new_editor()->retrieve_config_global_flag('opac.use_geolocation');
$use_geo = ($use_geo and $U->is_true($use_geo->enabled));

Other configurations in the config schema

Many different parts of Evergreen store some other types of configurations in the database, usually in the config schema. You can access these as you would any other data from the database.

dev/configuration.txt · Last modified: 2022/05/01 21:26 by sandbergja

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.