throws ResourceDuplicationException, InvalidParametersException,
UnauthorizedAccessException {
if (!WidgetKeyManager.isValidRequest(request)) throw new UnauthorizedAccessException();
IWidgetInstance instance = WidgetInstancesController.findWidgetInstance(request);
if (instance == null) throw new InvalidParametersException();
HttpSession session = request.getSession(true);
String participantId = request.getParameter("participant_id"); //$NON-NLS-1$
String participantDisplayName = request.getParameter("participant_display_name"); //$NON-NLS-1$
String participantThumbnailUrl = request.getParameter("participant_thumbnail_url"); //$NON-NLS-1$
// Check required params
if (participantId == null || participantId.trim().equals("")) {
_logger.error("participant_id parameter cannot be null");
throw new InvalidParametersException();
}
if (addParticipantToWidgetInstance(instance, participantId, participantDisplayName, participantThumbnailUrl)){
Notifier.notifyWidgets(session, instance, Notifier.PARTICIPANTS_UPDATED);
_logger.debug("added user to widget instance: " + participantId);