Examples of GetWorkspaceParticipantsResponseImpl


Examples of com.google.collide.dto.server.DtoServerImpls.GetWorkspaceParticipantsResponseImpl

  /**
   * Returns all the connected tabs, as well as the user information for the user that owns each
   * tab.
   */
  void doGetParticipants(Message<JsonObject> event) {
    GetWorkspaceParticipantsResponseImpl resp = GetWorkspaceParticipantsResponseImpl.make();
    List<ParticipantUserDetailsImpl> collaboratorsArr = new ArrayList<ParticipantUserDetailsImpl>();

    Set<Entry<String, ConnectedTab>> collaborators = connectedTabs.entrySet();
    for (Entry<String, ConnectedTab> entry : collaborators) {
      String userId = entry.getValue().loginInfo.userId;
      String username = entry.getValue().loginInfo.username;
      ParticipantUserDetailsImpl participantDetails = ParticipantUserDetailsImpl.make();
      ParticipantImpl participant = ParticipantImpl.make().setId(entry.getKey()).setUserId(userId);
      UserDetailsImpl userDetails = UserDetailsImpl.make()
          .setUserId(userId).setDisplayEmail(username).setDisplayName(username)
          .setGivenName(username);

      participantDetails.setParticipant(participant);
      participantDetails.setUserDetails(userDetails);     
      collaboratorsArr.add(participantDetails);
    }

    resp.setParticipants(collaboratorsArr);       
    event.reply(Dto.wrap(resp));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.