+sub after_hold_create {
+ my ( $self, $param ) = @_;
+ Koha::Exceptions::Exception->throw("after_hold_create called with parameter " . ref($param) );
+}
+
+sub after_biblio_action {
+ my ( $self, $params ) = @_;
+ my $action = $params->{action} // '';
+ my $biblio = $params->{biblio};
+ my $biblio_id = $params->{biblio_id};
+
+ if ( $action ne 'delete' ) {
+ Koha::Exceptions::Exception->throw("after_biblio_action called with action: $action, ref: " . ref($biblio) );
+ }
+ else {
+ Koha::Exceptions::Exception->throw("after_biblio_action called with action: $action") if $biblio_id;
+ }
+}
+
+sub after_item_action {
+ my ( $self, $params ) = @_;
+ my $action = $params->{action} // '';
+ my $item = $params->{item};
+ my $item_id = $params->{item_id};
+
+ if ( $action ne 'delete' ) {
+ my $itemnumber_defined = (defined $item->itemnumber) ? 'yes' : 'no';
+ my $item_id_defined = (defined $item_id) ? 'yes' : 'no';
+ Koha::Exceptions::Exception->throw("after_item_action called with action: $action, ref: " . ref($item) . " ".
+ "item_id defined: $item_id_defined ".
+ "itemnumber defined: $itemnumber_defined" );
+ }
+ else {
+ Koha::Exceptions::Exception->throw("after_item_action called with action: $action" ) if $item_id;
+ }
+}
+
+sub after_circ_action {
+ my ( $self, $params ) = @_;
+
+ my $action = $params->{action};
+ my $checkout = $params->{payload}->{checkout};
+ my $payload = $params->{payload};
+
+ my $type = $payload->{type};
+
+ if ( $action eq 'renewal' ) {
+ Koha::Exceptions::Exception->throw("after_circ_action called with action: $action, ref: " . ref($checkout));
+ }
+ elsif ( $action eq 'checkout') {
+ Koha::Exceptions::Exception->throw("after_circ_action called with action: $action, ref: " . ref($checkout) . " type: $type");
+ }
+ elsif ( $action eq 'checkin' ) {
+ Koha::Exceptions::Exception->throw("after_circ_action called with action: $action, ref: " . ref($checkout));
+ }
+}
+