From f9ef894ebd6d76f1a85c67d82473c6af31ad4ac3 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Mon, 9 May 2011 23:50:31 -0400 Subject: [PATCH] register the methods we're expecting for the print/csv/email exports in Vandelay, and remove limit/offset options for such methods, and expectation of streaming --- .../perlmods/lib/OpenILS/Application/Vandelay.pm | 87 ++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm index 94b7a32842..77450302b8 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm @@ -369,6 +369,28 @@ __PACKAGE__->register_method( stream => 1, record_type => 'bib' ); +__PACKAGE__->register_method( + api_name => "open-ils.vandelay.bib_queue.records.retrieve.atomic.export.print", + method => 'retrieve_queued_records', + api_level => 1, + argc => 2, + record_type => 'bib' +); +__PACKAGE__->register_method( + api_name => "open-ils.vandelay.bib_queue.records.retrieve.atomic.export.csv", + method => 'retrieve_queued_records', + api_level => 1, + argc => 2, + record_type => 'bib' +); +__PACKAGE__->register_method( + api_name => "open-ils.vandelay.bib_queue.records.retrieve.atomic.export.email", + method => 'retrieve_queued_records', + api_level => 1, + argc => 2, + record_type => 'bib' +); + __PACKAGE__->register_method( api_name => "open-ils.vandelay.auth_queue.records.retrieve", method => 'retrieve_queued_records', @@ -377,6 +399,27 @@ __PACKAGE__->register_method( stream => 1, record_type => 'auth' ); +__PACKAGE__->register_method( + api_name => "open-ils.vandelay.auth_queue.records.retrieve.atomic.export.print", + method => 'retrieve_queued_records', + api_level => 1, + argc => 2, + record_type => 'auth' +); +__PACKAGE__->register_method( + api_name => "open-ils.vandelay.auth_queue.records.retrieve.atomic.export.csv", + method => 'retrieve_queued_records', + api_level => 1, + argc => 2, + record_type => 'auth' +); +__PACKAGE__->register_method( + api_name => "open-ils.vandelay.auth_queue.records.retrieve.atomic.export.email", + method => 'retrieve_queued_records', + api_level => 1, + argc => 2, + record_type => 'auth' +); __PACKAGE__->register_method( api_name => "open-ils.vandelay.bib_queue.records.matches.retrieve", @@ -431,6 +474,10 @@ sub retrieve_queued_records { limit => $limit, offset => $offset, }; + if($self->api_name =~ /export/) { + delete $query->{limit}; + delete $query->{offset}; + } $query->{where}->{import_time} = undef if $$options{non_imported}; @@ -491,6 +538,42 @@ __PACKAGE__->register_method( with_import_error : only return items that failed to import / ); +__PACKAGE__->register_method( + api_name => 'open-ils.vandelay.import_item.queue.export.print', + method => 'retrieve_queue_import_items', + api_level => 1, + argc => 2, + authoritative => 1, + signature => q/ + Returns template-generated printable output of Import Item (vii) objects for the selected queue. + Filter options: + with_import_error : only return items that failed to import + / +); +__PACKAGE__->register_method( + api_name => 'open-ils.vandelay.import_item.queue.export.csv', + method => 'retrieve_queue_import_items', + api_level => 1, + argc => 2, + authoritative => 1, + signature => q/ + Returns template-generated CSV output of Import Item (vii) objects for the selected queue. + Filter options: + with_import_error : only return items that failed to import + / +); +__PACKAGE__->register_method( + api_name => 'open-ils.vandelay.import_item.queue.export.email', + method => 'retrieve_queue_import_items', + api_level => 1, + argc => 2, + authoritative => 1, + signature => q/ + Emails template-generated output of Import Item (vii) objects for the selected queue. + Filter options: + with_import_error : only return items that failed to import + / +); sub retrieve_queue_import_items { my($self, $conn, $auth, $q_id, $options) = @_; @@ -525,6 +608,10 @@ sub retrieve_queue_import_items { limit => $limit, offset => $offset }; + if($self->api_name =~ /export/) { + delete $query->{limit}; + delete $query->{offset}; + } $query->{where} = {'+vii' => {import_error => {'!=' => undef}}} if $$options{with_import_error}; -- 2.11.0