adding a generic org_unit search
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 8 Mar 2006 17:07:36 +0000 (17:07 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 8 Mar 2006 17:07:36 +0000 (17:07 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@3281 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Actor.pm

index e23ae48..7c6d886 100644 (file)
@@ -785,6 +785,23 @@ sub get_org_unit {
        return $home_ou;
 }
 
+__PACKAGE__->register_method(
+       method  => "search_org_unit",
+       api_name        => "open-ils.actor.org_unit_list.search",
+);
+
+sub search_org_unit {
+
+       my( $self, $client, $field, $value ) = @_;
+
+       my $list = OpenILS::Application::AppUtils->simple_scalar_request(
+               "open-ils.storage",
+               "open-ils.storage.direct.actor.org_unit.search.$field.atomic", 
+               $value );
+
+       return $list;
+}
+
 
 # build the org tree