@Override public void execute(OperationRequest operation, OperationContext context, ParticipantId participant) throws InvalidRequestException { String modifyHow = OperationUtil.getRequiredParameter(operation, ParamsProperty.MODIFY_HOW); String blipId = OperationUtil.getOptionalParameter(operation, ParamsProperty.BLIP_ID); SupplementedWave supplement = buildSupplement(operation, context, participant); if (modifyHow.equals(ModifyHowType.MARK_AS_READ.getValue())) { if (blipId == null || blipId.isEmpty()) { supplement.markAsRead(); } else { ObservableConversation conversation = context.openConversation(operation, participant).getRoot(); ConversationBlip blip = conversation.getBlip(blipId); supplement.markAsRead(blip); } } else if (modifyHow.equals(ModifyHowType.MARK_AS_UNREAD.getValue())) { supplement.markAsUnread(); } else { throw new UnsupportedOperationException("Unsupported folder action: " + modifyHow); } // Construct empty response. Map<ParamsProperty, Object> data = Maps.newHashMap(); context.constructResponse(operation, data); } }