@Override public void addParticipantIds(Set<ParticipantId> participants) { checkIsUsable(); wavelet.addParticipantIds(participants); }
@Override public void addParticipant(ParticipantId participant) { checkIsUsable(); wavelet.addParticipant(participant); }
@Override public Anchor createAnchor(ConversationBlip blip) { checkIsUsable(); return new Anchor(this, blip); }
@Override public void removeParticipant(ParticipantId participant) { checkIsUsable(); wavelet.removeParticipant(participant); }
/** * Destroys this conversation and detaches listeners. The conversation may * still be inspected but may not be mutated and will not generate any further * events. */ void destroy() { checkIsUsable(); wavelet.removeListener(waveletListener); manifest.removeListener(manifestListener); listeners.clear(); anchorListeners.clear(); rootThread.destroy(); isUsable = false; }
@Override public void setAnchor(Anchor newAnchor) { checkIsUsable(); if (newAnchor != null) { Preconditions.checkArgument(newAnchor.getConversation().getClass() == getClass(), "Anchor must not refer to a different conversation class"); Preconditions.checkArgument(newAnchor.getConversation() != this, "Anchor must not refer to a different anchored conversation"); WaveletBasedConversation conv = (WaveletBasedConversation) newAnchor.getConversation(); String blipId = newAnchor.getBlip().getId(); manifest.setAnchor(new AnchorData(idFor(conv.getWaveletId()), blipId)); } else { manifest.setAnchor(new AnchorData(null, null)); } }