added single copy location fetcher
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Aug 2006 03:05:44 +0000 (03:05 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Aug 2006 03:05:44 +0000 (03:05 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5267 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm

index 11e4f58..600fe07 100644 (file)
@@ -7,6 +7,7 @@ use OpenSRF::EX qw(:try);
 use OpenSRF::Utils::Logger qw(:logger);
 use OpenILS::Application::AppUtils;
 use OpenILS::Utils::Fieldmapper;
+use OpenILS::Utils::CStoreEditor qw/:funcs/;
 my $U = "OpenILS::Application::AppUtils";
 
 
@@ -16,7 +17,7 @@ __PACKAGE__->register_method(
        argc                    =>      1,
        signature       => q/
                Retrieves the ranged set of copy locations for the requested org.
-               If no org is provided, the home org of the requestor is used.
+               If no org is provided, all copy locations are returned
                @param authtoken The login session key
                @param orgId The org location id
                @return An array of copy location objects
@@ -133,5 +134,20 @@ sub cl_update {
 }
 
 
+__PACKAGE__->register_method(
+       method => 'fetch_loc',
+       api_name => 'open-ils.circ.copy_location.retrieve',
+);
+
+sub fetch_loc {
+       my( $self, $con, $id ) = @_;
+       my $e = new_editor();
+       my $cl = $e->retrieve_asset_copy_location($id)
+               or return $e->event;
+       return $cl;
+}
+
+
+
 
-666;
+23;