1 # ---------------------------------------------------------------
2 # Copyright © 2014 Jason J.A. Stephenson <jason@sigio.com>
4 # This file is part of NCIPServer.
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.
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.
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);
24 Response - Response object to be returned from ILS' handlers.
32 This is the Response object to be returned by the ILS' handlers.
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.
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.
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.
54 If the response is reporting a problem, this should point to a
55 NCIP::Problem object to be used in the problem template.
59 A NCIP::Header object for the optional ResponseHeader in the response
66 NCIP::Response->mk_accessors(qw(type data problem header));