[open-ils-commits] r10542 -
trunk/Open-ILS/src/perlmods/OpenILS/Application
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Sep 5 10:03:44 EDT 2008
Author: erickson
Date: 2008-09-05 10:03:42 -0400 (Fri, 05 Sep 2008)
New Revision: 10542
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
Log:
for ease of UI dev, allow import and overlay records on same API call. overlay recs present in overlay map
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm 2008-09-05 12:30:26 UTC (rev 10541)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm 2008-09-05 14:03:42 UTC (rev 10542)
@@ -366,25 +366,6 @@
record_type => 'auth'
);
-__PACKAGE__->register_method(
- api_name => "open-ils.vandelay.bib_record.list.overlay",
- method => 'import_record_list',
- api_level => 1,
- argc => 2,
- stream => 1,
- record_type => 'bib'
-);
-
-__PACKAGE__->register_method(
- api_name => "open-ils.vandelay.auth_record.list.overlay",
- method => 'import_record_list',
- api_level => 1,
- argc => 2,
- stream => 1,
- record_type => 'auth'
-);
-
-
sub import_record_list {
my($self, $conn, $auth, $rec_ids, $args) = @_;
my $e = new_editor(xact => 1, authtoken => $auth);
@@ -396,12 +377,10 @@
return {complete => 1};
}
-#open-ils.cat.biblio.record.xml.update
-
sub import_record_list_impl {
my($self, $conn, $auth, $e, $rec_ids, $args) = @_;
- my $overlay_map = $args->{overlay_map};
+ my $overlay_map = $args->{overlay_map} || {};
my $type = $self->{record_type};
my $total = @$rec_ids;
my $count = 0;
@@ -413,12 +392,14 @@
or return $e->die_event;
my $record;
- if($self->api_name =~ /overlay/) {
+ if(defined $overlay_map->{$rec_id}) {
+ $logger->info("vl: overlaying record $rec_id");
$record = $U->simplereq(
'open-ils.cat',
'open-ils.cat.biblio.record.xml.update',
$auth, $overlay_map->{$rec_id}, $rec->marc); #$rec->bib_source);
} else {
+ $logger->info("vl: importing new record");
$record = $U->simplereq(
'open-ils.cat',
'open-ils.cat.biblio.record.xml.import',
More information about the open-ils-commits
mailing list