source: LMDZ6/branches/Amaury_dev/tools/fcm/lib/FCM/Admin/User.pm @ 5095

Last change on this file since 5095 was 5095, checked in by abarral, 4 months ago

Revert cosp*/ from the trunk, as it's external code
Add missing bits from FCM2 source

File size: 2.1 KB
Line 
1# ------------------------------------------------------------------------------
2# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors.
3#
4# This file is part of FCM, tools for managing and building source code.
5#
6# FCM 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 3 of the License, or
9# (at your option) any later version.
10#
11# FCM is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with FCM. If not, see <http://www.gnu.org/licenses/>.
18# ------------------------------------------------------------------------------
19
20use strict;
21use warnings;
22
23package FCM::Admin::User;
24use base qw{FCM::Class::HASH};
25use overload q{""} => \&get_name;
26
27__PACKAGE__->class({
28    name         => '$',
29    display_name => '$',
30    email        => '$',
31});
32
331;
34__END__
35
36=head1 NAME
37
38FCM::Admin::User
39
40=head1 SYNOPSIS
41
42    use FCM::Admin::User;
43    $user = FCM::Admin::User->new({name => 'bob'});
44    $user->set_display_name('Robert Smith');
45    $user->set_email('robert.smith@somewhere.org');
46
47=head1 DESCRIPTION
48
49An object of this class is used to store the data model of a user.
50
51=head1 METHODS
52
53=over 4
54
55=item FCM::Admin::User->new(\%arguments)
56
57Creates a new instance. The keys of the %argument hash may contain "name",
58"display_name", and/or "email".
59
60=item $user->get_name()
61
62Returns the name/ID of the user.
63
64=item $user->get_display_name()
65
66Returns the display name of the user.
67
68=item $user->get_email()
69
70Returns the e-mail address of the user.
71
72=item $user->set_name($value)
73
74Sets the name/ID of the user.
75
76=item $user->set_display_name($value)
77
78Sets the display name of the user.
79
80=item $user->set_email($value)
81
82Sets the e-mail address of the user.
83
84=back
85
86=head1 COPYRIGHT
87
88Copyright (C) 2006-2021 British Crown (Met Office) & Contributors.
89
90=cut
Note: See TracBrowser for help on using the repository browser.