@Override public WaveletBasedConversation getConversation(String conversationId) { return getConversation(WaveletBasedConversation.widFor(conversationId)); }
@Override public WaveletBasedConversation getConversation(String conversationId) { return view.getConversation(conversationId); }
/** * Checks whether a wavelet id and blip id specify a valid anchor. */ private boolean isValidAnchor(WaveletId waveletId, String blipId) { // True if the fields are non-null, the anchoring wavelet is in view, and // the conversation has the blip. boolean isValid = false; if ((waveletId != null) && (blipId != null)) { WaveletBasedConversation conversation = wave.getConversation(waveletId); if (conversation != null) { isValid = (conversation.getBlip(blipId) != null); } } return isValid; }
/** * Builds an anchor if the wave has a specific wavelet and blip, else returns * null. */ private Anchor maybeMakeAnchor(WaveletId waveletId, String blipId) { Anchor anchor = null; if (isValidAnchor(waveletId, blipId)) { WaveletBasedConversation anchorConversation = wave.getConversation(waveletId); ConversationBlip anchorBlip = anchorConversation.getBlip(blipId); anchor = new Anchor(anchorConversation, anchorBlip); } return anchor; }
public void testNonExistentConversationIsNull() { assertNull(waveBasedConversationView.getConversation(WaveletId.of("foo.com", "conv+bar"))); }
public void testNonExistentConversationIsNull() { assertNull(waveBasedConversationView.getConversation(WaveletId.of("foo.com", "conv+bar"))); }