@Override
public void execute(
OperationRequest operation, OperationContext context, ParticipantId participant)
throws InvalidRequestException {
OpBasedWavelet wavelet = context.openWavelet(operation, participant);
ObservableConversationView conversationView = context.openConversation(operation, participant);
String waveletId = OperationUtil.getRequiredParameter(operation, ParamsProperty.WAVELET_ID);
String conversationId;
try {
// TODO(anorth): Remove this round-trip when the API instead talks about
// opaque conversation ids, and doesn't use legacy id serialization.
conversationId = WaveletBasedConversation.idFor(
ApiIdSerializer.instance().deserialiseWaveletId(waveletId));
} catch (InvalidIdException e) {
throw new InvalidRequestException("Invalid conversation id", operation, e);
}
ObservableConversation conversation = conversationView.getConversation(conversationId);
OperationType type = OperationUtil.getOperationType(operation);
switch (type) {
case BLIP_CONTINUE_THREAD:
continueThread(operation, context, participant, conversation);