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.
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.
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 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));
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.