LS/Service.pm untested

filter: Statementstmt 0.0% 0 / 56 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 19 Podpod 0.0% 0 / 7 totaltotal 0.0% 0 / 88 CC 4 SCAR 11.3
CC
4
Cov
0%
new
6.0
auth_type
6.0
auth_handler
6.0
CRAP 3.1
1 # =====================================================================
2 # Copyright (c) 2002,2003 IBM Corporation
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Common Public License v1.0
5 # which accompanies this distribution, and is available at
6 # http://www.opensource.org/licenses/cpl.php
7 #
8 # =====================================================================
9  
10 # Backwards compatibility
11 use LS::Service::Fault;
12 use LS::Service::Response;
13 use LS::Service::Authority;
14 use LS::Service::Namespace;
15 use LS::Service::DataService;
16 use LS::Service::AdvancedDataService;
17  
18 package LS::Service;
19 #
20 # Super-class of all LSID resolution services
21 #
22 # All protocol/encoding/transparent code should reside
23 # in this package.
24 #
25  
26 use strict;
27 use warnings;
28  
29 use vars qw( $SERVICE_METHODS );
30  
31 use LS;
32 use LS::ID;
33  
34  
35 use base 'LS::Base';
36  
37 #
38 # BEGIN( )
39 #
40 sub BEGIN {
41  
42 $SERVICE_METHODS = [
43 'authorityService',
44 'metadataService',
45 'dataService',
46 ];
47
48 LS::makeAccessorMethods($SERVICE_METHODS, __PACKAGE__);
49 }
50  
51  
52 #
53 # new( %options ) -
54 #
55 sub new {
56
57 my ($self, %options) = @_;
58  
59 unless (ref $self) {
60
61 $self = bless {
62
63 _auth_type=> undef,
64 _auth_handler=> undef,
65  
66 }, $self;
67
68 }
69  
70 $self->auth_type($options{'auth_type'});
71 $self->auth_handler($options{'auth_handler'});
72  
73  
74 return $self;
75 }
76  
77  
78 sub auth_type {
79
80 my $self = shift;
81  
82 @_ ? $self->{'_auth_type'} = $_[0] : $self->{'_auth_type'};
83 }
84  
85  
86 sub auth_handler {
87
88 my $self = shift;
89  
90 @_ ? $self->{'_auth_handler'} = $_[0] : $self->{'_auth_handler'};
91 }
92  
93  
94 # ACCESSOR
95 # authorityService( $authorityDispatch ) -
96 #
97  
98 #
99 # authority_service - Synonym for authorityService.
100 #
101 sub authority_service {
102  
103 my $self = shift;
104 return $self->authorityService(@_);
105 }
106  
107
108 # ACCESSOR
109 # metadataService( $metadataDispatch ) -
110 #
111  
112 #
113 # metadata_service - Synonym for metadataService.
114 #
115 sub metadata_service {
116  
117 my $self = shift;
118 return $self->metadataService(@_);
119 }
120  
121  
122 # ACCESSOR
123 # dataService( $dataDispatch ) -
124 #
125  
126 #
127 # data_service - Synonym for dataService.
128 #
129 sub data_service {
130  
131 my $self = shift;
132 return $self->dataService(@_);
133 }
134  
135 1;
136  
137 __END__