]> git.evergreen-ils.org Git - working/NCIPServer.git/blob - lib/NCIP/Response.pm
Fix table formatting
[working/NCIPServer.git] / lib / NCIP / Response.pm
1 # ---------------------------------------------------------------
2 # Copyright © 2014 Jason J.A. Stephenson <jason@sigio.com>
3 #
4 # This file is part of NCIPServer.
5 #
6 # NCIPServer is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 #
11 # NCIPServer is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 # General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with NCIPServer.  If not, see <http://www.gnu.org/licenses/>.
18 # ---------------------------------------------------------------
19 package NCIP::Response;
20 use parent qw(Class::Accessor);
21
22 =head1 NAME
23
24 Response - Response object to be returned from ILS' handlers.
25
26 =head1 SYNOPSIS
27
28
29
30 =head1 DESCRIPTION
31
32 This is the Response object to be returned by the ILS' handlers.
33
34 =head1 FIELDS
35
36 Presently, only one data or problem object is supported.  If one is
37 supplied the other must be left undefined/unset.  Only 1 header is
38 supported, but it is entirely optional according to the standard.
39
40 =head2 type
41
42 A string representing the name of the response this is usually the
43 initiation message name with Response tacked on, i.e.
44 LookupUserResponse, etc.  This value is used to lookup the appropriate
45 template for formatting the response message to the initiator.
46
47 =head2 data
48
49 This is an object or struct with the response data for a successful
50 result.  It's value and needs vary by message type.
51
52 =head2 problem
53
54 If the response is reporting a problem, this should point to a
55 NCIP::Problem object to be used in the problem template.
56
57 =head2 header
58
59 A NCIP::Header object for the optional ResponseHeader in the response
60 template.
61
62
63 =cut
64
65
66 NCIP::Response->mk_accessors(qw(type data problem header));
67
68 1;