From fbf7c57a477bd626a38c1150854fb93f9beaf0e6 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 10 Nov 2023 12:36:04 +0000 Subject: [PATCH] Bug 30070: Add Koha Objects for EDI Message Files This patch adds the Koha Object based classes assocaited with the edifact_message table. This table actually contains the raw message files which may well each contain multiple edifact messages. --- Koha/Edifact/File.pm | 50 ++++++++++++++++++++++++++++++++++ Koha/Edifact/Files.pm | 62 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 Koha/Edifact/File.pm create mode 100644 Koha/Edifact/Files.pm diff --git a/Koha/Edifact/File.pm b/Koha/Edifact/File.pm new file mode 100644 index 00000000000..8f01f1dff3e --- /dev/null +++ b/Koha/Edifact/File.pm @@ -0,0 +1,50 @@ +package Koha::Edifact::File; + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +use Modern::Perl; + +use base qw(Koha::Object); + +=encoding utf8 + +=head1 Name + +Koha::Edifact::File - Koha::Object class for single edifact file + +=head2 Class methods + +=head2 Internal methods + +=head3 _type + +Returns name of corresponding DBIC resultset + +=cut + +sub _type { + return 'EdifactMessage'; +} + +=head1 AUTHOR + +Martin Renvoize + +Koha Development Team + +=cut + +1; diff --git a/Koha/Edifact/Files.pm b/Koha/Edifact/Files.pm new file mode 100644 index 00000000000..e0701d24794 --- /dev/null +++ b/Koha/Edifact/Files.pm @@ -0,0 +1,62 @@ +package Koha::Edifact::Files; + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +use Modern::Perl; + +use Koha::Database; + +use base qw(Koha::Objects); + +=head1 NAME + +Koha::Edifact::Files - Koha Edifact File Object set class + +=head1 API + +=head2 Class Methods + +=head2 Internal methods + +=head3 _type + +Returns name of corresponding DBIC resultset + +=cut + +sub _type { + return 'EdifactMessage'; +} + +=head3 object_class + +Returns name of corresponding koha object class + +=cut + +sub object_class { + return 'Koha::Edifact::File'; +} + +=head1 AUTHOR + +Martin Renvoize + +Koha Development Team + +=cut + +1; -- 2.43.0