Package com.google.collide.dto.server.DtoServerImpls

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


      FileEditSession editSession = editSessions.get(resourceId);

      // Apply the DocOp.
      if (editSession != null) {
        List<String> docOps = ((JsonArrayListAdapter<String>) wrappedDocOp.getDocOps2()).asList();
        ServerToClientDocOpsImpl appliedDocOps = applyMutation(
            docOps, wrappedDocOp.getClientId(), wrappedDocOp.getCcRevision(),
            wrappedDocOp.getSelection(), resourceId, editSession);
        message.reply(Dto.wrap(appliedDocOps));
      }
    }
View Full Code Here


          appliedDocOpsList.get(appliedDocOpsList.size() - 1)
              .setSelection((DocumentSelectionImpl) result.transformedDocumentSelection);
        }

        // Broadcast the applied DocOp all the participants, ignoring the sender.
        ServerToClientDocOpsImpl broadcastedDocOps =
            ServerToClientDocOpsImpl.make().setDocOps(appliedDocOpsList);
        vertx.eventBus().send("participants.broadcast", new JsonObject().putString(
            Participants.OMIT_SENDER_TAG, authorId).putString(
            "payload", broadcastedDocOps.toJson()));
        return broadcastedDocOps;
      } catch (DocumentOperationException e) {
        logger.error(String.format("Failed to apply DocOps [%s]", serializedDocOps));
      }
      return null;
View Full Code Here

TOP

Related Classes of com.google.collide.dto.server.DtoServerImpls.ServerToClientDocOpsImpl

Copyright © 2018 www.massapicom. 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.