if (waveDomain != null) {
ProtocolWaveletDelta.Builder newDelta = ProtocolWaveletDelta.newBuilder(delta);
ParticipantId author = convertParticipantId(delta.getAuthor(), waveDomain);
newDelta.setAuthor(author.getAddress());
for (int i = 0; i < delta.getOperationCount(); i++) {
ProtocolWaveletOperation op = delta.getOperation(i);
ProtocolWaveletOperation.Builder newOp = ProtocolWaveletOperation.newBuilder(op);
if (op.hasAddParticipant()) {
convertAddParticipantOperation(newOp, op, waveDomain);
} else if (op.hasRemoveParticipant()) {
convertRemoveParticipantOperation(newOp, op, waveDomain);
}
// TODO(user) release convert for other operations.
newDelta.setOperation(i, newOp);
}