]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
early catalogue code. currently just turns a nodeset into tree and
[working/Evergreen.git] / Open-ILS / src / perlmods / OpenILS / Application / Cat.pm
1 use strict; use warnings;
2 package OpenILS::Application::Cat;
3 use OpenSRF::Application;
4 use OpenILS::Application::Cat::Utils;
5 use base qw/OpenSRF::Application/;
6
7
8
9
10 __PACKAGE__->register_method(
11         method  => "record_tree_retrieve",
12         api_name        => "open-ils.cat.record.tree.retrieve",
13         argc            => 1, 
14         note            => "Returns the tree associated with the nodeset of the given doc id"
15 );
16
17 sub record_tree_retrieve {
18         my( $self, $client, $recordid ) = @_;
19
20         my $name = "open-ils.storage.biblio.record_entry.nodeset.retrieve";
21         my $method = $self->method_lookup($name);
22
23         unless($method) {
24                 throw OpenSRF::EX::PANIC ("Could not lookup method $name");
25         }
26
27         my ($nodes) = $method->run($recordid);
28         return undef unless $nodes;
29
30         return OpenILS::Application::Cat::Utils->nodeset2tree( $nodes );
31 }
32
33
34
35 1;