/** * Creates a new wavelet with an optional message. * * @param domain the domain to create the wavelet in. * @param participants the initial participants on this new wavelet. * @param message an optional payload that is returned with the corresponding * event. * @return an instance of {@link Wavelet} that represents the new wavelet. */ public Wavelet createWavelet(String domain, Set<String> participants, String message) { Wavelet newWavelet = newWavelet(domain, participants, this); OperationRequest operation = appendOperation(OperationType.ROBOT_CREATE_WAVELET, newWavelet, Parameter.of(ParamsProperty.WAVELET_DATA, newWavelet.serialize())); // Don't add the message if it's null or empty. if (message != null && !message.isEmpty()) { operation.addParameter(Parameter.of(ParamsProperty.MESSAGE, message)); } return newWavelet; }
"blip1", null, roles, participants, dataDocument, tags, blips, threads, opQueue); WaveletData waveletData = expectedWavelet.serialize(); Wavelet actualWavelet = Wavelet.deserialize(opQueue, blips, threads, waveletData);
"blip1", null, roles, participants, dataDocument, tags, blips, threads, opQueue); WaveletData waveletData = expectedWavelet.serialize(); Wavelet actualWavelet = Wavelet.deserialize(opQueue, blips, threads, waveletData);