File Coverage

blib/lib/Elive.pm
Criterion Covered Total %
statement 26 40 65.0
branch 0 6 0.0
condition 0 6 0.0
subroutine 9 14 64.2
pod 6 6 100.0
total 41 72 56.9


line stmt bran cond sub pod time code
1             package Elive;
2 34     34   621417 use warnings; use strict;
  34     34   63  
  34         1068  
  34         150  
  34         51  
  34         1417  
3              
4             =head1 NAME
5              
6             Elive - Elluminate Live! Manager (ELM) Command Toolkit bindings
7              
8             =head1 VERSION
9              
10             Version 1.33
11              
12             =cut
13              
14             our $VERSION = '1.33';
15              
16 34     34   701 use 5.008003;
  34         108  
  34         1254  
17              
18 34     34   11265 use parent qw{Class::Data::Inheritable};
  34         6433  
  34         161  
19 34     34   18538 use Scalar::Util;
  34         57  
  34         1676  
20              
21 34     34   11242 use YAML::Syck;
  34         41999  
  34         2008  
22 34     34   203 use Carp;
  34         58  
  34         1626  
23 34     34   11288 use Elive::Entity;
  34         100  
  34         9988  
24              
25             =head1 EXAMPLE
26              
27             The following (somewhat contrived) example sets up a meeting of selected
28             participants:
29              
30             use Elive;
31             use Elive::Entity::User;
32             use Elive::Entity::Preload;
33             use Elive::Entity::Session;
34              
35             my $meeting_name = 'Meeting of the Smiths';
36              
37             Elive->connect('https://someEllumServer.com/my_instance',
38             'serversupport', 'mypass');
39              
40             my $users = Elive::Entity::User->list(filter => "(lastName = 'Smith')");
41             die "smithless" unless @$users;
42              
43             my $start = time() + 15 * 60; # starts in 15 minutes
44             my $end = $start + 30 * 60; # runs for half an hour
45              
46             my $whiteboard_preload = Elive::Entity::Preload->upload('welcome.wbd');
47              
48             my $session = Elive::Entity::Session->insert({
49             name => $meeting_name,
50             start => $start . '000',
51             end => $end . '000',
52             restricted => 1,
53             participants => $users,
54             add_preload => $whiteboard_preload,
55             });
56              
57             print "Session address: ".$session->web_url;
58              
59             Elive->disconnect;
60              
61             =head1 DESCRIPTION
62              
63             Elive is a set of Perl bindings and entity definitions for quick and easy
64             integration with the Elluminate I Manager (ELM) application. It can
65             be used to automate a range of tasks including setting up meetings and
66             participants, as well as managing users and user groups.
67              
68             =head1 BACKGROUND
69              
70             Elluminate I is software for virtual online classrooms. It is suitable
71             for meetings, demonstrations, web conferences, seminars, training and support.
72              
73             Most management functions that can be performed via the web interface can
74             also be achieved via SOAP web services. This is known as the
75             I and is detailed in chapter 4 of the Elluminate I
76             Software Developers Kit (SDK).
77              
78             Users, Meetings and other resources are stored in the Elluminate I
79             Manager (ELM) database. These can be entered, accessed and manipulated via
80             the Entity Commands in the Command Toolkit.
81              
82             =cut
83              
84             =head1 METHODS
85              
86             =head2 connect
87              
88             Elive->connect('https://myServer.com/test', some_user => 'some_pass');
89             my $connection = Elive->connection;
90              
91             Connects to an Elluminate server instance. Dies if the connection could not
92             be established. If, for example, the SOAP connection or user login failed.
93              
94             The login user must either be an Elluminate I system administrator
95             account, or a user that has been configured to access the Command Toolkit
96             via web services.
97              
98             See also: the Elive C file, L.
99              
100             =cut
101              
102             sub connect {
103 0     0 1 0 my $class = shift;
104 0         0 return Elive::Entity->connect(@_);
105             }
106              
107             =head2 connection
108              
109             $e1 = Elive->connection
110             or warn 'no elive connection active';
111              
112             Returns the current L connection.
113              
114             =cut
115              
116             sub connection {
117 0     0 1 0 my $class = shift;
118 0         0 return Elive::Entity->connection(@_);
119             }
120              
121             =head2 login
122              
123             Returns the login user for the default connection.
124              
125             my $login = Elive->login;
126             say "logged in as: ".$login->loginName;
127              
128             See L.
129              
130             =cut
131              
132             sub login {
133 0     0 1 0 my ($class, %opt) = @_;
134              
135 0   0     0 my $connection = $opt{connection} || $class->connection;
136              
137 0 0       0 die "not connected"
138             unless $connection;
139              
140 0         0 return $connection->login;
141             }
142              
143             =head2 server_details
144              
145             Returns the server details for the current connection. See L.
146              
147             my $server = Elive->server_details;
148             printf("server %s is running Elluminate Live! version %s\n", $server->name, $server->version);
149              
150             There can potentially be multiple servers:
151              
152             my @servers = Elive->server_details;
153             foreach my $server (@servers) {
154             printf("server %s is running Elluminate Live! version %s\n", $server->name, $server->version);
155             }
156              
157             =cut
158              
159             sub server_details {
160 0     0 1 0 my ($class, %opt) = @_;
161              
162 0 0 0     0 my $connection = $opt{connection} || $class->connection
163             or die "not connected";
164              
165 0         0 my @server_details = $connection->server_details;
166 0 0       0 return wantarray ? @server_details : $server_details[0]
167             }
168            
169             =head2 disconnect
170              
171             Disconnects the default Elluminate connection. It is recommended that you
172             do this prior to exiting your program.
173              
174             Elive->disconnect;
175             exit(0);
176              
177             =cut
178              
179             sub disconnect {
180 1     1 1 1472 my $self = shift;
181 1         14 return Elive::Entity->disconnect;
182             }
183              
184             =head2 debug
185              
186             Elive->debug(1)
187              
188             Sets or gets the debug level.
189              
190             =over 4
191              
192             =item 0 = no debugging
193              
194             =item 1 = dump object and class information
195              
196             =item 2 = also enable SOAP::Lite tracing
197              
198             =item 3 = very detailed
199              
200             =back
201              
202             =cut
203              
204             sub debug {
205 0     0 1   my $class = shift;
206 0           Elive::DAO::_Base->debug(@_);
207             }
208              
209             =head1 ERROR MESSAGES
210              
211             Elluminate Services Errors:
212              
213             =over 4
214              
215             =item "Unable to determine a command for the key : Xxxx"
216              
217             This may indicate that the particular command is is not available for your
218             site instance. Please follow the instructions in the README file for
219             detecting and repairing missing adapters.
220              
221             =item "User [], not permitted to access the command {]"
222              
223             Please ensure that the user is a system administrator account and/or the
224             user has been configured to access commands via web services. See also the
225             L file.
226              
227             =back
228              
229             =cut
230              
231             =head1 SCRIPTS
232              
233             =head2 elive_query - simple query shell
234              
235             elive_query is a script for issuing basic sql-like queries on entities. It serves as a simple demonstration script, and can be used to confirm connectivity and operation of Elive.
236              
237             % perl elive_query https://myserver.com/test -user sdk_user
238             Password: connecting to https://myserver.com/test...ok
239             Elive query 1.xx - type 'help' for help
240              
241             elive> select address,version from serverDetails
242             address |version
243             ------------|-------
244             myserver.com|10.0.1
245             elive> ^D
246              
247             It serves a secondary function of querying entity metadata. For example,
248             to show the C entity:
249              
250             % elive_query
251             Elive query 1.xx - type 'help' for help
252              
253             elive> show
254             usage: show group|meeting|...|serverParameters|session|users
255              
256             elive> show meeting
257             meeting: Elive::Entity::Meeting:
258             meetingId : pkey Int
259             adapter : Str -- adapter used to create the meeting
260             allModerators : Bool -- all participants can moderate
261             deleted : Bool
262             end : HiResDate -- meeting end time
263             facilitatorId : Str -- userId of facilitator
264             name : Str -- meeting name
265             password : Str -- meeting password
266             privateMeeting : Bool -- don't display meeting in public schedule
267             restrictedMeeting : Bool -- Restricted meeting
268             start : HiResDate -- meeting start time
269              
270             for more information, please see L, or or type the command: C
271              
272             =head2 elive_raise_meeting - meeting creation
273              
274             This is a demonstration script for creating meetings. This includes the setting
275             of meeting options, assigning participants and uploading of preloads (whiteboard, plan and media files).
276              
277             For more information, see L or type the command: C
278              
279             =head2 elive_lint_config - configuration file checker
280              
281             A utility script that checks your Elluminate server configuration. This
282             is more likely to be of use for Elluminate I prior to 10.0. Please
283             see the README file.
284              
285             =head1 SEE ALSO
286              
287             =head2 Modules in the Elive distribution
288              
289             =over 4
290              
291             =item L - Sessions (or meetings)
292              
293             =item L - Groups of Users
294              
295             =item L - Preload Content (whiteboard, multimedia and plans)
296              
297             =item L - Session Recordings
298              
299             =item L - Management Reports
300              
301             =item L - Users/Logins
302              
303             =item L - Elluminate SOAP connections
304              
305             =back
306              
307             =head2 Scripts in the Elive Distribution
308              
309             =over 4
310              
311             =item L - simple interactive queries on Elive entities
312              
313             =item L - command-line meeting creation
314              
315             =item L - Elluminate Live! configuration checker
316              
317             =back
318              
319             =head2 Related CPAN Modules
320              
321             L - this module implements the alternate Elluminate I Standard Bridge API (v3).
322              
323             =head2 Elluminate Documentation
324              
325             This following documents were used in the construction of this module:
326              
327             =over 4
328              
329             =item ELM2.5_SDK.pdf
330              
331             General Description of SDK development for Elluminate I. In particular
332             see section 4 - the SOAP Command Toolkit. This module concentrates on
333             implementing the Entity Commands described in section 4.1.8.
334              
335             =item Undocumented ELM 3.x SDK Calls.pdf
336              
337             This describes the C and C commands, as
338             implemented by the L C and C
339             methods.
340              
341             =item DatabaseSchema.pdf
342              
343             Elluminate Database Schema Documentation.
344              
345             =back
346              
347             =head1 AUTHOR
348              
349             David Warring, C<< >>
350              
351             =head1 BUGS AND LIMITATIONS
352              
353             =over 4
354              
355             =item * Elive does not support hosted (SAS) systems
356              
357             The Elive distribution only supports the ELM (Elluminate I Manager) SDK.
358             The SAS (Session Administration System) is not supported.
359              
360             =back
361              
362             =head1 SUPPORT
363              
364             Please report any bugs or feature requests to C,
365             or through the web interface at L.
366             I will be notified, and then you'll automatically be notified of progress on
367             your bug as I make changes.
368              
369             You can find documentation for this module with the perldoc command.
370              
371             perldoc Elive
372              
373             You can also look for information at:
374              
375             =over 4
376              
377             =item * RT: CPAN's request tracker
378              
379             L
380              
381             =item * AnnoCPAN: Annotated CPAN documentation
382              
383             L
384              
385             =item * CPAN Ratings
386              
387             L
388              
389             =item * Search CPAN
390              
391             L
392              
393             =back
394              
395             =head1 ACKNOWLEDGEMENTS
396              
397             Thanks to Lex Lucas and Simon Haidley for their ongoing support and
398             assistance with the development of this module.
399              
400             =head1 COPYRIGHT & LICENSE
401              
402             Copyright 2009-2012 David Warring, all rights reserved.
403              
404             This program is free software; you can redistribute it and/or modify it
405             under the same terms as Perl itself.
406              
407             =cut
408              
409             1; # End of Elive