Bug 30484: Implement support for ILL request updates
[koha-ffzg.git] / Koha / Illrequest / SupplierUpdateProcessor.pm
1 package Koha::Illrequest::SupplierUpdateProcessor;
2
3 # Copyright 2022 PTFS Europe Ltd
4 #
5 # This file is part of Koha.
6 #
7 # Koha is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # Koha is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with Koha; if not, see <http://www.gnu.org/licenses>.
19
20 use Modern::Perl;
21
22 =head1 NAME
23
24 Koha::Illrequest::SupplierUpdateProcessor - Represents a SupplerUpdate processor
25
26 =head1 SYNOPSIS
27
28 Object-oriented class that provides an object allowing us to perform processing on
29 a SupplierUpdate
30
31 =head1 DESCRIPTION
32
33 Object-oriented base class that provides an object allowing us to perform processing on
34 a SupplierUpdate
35 ** This class should not be directly instantiated, it should only be sub-classed **
36
37 =head1 API
38
39 =head2 Class Methods
40
41 =head3 new
42
43     my $processor = Koha::Illrequest::SupplierUpdateProcessor->new(
44         $target_source_type,
45         $target_source_name
46     );
47
48 Create a new Koha::Illrequest::SupplierUpdateProcessor object.
49
50 =cut
51
52 sub new {
53     my ( $class, $target_source_type, $target_source_name, $processor_name ) = @_;
54     my $self  = {};
55
56     $self->{target_source_type} = $target_source_type;
57     $self->{target_source_name} = $target_source_name;
58     $self->{name} = $processor_name;
59
60     bless $self, $class;
61
62     return $self;
63 }
64
65 =head3 run
66
67     Koha::Illrequest::SupplierUpdateProcessor->run();
68
69 Runs the processor
70
71 =cut
72
73 sub run {
74     my ( $self ) = @_;
75     my ( $package, $filename ) = caller;
76     warn __PACKAGE__ . " run should only be invoked by a subclass\n";
77 }
78
79 =head1 AUTHOR
80
81 Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
82
83 =cut
84
85 1;