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/;
10 __PACKAGE__->register_method(
11 method => "record_tree_retrieve",
12 api_name => "open-ils.cat.record.tree.retrieve",
14 note => "Returns the tree associated with the nodeset of the given doc id"
17 sub record_tree_retrieve {
18 my( $self, $client, $recordid ) = @_;
20 my $name = "open-ils.storage.biblio.record_entry.nodeset.retrieve";
21 my $method = $self->method_lookup($name);
24 throw OpenSRF::EX::PANIC ("Could not lookup method $name");
27 my ($nodes) = $method->run($recordid);
28 return undef unless $nodes;
30 return OpenILS::Application::Cat::Utils->nodeset2tree( $nodes );