Elive/Entity/MeetingParameters.pm

filter: Statementstmt 94.6% 53 / 56 Branchbran 100% 2 / 2 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 66.6% 6 / 9 Podpod 100% 3 / 3 totaltotal 89.3% 67 / 75 CC 4 SCAR 8.1
CC
4
Cov
93%
_thaw
4.0
insert
2.0
delete
2.0
CRAP 2.3
« Elive/Entity/Group/Members.pm ↑ Summary Elive/Util/Type.pm »
1 package Elive::Entity::MeetingParameters;
2 22 ▶use warnings; use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 22 ▶use Mouse;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 22 ▶use Mouse::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 22 extends 'Elive::Entity';
8  
9 22 __PACKAGE__->entity_name('MeetingParameters');
10 22 __PACKAGE__->_isa('Meeting');
11  
12 coerce 'Elive::Entity::MeetingParameters' => from 'HashRef'
13 1 ▶ => via {Elive::Entity::MeetingParameters->new($_) };
Subroutine __ANON__: called CC=1 SCAR=0.0
14  
15 22 has 'meetingId' => (is => 'rw', isa => 'Int', required => 1,
16 documentation => 'associated meeting');
17 22 __PACKAGE__->primary_key('meetingId');
18  
19 22 has 'costCenter' => (is => 'rw', isa => 'Str',
20 documentation => 'user defined cost center');
21 22 __PACKAGE__->_alias('cost_center' => 'costCenter');
22  
23 22 has 'moderatorNotes' => (is => 'rw', isa => 'Str',
24 documentation => 'meeting instructions for moderator(s)');
25 22 __PACKAGE__->_alias('moderator_notes' => 'moderatorNotes');
26  
27 22 has 'userNotes' => (is => 'rw', isa => 'Str',
28 documentation => 'meeting instructions for all participants');
29 22 __PACKAGE__->_alias('user_notes' => 'userNotes');
30  
31 22 enum enumRecordingStates => '', qw(on off remote);
32 22 has 'recordingStatus' => (is => 'rw', isa => 'enumRecordingStates',
33 documentation => 'recording status; on, off or remote (start/stopped by moderator)');
34 22 __PACKAGE__->_alias('recording' => 'recordingStatus');
35  
36 22 has 'raiseHandOnEnter' => (is => 'rw', isa => 'Bool',
37 documentation => 'raise hands automatically when users join');
38 22 __PACKAGE__->_alias('raise_hands' => 'raiseHandOnEnter');
39  
40 22 has 'maxTalkers' => (is => 'rw', isa => 'Int',
41 documentation => 'maximum number of simultaneous talkers');
42 22 __PACKAGE__->_alias('max_talkers' => 'maxTalkers');
43  
44 22 has 'inSessionInvitation' => (is => 'rw', isa => 'Bool',
45 documentation => 'Can moderators invite other individuals from within the online session');
46 # v9.5
47 22 __PACKAGE__->_alias('inSessionInvitations' => 'inSessionInvitation');
48 22 __PACKAGE__->_alias('invites' => 'inSessionInvitation');
49  
50 22 has 'followModerator' => (is => 'rw', isa => 'Bool',
51 documentation => 'Whiteboard slides are locked to moderator view');
52 22 __PACKAGE__->_alias('follow_moderator' => 'followModerator');
53  
54 22 has 'videoWindow' => (is => 'rw', isa => 'Int',
55 documentation => 'Max simultaneous cameras');
56 22 __PACKAGE__->_alias('max_cameras' => 'videoWindow');
57  
58 22 has 'recordingObfuscation' => (is => 'rw', isa => 'Bool');
59 22 has 'recordingResolution' => (is => 'rw', isa => 'Str',
60 documentation => 'CG:course gray, CC:course color, MG:medium gray, MC:medium color, FG:fine gray, FC:fine color');
61 22 __PACKAGE__->_alias('recording_resolution' => 'recordingResolution');
62  
63 22 has 'profile' => (is => 'rw', isa => 'Str',
64 documentation => "Which user profiles are displayed: 'none', 'mod' or 'all'");
65  
66 =head1 NAME
67  
68 Elive::Entity::MeetingParameters - Meeting parameters entity class
69  
70 =head1 SYNOPSIS
71  
72 Note: the C<insert()> and C<update()> methods are depreciated. For alternatives,
73 please see L<Elive::Entity::Session>.
74  
75 use Elive::Entity::MeetingParameters;
76  
77 my $meeting_params
78 = Elive::Entity::MeetingParameters->retrieve($meeting_id);
79  
80 $meeting_params->update({
81 maxTalkers => 3,
82 costCenter => 'acme',
83 moderatorNotes => 'be there early!',
84 userNotes => "don't be late!",
85 recordingStatus => 'on',
86 raiseHandsOnEnter => 1,
87 inSessionInvitation => 1,
88 followModerator => 0,
89 videoWindow => 0,
90 });
91  
92 =head1 DESCRIPTION
93  
94 This class contains a range of options for a previously created meeting.
95  
96 =cut
97  
98 =head1 METHODS
99  
100 =cut
101  
102 =head2 retrieve
103  
104 my $paremeters = Elive::Entity::MeetingParameters->retrieve($meeting_id);
105  
106 Retrieves the meeting parameters for a meeting.
107  
108 =cut
109  
110 =head2 insert
111  
112 The insert method is not applicable. The meeting parameters table is
113 automatically created when you create a table.
114  
115 =cut
116  
117 0 ▶sub insert {return shift->_not_available}
Subroutine insert: not called CC=1 SCAR=6.9
Pod documented
118  
119 =head2 delete
120  
121 The delete method is not applicable. meeting parameters are deleted
122 when the meeting itself is deleted.
123  
124 =cut
125  
126 0 ▶sub delete {return shift->_not_available}
Subroutine delete: not called CC=1 SCAR=6.9
Pod documented
127  
128 =head2 list
129  
130 The list method is not available for meeting parameters.
131  
132 =cut
133  
134 0 ▶sub list {return shift->_not_available}
Subroutine list: not called CC=1 SCAR=6.9
Pod documented
135  
136 sub _thaw {
137 7 ▶ my ($class, $db_data, @args) = @_;
Subroutine _thaw: called CC=4 SCAR=13.9
138  
139 7 my $data = $class->SUPER::_thaw($db_data, @args);
140  
141 6 for (grep {defined} $data->{recordingStatus}) {
142  
143 6 $_ = lc($_);
144  
145 6 ▶ unless (m{^(on|off|remote)$}x || $_ eq '') {
Branch: 1 branch
BranchTrueFalseTotal
unless (/^(on|off|remote)$/x or $_ eq "") 1 5 6
Condition66%2/3
/^(on|off|remote)$/x or $_ eq ""
l!l&&r!l&&!r
501
MC/DC50%1/2
/^(on|off|remote)$/x or $_ eq ""
/^(on|off|remote)$/x $_ eq ""
Truth table66%2/3
A or B
A= /^(on|off|remote)$/xB= $_ eq ""
ABresult
1X1
011
000
146 1 warn "ignoring unknown recording status: $_\n";
147 1 delete $data->{recordingStatus};
148 }
149 }
150  
151 6 return $data;
152 }
153  
154 =head1 See Also
155  
156 L<Elive::Entity::Session>
157  
158 =cut
159  
160 22 1;
« Elive/Entity/Group/Members.pm ↑ Summary Elive/Util/Type.pm »