/** * Method addUserToParticipantList. * * @param aUser - String */ private void addUsersToParticipantList(String aUser) { // Here we first need to resolve any group aliases to multiple users final List<String> resolvedUsers = R4EPreferencePage.getParticipantsFromList(aUser.trim()); for (String user : resolvedUsers) { String[] userTokens = user.split(R4EUIConstants.LIST_SEPARATOR); // Resolve user in database (if possible) R4EParticipant participant = getParticipant(userTokens[0].toLowerCase()); if (null == participant) { return; // Participant already in list } // Override email with address defined in users group (if any) if (2 == userTokens.length && !(userTokens[1].trim().equals(""))) { participant.setEmail(userTokens[1]); } // Override email with address defined in current review (if any) if (null != R4EUIModelController.getActiveReview()) { R4EParticipant reviewParticipant; try { reviewParticipant = R4EUIModelController.getActiveReview().getParticipant(participant.getId(), false); if (null != reviewParticipant) { participant.setEmail(reviewParticipant.getEmail()); } } catch (ResourceHandlingException e) { UIUtils.displayResourceErrorDialog(e); } } fParticipants.add(participant); updateComponents(participant); } }