1 package OpenILS::Application::Storage::Publisher::config;
2 use base qw/OpenILS::Application::Storage/;
3 use OpenILS::Application::Storage::CDBI::config;
6 sub metabib_field_all {
10 for my $rec ( config::metabib_field->retrieve_all ) {
11 $client->respond( $rec->to_fieldmapper );
16 __PACKAGE__->register_method(
17 method => 'metabib_field_all',
18 api_name => 'open-ils.storage.direct.config.metabib_field.retrieve.all',
27 for my $rec ( config::standing->retrieve_all ) {
28 $client->respond( $rec->to_fieldmapper );
33 __PACKAGE__->register_method(
34 method => 'standing_all',
35 api_name => 'open-ils.storage.direct.config.standing.retrieve.all',
44 for my $rec ( config::identification_type->retrieve_all ) {
45 $client->respond( $rec->to_fieldmapper );
50 __PACKAGE__->register_method(
51 method => 'ident_type_all',
52 api_name => 'open-ils.storage.direct.config.identification_type.retrieve.all',
57 sub config_status_all {
61 for my $rec ( config::copy_status->retrieve_all ) {
62 $client->respond( $rec->to_fieldmapper );
67 __PACKAGE__->register_method(
68 method => 'config_status_all',
69 api_name => 'open-ils.storage.direct.config.copy_status.retrieve.all',
78 for my $rec ( config::non_cataloged_type->retrieve_all ) {
79 $client->respond( $rec->to_fieldmapper );
84 __PACKAGE__->register_method(
85 method => 'config_non_cat',
86 api_name => 'open-ils.storage.direct.config.non_cataloged_type.retrieve.all',
92 # XXX arg, with the descendancy SPs...
93 sub ranged_config_non_cat {
98 my $ctable = config::non_cataloged_type->table;
100 my $descendants = defined($binds[1]) ?
101 "actor.org_unit_full_path(?, ?)" :
102 "actor.org_unit_full_path(?)" ;
109 ON (d.id = c.owning_lib)
112 my $sth = config::non_cataloged_type->db_Main->prepare($sql);
113 $sth->execute(@binds);
115 while ( my $rec = $sth->fetchrow_hashref ) {
117 my $cnct = new Fieldmapper::config::non_cataloged_type;
118 $cnct->name($rec->{name});
119 $cnct->owning_lib($rec->{owning_lib});
120 $cnct->id($rec->{id});
122 $client->respond( $cnct );
127 __PACKAGE__->register_method(
128 method => 'ranged_config_non_cat',
129 api_name => 'open-ils.storage.ranged.config.non_cataloged_type.retrieve',