WaveletBasedConversation.makeWaveletConversational(opBasedWavelet);
ObservableConversationView conversation =
context.getConversationUtil().buildConversation(opBasedWavelet);
ObservableConversationBlip rootBlip = conversation.getRoot().getRootThread().appendBlip();
for (ParticipantId newParticipant : participants) {
opBasedWavelet.addParticipant(newParticipant);
}
// Store the temporary id of the wavelet and rootblip so that future
// operations can reference it.
try {
WaveId waveId = ApiIdSerializer.instance().deserialiseWaveId(waveletData.getWaveId());
WaveletId waveletId =
ApiIdSerializer.instance().deserialiseWaveletId(waveletData.getWaveletId());
context.putWavelet(waveId, waveletId, newWavelet);
} catch (InvalidIdException e) {
throw new InvalidRequestException("Invalid id", operation, e);
}
context.putBlip(waveletData.getRootBlipId(), rootBlip);
String message = OperationUtil.getOptionalParameter(operation, ParamsProperty.MESSAGE);
WaveletCreatedEvent event =
new WaveletCreatedEvent(null, null, participant.getAddress(), System.currentTimeMillis(),
rootBlip.getId(), message,
ApiIdSerializer.instance().serialiseWaveId(waveletName.waveId),
ApiIdSerializer.instance().serialiseWaveletId(waveletName.waveletId));
context.processEvent(operation, event);
}