From a43ecd3c7fd871e7ff7d85139e67d73f1b1f0b81 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Sat, 26 Jul 2014 16:58:47 -0400 Subject: [PATCH] Add the work achieved so far today. This stuff may get moved around later. Signed-off-by: Jason Stephenson --- lib/NCIP/ILS.pm | 56 +++++++++++++++++++++++++++++++++++ lib/NCIP/Problem.pm | 24 +++++++++++++++ lib/NCIP/StructuredAddress.pm | 25 ++++++++++++++++ lib/NCIP/User.pm | 40 ++++++++++++------------- 4 files changed, 124 insertions(+), 21 deletions(-) create mode 100644 lib/NCIP/ILS.pm create mode 100644 lib/NCIP/Problem.pm create mode 100644 lib/NCIP/StructuredAddress.pm diff --git a/lib/NCIP/ILS.pm b/lib/NCIP/ILS.pm new file mode 100644 index 0000000..1523922 --- /dev/null +++ b/lib/NCIP/ILS.pm @@ -0,0 +1,56 @@ +# --------------------------------------------------------------- +# Copyright © 2014 Jason J.A. Stephenson +# +# This file is part of NCIPServer. +# +# NCIPServer 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 2 of the License, or +# (at your option) any later version. +# +# NCIPServer 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 NCIPServer. If not, see . +# --------------------------------------------------------------- +package NCIP::ILS; + +sub new { + my $invocant = shift; + my $class = ref $invocant || $invocant; + my $self = bless {@_}, $class; + return $self; +} + +# Methods required for SHAREit: + +sub acceptitem { +} + +sub cancelrequestitem { +} + +sub checkinitem { +} + +sub checkoutitem { +} + +sub lookupuser { +} + +sub renewitem { +} + +sub requestitem { +} + +# Other methods, just because. + +sub lookupversion { +} + +1; diff --git a/lib/NCIP/Problem.pm b/lib/NCIP/Problem.pm new file mode 100644 index 0000000..088a526 --- /dev/null +++ b/lib/NCIP/Problem.pm @@ -0,0 +1,24 @@ +# --------------------------------------------------------------- +# Copyright © 2014 Jason J.A. Stephenson +# +# This file is part of NCIPServer. +# +# NCIPServer 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 2 of the License, or +# (at your option) any later version. +# +# NCIPServer 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 NCIPServer. If not, see . +# --------------------------------------------------------------- +package NCIP::Problem; +use parent qw(Class::Accessor); + +NCIP::Problem->mk_accessors(qw(type scheme detail element value ext)); + +1; diff --git a/lib/NCIP/StructuredAddress.pm b/lib/NCIP/StructuredAddress.pm new file mode 100644 index 0000000..ce971f6 --- /dev/null +++ b/lib/NCIP/StructuredAddress.pm @@ -0,0 +1,25 @@ +# --------------------------------------------------------------- +# Copyright © 2014 Jason J.A. Stephenson +# +# This file is part of NCIPServer. +# +# NCIPServer 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 2 of the License, or +# (at your option) any later version. +# +# NCIPServer 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 NCIPServer. If not, see . +# --------------------------------------------------------------- +package NCIP::StructuredAddress; +use parent qw(Class::Accessor); + +NCIP::StructuredAddress->mk_accessors(qw(line1 line2 locality region postalcode + country)); + +1; diff --git a/lib/NCIP/User.pm b/lib/NCIP/User.pm index 6cd2899..44f443f 100644 --- a/lib/NCIP/User.pm +++ b/lib/NCIP/User.pm @@ -1,6 +1,24 @@ +# --------------------------------------------------------------- +# Copyright © 2014 Jason J.A. Stephenson +# +# This file is part of NCIPServer. +# +# NCIPServer 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 2 of the License, or +# (at your option) any later version. +# +# NCIPServer 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 NCIPServer. If not, see . +# --------------------------------------------------------------- package NCIP::User; -use base qw(Class::Accessor); +use parent qw(Class::Accessor); # User Object needs # Authentication Input @@ -16,24 +34,4 @@ use base qw(Class::Accessor); # Make accessors for the ones that makes sense NCIP::User->mk_accessors(qw(userid ils userdata)); -sub initialise { - my $self = shift; - my $ils = $self->ils; - my ( $userdata, $error ) = $ils->userdata( $self->userid ); - $self->{'userdata'} = $userdata; - -} - -sub authentication { -} - -sub previous_userids { -} - -sub status { - - # Is the user blocked - # if so, why -} - 1; -- 2.43.2