Elive::View::Session - Session view class


Elive documentation  | view source Contained in the Elive distribution.

Index


NAME

Top

Elive::View::Session - Session view class

DESCRIPTION

Top

A session is a consolidated view of meetings, meeting parameters, server parameters and participants.

METHODS

Top

insert

Creates a new session on an Elluminate server.

    use Elive::View::Session;

    my $session_start = time();
    my $session_end = $session_start + 900;

    $session_start .= '000';
    $session_end .= '000';

    my $preload = Elive::Entity::Preload->upload('c:\\Documents\intro.wbd');

    my %session_data = (
	name => 'An example session',
	facilitatorId => Elive->login->userId,
	password => 'example', # what else?
	start =>  $session_start,
	end => $session_end,
	privateMeeting => 1,
	costCenter => 'example',
	recordingStatus => 'remote',
	raiseHandOnEnter => 1,
	maxTalkers => 2,
	inSessionInvitation => 1,
	boundaryMinutes => 15,
	fullPermissions => 1,
	supervised => 1,
	seats => 2,
        participants => [
            -moderators => [qw(alice bob)],
            -others => '*staff_group'
        ],
        add_preload => $preload
    );

    my $session = Elive::View::Session->insert( \%session_data );

A series of sessions can be created using the recurrenceCount and recurrenceDays parameters.

    #
    # create three weekly sessions
    #
    my @sessions = Elive::View::Session->insert({
                            ...,
                            recurrenceCount => 3,
                            recurrenceDays  => 7,
                        });
=cut

sub insert { my $class = shift; my %data = %{ shift() }; my %opts = @_;

    my $preloads = delete $data{add_preload};
    #
    # start by inserting the meeting
    #
    my @meeting_props = $class->_data_owned_by('Elive::Entity::Meeting' => (sort keys %data));

    my %meeting_data = map {
	$_ => delete $data{$_}
    } @meeting_props;

    #
    # recurrenceCount, and recurrenceDays may result in multiple meetings
    #
    my @meetings = Elive::Entity::Meeting->insert(\%meeting_data, %opts);

    my @objs = map {
	my $meeting = $_;

	my $self = bless {id => $meeting->meetingId,
			  meeting => $meeting}, $class;
	$self->connection( $meeting->connection );
	#
	# from here on in, it's just a matter of updating attributes owned by
	# the other entities. We need to do this for each meeting instance
	#
	$self->update(\%data, %opts)
	    if keys %data;

	$self->__add_preloads( $preloads ) if $preloads;

	$self;

    } @meetings;

    return wantarray? @objs : $objs[0];
}

update

Updates a previously created session.

    $session->seats(5);
    $session->update;

...or equivalently...

    $session->update({seats => 5});

buildJNLP check_preload add_preload remove_preload is_participant is_moderator list_preloads list_recordings

These methods are available from the base class Elive::Entity::Session.

adapter allModerators boundaryMinutes costCenter deleted enableTelephony end facilitatorId followModerator fullPermissions id inSessionInvitation maxTalkers moderatorNotes moderatorTelephonyAddress moderatorTelephonyPIN name participantTelephonyAddress participantTelephonyPIN participants password privateMeeting profile raiseHandOnEnter recordingObfuscation recordingResolution recordingStatus redirectURL restrictedMeeting seats serverTelephonyAddress serverTelephonyPIN start supervised telephonyType userNotes videoWindow

These attributes are available from the base class Elive::Entity::Session.

SEE ALSO

Top

Elive::Entity::Session (the base class).


Elive documentation  | view source Contained in the Elive distribution.