first round of the settings app
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 16 Feb 2005 17:24:50 +0000 (17:24 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 16 Feb 2005 17:24:50 +0000 (17:24 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@72 9efc2488-bf62-4759-914b-345cdb29e865

src/perlmods/OpenSRF/Application/Settings.pm [new file with mode: 0644]

diff --git a/src/perlmods/OpenSRF/Application/Settings.pm b/src/perlmods/OpenSRF/Application/Settings.pm
new file mode 100644 (file)
index 0000000..af7c3f3
--- /dev/null
@@ -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;