Moving from OpenILS namespace to ShareStuff
authorMike Rylander <mrylander@gmail.com>
Wed, 3 Apr 2013 00:01:00 +0000 (20:01 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 3 Apr 2013 00:01:00 +0000 (20:01 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>

src/perl/lib/ShareStuff/AppUtils.pm
src/perl/lib/ShareStuff/UI.pm

index 796629d..c86583a 100644 (file)
@@ -81,7 +81,7 @@ sub check_user_perms {
        for my $type (@perm_types) {
            $PERM_QUERY->{select}->{au}->[0]->{params} = [$type, $org_id];
                $PERM_QUERY->{where}->{id} = $user_id;
-               return $type unless $self->is_true(OpenILS::Utils::CStoreEditor->new->json_query($PERM_QUERY)->[0]->{has_perm});
+               return $type unless $self->is_true(ShareStuff::CStoreEditor->new->json_query($PERM_QUERY)->[0]->{has_perm});
        }
        return undef;
 }
@@ -90,7 +90,7 @@ sub check_user_perms {
 sub check_perms {
        my( $self, $user_id, $org_id, @perm_types ) = @_;
        my $t = $self->check_user_perms( $user_id, $org_id, @perm_types );
-       return OpenILS::Event->new('PERM_FAILURE', ilsperm => $t, ilspermloc => $org_id ) if $t;
+       return ShareStuff::Event->new('PERM_FAILURE', ilsperm => $t, ilspermloc => $org_id ) if $t;
        return undef;
 }
 
@@ -238,7 +238,7 @@ sub fetch_closed_date {
 
        if(!$cd_obj) {
                $logger->info("closed_date $cd not found in the db");
-               $evt = OpenILS::Event->new('ACTOR_USER_NOT_FOUND');
+               $evt = ShareStuff::Event->new('ACTOR_USER_NOT_FOUND');
        }
 
        return ($cd_obj, $evt);
@@ -256,7 +256,7 @@ sub fetch_user {
 
        if(!$user) {
                $logger->info("User $userid not found in the db");
-               $evt = OpenILS::Event->new('ACTOR_USER_NOT_FOUND');
+               $evt = ShareStuff::Event->new('ACTOR_USER_NOT_FOUND');
        }
 
        return ($user, $evt);
@@ -265,7 +265,7 @@ sub fetch_user {
 sub checkses {
        my( $self, $session ) = @_;
        my $user = $self->check_user_session($session) or 
-        return (undef, OpenILS::Event->new('NO_SESSION'));
+        return (undef, ShareStuff::Event->new('NO_SESSION'));
     return ($user);
 }
 
@@ -323,7 +323,7 @@ sub fetch_copy {
                'open-ils.cstore',
                'open-ils.cstore.direct.asset.copy.retrieve', $copyid );
 
-       if(!$copy) { $evt = OpenILS::Event->new('ASSET_COPY_NOT_FOUND'); }
+       if(!$copy) { $evt = ShareStuff::Event->new('ASSET_COPY_NOT_FOUND'); }
 
        return( $copy, $evt );
 }
@@ -341,7 +341,7 @@ sub fetch_circulation {
                "open-ils.cstore.direct.action.circulation.retrieve", $circid );
 
        if(!$circ) {
-               $evt = OpenILS::Event->new('ACTION_CIRCULATION_NOT_FOUND', circid => $circid );
+               $evt = ShareStuff::Event->new('ACTION_CIRCULATION_NOT_FOUND', circid => $circid );
        }
 
        return ( $circ, $evt );
@@ -365,7 +365,7 @@ sub fetch_record_by_copy {
        );
 
        if(!$record) {
-               $evt = OpenILS::Event->new('BIBLIO_RECORD_ENTRY_NOT_FOUND');
+               $evt = ShareStuff::Event->new('BIBLIO_RECORD_ENTRY_NOT_FOUND');
        } else {
                $record = $record->call_number->record;
        }
@@ -383,7 +383,7 @@ sub fetch_hold {
                'open-ils.cstore',
                'open-ils.cstore.direct.action.hold_request.retrieve', $holdid);
 
-       $evt = OpenILS::Event->new('ACTION_HOLD_REQUEST_NOT_FOUND', holdid => $holdid) unless $hold;
+       $evt = ShareStuff::Event->new('ACTION_HOLD_REQUEST_NOT_FOUND', holdid => $holdid) unless $hold;
 
        return ($hold, $evt);
 }
@@ -399,7 +399,7 @@ sub fetch_hold_transit_by_hold {
                'open-ils.cstore',
                'open-ils.cstore.direct.action.hold_transit_copy.search', { hold => $holdid } );
 
-       $evt = OpenILS::Event->new('ACTION_HOLD_TRANSIT_COPY_NOT_FOUND', holdid => $holdid) unless $transit;
+       $evt = ShareStuff::Event->new('ACTION_HOLD_TRANSIT_COPY_NOT_FOUND', holdid => $holdid) unless $transit;
 
        return ($transit, $evt );
 }
@@ -419,7 +419,7 @@ sub fetch_open_hold_by_copy {
                        cancel_time                     => undef,
                } );
 
-       $evt = OpenILS::Event->new('ACTION_HOLD_REQUEST_NOT_FOUND', copyid => $copyid) unless $hold;
+       $evt = ShareStuff::Event->new('ACTION_HOLD_REQUEST_NOT_FOUND', copyid => $copyid) unless $hold;
        return ($hold, $evt);
 }
 
@@ -429,7 +429,7 @@ sub fetch_hold_transit {
        $logger->debug("Fetching hold transit with hold id $transid");
        $htransit = $self->cstorereq(
                'open-ils.cstore.direct.action.hold_transit_copy.retrieve', $transid );
-       $evt = OpenILS::Event->new('ACTION_HOLD_TRANSIT_COPY_NOT_FOUND', id => $transid) unless $htransit;
+       $evt = ShareStuff::Event->new('ACTION_HOLD_TRANSIT_COPY_NOT_FOUND', id => $transid) unless $htransit;
        return ($htransit, $evt);
 }
 
@@ -443,7 +443,7 @@ sub fetch_copy_by_barcode {
                'open-ils.cstore.direct.asset.copy.search', { barcode => $barcode, deleted => 'f'} );
                #'open-ils.storage.direct.asset.copy.search.barcode', $barcode );
 
-       $evt = OpenILS::Event->new('ASSET_COPY_NOT_FOUND', barcode => $barcode) unless $copy;
+       $evt = ShareStuff::Event->new('ASSET_COPY_NOT_FOUND', barcode => $barcode) unless $copy;
 
        return ($copy, $evt);
 }
@@ -458,7 +458,7 @@ sub fetch_open_billable_transaction {
                'open-ils.cstore',
                'open-ils.cstore.direct.money.open_billable_transaction_summary.retrieve',  $transid);
 
-       $evt = OpenILS::Event->new(
+       $evt = ShareStuff::Event->new(
                'MONEY_OPEN_BILLABLE_TRANSACTION_SUMMARY_NOT_FOUND', transid => $transid ) unless $transaction;
 
        return ($transaction, $evt);
@@ -488,7 +488,7 @@ sub fetch_container {
                'open-ils.cstore',
                "open-ils.cstore.direct.container.$meth.retrieve", $id );
 
-       $evt = OpenILS::Event->new(
+       $evt = ShareStuff::Event->new(
                $e, container => $id, container_type => $type ) unless $bucket;
 
        return ($bucket, $evt);
@@ -543,7 +543,7 @@ sub fetch_container_item {
        $e = 'CONTAINER_USER_BUCKET_ITEM_NOT_FOUND' if $type eq 'user';
        $e = 'CONTAINER_COPY_BUCKET_ITEM_NOT_FOUND' if $type eq 'copy';
 
-       $evt = OpenILS::Event->new(
+       $evt = ShareStuff::Event->new(
                $e, itemid => $id, container_type => $type ) unless $bucket;
 
        return ($bucket, $evt);
@@ -618,7 +618,7 @@ sub fetch_copy_location {
        my $evt;
        my $cl = $self->cstorereq(
                'open-ils.cstore.direct.asset.copy_location.retrieve', $id );
-       $evt = OpenILS::Event->new('ASSET_COPY_LOCATION_NOT_FOUND') unless $cl;
+       $evt = ShareStuff::Event->new('ASSET_COPY_LOCATION_NOT_FOUND') unless $cl;
        return ($cl, $evt);
 }
 
@@ -635,16 +635,16 @@ sub fetch_copy_location_by_name {
        my $cl = $self->cstorereq(
                'open-ils.cstore.direct.asset.copy_location.search',
                        { name => $name, owning_lib => $org } );
-       $evt = OpenILS::Event->new('ASSET_COPY_LOCATION_NOT_FOUND') unless $cl;
+       $evt = ShareStuff::Event->new('ASSET_COPY_LOCATION_NOT_FOUND') unless $cl;
        return ($cl, $evt);
 }
 
 sub fetch_callnumber {
        my( $self, $id, $flesh, $e ) = @_;
 
-       $e ||= OpenILS::Utils::CStoreEditor->new;
+       $e ||= ShareStuff::CStoreEditor->new;
 
-       my $evt = OpenILS::Event->new( 'ASSET_CALL_NUMBER_NOT_FOUND', id => $id );
+       my $evt = ShareStuff::Event->new( 'ASSET_CALL_NUMBER_NOT_FOUND', id => $id );
        return( undef, $evt ) unless $id;
 
        $logger->debug("Fetching callnumber $id");
@@ -669,7 +669,7 @@ sub fetch_org_unit {
        my $org = $self->simplereq(
                'open-ils.cstore', 
                'open-ils.cstore.direct.actor.org_unit.retrieve', $id );
-       $evt = OpenILS::Event->new( 'ACTOR_ORG_UNIT_NOT_FOUND', id => $id ) unless $org;
+       $evt = ShareStuff::Event->new( 'ACTOR_ORG_UNIT_NOT_FOUND', id => $id ) unless $org;
        $ORG_CACHE{$id}  = $org;
 
        return ($org, $evt);
@@ -686,7 +686,7 @@ sub fetch_stat_cat {
        my $e = 'ASSET_STAT_CAT_NOT_FOUND';
        $e = 'ACTOR_STAT_CAT_NOT_FOUND' if $type eq 'actor';
 
-       $evt = OpenILS::Event->new( $e, id => $id ) unless $cat;
+       $evt = ShareStuff::Event->new( $e, id => $id ) unless $cat;
        return ( $cat, $evt );
 }
 
@@ -701,7 +701,7 @@ sub fetch_stat_cat_entry {
        my $e = 'ASSET_STAT_CAT_ENTRY_NOT_FOUND';
        $e = 'ACTOR_STAT_CAT_ENTRY_NOT_FOUND' if $type eq 'actor';
 
-       $evt = OpenILS::Event->new( $e, id => $id ) unless $entry;
+       $evt = ShareStuff::Event->new( $e, id => $id ) unless $entry;
        return ( $entry, $evt );
 }
 
@@ -716,7 +716,7 @@ sub fetch_stat_cat_entry_default {
     my $e = 'ASSET_STAT_CAT_ENTRY_DEFAULT_NOT_FOUND';
     $e = 'ACTOR_STAT_CAT_ENTRY_DEFAULT_NOT_FOUND' if $type eq 'actor';
 
-    $evt = OpenILS::Event->new( $e, id => $id ) unless $entry_default;
+    $evt = ShareStuff::Event->new( $e, id => $id ) unless $entry_default;
     return ( $entry_default, $evt );
 }
 
@@ -734,7 +734,7 @@ sub fetch_stat_cat_entry_default_by_stat_cat_and_org {
 
     my $e = 'ASSET_STAT_CAT_ENTRY_DEFAULT_NOT_FOUND';
     $e = 'ACTOR_STAT_CAT_ENTRY_DEFAULT_NOT_FOUND' if $type eq 'actor';
-    return (undef, OpenILS::Event->new($e) );
+    return (undef, ShareStuff::Event->new($e) );
 }
 
 sub find_org {
@@ -757,7 +757,7 @@ sub fetch_non_cat_type_by_name_and_org {
                'open-ils.cstore.direct.config.non_cataloged_type.search.atomic',
                { name => $name, owning_lib => $orgId } );
        return ($types->[0], undef) if($types and @$types);
-       return (undef, OpenILS::Event->new('CONFIG_NON_CATALOGED_TYPE_NOT_FOUND') );
+       return (undef, ShareStuff::Event->new('CONFIG_NON_CATALOGED_TYPE_NOT_FOUND') );
 }
 
 sub fetch_non_cat_type {
@@ -767,13 +767,13 @@ sub fetch_non_cat_type {
        $type = $self->simplereq(
                'open-ils.cstore', 
                'open-ils.cstore.direct.config.non_cataloged_type.retrieve', $id );
-       $evt = OpenILS::Event->new('CONFIG_NON_CATALOGED_TYPE_NOT_FOUND') unless $type;
+       $evt = ShareStuff::Event->new('CONFIG_NON_CATALOGED_TYPE_NOT_FOUND') unless $type;
        return ($type, $evt);
 }
 
 sub DB_UPDATE_FAILED { 
        my( $self, $payload ) = @_;
-       return OpenILS::Event->new('DATABASE_UPDATE_FAILED', 
+       return ShareStuff::Event->new('DATABASE_UPDATE_FAILED', 
                payload => ($payload) ? $payload : undef ); 
 }
 
@@ -829,7 +829,7 @@ sub fetch_booking_reservation {
                }
 
        } else {
-               $evt = OpenILS::Event->new('RESERVATION_NOT_FOUND');
+               $evt = ShareStuff::Event->new('RESERVATION_NOT_FOUND');
        }
 
        return ($res, $evt);
@@ -842,7 +842,7 @@ sub fetch_circ_duration_by_name {
                'open-ils.cstore', 
                'open-ils.cstore.direct.config.rules.circ_duration.search.atomic', { name => $name } );
        $dur = $dur->[0];
-       $evt = OpenILS::Event->new('CONFIG_RULES_CIRC_DURATION_NOT_FOUND') unless $dur;
+       $evt = ShareStuff::Event->new('CONFIG_RULES_CIRC_DURATION_NOT_FOUND') unless $dur;
        return ($dur, $evt);
 }
 
@@ -853,7 +853,7 @@ sub fetch_recurring_fine_by_name {
                'open-ils.cstore', 
                'open-ils.cstore.direct.config.rules.recurring_fine.search.atomic', { name => $name } );
        $obj = $obj->[0];
-       $evt = OpenILS::Event->new('CONFIG_RULES_RECURRING_FINE_NOT_FOUND') unless $obj;
+       $evt = ShareStuff::Event->new('CONFIG_RULES_RECURRING_FINE_NOT_FOUND') unless $obj;
        return ($obj, $evt);
 }
 
@@ -864,7 +864,7 @@ sub fetch_max_fine_by_name {
                'open-ils.cstore', 
                'open-ils.cstore.direct.config.rules.max_fine.search.atomic', { name => $name } );
        $obj = $obj->[0];
-       $evt = OpenILS::Event->new('CONFIG_RULES_MAX_FINE_NOT_FOUND') unless $obj;
+       $evt = ShareStuff::Event->new('CONFIG_RULES_MAX_FINE_NOT_FOUND') unless $obj;
        return ($obj, $evt);
 }
 
@@ -875,7 +875,7 @@ sub fetch_hard_due_date_by_name {
                'open-ils.cstore', 
                'open-ils.cstore.direct.config.hard_due_date.search.atomic', { name => $name } );
        $obj = $obj->[0];
-       $evt = OpenILS::Event->new('CONFIG_RULES_HARD_DUE_DATE_NOT_FOUND') unless $obj;
+       $evt = ShareStuff::Event->new('CONFIG_RULES_HARD_DUE_DATE_NOT_FOUND') unless $obj;
        return ($obj, $evt);
 }
 
@@ -921,7 +921,7 @@ sub fetch_open_circulation {
        my( $self, $cid ) = @_;
        $self->logmark;
 
-       my $e = OpenILS::Utils::CStoreEditor->new;
+       my $e = ShareStuff::CStoreEditor->new;
     my $circ = $e->search_action_circulation({
         target_copy => $cid, 
         stop_fines_time => undef, 
@@ -965,7 +965,7 @@ sub fetch_open_transit_by_copy {
        $transit = $self->cstorereq(
                'open-ils.cstore.direct.action.transit_copy.search',
                { target_copy => $copyid, dest_recv_time => undef });
-       $evt = OpenILS::Event->new('ACTION_TRANSIT_COPY_NOT_FOUND') unless $transit;
+       $evt = ShareStuff::Event->new('ACTION_TRANSIT_COPY_NOT_FOUND') unless $transit;
        return ($transit, $evt);
 }
 
@@ -1045,7 +1045,7 @@ sub fetch_billable_xact {
        $logger->debug("Fetching billable transaction %id");
        $xact = $self->cstorereq(
                'open-ils.cstore.direct.money.billable_transaction.retrieve', $id );
-       $evt = OpenILS::Event->new('MONEY_BILLABLE_TRANSACTION_NOT_FOUND') unless $xact;
+       $evt = ShareStuff::Event->new('MONEY_BILLABLE_TRANSACTION_NOT_FOUND') unless $xact;
        return ($xact, $evt);
 }
 
@@ -1055,7 +1055,7 @@ sub fetch_billable_xact_summary {
        $logger->debug("Fetching billable transaction summary %id");
        $xact = $self->cstorereq(
                'open-ils.cstore.direct.money.billable_transaction_summary.retrieve', $id );
-       $evt = OpenILS::Event->new('MONEY_BILLABLE_TRANSACTION_NOT_FOUND') unless $xact;
+       $evt = ShareStuff::Event->new('MONEY_BILLABLE_TRANSACTION_NOT_FOUND') unless $xact;
        return ($xact, $evt);
 }
 
@@ -1069,7 +1069,7 @@ sub fetch_fleshed_copy {
                  flesh_fields => { acp => [ qw/ circ_lib location status stat_cat_entries / ] }
                }
        );
-       $evt = OpenILS::Event->new('ASSET_COPY_NOT_FOUND', id => $id) unless $copy;
+       $evt = ShareStuff::Event->new('ASSET_COPY_NOT_FOUND', id => $id) unless $copy;
        return ($copy, $evt);
 }
 
@@ -1093,7 +1093,7 @@ sub fetch_copy_note {
        $logger->debug("Fetching copy note $id");
        $note = $self->cstorereq(
                'open-ils.cstore.direct.asset.copy_note.retrieve', $id );
-       $evt = OpenILS::Event->new('ASSET_COPY_NOTE_NOT_FOUND', id => $id ) unless $note;
+       $evt = ShareStuff::Event->new('ASSET_COPY_NOTE_NOT_FOUND', id => $id ) unless $note;
        return ($note, $evt);
 }
 
@@ -1118,10 +1118,10 @@ sub fetch_user_by_barcode {
        my( $self, $bc ) = @_;
        my $cardid = $self->cstorereq(
                'open-ils.cstore.direct.actor.card.id_list', { barcode => $bc } );
-       return (undef, OpenILS::Event->new('ACTOR_CARD_NOT_FOUND', barcode => $bc)) unless $cardid;
+       return (undef, ShareStuff::Event->new('ACTOR_CARD_NOT_FOUND', barcode => $bc)) unless $cardid;
        my $user = $self->cstorereq(
                'open-ils.cstore.direct.actor.user.search', { card => $cardid } );
-       return (undef, OpenILS::Event->new('ACTOR_USER_NOT_FOUND', card => $cardid)) unless $user;
+       return (undef, ShareStuff::Event->new('ACTOR_USER_NOT_FOUND', card => $cardid)) unless $user;
        return ($user);
        
 }
@@ -1131,7 +1131,7 @@ sub fetch_bill {
        $logger->debug("Fetching billing $billid");
        my $bill = $self->cstorereq(
                'open-ils.cstore.direct.money.billing.retrieve', $billid );
-       my $evt = OpenILS::Event->new('MONEY_BILLING_NOT_FOUND') unless $bill;
+       my $evt = ShareStuff::Event->new('MONEY_BILLING_NOT_FOUND') unless $bill;
        return($bill, $evt);
 }
 
@@ -1224,7 +1224,7 @@ sub patron_total_items_out {
 sub fetch_mbts {
        my $self = shift;
        my $id  = shift;
-       my $e = shift || OpenILS::Utils::CStoreEditor->new;
+       my $e = shift || ShareStuff::CStoreEditor->new;
        $id = $id->id if ref($id);
     
     my $xact = $e->retrieve_money_billable_transaction_summary($id)
@@ -1249,7 +1249,7 @@ sub make_mbts {
                
 sub ou_ancestor_setting_value {
     my($self, $org_id, $name, $e) = @_;
-    $e = $e || OpenILS::Utils::CStoreEditor->new;
+    $e = $e || ShareStuff::CStoreEditor->new;
     my $set = $self->ou_ancestor_setting($org_id, $name, $e);
     return $set->{value} if $set;
     return undef;
@@ -1269,7 +1269,7 @@ sub ou_ancestor_setting_value {
 
 sub ou_ancestor_setting {
     my( $self, $orgid, $name, $e, $auth ) = @_;
-    $e = $e || OpenILS::Utils::CStoreEditor->new(
+    $e = $e || ShareStuff::CStoreEditor->new(
         (defined $auth) ? (authtoken => $auth) : ()
     );
     my $coust = $e->retrieve_config_org_unit_setting_type([
@@ -1352,7 +1352,7 @@ my $org_types;
 sub get_org_types {
        my($self, $client) = @_;
        return $org_types if $org_types;
-       return $org_types = OpenILS::Utils::CStoreEditor->new->retrieve_all_actor_org_unit_type();
+       return $org_types = ShareStuff::CStoreEditor->new->retrieve_all_actor_org_unit_type();
 }
 
 my %ORG_TREE;
@@ -1363,7 +1363,7 @@ sub get_org_tree {
        my $tree = $ORG_TREE{$locale} || $cache->get_cache("orgtree.$locale");
        return $tree if $tree;
 
-       my $ses = OpenILS::Utils::CStoreEditor->new;
+       my $ses = ShareStuff::CStoreEditor->new;
        $ses->session->session_locale($locale);
        $tree = $ses->search_actor_org_unit( 
                [
@@ -1391,7 +1391,7 @@ sub get_org_descendants {
        };
        $select->{params} = [$depth] if defined $depth;
 
-       my $org_list = OpenILS::Utils::CStoreEditor->new->json_query({
+       my $org_list = ShareStuff::CStoreEditor->new->json_query({
                select => {aou => [$select]},
         from => 'aou',
                where => {id => $org_id}
@@ -1412,7 +1412,7 @@ sub get_org_ancestors {
         return $orgs if $orgs;
     }
 
-       my $org_list = OpenILS::Utils::CStoreEditor->new->json_query({
+       my $org_list = ShareStuff::CStoreEditor->new->json_query({
                select => {
                        aou => [{
                                transform => 'actor.org_unit_ancestors',
@@ -1447,14 +1447,14 @@ sub get_org_full_path {
        };
 
     $query->{select}->{aou}->[0]->{params} = [$depth] if defined $depth;
-       my $org_list = OpenILS::Utils::CStoreEditor->new->json_query($query);
+       my $org_list = ShareStuff::CStoreEditor->new->json_query($query);
     return [ map {$_->{id}} @$org_list ];
 }
 
 # returns the ID of the org unit ancestor at the specified depth
 sub org_unit_ancestor_at_depth {
     my($class, $org_id, $depth) = @_;
-    my $resp = OpenILS::Utils::CStoreEditor->new->json_query(
+    my $resp = ShareStuff::CStoreEditor->new->json_query(
         {from => ['actor.org_unit_ancestor_at_depth', $org_id, $depth]})->[0];
     return ($resp) ? $resp->{id} : undef;
 }
@@ -1462,7 +1462,7 @@ sub org_unit_ancestor_at_depth {
 # returns the user's configured locale as a string.  Defaults to en-US if none is configured.
 sub get_user_locale {
        my($self, $user_id, $e) = @_;
-       $e ||= OpenILS::Utils::CStoreEditor->new;
+       $e ||= ShareStuff::CStoreEditor->new;
 
        # first, see if the user has an explicit locale set
        my $setting = $e->search_actor_user_setting(
@@ -1476,7 +1476,7 @@ sub get_user_locale {
 # returns org locale setting
 sub get_org_locale {
        my($self, $org_id, $e) = @_;
-       $e ||= OpenILS::Utils::CStoreEditor->new;
+       $e ||= ShareStuff::CStoreEditor->new;
 
        my $locale;
        if(defined $org_id) {
@@ -1566,7 +1566,7 @@ sub get_copy_price {
 # given a transaction ID, this returns the context org_unit for the transaction
 sub xact_org {
     my($self, $xact_id, $e) = @_;
-    $e ||= OpenILS::Utils::CStoreEditor->new;
+    $e ||= ShareStuff::CStoreEditor->new;
     
     my $loc = $e->json_query({
         "select" => {circ => ["circ_lib"]},
@@ -1597,7 +1597,7 @@ sub xact_org {
 sub find_event_def_by_hook {
     my($self, $hook, $context_org, $e) = @_;
 
-    $e ||= OpenILS::Utils::CStoreEditor->new;
+    $e ||= ShareStuff::CStoreEditor->new;
 
     my $orgs = $self->get_org_ancestors($context_org);
 
@@ -1621,7 +1621,7 @@ sub find_event_def_by_hook {
 sub fire_object_event {
     my($self, $event_def, $hook, $object, $context_org, $granularity, $user_data, $client) = @_;
 
-    my $e = OpenILS::Utils::CStoreEditor->new;
+    my $e = ShareStuff::CStoreEditor->new;
     my $def;
 
     my $auto_method = "open-ils.trigger.event.autocreate.by_definition";
@@ -1758,7 +1758,7 @@ sub create_circ_chain_summary {
 my $ccvm_cache;
 sub get_bre_attrs {
     my ($class, $bre_ids, $e) = @_;
-    $e = $e || OpenILS::Utils::CStoreEditor->new;
+    $e = $e || ShareStuff::CStoreEditor->new;
 
     my $attrs = {};
     return $attrs unless defined $bre_ids;
@@ -1851,7 +1851,7 @@ sub bib_container_items_via_search {
     return [] unless @$id_list;
 
     # Now get the bib container items themselves...
-    my $e = new OpenILS::Utils::CStoreEditor;
+    my $e = new ShareStuff::CStoreEditor;
     unless ($e) {
         $logger->warn("bib_container_items_via_search() couldn't get cstoreeditor");
         return;
@@ -1893,7 +1893,7 @@ sub log_user_activity {
 
     my $commit = 0;
     if (!$e) {
-        $e = OpenILS::Utils::CStoreEditor->new(xact => 1);
+        $e = ShareStuff::CStoreEditor->new(xact => 1);
         $commit = 1;
     }
 
index b7138eb..b1ca1c9 100644 (file)
@@ -24,7 +24,7 @@ sub import {
 
 sub child_init {
     OpenSRF::System->bootstrap_client( config_file => $bootstrap );
-    OpenILS::Utils::CStoreEditor::init();
+    ShareStuff::CStoreEditor::init();
     return OK;
 }