NAME
Elive::Entity::ParticipantList - Meeting Participants entity class
DESCRIPTION
This is the entity class for meeting participants.
The participants property is an array of type Elive::Entity::Participant.
Note: the insert() and update() methods are depreciated. For alternatives, please see Elive::Entity::Session.
User Participants
The participants property may be specified in the format: userId[=roleId], where the role is 3 for a normal participant or 2 for a meeting moderator.
Participants may be specified as a ';' separated string:
my $participant_list = $meeting->participant_list;
$participant_list->participants('111111=2;222222');
$participant_list->update;
Participants may also be specified as an array of scalars:
$participant_list->participants(['111111=2', 222222]);
$participant_list->update;
Or an array of hashrefs:
$participant_list->participants([{user => 111111, role => 2},
{user => 222222}]);
$participant_list->update;
Groups of Participants
Groups of users may also be assigned to a meeting. All users that are member of that group are then able to participate in the meeting, and are assigned the given role.
By convention, a leading '*' indicates a group:
#
# Set alice and bob as moderators. Then add all students in the
# cookery class:
#
$participant_list->participants('alice=2;bob=2;*cookery_class=3');
$participant_list->update;
Similar to the above:
$participant_list->participants(['alice=2', 'bob=2', '*cookery_class=3']);
$participant_list->update;
As a list of hashrefs:
$participant_list->participants([
{user => 'alice', role => 2},
{user => 'bob', role => 2},
{group => 'cookery_class', role => 3},
]);
$participant_list->update;
Command Selection
By default this command uses the setParticipantList SOAP command, which doesn't handle groups. If any groups are specified, it will switch to using updateSession, which does handle groups.
METHODS
retrieve
my $meeting_participants = Elive::Entity::ParticipantList->retrieve($meeting_id);
Retrieves the participant list for a meeting.
update
This method updates meeting participants.
my $participant_list
= Elive::Entity::ParticipantList->retrieve($meeting_id);
$participant_list->participants->add($alice->userId, $bob->userId);
$participant_list->update;
Note:
- if you specify an empty list,
resetmethod will be called. The resultant list wont be empty, but will have the moderator as the sole participant.
reset
$participant_list->reset
Reset the participant list. This will set the meeting facilitator as the only participant, with a role of 2 (moderator).
insert
my $participant_list = Elive::Entity::ParticipantList->insert({
meetingId => $meeting_id,
participants => '111111=2;33333'
});
Note that if you empty the participant list, reset will be called.
list
The list method is not available for participant lists.