From 97facd4fb9f60c330842863c3cfe2fa444d9f99c Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 16 Feb 2005 17:24:50 +0000 Subject: [PATCH] first round of the settings app git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@72 9efc2488-bf62-4759-914b-345cdb29e865 --- src/perlmods/OpenSRF/Application/Settings.pm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/perlmods/OpenSRF/Application/Settings.pm diff --git a/src/perlmods/OpenSRF/Application/Settings.pm b/src/perlmods/OpenSRF/Application/Settings.pm new file mode 100644 index 0000000..af7c3f3 --- /dev/null +++ b/src/perlmods/OpenSRF/Application/Settings.pm @@ -0,0 +1,25 @@ +package OpenSRF::Application::Settings; +use OpenSRF::Application; +use OpenSRF::Utils::SettingsParser; +use base 'OpenSRF::Application'; + + + +__PACKAGE__->register_method( method => 'get_host_config', api_name => 'opensrf.settings.host_config.get' ); +sub get_host_config { + my( $self, $client, $host ) = @_; + my $parser = OpenSRF::Utils::SettingsParser->new(); + return $parser->get_server_config($host); +} + + + + +__PACKAGE__->register_method( method => 'xpath_get', api_name => 'opensrf.settings.xpath.get' ); +sub xpath_get { + my($self, $client, $xpath) = @_; + return OpenSRF::Utils::SettingsParser->new()->_get_all( $xpath ); +} + + +1; -- 2.11.0