Date date = getConversationDate(conversation);
Transition transition = new Transition(conversation, date, tokenName,
tokenValue, identity);
model.addTransition(transition);
SortedMap<ConversationID, Transition> transitions = model.getTransitions(tokenName, tokenValue);
ConversationID next = null;
Iterator<ConversationID> it = transitions.keySet().iterator();
while (it.hasNext()) {
if (it.next().equals(conversation)) {
if (it.hasNext())
next = it.next();
break;
}
}
ConversationModel cm = framework.getModel().getConversationModel();
int c = cm.getConversationCount();
if (next == null)
next = cm.getConversationAt(c - 1);
for (int i = 0; i < c; i++) {
ConversationID id = cm.getConversationAt(i);
if (id.compareTo(conversation) >= 0) {
// FIXME: When removing the identity, this should only take effect from the NEXT request.
List<NamedValue> tokens = getRequestTokens(cm.getRequest(id));
tokens.addAll(getResponseTokens(cm.getResponse(id)));
for (NamedValue token : tokens) {
if (token.getName().equals(tokenName) && token.getValue().equals(tokenValue)) {